:root {
  --page-top: #eef8f1;
  --page-bottom: #e5f4ea;
  --primary-rgb: 24, 184, 121;
  --primary-deep-rgb: 17, 168, 109;
  --primary: rgb(var(--primary-rgb));
  --primary-deep: rgb(var(--primary-deep-rgb));
  --success: #1d7a54;
  --ink-900: #243247;
  --ink-700: #49566b;
  --ink-500: #a1aaba;
  --line: #eceff3;
  --card: #ffffff;
  --radius-card: 22px;
  --radius-input: 9px;
  --danger: #b42318;
}

:root.questionnaire {
  --page-top: #f5f5f5;
  --page-bottom: #ebebeb;
  --primary-rgb: 255, 223, 131;
  --primary-deep-rgb: 255, 203, 62;
  --accent-ink: #865f00;
  --on-primary: #211609;
  --success: var(--accent-ink);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-900);
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button,
label,
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

.form-page {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 0 calc(38px + env(safe-area-inset-bottom));
}

.hero-shell {
  display: flow-root;
  min-height: 184px;
  padding: 42px 24px 26px 28px;
  border-bottom: 1px solid rgba(var(--primary-rgb), 0.12);
}

.hero-copy-block {
  max-width: 680px;
}

.hero-shell h1 {
  margin: 0;
  color: #000000;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-copy {
  margin: 10px 0 0;
  color: #333333;
  font-size: 15px;
  line-height: 1.7;
}

.hero-intro {
  color: #8f6b00;
}

.rating-instructions {
  margin: 8px 0 0;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 1.65;
}

.hero-illustration {
  float: right;
  width: 230px;
  height: auto;
  aspect-ratio: 850 / 700;
  object-fit: contain;
  object-position: right;
  margin: -18px 0 4px 16px;
  opacity: 0.7;
  mix-blend-mode: multiply;
}

.sheet-card {
  padding: 18px 24px 0;
}

.questionnaire-form,
#questionnaire-sections {
  display: grid;
  gap: 16px;
}

.person-card {
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: none;
}

.person-card-head {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.person-card-head h2 {
  margin: 0;
  color: #000000;
  font-size: 21px;
  font-weight: 600;
}

.entrepreneur-name-row {
  padding: 20px 28px 0;
  background: #ffffff;
}

.submission-image .entrepreneur-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}

.submission-date {
  margin: 0;
  color: var(--ink-700);
  font-size: 15px;
}

.entrepreneur-name-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  color: #000000;
  font-size: 15px;
  font-weight: 500;
}

.entrepreneur-name-field span {
  flex: 0 0 auto;
}

.entrepreneur-name-field input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 8px 12px;
  border: 1px solid #dfe5ed;
  border-radius: var(--radius-input);
  background: #ffffff;
  color: var(--ink-900);
  font-size: 15px;
}

.entrepreneur-name-field input::placeholder {
  color: #c3cad4;
}

.person-card-body {
  padding: 22px 28px 36px;
}

.questionnaire-card-body {
  display: grid;
  gap: 20px;
}

.training-direction {
  display: grid;
  gap: 16px;
}

.training-direction + .training-direction {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.training-direction h3 {
  position: relative;
  margin: 0;
  padding-left: 13px;
  color: #000000;
  font-size: 20px;
  line-height: 1.5;
}

.training-direction h3::before {
  content: "";
  position: absolute;
  top: 0.32em;
  left: 0;
  width: 5px;
  height: 0.86em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--primary-deep));
}

.training-goal,
.direction-copy p {
  color: var(--ink-700);
  font-size: 15px;
  line-height: 1.7;
}

.training-goal {
  margin: 10px 0 0;
}

.training-goal strong {
  display: block;
  color: #405f81;
}

.direction-copy {
  display: grid;
  gap: 10px;
}

.direction-copy p {
  margin: 0;
}

.direction-copy .direction-emphasis {
  margin-top: 8px;
}

