:root {
  color-scheme: light;
  --page: #f3f4ee;
  --surface: #fffefa;
  --ink: #1f2924;
  --muted: #53605a;
  --line: #dce1d9;
  --green: #245c49;
  --dark: #182d26;
  --mint: #cbebd1;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.6; }
h1, h2, p, ul { margin: 0; }
button, input, textarea { font: inherit; }
button {
  min-height: 39px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: #a3b4a9; background: #f0f5ee; }
button:disabled { color: #6b756e; background: #f1f3ee; cursor: not-allowed; }
:where(button, input, textarea, summary):focus-visible { outline: 2px solid #25785b; outline-offset: 3px; }
.mast { background: var(--dark); color: #fffefa; }
.mast-inner, .workspace { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
.mast-inner { display: flex; align-items: center; gap: 14px; min-height: 101px; }
.mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  flex: none;
  border-radius: 12px;
  background: var(--mint);
  color: var(--dark);
  font-weight: 800;
  font-size: 27px;
  line-height: 1;
}
h1 { font-size: 27px; line-height: 1.24; letter-spacing: .025em; }
.mast p { margin-top: 4px; color: #c3d5ca; font-size: 13px; }
.workspace { padding-block: 26px 21px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 16px; align-items: start; }
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 2px 5px #182d2608;
}
.editor { padding: 22px 24px; }
.output { padding: 21px 19px; }
fieldset { margin: 0; min-inline-size: 0; padding: 0; border: 0; }
legend, label { display: block; margin: 0 0 8px; padding: 0; font-weight: 700; }
.template-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.template-buttons button { font-size: 13px; padding-inline: 9px; white-space: nowrap; }
.template-buttons button[aria-pressed="true"] { color: #fff; border-color: var(--green); background: var(--green); }
.field { margin-top: 18px; }
.source-guidance {
  --hint-color: #245c49;
  --hint-bg: #edf4ec;
  margin-bottom: 9px;
  border-left: 3px solid var(--hint-color);
  border-radius: 5px 8px 8px 5px;
  padding: 9px 12px;
  background: var(--hint-bg);
  font-size: 13px;
}
.source-guidance p { font-weight: 700; margin-bottom: 3px; }
.source-guidance ul { display: flex; flex-wrap: wrap; gap: 2px 20px; padding-left: 17px; color: #3f4b44; }
.source-guidance li::marker { color: #425e51; }
input, textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
}
input::placeholder, textarea::placeholder { color: #646f69; }
textarea { resize: vertical; min-height: 82px; line-height: 1.55; }
#source { min-height: 144px; }
.field-note { margin-top: 5px; color: var(--muted); font-size: 12px; }
.keyword-row { display: flex; align-items: center; gap: 6px; }
.keyword-row input { flex: 0 1 176px; min-width: 0; padding-block: 7px; }
.keyword-row button { flex: none; font-size: 13px; }
.optional { margin-left: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
h2 { font-size: 15px; }
.deliverables { display: grid; gap: 12px; list-style: none; padding: 0; margin-top: 15px; }
.deliverables li { display: flex; gap: 9px; align-items: baseline; }
.deliverables li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--green);
}
.deliverables strong { display: block; font-size: 13px; }
.deliverables small { display: block; color: var(--muted); font-size: 12px; }
.export { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.export button { width: 100%; margin-bottom: 7px; font-size: 13px; }
.export .primary:not(:disabled) { color: #fff; border-color: var(--green); background: var(--green); font-weight: 700; }
.export .primary:hover:not(:disabled) { background: #194838; }
.action-status { overflow-wrap: anywhere; }
.action-status:empty { margin: 0; }
details { margin-top: 4px; }
summary { cursor: pointer; padding-block: 5px; font-size: 12px; color: #3d594c; }
#preview { margin-top: 5px; font: 12px/1.55 ui-monospace, monospace; }
.draft-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.draft-bar p { margin-top: 0; }
.draft-bar button { border-color: transparent; background: transparent; font-size: 12px; color: var(--muted); flex-shrink: 0; }

@media (max-width: 740px) {
  .mast-inner { min-height: 82px; }
  .mast-inner, .workspace { padding-inline: 15px; }
  .workspace { padding-top: 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .editor, .output { padding: 16px; }
  .source-guidance ul { gap: 1px 18px; }
}
@media (max-width: 375px) {
  .mast-inner, .workspace { padding-inline: 10px; }
  .editor, .output { padding: 13px; }
  .keyword-row button { padding-inline: 8px; }
}
