:root {
  --bg: #f5f7fb;
  --card: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #16a34a;
  --blue: #2563eb;
  --gold: #f59e0b;
  --red: #dc2626;
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.topbar {
  min-height: 68px;
  padding: 0 32px;
  background: #101827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar a {
  color: #dbeafe;
  text-decoration: none;
}

.container {
  max-width: 1180px;
  margin: 32px auto;
  padding: 0 20px;
}

.install {
  max-width: 980px;
  margin: 40px auto;
  padding: 0 20px;
}

.hero {
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #1d4ed8);
  color: #fff;
  padding: 56px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 42px;
  margin: 0 0 16px;
}

.hero p {
  font-size: 18px;
  max-width: 760px;
  line-height: 1.8;
}

.safe {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.card.mini {
  box-shadow: none;
  margin: 0;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 18px;
  padding: 24px;
}

.empty-state strong {
  font-size: 20px;
}

.narrow {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  color: #111827;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18);
}

.btn.ghost {
  background: #fff;
  color: #111827;
}

.btn.small {
  padding: 8px 14px;
}

.flash {
  padding: 14px 18px;
  border-radius: 16px;
  margin-bottom: 18px;
  font-weight: 700;
}

.flash.success {
  background: #dcfce7;
  color: #166534;
}

.flash.error {
  background: #fee2e2;
  color: #991b1b;
}

.flash.warning {
  background: #fef3c7;
  color: #92400e;
}

.flash a {
  color: inherit;
  font-weight: 900;
}

.license-status {
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.license-status strong {
  font-size: 20px;
}

.ok-box {
  background: #dcfce7;
  color: #166534;
}

.bad-box {
  background: #fee2e2;
  color: #991b1b;
}

.ok { color: var(--green); font-weight: 800; }
.bad { color: var(--red); font-weight: 800; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }

code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
}

textarea { resize: vertical; }

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
}

th { color: #475569; }

.badge {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}

.table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.qr-img {
  width: 180px;
  height: 180px;
  border-radius: 18px;
  border: 10px solid #fff;
  box-shadow: var(--shadow);
  background: #fff;
}

.download-hero {
  text-align: center;
  background: #111827;
  color: #fff;
  border-radius: 28px;
  padding: 42px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.app-logo {
  width: 98px;
  height: 98px;
  object-fit: cover;
  border-radius: 24px;
  background: #fff;
  margin-bottom: 12px;
}

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

.download-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}

.download-card em {
  align-self: flex-start;
  margin-top: 8px;
  font-style: normal;
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  color: #111827;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 900;
}

.download-card.recommended {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 12px 28px rgba(245, 158, 11, .18);
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, .28), transparent 30%),
    linear-gradient(135deg, #0f172a, #14532d);
}

.center {
  text-align: center;
}

.qr-img.big {
  width: 260px;
  height: 260px;
}

.article {
  line-height: 1.9;
  font-size: 17px;
}

.article h1 {
  font-size: 34px;
  margin-top: 0;
}

.code-block {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 18px;
  padding: 18px;
  line-height: 1.7;
  overflow: auto;
}

.table-btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 800;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}

.mode-switch {
  background: linear-gradient(135deg, #111827, #334155) !important;
  color: #fff !important;
}

.wizard-hero,
.onboarding-hero {
  border-radius: 34px;
  padding: 48px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(59, 130, 246, .46), transparent 26%),
    radial-gradient(circle at 86% 8%, rgba(34, 197, 94, .36), transparent 30%),
    linear-gradient(135deg, #0f172a, #172554 55%, #052e16);
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
}

.wizard-hero h1,
.onboarding-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
  margin: 10px 0;
}

.wizard-steps,
.metric-grid,
.quick-actions,
.template-grid,
.app-list,
.completion-actions {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}

.wizard-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-card,
.metric-card,
.app-tile,
.template-card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
  backdrop-filter: blur(14px);
}

.step-card b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  margin-right: 8px;
}

.step-card.active b {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #fff;
}

.metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric-card {
  min-height: 118px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 800;
}

.metric-card strong {
  display: block;
  font-size: 34px;
  margin: 10px 0 4px;
}

.metric-card small {
  color: var(--muted);
}