.direction-copy strong {
  color: #000000;
  font-weight: 700;
}

.direction-questions {
  display: grid;
  gap: 16px;
}

.exercise-table {
  width: 100%;
  table-layout: fixed;
  border: 1px solid var(--line);
  border-spacing: 0;
  border-radius: var(--radius-input);
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.6;
}

.exercise-table caption {
  padding-bottom: 8px;
  color: var(--ink-900);
  font-weight: 400;
  text-align: left;
}

.exercise-table th,
.exercise-table td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.exercise-table th {
  color: var(--ink-900);
}

.exercise-table td {
  border-top: 1px solid var(--line);
}

.exercise-table :is(th, td) + :is(th, td) {
  border-left: 1px solid var(--line);
}

.survey-question {
  position: relative;
  display: grid;
  gap: 15px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.survey-question:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.survey-question-title :is(h3, h4) {
  margin: 0;
  color: #202631;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
}

.survey-question-title p {
  margin: 5px 0 0;
  color: #343e4b;
  font-size: 15px;
  line-height: 1.6;
}

.survey-question-index {
  display: inline-block;
  margin-right: 7px;
  color: var(--primary-deep);
  font-weight: 700;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 500;
}

.field textarea {
  width: 100%;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #dfe5ed;
  border-radius: var(--radius-input);
  background: #ffffff;
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.65;
}

.entrepreneur-name-field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-ink);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.32);
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.choice-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--ink-900);
  font-size: 14px;
  cursor: pointer;
}

.choice-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary-deep);
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.rating-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.rating-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #dfe5ed;
  border-radius: var(--radius-input);
  background: #ffffff;
  color: var(--ink-700);
  font-size: 14px;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.rating-option input:focus-visible + span {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

.rating-option input:checked + span {
  border-color: transparent;
  background: linear-gradient(169deg, var(--primary), var(--primary-deep));
  color: var(--on-primary);
  transform: translateY(-1px);
}

.submit-bar {
  display: flex;
  justify-content: center;
  padding: 18px 28px 4px;
}

.submit-btn {
  width: 100%;
  max-width: 996px;
  height: 51px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: linear-gradient(169deg, var(--primary), var(--primary-deep));
  box-shadow: 0 14px 28px rgba(var(--primary-deep-rgb), 0.2);
  color: var(--on-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:active {
  transform: translateY(1px);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--success);
  font-size: 13px;
  text-align: center;
}

.form-message.is-error {
  color: var(--danger);
}

.submission-image .submit-bar,
.submission-image .form-message {
  display: none;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 4px;
  color: #000000;
  font-size: 15px;
}

.page-footer img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.noscript-message {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--danger);
  text-align: center;
}

.success-body {
  background: linear-gradient(180deg, var(--page-top) 0%, var(--page-bottom) 100%);
}

.success-page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 72px 16px calc(24px + env(safe-area-inset-bottom));
}

.success-card {
  width: min(380px, 100%);
  padding: 40px 20px 34px;
  border: 1px solid rgba(24, 184, 121, 0.12);
  border-radius: var(--radius-card);
  background: #ffffff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(29, 122, 84, 0.08);
}

.success-badge {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(169deg, var(--primary), var(--primary-deep));
  box-shadow: 0 10px 24px rgba(17, 168, 109, 0.22);
  animation: success-badge-pop 560ms ease-out both;
}

.success-badge-ring {
  position: absolute;
  inset: -6px;
  border: 2px solid rgba(24, 184, 121, 0.24);
  border-radius: inherit;
  animation: success-ring-pulse 1.4s ease-out infinite;
}

.success-badge-check {
  position: absolute;
  left: 22px;
  top: 17px;
  width: 14px;
  height: 24px;
  border-right: 4px solid #ffffff;
  border-bottom: 4px solid #ffffff;
  border-bottom-right-radius: 3px;
  transform: rotate(45deg) scale(0.7);
  opacity: 0;
  animation: success-check-draw 420ms 180ms ease-out forwards;
}

