:root {
  --bg: #f4f8fb;
  --surface: #ffffff;
  --text: #1d2530;
  --muted: #8b97a7;
  --line: #e8edf4;
  --blue: #23b8ec;
  --green: #24d66c;
  --deep-green: #12b662;
  --danger: #ff5d5d;
  --danger-soft: #fff0f0;
  --warning: #ff8a44;
  --shadow: 0 18px 38px rgba(20, 51, 84, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(57, 206, 242, 0.18), transparent 26%),
    linear-gradient(180deg, #e9f6ff 0%, var(--bg) 220px);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  padding: 0 0 40px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.app-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
}

.hero {
  color: #fff;
  background:
    linear-gradient(180deg, #11cb88 0%, #11cb88 36%, #0fbe79 100%);
  box-shadow: 0 10px 28px rgba(8, 98, 129, 0.18);
}

.hero-banner {
  padding: 30px 22px 30px;
}

.hero-badge {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.hero-date,
.hero-tags {
  margin: 8px 0 0;
  font-size: 14px;
}

.page {
  padding: 0 16px 36px;
}

.stepper {
  margin-top: -8px;
  padding: 28px 18px 24px;
  background: var(--surface);
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
}

.stepper-row,
.stepper-labels {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(18px, 1fr) minmax(72px, 1fr) minmax(18px, 1fr) minmax(72px, 1fr);
  align-items: center;
}

.stepper-step {
  display: flex;
  justify-content: center;
}

.stepper-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #adb7c3;
  background: #f5f7fb;
  font-weight: 700;
}

.stepper-node.is-active,
.stepper-node.is-done {
  color: #fff;
  background: linear-gradient(180deg, #34c6f0 0%, #22aae5 100%);
}

.stepper-line {
  height: 2px;
  background: #dadfe6;
  width: 100%;
}

.stepper-line.is-done {
  background: linear-gradient(90deg, #34c6f0 0%, #22aae5 100%);
}

.stepper-labels {
  margin-top: 14px;
  font-size: 15px;
  color: #111;
}

.stepper-labels span {
  text-align: center;
  color: #111;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
}

.stepper-labels span:nth-child(1) { grid-column: 1; }
.stepper-labels span:nth-child(2) { grid-column: 3; }
.stepper-labels span:nth-child(3) { grid-column: 5; }

.stepper-labels span.is-active {
  color: #1fb7e8;
}

.card {
  margin-top: 16px;
  padding: 18px 16px 24px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.action-pill {
  width: 100%;
  margin: 18px 0 20px;
  padding: 18px 20px;
  border-radius: 999px;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(180deg, #3ce85f 0%, #1fd34d 100%);
  box-shadow: 0 12px 26px rgba(28, 200, 83, 0.28);
}

.form.hidden {
  display: none;
}

.field {
  display: flex;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
}

.field.is-disabled input {
  color: #9ba6b6;
}

.field-label {
  flex: 0 0 88px;
  font-size: 16px;
  color: #2c333c;
}

.field-label.required::before {
  content: "*";
  color: #df5e5e;
  margin-right: 4px;
}

.field input,
.field select {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
}

.field input::placeholder {
  color: #b2bac5;
}

.field-inline {
  gap: 12px;
}

.field-inline input {
  flex: 1;
  min-width: 0;
}

.link-btn {
  flex: 0 0 auto;
  padding-left: 16px;
  color: #333;
  border-left: 1px solid var(--line);
}

.agreement {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 26px;
  color: #4b5562;
}

.agreement input {
  width: 22px;
  height: 22px;
}

.primary-btn,
.secondary-btn {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(180deg, #2bc5ef 0%, #1ea9e7 100%);
  box-shadow: 0 10px 18px rgba(34, 183, 235, 0.26);
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.secondary-btn {
  background: linear-gradient(180deg, #36d8aa 0%, #21b98a 100%);
  box-shadow: 0 10px 18px rgba(43, 198, 142, 0.24);
}

.tip-link {
  margin: 52px 0 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 10px;
  font-size: 16px;
}

.mock-tip,
.field-tip {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 14px;
  color: #6d7784;
}

.notice {
  margin: -2px -16px 8px;
  padding: 18px 20px;
  background: #fff8fb;
  color: #353b43;
  font-size: 15px;
  line-height: 1.7;
}

.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.select-row select {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fbfe;
}

.survey-header {
  margin: -18px -16px 12px;
  padding: 18px 16px 16px;
  background: #fafafa;
  border-radius: 24px 24px 0 0;
}

.survey-header h2,
.entry-notes h3 {
  margin: 0;
  font-size: 18px;
}

.survey-header p {
  margin: 6px 0 0;
  color: #555;
}

.question-block {
  padding: 18px 0 8px;
}

.question-title {
  margin: 0 0 16px;
  color: #df5e44;
  font-size: 18px;
  font-weight: 700;
}

.question-hint {
  color: #ff7a2f;
  margin-left: 4px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-top: 1px solid var(--line);
}

.option-row input {
  width: 22px;
  height: 22px;
}

.survey-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.success-view {
  padding-top: 26px;
}

.success-message {
  margin: 4px 0 20px;
  font-size: 18px;
  line-height: 1.7;
}

.identity-block {
  text-align: center;
}

.identity-block h2 {
  margin: 0;
  font-size: 28px;
}

.identity-block p {
  margin: 6px 0 0;
  color: #7e8894;
  font-size: 18px;
}

.qr-card {
  margin-top: 18px;
  padding: 18px 16px 20px;
  border-radius: 20px;
  background: #fbfbfb;
  box-shadow: inset 0 0 0 1px #f0f0f0;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.qr-card.is-danger {
  background: linear-gradient(180deg, #fff8f8 0%, #fffdfd 100%);
  box-shadow: inset 0 0 0 2px rgba(226, 78, 78, 0.28);
}

.qr-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6px 0 14px;
}

#qr-image {
  width: 256px;
  height: 256px;
  background: #fff;
  border: 12px solid #fff;
  box-shadow: 0 0 0 1px #ececec;
  object-fit: contain;
}

#qr-loading {
  margin: 10px 0;
  font-size: 14px;
}

.entry-code-strip {
  margin-bottom: 12px;
  padding: 12px 18px;
  text-align: center;
  font-size: 16px;
  color: #fff;
  border-radius: 4px;
  background-color: #217fec;
}

.entry-code-strip.is-danger {
  background-color: #e24e4e;
}

.meta-row {
  margin: 10px 0 0;
  text-align: center;
  font-size: 16px;
}

.divider-title {
  margin: 26px 0 18px;
  text-align: center;
  color: #a2a7b1;
}

.invite-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #37414d;
}

.icon-bubble {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.icon-bubble.green  { background: #39c658; }
.icon-bubble.lime   { background: #78cf2f; }
.icon-bubble.orange { background: #f59d17; }
.icon-bubble.sky    { background: #3da8f5; }

.shortcut-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.shortcut {
  min-height: 58px;
  border-radius: 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.shortcut.orange { background: linear-gradient(90deg, #f78d33, #f79f52); }
.shortcut.green  { background: linear-gradient(90deg, #54d0a8, #61d585); }
.shortcut.blue   { background: linear-gradient(90deg, #2ea9ef, #2297e8); }
.shortcut.banner {
  background:
    radial-gradient(circle at 20% 25%, #ffe66d 0, #ffe66d 3%, transparent 4%),
    radial-gradient(circle at 76% 42%, #fff 0, #fff 2.5%, transparent 3.5%),
    linear-gradient(90deg, #0f83f6 0%, #1f9df7 55%, #0977ed 100%);
}

.expo-info,
.entry-notes {
  margin-top: 26px;
  line-height: 1.8;
  font-size: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  min-width: 160px;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(16, 27, 39, 0.9);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

@media (max-width: 380px) {
  .page {
    padding: 0 12px 30px;
  }

  .field-label {
    flex-basis: 78px;
  }

  .invite-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stepper-row,
  .stepper-labels {
    grid-template-columns: minmax(64px, 1fr) minmax(12px, 1fr) minmax(64px, 1fr) minmax(12px, 1fr) minmax(64px, 1fr);
  }

  .stepper-labels span {
    font-size: 13px;
  }

  #qr-image {
    width: 220px;
    height: 220px;
  }
}
