:root {
  --ink-900: #243247;
  --ink-700: #49566b;
  --ink-500: #a1aaba;
  --line: #eceff3;
  --card: #ffffff;
  --primary: #18b879;
  --primary-deep: #11a86d;
  --success: #1d7a54;
  --radius-lg: 22px;
  --radius-md: 9px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

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

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

.form-page {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 0 48px;
}

.hero-shell {
  border-bottom: 1px solid var(--line);
}

.hero-card {
  padding: 26px 26px 12px 18px;
}

.hero-brand {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  overflow: visible;
  min-height: 140px;
}

.hero-copy-block {
  position: relative;
  z-index: 1;
  max-width: none;
  width: 100%;
  padding-right: 0;
}

.hero-corner-logo {
  position: absolute;
  top: -8px;
  right: 6px;
  width: 34px;
  height: 34px;
  object-fit: contain;
  z-index: 3;
}

.hero-illustration {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 168px;
  height: 168px;
  opacity: 0.5;
  pointer-events: none;
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
}

.hero-illustration-glow {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(95, 255, 132, 0.85) 0%, rgba(95, 255, 132, 0.35) 45%, rgba(95, 255, 132, 0) 75%);
  filter: blur(4px);
}

.hero-illustration-sheet {
  position: absolute;
  left: 62px;
  top: 46px;
  width: 96px;
  height: 118px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(76, 255, 98, 0.95) 0%, rgba(197, 255, 214, 0.92) 76%, rgba(162, 255, 190, 0.9) 100%);
  box-shadow: 0 10px 26px rgba(47, 214, 95, 0.18);
}

.hero-illustration-sheet::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 24px;
  height: 32px;
  border-radius: 0 18px 0 18px;
  background: linear-gradient(180deg, rgba(28, 220, 72, 0.95) 0%, rgba(134, 255, 167, 0.88) 100%);
}

.hero-illustration-sheet span {
  position: absolute;
  left: 18px;
  width: 60px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 10px rgba(47, 214, 95, 0.18);
}

.hero-illustration-sheet span:nth-child(1) { top: 34px; }
.hero-illustration-sheet span:nth-child(2) { top: 54px; }
.hero-illustration-sheet span:nth-child(3) { top: 74px; }

.hero-illustration-base {
  position: absolute;
  left: 74px;
  top: 154px;
  width: 80px;
  height: 30px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, rgba(98, 255, 130, 0.95) 0%, rgba(29, 222, 79, 0.92) 100%);
}

.hero-card h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #000000;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #b68b3a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.hero-date-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: block;
}

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

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

.people-form {
  display: grid;
  gap: 16px;
}

.person-card {
  border: 0;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: none;
  overflow: visible;
}

.person-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 0 0 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.person-card-head strong {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px 0 0;
  font-size: 17px;
  font-weight: 500;
  color: #374151;
}

.person-card-head strong::before {
  content: "";
  width: 5px;
  height: 17px;
  margin-right: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #96cac4 0%, #75b96f 100%);
  flex: 0 0 auto;
}

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

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field-name {
  grid-column: 1 / -1;
}

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

.field-message {
  margin-top: -2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-700);
}

.field-message[data-state="valid"] {
  color: var(--success);
}

.field-message[data-state="idle"],
.field-message[data-state="loading"] {
  color: var(--ink-700);
}

.field-message[data-state="invalid"] {
  color: #c84d4d;
}

.field input,
.field select,
.field textarea,
.readonly-output {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #dfe6eb;
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--ink-900);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.name-picker {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.name-picker input {
  flex: 1 1 auto;
  min-width: 0;
}

.name-picker-trigger {
  display: none;
}

.name-picker-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  padding: 10px;
  border: 1px solid #dfe6eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(36, 50, 71, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.name-tag-option,
.name-tag-empty {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
}

.name-tag-option {
  border: 1px solid #dfe6eb;
  background: #ffffff;
  color: var(--ink-700);
  cursor: pointer;
}

.name-tag-empty {
  display: inline-flex;
  align-items: center;
  color: var(--ink-700);
  background: #f7f9fc;
}

.field textarea {
  height: 100px;
  min-height: 100px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(5, 150, 105, 0.42);
  box-shadow: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #c3cad4;
  font-size: 14px;
  font-weight: 400;
}

.field input[data-state="valid"] {
  border-color: rgba(24, 184, 121, 0.42);
  background: rgba(24, 184, 121, 0.04);
}

.field input[data-state="invalid"] {
  border-color: rgba(200, 77, 77, 0.45);
  background: rgba(200, 77, 77, 0.04);
}

.readonly-output {
  display: flex;
  align-items: center;
  color: var(--ink-700);
  background: #f7f9fc;
}

.is-hidden {
  display: none;
}

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

.submit-btn,
.success-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 996px;
  width: 100%;
  height: 51px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(169deg, var(--primary), #35c98e);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(24,184,121,.22);
}

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

.page-footer-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
}

