:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #2f2635;
  background: linear-gradient(145deg, #fff1f3 0%, #f1e9ff 100%);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.app { width: min(560px, 100%); margin: 0 auto; padding: 18px; }

.hero {
  padding: 28px 20px;
  border-radius: 0 0 18px 18px;
  color: #fff;
  background: linear-gradient(120deg, #d94868, #7c4dff);
  box-shadow: 0 16px 40px rgba(112, 72, 166, .2);
}

h1, h2, p { margin: 0; }
h1 { font-size: 25px; }
h2 { font-size: 20px; margin-bottom: 16px; }
.hero p { margin-top: 8px; opacity: .86; }

.panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #eadff4;
  border-radius: 8px;
  background: rgba(255,255,255,.88);
}

.hidden { display: none; }
label { display: grid; gap: 8px; margin-bottom: 14px; font-weight: 650; }
input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8cce5;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary { width: 100%; color: #fff; background: #d94868; }
.inline { display: grid; grid-template-columns: 1fr 126px; gap: 8px; align-items: center; margin-bottom: 14px; }
.inline button { color: #fff; background: #7c4dff; }

.activity {
  display: grid;
  gap: 5px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid #eadff4;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.activity.active { border-color: #d94868; box-shadow: 0 0 0 2px rgba(217,72,104,.12); }
.activity strong { font-size: 16px; }
.activity span, .muted { color: #786783; font-size: 14px; }
.result { margin-top: 14px; padding: 12px; border-radius: 8px; background: #faf7fd; word-break: break-all; }
.result a { color: #7c4dff; font-weight: 700; }
.result button { margin-top: 10px; color: #fff; background: #7c4dff; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.segmented button {
  color: #6a5875;
  background: #f5effa;
  border: 1px solid #eadff4;
}
.segmented button.active {
  color: #fff;
  background: #7c4dff;
}

.record {
  display: grid;
  gap: 5px;
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #eadff4;
  border-radius: 8px;
  background: #fff;
}
.record span { color: #786783; font-size: 14px; }
.record a { color: #7c4dff; word-break: break-all; }

.question {
  padding: 14px 0;
  border-bottom: 1px solid #f0e8f6;
}
.question-title { margin-bottom: 10px; font-weight: 700; }
.option { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 500; }
.option input { width: auto; min-height: auto; }
.success { font-size: 18px; line-height: 1.6; color: #d94868; font-weight: 700; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(47, 38, 53, .92);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
#toast.show { opacity: 1; }
