/* ─────────────────────────────────────────────────────────────────────────────
 * QR station homepage — "precision black & white" (Vercel-like) with the
 * 17maopao brand green as the single accent, plus an editorial serif for
 * section headings so the page reads like writing, not a spec sheet.
 * Only loaded on / — other pages keep assets/style.css. No external fonts.
 * ───────────────────────────────────────────────────────────────────────────*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fbfbfc;
  --ink: #111111;
  --ink-2: #3d4148;
  --muted: #6b7280;
  --meta: #8a8f98;
  --line: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.14);
  --dark: #0c0e11;
  --accent: #0a7a1f;
  --accent-bright: #07d228;
  --accent-tint: #eafbe9;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-ring: 0 0 0 1px rgba(17, 17, 17, 0.07);
  --shadow-card: 0 1px 2px rgba(17, 17, 17, 0.04), 0 16px 40px -20px rgba(17, 17, 17, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #085f18; }
a:focus-visible, button:focus-visible, .type:focus-within,
.input:focus-visible, .file-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── header ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.logo-mark { display: block; height: 28px; width: auto; }
.head-nav { display: flex; gap: 22px; font-size: 14px; }
.head-nav a { color: var(--ink-2); text-decoration: none; }
.head-nav a:hover { color: var(--ink); }
.head-note { margin-left: auto; font-size: 13px; color: var(--meta); white-space: nowrap; }

/* ── hero: full-bleed photo with copy on top ────────────────────────────── */
.hero {
  position: relative; color: #ffffff; padding: 104px 0 108px;
  background: #0c0e11 url("/assets/img/hero-cafe-wide.webp") right center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(8, 10, 12, 0.94) 0%,
    rgba(8, 10, 12, 0.90) 34%,
    rgba(8, 10, 12, 0.58) 56%,
    rgba(8, 10, 12, 0.20) 78%,
    rgba(8, 10, 12, 0.06) 100%);
}
.hero .wrap { position: relative; z-index: 1; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: #b8f5c4;
  background: rgba(7, 210, 40, 0.14); border: 1px solid rgba(7, 210, 40, 0.32);
}
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }
.hero h1 { margin: 0 0 18px; max-width: 620px; font-size: clamp(32px, 3.7vw, 46px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; color: #ffffff; }
.hero h1 em { color: var(--accent-bright); font-style: normal; white-space: nowrap; }
.hero .lede { margin: 0 0 12px; max-width: 520px; font-size: 16.5px; line-height: 1.65; color: #d3d8de; }
.byline { margin: 0 0 24px; font-size: 12.5px; letter-spacing: 0.02em; color: #9aa3af; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn-primary, .btn-quiet { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 10px; font-size: 15px; font-weight: 650; text-decoration: none; }
.btn-primary { background: #ffffff; color: #111111; }
.btn-primary:hover { background: #f1f1f1; color: #111111; }
.btn-quiet { background: rgba(255, 255, 255, 0.02); color: #ffffff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.btn-quiet:hover { color: #ffffff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65); }

/* ── tool panel ─────────────────────────────────────────────────────────── */
.panel {
  position: relative; z-index: 2; margin: 40px auto 0;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-ring), var(--shadow-card); overflow: hidden;
}
.types { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.type {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--muted);
  border: 1px solid transparent; cursor: pointer; position: relative;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.type input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.type svg, .type span { pointer-events: none; position: relative; z-index: 1; }
.type:hover { color: var(--ink); background: #f3f4f6; }
.type:has(input:checked) { color: var(--accent); background: var(--accent-tint); border-color: rgba(7, 210, 40, 0.35); }

.workspace { display: grid; grid-template-columns: 1.08fr 0.92fr; }
.col { padding: 28px 30px; }
.form { border-right: 1px solid var(--line); }
.side { background: var(--surface-2); display: flex; flex-direction: column; position: sticky; top: 76px; align-self: start; }

.sec-label { margin: 24px 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--meta); }
.sec-label:first-child { margin-top: 0; }
.field { display: block; margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input {
  display: block; width: 100%; height: 46px; margin-top: 6px; padding: 10px 12px;
  font-family: var(--font); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(7, 210, 40, 0.16); outline: none; }
textarea.input { height: auto; min-height: 92px; resize: vertical; line-height: 1.5; }
select.input { padding-right: 34px; }
input[type="color"].color { padding: 4px; cursor: pointer; height: 46px; }
.row-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.row-three .field { margin: 0; }
.row-security { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.row-security .field { margin: 0; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin: 0; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.chk-block { margin-top: 12px; }
.row.row-security > .chk { height: auto; margin-top: 0; padding-bottom: 15px; }

.file-label { margin: 6px 0 8px; }
.file-drop {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface-2); color: var(--muted); font-size: 13.5px; text-align: center;
  cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.file-drop:hover, .file-drop.drop-hover { border-color: var(--accent); color: var(--ink); background: #f7fdf7; }
.file-drop.has-logo { border-style: solid; }
.logo-preview { height: 36px; max-width: 120px; object-fit: contain; border-radius: 4px; background: #fff; }
.logo-remove { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border: 0; border-radius: 50%; background: #e5e7eb; color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer; }
.logo-remove:hover { background: #d1d5db; }
.hint { margin: 8px 0 0; font-size: 12.5px; color: var(--meta); }
.status { margin-top: 10px; }

.preview-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-ring); }
#canvas { display: flex; justify-content: center; min-height: 336px; padding: 8px; background: #fff; border-radius: 10px; }
#canvas canvas, #canvas img { max-width: 100%; height: auto; }
.preview-note { margin: 0; font-size: 12.5px; color: var(--meta); text-align: center; }

.btn { width: 100%; height: 50px; margin-top: 16px; font-family: var(--font); font-size: 15.5px; font-weight: 700; color: #fff; background: var(--ink); border: 0; border-radius: var(--radius); cursor: pointer; transition: background 0.15s, transform 0.05s; }
.btn:not(:disabled):hover { background: #000; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn:disabled { background: #c9ccd1; cursor: not-allowed; }
.side-facts { margin: 18px 0 0; padding: 16px 18px; width: 100%; background: #fff; border-radius: 14px; box-shadow: var(--shadow-ring); }
.side-facts p { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--meta); }
.side-facts ul { margin: 0; padding: 0; list-style: none; }
.side-facts li { display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 3px 0; }
.side-facts li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.mini-links { margin: 14px 0 0; font-size: 13px; color: var(--meta); }
.mini-links a { color: var(--accent); text-decoration: none; }
.mini-links a:hover { text-decoration: underline; }

/* ── editorial bands: one column, full width ────────────────────────────── */
.band { margin: 80px auto; }
.band h2 { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(26px, 2.8vw, 34px); line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
.band > p { margin: 0 0 18px; font-family: var(--serif); font-size: 19px; line-height: 1.72; color: #2c2f33; }
.band-lede { margin: 0 0 30px !important; font-family: var(--font) !important; font-size: 16.5px !important; line-height: 1.6 !important; color: var(--ink-2) !important; }

.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.place { margin: 0; }
.place img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-ring); }
.place figcaption { margin-top: 12px; font-family: var(--font); font-size: 14px; line-height: 1.62; color: var(--ink-2); }
.place figcaption strong { color: var(--ink); }
.figure-note { margin: 22px 0 0 !important; font-family: var(--font) !important; font-size: 13px !important; line-height: 1.6 !important; color: var(--meta) !important; }

table.data { width: 100%; border-collapse: collapse; margin: 10px 0 26px; font-family: var(--font); font-size: 15px; }
table.data caption { caption-side: top; text-align: left; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--meta); padding-bottom: 10px; }
table.data th, table.data td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
table.data th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
table.data td:first-child { font-variant-numeric: tabular-nums; font-weight: 600; width: 140px; }
table.data td.bad { color: #b42318; }
table.data td.good { color: var(--accent); font-weight: 600; }

.test-figure { margin: 6px 0 26px; }
.test-figure img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow-ring); }
.test-figure figcaption { margin-top: 10px; font-family: var(--font); font-size: 13px; line-height: 1.55; color: var(--meta); }

.limits { margin: 0; padding-left: 22px; list-style: disc; }
.limits li { font-family: var(--serif); font-size: 19px; line-height: 1.72; color: #2c2f33; margin-bottom: 12px; }

.faq { max-width: none; }
.faq h3 { margin: 28px 0 8px; font-family: var(--font); font-size: 17px; font-weight: 700; color: var(--ink); }
.faq p { margin: 0; font-family: var(--serif); font-size: 18.5px; line-height: 1.7; color: #2c2f33; }

.guide-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 22px; }
.guide-card { display: block; padding: 24px 26px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-ring); text-decoration: none; color: inherit; transition: box-shadow 0.15s, transform 0.15s; }
.guide-card:hover { box-shadow: 0 0 0 1px rgba(7, 210, 40, 0.45); transform: translateY(-1px); }
.guide-card h3 { margin: 0 0 10px; font-family: var(--font); font-size: 17px; font-weight: 700; color: var(--ink); }
.guide-card p { margin: 0 0 14px; font-family: var(--font); font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.guide-card span { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--accent); }
.guide-more { margin: 0 !important; font-family: var(--font) !important; font-size: 14.5px !important; line-height: 1.75 !important; color: var(--muted) !important; }
.guide-more a { color: var(--ink-2); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-foot { margin-top: 80px; padding: 26px 0 34px; background: var(--surface-2); border-top: 1px solid var(--line); }
.foot-in p { margin: 4px 0; font-size: 13px; color: var(--muted); }
.foot-in a { color: var(--accent); text-decoration: none; }
.foot-in a:hover { text-decoration: underline; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero { padding: 72px 0 80px; background: #0c0e11; }
  .hero::before { background: linear-gradient(180deg, rgba(8,10,12,.90) 0%, rgba(8,10,12,.78) 60%, rgba(8,10,12,.92) 100%); }
  .guide-cards { grid-template-columns: 1fr; }
  .workspace { grid-template-columns: 1fr; }
  .form { border-right: 0; border-bottom: 1px solid var(--line); }
  .side { position: static; }
  .places { grid-template-columns: 1fr; gap: 32px; }
  .place img { max-width: 560px; }
  .head-nav { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 56px 0 56px; }
  .hero .lede { font-size: 16px; }
  .col { padding: 20px 18px; }
  #canvas { min-height: 0; }
  .row-three { grid-template-columns: 1fr 1fr; }
  .row-three .field:first-child { grid-column: 1 / -1; }
  .band { margin: 48px auto; }
  .band h2 { font-size: 23px; }
  .head-note { display: none; }
}