.quick-actions {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.quick-actions a {
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 18px;
  padding: 16px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.health-list {
  display: grid;
  gap: 12px;
}

.health-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  padding: 14px;
  background: #f8fafc;
}

.status-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-ok {
  color: #166534;
  background: #dcfce7;
}

.status-warn {
  color: #92400e;
  background: #fef3c7;
}

.status-bad {
  color: #991b1b;
  background: #fee2e2;
}

.progress-rail {
  height: 9px;
  min-width: 110px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-rail.big {
  height: 14px;
  margin: 16px 0;
}

.progress-rail span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
}

.build-flow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.flow-step {
  padding: 8px 12px;
  border-radius: 999px;
  color: #64748b;
  background: #e2e8f0;
  font-size: 13px;
  font-weight: 900;
}

.flow-step.done {
  color: #065f46;
  background: #d1fae5;
}

.template-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-preview {
  height: 116px;
  border-radius: 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.input-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 99;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .92);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .24);
  font-weight: 900;
}

.ai-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 50px rgba(37, 99, 235, .32);
  font-weight: 900;
  cursor: pointer;
}

.ai-panel {
  position: fixed;
  right: 22px;
  bottom: 84px;
  width: min(360px, calc(100vw - 32px));
  z-index: 60;
  display: none;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .22);
}

body.ai-open .ai-panel {
  display: block;
}

.ai-msg {
  border-radius: 16px;
  padding: 12px;
  background: #eff6ff;
  color: #1e3a8a;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 900;
  cursor: pointer;
}

.error-card {
  border-color: #fecaca;
  background: #fff1f2;
}

.template-live-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 28px;
  align-items: center;
  border-radius: 32px;
  padding: 46px;
  color: #fff;
  background: var(--tpl-bg);
  box-shadow: 0 32px 90px rgba(15, 23, 42, .28);
  overflow: hidden;
}

.template-live-preview h1 {
  font-size: clamp(36px, 5vw, 72px);
  margin: 18px 0;
}

.template-live-preview p {
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}

.preview-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.preview-phone {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 34px;
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(16px);
}

.preview-logo {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 26px;
  color: #0f172a;
  background: var(--tpl-accent);
  font-weight: 1000;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
}

