:root {
  --bg: #0e1116; --panel: #161b23; --line: #2a3240; --text: #e6ebf2;
  --muted: #8b96a5; --accent: #756de0; --ok: #3fbf7f; --err: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
header { text-align: center; padding: 28px 16px 8px; }
h1 { margin: 0; font-size: 26px; letter-spacing: 2px; }
.sub { color: var(--muted); margin: 8px 0 0; font-size: 14px; }
main { flex: 1; display: grid; grid-template-columns: 380px 1fr; gap: 18px;
       padding: 18px; max-width: 1200px; margin: 0 auto; width: 100%; }
@media (max-width: 860px) { main { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line);
         border-radius: 14px; padding: 18px; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 26px 14px;
        text-align: center; cursor: pointer; transition: border-color .15s; }
.drop.over { border-color: var(--accent); }
.drop p { margin: 0; color: var(--muted); }
.drop small { color: var(--muted); opacity: .7; }
.thumb { max-width: 100%; max-height: 200px; border-radius: 8px; margin-top: 8px; }
label.row { display: flex; justify-content: space-between; color: var(--muted);
            font-size: 13px; margin: 14px 0 6px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.row2 { display: flex; gap: 12px; }
.half { flex: 1; color: var(--muted); font-size: 13px; display: flex;
        flex-direction: column; gap: 6px; }
input[type=number], select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; width: 100%; font-size: 14px;
}
.adv { margin-top: 12px; color: var(--muted); font-size: 13px; }
.adv summary { cursor: pointer; }
.adv input { margin-top: 6px; }
.go { width: 100%; margin-top: 18px; padding: 13px; font-size: 16px; border: none;
      border-radius: 10px; background: var(--accent); color: white; cursor: pointer; }
.go:disabled { opacity: .4; cursor: not-allowed; }
.msg { color: var(--muted); font-size: 13px; min-height: 18px; margin: 10px 0 0; text-align: center; }

/* ── 预览区（v2 参考图风格：上黑蓝→下蓝紫纵向渐变，无地面无阴影）── */
.viewer { position: relative; height: 520px; border-radius: 10px;
          background: linear-gradient(180deg, #090910 0%, #393765 50%, #756de0 100%);
          display: flex; align-items: center; justify-content: center;
          overflow: hidden; }
.viewer .placeholder { color: rgba(230, 235, 242, .75); font-size: 14px; }

.actions { display: flex; gap: 10px; margin-top: 14px; }
.ghost { flex: 1; padding: 10px; background: transparent; color: var(--text);
         border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
         font-size: 14px; }
.ghost:disabled { opacity: .4; cursor: not-allowed; }
.ghost:hover:not(:disabled) { border-color: var(--accent); }
.ghost.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── 示例区 ── */
.examples-wrap { margin-top: 16px; }
.examples-title { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.examples { display: flex; gap: 12px; }
.example-card {
  flex: 1; max-width: 160px; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.example-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.example-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.example-card span { color: var(--muted); font-size: 12px; padding: 7px 10px;
                     text-align: left; }
@media (max-width: 560px) { .examples { flex-wrap: wrap; } .example-card { min-width: 40%; } }

.gate { position: fixed; inset: 0; background: rgba(10, 12, 16, .92);
        display: flex; align-items: center; justify-content: center; z-index: 10; }
.gate-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
            padding: 28px; width: 320px; text-align: center; }
.gate-box h2 { margin: 0 0 14px; font-size: 18px; }
.gate-box input { width: 100%; padding: 10px 12px; border-radius: 8px;
                  border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.gate-box button { width: 100%; margin-top: 12px; padding: 10px; border: none;
                   border-radius: 8px; background: var(--accent); color: white; cursor: pointer; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 14px; }
.hidden { display: none !important; }
