:root {
  color-scheme: light dark;
  --paper: #f8f7f3;
  --ink: #1a1916;
  --muted: #56524c;
  --line: #d9d4ca;
  --surface: #f1efe8;
  --accent: #65396f;
  --field: #fffefa;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    1rem/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 28px;
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
header {
  max-width: 720px;
  padding: 12px 0 24px;
}
h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 10px 0 20px;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin-top: 0;
}
p {
  margin: 8px 0 16px;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.9rem;
}
.lead {
  font-size: 1.15rem;
}
.hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.purpose {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  max-width: 720px;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.example {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin: 0 0 28px;
  padding: 20px;
}
legend {
  font-size: 1.2rem;
  font-weight: 650;
  padding: 0 8px;
}
.field {
  margin: 24px 0;
}
.field-label {
  display: block;
  font-weight: 600;
}
input:not([type="checkbox"]),
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--field);
  font: inherit;
}
textarea {
  resize: vertical;
  min-height: 88px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.9;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 10px 0;
  min-height: 44px;
}
.check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 4px 0 0;
  accent-color: var(--accent);
}
.example-choice {
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  font-weight: 600;
}
.include {
  font-size: 0.95rem;
}
button {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button.secondary {
  background: transparent;
  color: var(--accent);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.preview-panel {
  position: sticky;
  top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
#preview {
  font-size: 0.95rem;
  line-height: 1.6;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 8px;
}
#copy-status {
  min-height: 1.65em;
  color: var(--accent);
}
.clear-area {
  padding: 0 0 24px;
}
footer {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 36px;
  max-width: 760px;
}
.notice {
  padding: 20px;
  border: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .layout > section {
    width: 100%;
  }
  .preview-panel {
    position: static;
  }
  .wrap {
    padding: 24px 16px 48px;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17141a;
    --ink: #f5f0f6;
    --muted: #c4bbc8;
    --line: #514657;
    --surface: #241e29;
    --accent: #d4abe0;
    --field: #1c1721;
  }
  button {
    color: #211727;
  }
}
