:root {
  --bg: #f4f6fb;
  --text: #12141a;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #e6e9f0;
  --chip: #eef1f6;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --shadow: 0 10px 30px rgba(18, 20, 26, 0.06);
  --radius: 16px;
  --shell: 1120px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.offscreen { position: absolute; left: -9999px; top: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
}

.top {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #12141a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.top nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.top nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
}
.top nav a:hover {
  color: var(--text);
  background: var(--chip);
}

.page {
  flex: 1;
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
  padding: 48px 48px 44px;
  background:
    radial-gradient(1200px 280px at 10% -20%, rgba(37,99,235,.18), transparent 50%),
    linear-gradient(180deg, #16181f 0%, #0f1116 100%);
  color: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.hero p {
  margin: 14px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 16px;
  max-width: 460px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.hero-side {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 20px 22px;
}
.hero-side li {
  list-style: none;
  margin: 0 0 12px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
}
.hero-side ul { margin: 0; padding: 0; }
.hero-side li:last-child { margin: 0; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 36px 0 16px;
}
.section-title h2 { margin: 0; font-size: 22px; }
.section-title span { color: var(--muted); font-size: 13px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tool-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: left;
  width: 100%;
  color: inherit;
  font: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: #dbe4ff;
}
.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.tool-name { margin-top: 14px; font-size: 18px; font-weight: 650; }
.tool-desc { margin-top: 6px; font-size: 13px; color: var(--muted); }

.crumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.crumb a:hover { color: var(--accent); }

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}
.panel, .stage, .doc {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.panel { padding: 24px; }
.stage { padding: 24px; min-height: 420px; }
.doc {
  padding: 32px 40px 40px;
  max-width: 760px;
}
.doc h2, .panel h2 { margin: 0; font-size: 24px; }
.desc { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.label { margin: 18px 0 8px; font-size: 13px; color: #4b5563; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid transparent;
  background: var(--chip);
  border-radius: 8px;
  padding: 7px 12px;
  font: inherit;
  cursor: pointer;
}
.chip:hover { border-color: #d1d5db; }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: #c7d7fe; }
.row { display: flex; align-items: center; gap: 8px; }
.row input[type="number"] { width: 120px; }

input[type="text"], input[type="number"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
input[type="range"] { width: 100%; }
textarea { min-height: 120px; resize: vertical; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.btn, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  font: 600 14px inherit;
  text-align: center;
  cursor: pointer;
}
.btn { background: var(--accent); color: #fff; }
.btn:hover { background: #1d4ed8; }
.btn:disabled { opacity: .45; }
.btn-ghost { background: var(--chip); color: var(--text); }
.btn-ghost:hover { background: #e4e8ef; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.empty {
  height: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fafbfe;
}
.previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.item img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  background: #f7f8fb;
}
.meta { margin: 10px 0; font-size: 12px; color: var(--muted); }
.cells { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.cells img { width: 100%; border-radius: 6px; max-height: none; }
.video {
  width: 100%;
  border-radius: 12px;
  background: #111;
  max-height: 420px;
}
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.qr-out {
  width: 280px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.article p { color: #3a3f4a; }
.article h3 { margin: 24px 0 8px; font-size: 16px; }

.foot {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 18px 0;
  font-size: 13px;
}
.foot-inner {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
}
.foot a:hover { color: var(--accent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: rgba(18,20,26,.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 50;
  max-width: 80%;
}

@media (max-width: 960px) {
  .hero, .workspace { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 32px; }
  .page { width: min(var(--shell), calc(100% - 32px)); }
  .shell { width: min(var(--shell), calc(100% - 32px)); }
  .top nav a:nth-child(2),
  .top nav a:nth-child(3),
  .top nav a:nth-child(4) { display: none; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .hero-actions, .actions, .foot-inner { flex-direction: column; align-items: stretch; }
  .btn, .btn-ghost { width: 100%; }
}
