:root {
  color-scheme: light;
  --paper: #e7eef0;
  --card: #f7fbfb;
  --ink: #172026;
  --muted: #4d5c64;
  --mark: #b42318;
  --line: #c5d4d8;
  --button: #17343c;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
}
h1, h2, h3, .eyebrow {
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 600;
}
h1 { font-size: clamp(2.3rem, 8vw, 4rem); line-height: 0.95; margin: 0.1rem 0 0.6rem; letter-spacing: -0.03em; }
h2, h3 { margin: 0; }
p { margin: 0.35rem 0; white-space: pre-wrap; }
button, textarea { font: inherit; color: inherit; }
.mast, .banner, main, footer { width: min(1080px, calc(100% - 28px)); margin-inline: auto; }
.mast { padding: 28px 0 8px; }
.eyebrow { margin: 0; color: var(--mark); letter-spacing: 0.14em; font-size: 0.82rem; }
.lede, .idle, footer { color: var(--muted); }
.banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--mark);
  border-radius: 16px;
  padding: 14px 16px;
}
.banner[data-configured="true"] { border-left-color: var(--button); }
main { display: grid; gap: 16px; padding: 16px 0 8px; }
.editor, .output {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
label { display: block; margin-bottom: 8px; }
.remind { margin: 0 0 8px; color: var(--mark); }
textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1.5;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
}
button.primary { background: var(--button); color: #f4fbfb; border-color: var(--button); }
button:disabled { opacity: 0.6; }
.error { min-height: 1.4rem; color: var(--mark); }
.output-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.output section { padding: 10px 0; border-top: 1px solid var(--line); }
.output section p { margin: 6px 0 0; }
.banner.is-sample, .banner.is-processed { margin-bottom: 8px; }
footer { padding-bottom: 32px; font-size: 0.92rem; }
footer a { color: inherit; min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 900px) {
  main { grid-template-columns: 1fr 1fr; align-items: start; }
  .output { position: sticky; top: 12px; }
}
