:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f7;
  color: #0f172a;
}

* { box-sizing: border-box; }
body { margin: 0; background: #eef2f7; }
.shell { max-width: 1180px; margin: 0 auto; padding: 28px; }
.hero, .card, .notice {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
.hero { padding: 34px; margin-bottom: 18px; }
.hero h1 { margin: 4px 0 10px; font-size: clamp(2rem, 4vw, 2.2rem); line-height: 1; }
.hero p { max-width: 780px; color: #475569; font-size: 1.05rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: #0284c7; font-size: .75rem; }
.notice { padding: 18px 22px; margin-bottom: 18px; color: #334155; }
.card { padding: 24px; margin-bottom: 18px; }
.grid-2, .preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
h2 { margin-top: 0; }
h3 { margin-bottom: 12px; }
.muted, .hint { color: #64748b; }
.hint { font-size: .82rem; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.question-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label {display:grid; gap:7px; font-weight: 700; color: #1e293b; }
.form-grid label {display:block}
.form-grid label span {display:inline-block}
.form-grid input, .form-grid textarea {margin-top:10px}
input, textarea, button {
  font: inherit;
  border-radius: 12px;
}
input, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  padding: 12px 14px;
  background: #fff;
}
textarea { resize: vertical; }
.question-card {
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  border-radius: 16px;
  padding: 14px;
}
.question-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.question-top span { color: #64748b; font-size: .82rem; }
.question-text { font-weight: 400; color: #475569; line-height: 1.35; }
.question-card input { max-width: 120px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
button {
  border: 0;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
}
button.secondary { background: #e2e8f0; color: #0f172a; }
button:hover { filter: brightness(1.04); }
.file-drop {
  margin-top: 16px;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  padding: 18px;
  border-radius: 16px;
}
.status { min-height: 1.4em; color: #475569; }
.status.ok { color: #047857; }
.status.error { color: #b91c1c; }
.state-list { display: grid; gap: 12px; }
.state-list div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.state-list dt { font-weight: 800; }
.state-list dd { margin: 0; color: #475569; }
canvas {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #fff;
}
@media (max-width: 820px) {
  .shell { padding: 14px; }
  .grid-2, .preview-grid, .form-grid, .question-grid { grid-template-columns: 1fr; }
}
.mode-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: -4px 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 800;
  font-size: .9rem;
}
button:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: none;
}
