:root {
  --blue: #3cb1e6;
  --blue-dark: #147ca7;
  --ink: #1f3447;
  --text: #34495e;
  --muted: #6b7a89;
  --line: #d7e8f0;
  --soft: #f5fbfe;
  --paper: #ffffff;
  --green: #58b985;
  --orange: #e7a548;
  --purple: #7b8ceb;
  --shadow: 0 18px 48px rgba(23, 50, 77, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(60, 177, 230, 0.12), rgba(255, 255, 255, 0) 320px),
    #f8fbfd;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 36px 18px;
}

.eyebrow {
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
}

.top-actions,
.form-actions,
.result-head,
.score-top {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 10px;
}

.primary-button,
.icon-button,
.form-actions button,
.result-head button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  min-height: 42px;
}

.primary-button {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 22px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(420px, 1fr) 390px;
  gap: 18px;
  padding: 0 36px 36px;
}

.progress-panel,
.form-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.progress-panel {
  padding: 18px;
  position: sticky;
  top: 18px;
  align-self: start;
}

.intro {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.intro strong {
  color: var(--ink);
  font-size: 16px;
}

.intro span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.intro img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 4px;
}

.steps {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  text-align: left;
}

.step span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef6fa;
  color: var(--blue-dark);
  font-weight: 800;
}

.step b {
  font-size: 14px;
}

.step.active {
  border-color: var(--blue);
  background: #f1fbff;
  color: var(--ink);
}

.score-box {
  padding: 14px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid #f1d9a7;
}

.score-top {
  justify-content: space-between;
}

.score-top span {
  color: var(--muted);
  font-size: 13px;
}

.score-top strong {
  color: var(--ink);
  font-size: 28px;
}

.score-bar {
  height: 8px;
  border-radius: 4px;
  background: #f2e5ca;
  overflow: hidden;
  margin: 8px 0 10px;
}

.score-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 0.2s ease;
}

.score-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.form-panel {
  padding: 24px;
  min-height: 680px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.section-head {
  margin-bottom: 22px;
}

.section-head span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.35;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label,
.quick-scenes {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label span,
.field-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(60, 177, 230, 0.16);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue-dark);
}

.form-actions {
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.form-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.submit-box {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(60, 177, 230, 0.35);
  border-radius: 8px;
  background: #f2fbff;
}

.submit-box strong {
  color: var(--ink);
}

.submit-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.submit-box button {
  justify-self: start;
}

.result-panel {
  padding: 18px;
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.result-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.result-head span {
  color: var(--ink);
  font-weight: 800;
}

.result-head button {
  padding: 8px 11px;
  min-height: 36px;
  font-size: 13px;
}

.canvas-preview {
  display: grid;
  gap: 12px;
}

.preview-title {
  padding: 14px;
  border-left: 6px solid var(--blue);
  border-radius: 8px;
  background: var(--soft);
}

.preview-title h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.4;
}

.preview-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.preview-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.preview-block b {
  display: block;
  color: var(--blue-dark);
  font-size: 13px;
  margin-bottom: 6px;
}

.preview-block p {
  margin: 0;
  min-height: 22px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.preview-block.empty p {
  color: #9aa8b4;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  min-width: 210px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(420px, 1fr);
  }

  .result-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px 18px 14px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 0 14px 24px;
  }

  .progress-panel,
  .result-panel {
    position: static;
  }

  .steps {
    grid-template-columns: repeat(5, 1fr);
  }

  .step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 4px;
  }

  .step b {
    font-size: 12px;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .form-panel {
    padding: 18px;
    min-height: auto;
  }

  h1 {
    font-size: 26px;
  }

  .section-head h2 {
    font-size: 21px;
  }
}

@media print {
  body {
    background: white;
  }

  .topbar,
  .progress-panel,
  .form-panel,
  .result-head,
  .toast {
    display: none;
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .result-panel {
    box-shadow: none;
    border: none;
    max-height: none;
    padding: 0;
  }

  .canvas-preview {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .preview-title {
    grid-column: 1 / -1;
  }

  .preview-block {
    min-height: 130px;
  }
}
