:root {
  --bg: #07080c;
  --panel: #11131a;
  --ink: #f4f1ea;
  --muted: #9aa0ae;
  --line: #232633;
  --accent: #7c5cff;
  --accent2: #3ee0a0;
  --warn: #ff6b6b;
  --a: #3ee0a0;
  --b: #7c5cff;
  --c: #f5c542;
  --d: #ff8a4c;
  --f: #ff5c7a;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(124,92,255,.28), transparent 60%),
    radial-gradient(700px 400px at 90% 0%, rgba(62,224,160,.12), transparent 55%),
    radial-gradient(600px 500px at 50% 110%, rgba(255,92,122,.08), transparent 50%);
}
a { color: var(--accent2); }
.top {
  max-width: 920px; margin: 0 auto; padding: 20px 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--accent), #3a2a8a); color: white;
}
.brand strong { display: block; font-size: 15px; }
.brand .sub { color: var(--muted); font-size: 12px; }
.chip {
  text-decoration: none; color: var(--ink); font-size: 13px;
  border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.03);
}
main { max-width: 920px; margin: 0 auto; padding: 28px 20px 80px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 12px 0 14px; letter-spacing: -0.03em;
}
.hero em { font-style: normal; color: var(--accent2); }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 58ch; margin: 0 0 28px; }
.panel, .result, .hook {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
}
.panel label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
textarea {
  width: 100%; resize: vertical; min-height: 180px;
  background: #0a0b10; color: var(--ink); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px; font-family: var(--mono); font-size: 13.5px; line-height: 1.45;
}
textarea:focus { outline: 2px solid rgba(124,92,255,.5); border-color: var(--accent); }
.row { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
button {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 12px; padding: 12px 18px;
}
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: linear-gradient(135deg, var(--accent), #5a3fff); color: white; }
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.quota { color: var(--muted); font-size: 13px; }
.error { color: var(--warn); margin: 10px 0 0; font-size: 14px; }
.result { margin-top: 22px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-wrap {
  overflow: auto; border-radius: 14px; background: #0a0b10;
  border: 1px solid var(--line); display: flex; justify-content: center; padding: 12px;
}
#card { width: min(100%, 540px); height: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.raw { margin-top: 14px; color: var(--muted); }
.raw pre {
  background: #0a0b10; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; overflow: auto; color: #c9cdd8; font-size: 12px;
}
.hook { margin-top: 22px; color: var(--muted); font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 20px 40px; }

/* v3: bilingual + landing preview */
:root { --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
.top-right { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.03); }
.lang button { padding: 7px 11px; border-radius: 0; font-size: 12.5px; background: transparent; color: var(--muted); font-weight: 600; }
.lang button.on { background: var(--accent); color: #fff; }
.hero { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: center; margin-bottom: 24px; }
.hero .lede { margin-bottom: 14px; }
.dare { margin: 0; font-weight: 700; color: var(--c); font-size: 1.05rem; }
.preview { margin: 0; text-align: center; }
.preview canvas { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.5); transform: rotate(2deg); border: 1px solid var(--line); }
.preview figcaption { color: var(--muted); font-size: 12px; margin-top: 10px; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .preview { max-width: 240px; margin: 0 auto; }
  .top { flex-wrap: wrap; }
}