.success-card h1 {
  margin: 0;
  color: var(--ink-900);
  font-size: 24px;
}

.success-card > p {
  margin: 8px 0 0;
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.7;
}

.success-meta {
  display: grid;
  gap: 9px;
  margin: 22px 0 0;
  padding: 15px 16px;
  border-radius: 14px;
  background: #f5fbf7;
  text-align: left;
}

.success-meta div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
}

.success-meta dt,
.success-meta dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.success-meta dt {
  color: var(--ink-500);
}

.success-meta dd {
  overflow-wrap: anywhere;
  color: var(--ink-900);
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 20px auto 0;
}

.success-btn {
  width: 100%;
  height: 51px;
  padding: 0 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.success-btn-primary {
  color: #ffffff;
  background: linear-gradient(169deg, var(--primary), var(--primary-deep));
  box-shadow: 0 14px 28px rgba(17, 168, 109, 0.2);
}

.success-btn-continue {
  border: 1px solid rgba(24, 184, 121, 0.3);
  background: rgba(24, 184, 121, 0.08);
  color: var(--success);
}

.success-btn-secondary {
  border: 1px solid #dfe5ed;
  background: #ffffff;
  color: var(--ink-900);
}

.success-tip {
  min-height: 22px;
  color: var(--success) !important;
  font-size: 12px !important;
}

.answer-image-preview {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
}

.answer-image-preview::backdrop {
  background: rgba(23, 31, 46, 0.66);
}

.answer-image-preview-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  color: var(--ink-900);
}

.answer-image-preview-head button {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-900);
  cursor: pointer;
}

.answer-image-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.answer-download-page {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px 16px;
}

.answer-download-page h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.answer-download-page p {
  margin: 0 0 16px;
  color: var(--ink-700);
}

.answer-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.answer-download-actions .success-btn {
  width: auto;
  color: var(--ink-900);
}

.answer-download-actions [hidden] {
  display: none;
}

.answer-download-page img {
  width: 100%;
  height: auto;
}

@keyframes success-badge-pop {
  0% { transform: scale(0.82); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes success-check-draw {
  0% { opacity: 0; transform: rotate(45deg) scale(0.7); }
  100% { opacity: 1; transform: rotate(45deg) scale(1); }
}

@keyframes success-ring-pulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.14); opacity: 0; }
}

@media (max-width: 640px) {
  .hero-shell {
    min-height: 174px;
    padding: 34px 18px 26px;
  }

  .hero-shell h1 {
    font-size: 24px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .hero-illustration {
    width: min(30vw, 144px);
    max-width: calc(100% - 202px);
    margin: -12px 0 4px 10px;
  }

  .sheet-card {
    padding: 14px 12px 0;
  }

  .person-card-head {
    min-height: 54px;
    padding: 0 12px;
  }

  .person-card-head h2 {
    font-size: 19px;
  }

  .entrepreneur-name-row {
    padding: 16px 16px 0;
  }

  .entrepreneur-name-field {
    gap: 6px;
    font-size: 14px;
  }

  .entrepreneur-name-field input {
    height: 44px;
  }

  .person-card-body {
    padding: 19px 18px 30px;
  }

  .questionnaire-card-body {
    gap: 18px;
  }

  .survey-question {
    gap: 13px;
    padding-bottom: 20px;
  }

  .survey-question-title :is(h3, h4) {
    font-size: 16px;
    line-height: 1.65;
  }

  .training-direction h3 {
    font-size: 18px;
  }

  .training-goal,
  .direction-copy p {
    font-size: 14px;
  }

  .field-label {
    font-size: 14px;
  }

  .rating-grid {
    gap: 4px;
  }

  .rating-option span {
    min-height: 36px;
    border-radius: 7px;
    font-size: 13px;
  }

  .submit-bar {
    padding: 14px 12px 4px;
  }

  .success-page {
    padding-top: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