.preview-qr {
  width: 148px;
  height: 148px;
  margin: 22px auto 10px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0/28px 28px,
    linear-gradient(#111 10px, transparent 10px) 0 0/28px 28px,
    #fff;
  border: 10px solid #fff;
}

.preview-shot {
  min-height: 150px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(37,99,235,.2), rgba(124,58,237,.2)), repeating-linear-gradient(90deg, #e2e8f0 0 18px, #f8fafc 18px 36px);
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding: 16px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .container { margin: 18px auto; }
  .hero { padding: 28px; }
  .hero h1 { font-size: 30px; }
  .grid.three,
  .grid.two,
  .wizard-steps,
  .metric-grid,
  .quick-actions,
  .template-grid,
  .app-list,
  .health-row,
  .form-grid,
  .download-grid { grid-template-columns: 1fr; }
  .split { display: block; }
  .card { padding: 18px; }
  .input-action { grid-template-columns: 1fr; }
  .wizard-hero { padding: 26px; }
  .template-live-preview { grid-template-columns: 1fr; padding: 28px; }
}

/* Official website */
.official-body{background:radial-gradient(circle at top left,rgba(37,99,235,.28),transparent 34rem),radial-gradient(circle at top right,rgba(20,184,166,.18),transparent 34rem),linear-gradient(180deg,#020617 0%,#0f172a 42%,#f8fafc 42%,#f8fafc 100%);color:#0f172a}.official-nav{width:min(1180px,calc(100% - 32px));margin:18px auto 0;min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 16px;border:1px solid rgba(255,255,255,.18);border-radius:24px;background:rgba(15,23,42,.72);backdrop-filter:blur(18px);position:sticky;top:14px;z-index:30;box-shadow:0 24px 80px rgba(0,0,0,.28)}.official-brand{display:inline-flex;align-items:center;gap:10px;color:#fff;font-weight:950;text-decoration:none;letter-spacing:-.03em}.official-brand span{color:#38bdf8;text-shadow:0 0 24px rgba(56,189,248,.9)}.official-nav nav{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center}.official-nav a{color:#cbd5e1;text-decoration:none;font-weight:800;padding:9px 12px;border-radius:999px}.official-nav a.active,.official-nav a:hover{background:rgba(255,255,255,.12);color:#fff}.official-main{width:min(1180px,calc(100% - 32px));margin:34px auto 0}.official-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:26px;align-items:center;color:#fff;padding:64px 0 72px}.official-pill{display:inline-flex;width:fit-content;padding:8px 12px;border-radius:999px;color:#bae6fd;background:rgba(14,165,233,.13);border:1px solid rgba(125,211,252,.28);font-weight:900}.official-hero h1{margin:12px 0 18px;font-size:clamp(42px,6vw,76px);line-height:1.02;letter-spacing:-.07em}.official-hero p{max-width:760px;color:#cbd5e1;font-size:20px;line-height:1.85}.official-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}.official-dashboard-mock{padding:26px;min-height:380px;border-radius:34px;background:linear-gradient(160deg,rgba(255,255,255,.16),rgba(255,255,255,.05));border:1px solid rgba(255,255,255,.18);box-shadow:0 34px 110px rgba(0,0,0,.38);backdrop-filter:blur(20px)}.official-dashboard-mock div{height:180px;border-radius:24px;background:linear-gradient(90deg,rgba(56,189,248,.32),transparent),repeating-linear-gradient(0deg,rgba(255,255,255,.08) 0 1px,transparent 1px 32px),#111827;margin-bottom:18px}.official-dashboard-mock strong{display:block;font-size:26px;color:#fff}.official-dashboard-mock p{font-size:15px;color:#94a3b8}.official-dashboard-mock span{display:inline-flex;margin:8px 6px 0 0;padding:8px 11px;border-radius:999px;color:#dbeafe;background:rgba(37,99,235,.25)}.official-section{margin:28px 0;padding:34px;border:1px solid rgba(15,23,42,.08);border-radius:34px;background:rgba(255,255,255,.88);box-shadow:0 24px 80px rgba(15,23,42,.08)}.official-section h1,.official-section h2{margin:0 0 18px;letter-spacing:-.04em}.official-section h1{font-size:clamp(34px,5vw,58px)}.official-section h2{font-size:clamp(28px,4vw,44px)}.official-lead{color:#475569;font-size:20px;line-height:1.8}.official-grid{display:grid;gap:16px}.official-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.official-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.official-grid.four,.official-grid.icons{grid-template-columns:repeat(4,minmax(0,1fr))}.official-card,.official-screen{position:relative;overflow:hidden;border:1px solid rgba(15,23,42,.08);border-radius:24px;background:linear-gradient(180deg,#fff,#f8fafc);padding:24px;min-height:150px}.official-card.highlighted{border-color:rgba(37,99,235,.35);box-shadow:0 20px 60px rgba(37,99,235,.16)}.official-card h3,.official-screen strong{display:block;margin:0 0 10px;font-size:21px}.official-card p,.official-screen p{color:#64748b;line-height:1.75}.official-card a{color:#2563eb;font-weight:900;text-decoration:none}.official-icon{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:16px;margin-bottom:14px;color:#fff;font-weight:950;background:linear-gradient(135deg,#2563eb,#06b6d4);box-shadow:0 14px 36px rgba(37,99,235,.22)}.official-flow div,.official-flow.mini{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.official-flow span{display:inline-flex;align-items:center;padding:12px 16px;border-radius:999px;background:#0f172a;color:#fff;font-weight:900}.official-flow span:not(:last-child)::after{content:"→";margin-left:14px;color:#38bdf8}.official-money{display:grid;grid-template-columns:.9fr 1.1fr;gap:24px;align-items:center;background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff}.official-money p{color:#dbeafe;line-height:1.9}.official-screen{min-height:190px;background:linear-gradient(180deg,rgba(15,23,42,.05),transparent),repeating-linear-gradient(0deg,rgba(37,99,235,.12) 0 1px,transparent 1px 34px),#fff}.official-footer{width:min(1180px,calc(100% - 32px));margin:36px auto;padding:24px;display:flex;justify-content:space-between;gap:20px;border-radius:28px;background:#0f172a;color:#cbd5e1}.official-footer nav{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end}.official-footer a{color:#e0f2fe;text-decoration:none}@media(max-width:900px){.official-nav,.official-footer{flex-direction:column;align-items:flex-start}.official-hero,.official-money,.official-grid.two,.official-grid.three,.official-grid.four,.official-grid.icons{grid-template-columns:1fr}.official-hero{padding:42px 0}.official-section{padding:24px}}
