:root {
  color-scheme: light;
  --blue: #0a84ff;
  --blue-dark: #075fc4;
  --green: #1f9d68;
  --orange: #f08a24;
  --red: #d94a38;
  --ink: #202733;
  --muted: #667085;
  --soft: #f5f8fb;
  --panel: #ffffff;
  --line: #dce4ee;
  --shadow: 0 18px 48px rgba(32, 39, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #edf6ff;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(10, 132, 255, 0.11), transparent 34%),
    linear-gradient(240deg, rgba(31, 157, 104, 0.12), transparent 38%),
    #f6fbff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img,
canvas {
  max-width: 100%;
}

.site-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
}

.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 132, 255, 0.22);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  min-height: 36px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(10, 132, 255, 0.1);
  color: var(--blue-dark);
}

.hero {
  min-height: clamp(420px, 62vh, 620px);
  padding: 48px 0 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 28px;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2.1vw, 20px);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--blue-dark);
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.22);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.secondary:hover {
  background: #f8fbff;
  box-shadow: 0 10px 20px rgba(32, 39, 51, 0.08);
}

.button.warn {
  background: var(--red);
}

.visual-board {
  min-height: 360px;
  padding: 22px;
  border: 1px solid rgba(220, 228, 238, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.preview-stack {
  display: grid;
  gap: 14px;
}

.mini-window {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.mini-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-qr {
  width: 92px;
  height: 92px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.mini-qr span {
  border-radius: 2px;
  background: var(--ink);
}

.mini-photo {
  height: 98px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.16), rgba(31, 157, 104, 0.2)),
    linear-gradient(160deg, #eaf3ff 0%, #ffffff 48%, #dff8ec 100%);
}

.mini-photo::before {
  content: "6bx.cn";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: rgba(32, 39, 51, 0.45);
  font-weight: 900;
  transform: rotate(-12deg);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mini-grid span {
  aspect-ratio: 1;
  border-radius: 6px;
  background: linear-gradient(135deg, #dfefff, #e6f7ee);
}

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

.tool-card {
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(32, 39, 51, 0.08);
}

.tool-card:hover {
  border-color: rgba(10, 132, 255, 0.42);
  transform: translateY(-2px);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.tool-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eff7ff;
  color: var(--blue-dark);
  font-weight: 900;
}

.tool-card h2,
.panel h2 {
  margin: 16px 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.tool-card p,
.panel-note {
  margin: 0;
  color: var(--muted);
}

.tool-card .open-link {
  margin-top: 22px;
  color: var(--blue-dark);
  font-weight: 800;
}

.tool-layout {
  padding: 28px 0 36px;
}

.page-heading {
  margin: 20px 0 24px;
}

.page-heading h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(32, 39, 51, 0.08);
}

.controls {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.group-label {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 116px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

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

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.segmented button {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 6px 16px rgba(32, 39, 51, 0.08);
}

.dropzone {
  min-height: 124px;
  padding: 18px;
  display: grid;
  place-items: center;
  border: 1.5px dashed #aab8c8;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  text-align: center;
}

.dropzone strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.preview-panel {
  min-height: 520px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.canvas-wrap {
  min-height: 360px;
  padding: 14px;
  display: grid;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f2f5f8 25%, transparent 25%),
    linear-gradient(-45deg, #f2f5f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f5f8 75%),
    linear-gradient(-45deg, transparent 75%, #f2f5f8 75%),
    #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.canvas-wrap canvas {
  width: auto;
  height: auto;
  max-height: 68vh;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(32, 39, 51, 0.14);
}

.qr-output {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.qr-output canvas,
.qr-output img {
  width: min(100%, 360px);
  height: auto;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(32, 39, 51, 0.14);
}

.thumb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--soft);
  cursor: grab;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-delete {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(217, 74, 56, 0.92);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.thumb.dragging {
  opacity: 0.5;
  border-color: var(--blue);
}

.status {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.footer {
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid rgba(220, 228, 238, 0.8);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100% - 24px, 680px);
    padding-top: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .workspace,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 30px;
  }

  .visual-board {
    min-height: 280px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 20px, 480px);
  }

  .nav-links a {
    white-space: nowrap;
  }

  .button {
    width: 100%;
  }

  .panel {
    padding: 16px;
  }

  .preview-panel {
    min-height: 360px;
  }
}