.page-footer-name {
  line-height: 1;
}

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

.success-card {
  width: min(100%, 328px);
  padding: 38px 20px 18px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 56px rgba(24, 184, 121, 0.12);
  transform: translateY(-56px);
}

.success-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 20px;
}

.success-badge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #21c787 0%, #19b87a 100%);
  box-shadow: 0 16px 28px rgba(24, 184, 121, 0.22);
}

.success-badge-check {
  position: relative;
  width: 28px;
  height: 16px;
  border-left: 5px solid #ffffff;
  border-bottom: 5px solid #ffffff;
  transform: rotate(-45deg) translate(2px, -2px);
  animation: pop-in 0.5s ease;
}

.success-card h1 {
  margin: 0;
  font-size: 24px;
  color: #143454;
}

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

.success-actions {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 268px);
  min-height: 50px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.success-btn-continue {
  border: 1px solid #bfe7d8;
  background: #f3fffa;
  color: var(--primary-deep);
  box-shadow: none;
}

.success-btn-primary {
  border: 0;
  background: linear-gradient(169deg, var(--primary), #35c98e);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(24,184,121,.22);
}

.success-btn-secondary {
  border: 1px solid #dce6e2;
  background: #ffffff;
  color: #0f172a;
}

.success-btn-icon-svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: #ffffff;
}

.poster-stage {
  position: fixed;
  left: -99999px;
  top: 0;
  width: 1080px;
  opacity: 0;
  pointer-events: none;
}

.poster-sheet {
  width: 1080px;
}

.poster-page {
  width: 1080px;
}

.poster-value {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid #dfe6eb;
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--ink-900);
  background: #ffffff;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.poster-textarea {
  min-height: 100px;
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: rotate(-45deg) scale(0.4) translate(2px, -2px);
  }

  100% {
    opacity: 1;
    transform: rotate(-45deg) scale(1) translate(2px, -2px);
  }
}

@media (max-width: 640px) {
  .sheet-card { padding: 14px 12px 0; }
  .person-card-head {
    min-height: 54px;
    padding: 0 0 0 12px;
  }
  .person-card-head strong {
    min-height: 38px;
    padding: 0 16px 0 0;
    font-size: 15px;
  }
  .person-card-head strong::before {
    width: 5px;
    height: 17px;
    margin-right: 6px;
  }
  .card-date-badge {
    margin-right: 12px;
    font-size: 12px;
  }
  .hero-brand {
    gap: 12px;
    min-height: 110px;
  }
  .hero-corner-logo {
    width: 34px;
    height: 34px;
    top: -8px;
    right: 2px;
  }
  .hero-copy-block {
    max-width: none;
    width: 100%;
    padding-right: 0;
  }
  .hero-illustration {
    width: 88px;
    height: 88px;
    right: 8px;
    top: 50%;
    opacity: 0.5;
    transform: translateY(-50%);
  }
  .hero-illustration-sheet {
    left: 38px;
    top: 28px;
    width: 62px;
    height: 78px;
    border-radius: 14px;
  }
  .hero-illustration-sheet::after {
    width: 18px;
    height: 24px;
    border-radius: 0 14px 0 14px;
  }
  .hero-illustration-sheet span {
    left: 12px;
    width: 38px;
    height: 6px;
  }
  .hero-illustration-sheet span:nth-child(1) { top: 22px; }
  .hero-illustration-sheet span:nth-child(2) { top: 36px; }
  .hero-illustration-sheet span:nth-child(3) { top: 50px; }
  .hero-illustration-base {
    left: 48px;
    top: 100px;
    width: 52px;
    height: 20px;
    border-radius: 0 0 14px 14px;
  }
  .field-grid {
    grid-template-columns: 1fr;
    gap: 14px 12px;
  }
  .person-card-body {
    padding: 19px 18px 40px;
  }
  .submit-bar {
    padding: 20px 18px 8px;
  }
  .submit-btn {
    max-width: none;
    width: 100%;
    height: 51px;
  }
  .page-footer {
    padding: 6px 0 14px;
    font-size: 15px;
  }
  .success-card {
    width: min(100%, 320px);
    padding: 34px 18px 18px;
    transform: translateY(-24px);
  }
  .success-btn {
    width: min(100%, 252px);
  }
}
