:root {
	color-scheme: light;
	font-family:
		-apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
		sans-serif;
	--wechat: #07c160;
	--wechat-dark: #05a852;
	--ink: #18251f;
	--muted: #6c7b73;
	--surface: rgba(255, 255, 255, 0.94);
	--line: #e3ebe7;
	--soft: #f3f8f5;
	--danger: #d94c4c;
	--shadow: 0 18px 60px rgba(48, 82, 64, 0.12);
}

* {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: #f5fbf7;
}

body {
	min-width: 320px;
	min-height: 100dvh;
	margin: 0;
	color: var(--ink);
	background:
		radial-gradient(circle at 8% 2%, rgba(143, 227, 181, 0.3), transparent 32%),
		linear-gradient(180deg, #f8fcfa 0%, #eff7f3 100%);
	overflow-x: hidden;
}

button,
input,
textarea {
	font: inherit;
}

button {
	-webkit-tap-highlight-color: transparent;
}

.ambient {
	position: fixed;
	z-index: 0;
	width: 240px;
	height: 240px;
	border-radius: 48% 52% 64% 36%;
	filter: blur(2px);
	opacity: 0.5;
	pointer-events: none;
}

.ambient-one {
	top: -110px;
	right: -90px;
	background: rgba(255, 215, 150, 0.42);
	transform: rotate(22deg);
}

.ambient-two {
	bottom: -150px;
	left: -110px;
	background: rgba(146, 220, 255, 0.34);
	transform: rotate(-18deg);
}

.app-shell {
	position: relative;
	z-index: 1;
	width: min(100%, 560px);
	min-height: 100dvh;
	margin: 0 auto;
	padding: max(20px, env(safe-area-inset-top)) 16px
		max(24px, env(safe-area-inset-bottom));
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 5;
	margin: calc(-1 * max(20px, env(safe-area-inset-top))) -16px 18px;
	padding: max(16px, env(safe-area-inset-top)) 20px 12px;
	background: rgba(245, 251, 247, 0.88);
	backdrop-filter: blur(16px);
}

.topbar-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 9px;
	font-size: 13px;
	color: var(--muted);
}

.topbar-title {
	max-width: 72%;
	overflow: hidden;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.progress-track {
	height: 5px;
	border-radius: 999px;
	background: #dfe9e3;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--wechat), #39d883);
	transition: width 220ms ease;
}

.card,
.loading-card {
	border: 1px solid rgba(221, 234, 226, 0.92);
	border-radius: 24px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.loading-card {
	display: grid;
	place-items: center;
	min-height: 300px;
	margin-top: 15vh;
	color: var(--muted);
}

.loading-pet {
	display: grid;
	place-items: center;
	width: 88px;
	height: 76px;
	margin-bottom: -80px;
	border-radius: 48% 52% 44% 56%;
	color: #28764f;
	font-size: 22px;
	background: #dff5e8;
	animation: float 1.8s ease-in-out infinite;
}

.welcome {
	padding: 30px 24px 24px;
}

.hero-pet {
	position: relative;
	display: grid;
	place-items: center;
	width: 112px;
	height: 96px;
	margin: 4px auto 26px;
	border-radius: 48% 52% 44% 56%;
	color: #226a47;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 4px;
	background: linear-gradient(145deg, #dcf8e8, #bcedcf);
	box-shadow: 0 18px 32px rgba(7, 193, 96, 0.16);
	animation: float 2.4s ease-in-out infinite;
}

.hero-pet::before,
.hero-pet::after {
	position: absolute;
	top: -12px;
	z-index: -1;
	width: 48px;
	height: 48px;
	border-radius: 12px 80% 12px 80%;
	background: #c9f1da;
	content: "";
}

.hero-pet::before {
	left: 5px;
	transform: rotate(8deg);
}

.hero-pet::after {
	right: 5px;
	transform: scaleX(-1) rotate(8deg);
}

.eyebrow {
	margin: 0 0 10px;
	color: var(--wechat-dark);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 9px;
	font-size: clamp(29px, 8vw, 40px);
	line-height: 1.16;
	letter-spacing: -0.03em;
}

.subtitle {
	margin-bottom: 22px;
	color: var(--wechat-dark);
	font-size: 16px;
	font-weight: 650;
}

.lead {
	font-size: 16px;
	line-height: 1.8;
}

.meta-row {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 22px 0;
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 11px;
	border-radius: 999px;
	color: #446054;
	font-size: 13px;
	background: var(--soft);
}

.notice-list {
	display: grid;
	gap: 12px;
	margin: 22px 0 28px;
	padding: 0;
	list-style: none;
}

.notice-list li {
	position: relative;
	padding-left: 25px;
	color: #52665c;
	font-size: 14px;
	line-height: 1.65;
}

.notice-list li::before {
	position: absolute;
	top: 0.52em;
	left: 2px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #8edcaf;
	box-shadow: 0 0 0 4px #edf9f2;
	content: "";
}

.question-card {
	padding: 26px 20px 20px;
	animation: card-in 240ms ease both;
}

.section-title {
	margin-bottom: 18px;
	color: var(--wechat-dark);
	font-size: 13px;
	font-weight: 700;
}

.section-intro {
	margin: -5px 0 22px;
	padding: 14px 15px;
	border-radius: 15px;
	color: #486155;
	font-size: 14px;
	line-height: 1.7;
	background: #f1f8f4;
}

.question-number {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	margin-bottom: 12px;
	padding: 3px 9px;
	border-radius: 8px;
	color: #13804a;
	font-size: 13px;
	font-weight: 750;
	background: #e5f8ed;
}

.question-title {
	margin-bottom: 8px;
	font-size: 22px;
	line-height: 1.42;
	letter-spacing: -0.015em;
}

.required {
	margin-left: 4px;
	color: var(--danger);
	font-size: 15px;
	vertical-align: top;
}

.question-help {
	margin-bottom: 18px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.6;
}

.options {
	display: grid;
	gap: 11px;
	margin-top: 22px;
}

.option {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr);
	align-items: start;
	gap: 12px;
	min-height: 52px;
	padding: 14px 15px;
	border: 1px solid var(--line);
	border-radius: 15px;
	cursor: pointer;
	background: #fff;
	-webkit-tap-highlight-color: transparent;
	transition:
		border-color 150ms ease,
		background-color 150ms ease;
}

.option.selected {
	border-color: rgba(7, 193, 96, 0.65);
	background: #effbf4;
}

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

.control {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	margin-top: 1px;
	border: 1.5px solid #b9c7bf;
	border-radius: 50%;
	background: #fff;
}

.multiple .control {
	border-radius: 6px;
}

.selected .control {
	border-color: var(--wechat);
	background: var(--wechat);
}

.selected .control::after {
	width: 5px;
	height: 9px;
	margin-top: -2px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	content: "";
	transform: rotate(45deg);
}

.option-text {
	font-size: 15px;
	line-height: 1.55;
}

.other-input,
.text-answer {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 14px;
	outline: none;
	color: var(--ink);
	background: #fff;
	transition:
		border-color 150ms ease,
		box-shadow 150ms ease;
}

.other-input {
	grid-column: 1 / -1;
	margin-top: 2px;
	padding: 12px 13px;
}

.text-wrap {
	position: relative;
	margin-top: 22px;
}

.text-answer {
	min-height: 168px;
	padding: 16px;
	line-height: 1.65;
	resize: vertical;
}

.other-input:focus,
.text-answer:focus {
	border-color: var(--wechat);
	box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.1);
}

.char-count {
	position: absolute;
	right: 13px;
	bottom: 11px;
	color: #91a099;
	font-size: 12px;
}

.validation-message {
	min-height: 22px;
	margin: 14px 2px 0;
	color: var(--danger);
	font-size: 13px;
}

.actions {
	display: grid;
	grid-template-columns: minmax(92px, 0.36fr) minmax(0, 1fr);
	gap: 12px;
	margin-top: 18px;
	padding-bottom: max(2px, env(safe-area-inset-bottom));
}

.actions.single {
	grid-template-columns: 1fr;
}

.button {
	min-height: 51px;
	border: 0;
	border-radius: 14px;
	cursor: pointer;
	font-size: 16px;
	font-weight: 650;
}

.button:disabled {
	cursor: wait;
	opacity: 0.6;
}

.button-primary {
	color: #fff;
	background: var(--wechat);
	box-shadow: 0 10px 24px rgba(7, 193, 96, 0.22);
}

.button-primary:active {
	background: var(--wechat-dark);
}

.button-secondary {
	color: #52655b;
	background: #eaf1ed;
}

.success {
	padding: 46px 25px 30px;
	text-align: center;
	animation: card-in 300ms ease both;
}

.success-mark {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	margin: 0 auto 23px;
	border-radius: 50%;
	color: #fff;
	font-size: 38px;
	background: var(--wechat);
	box-shadow: 0 16px 32px rgba(7, 193, 96, 0.24);
}

.success h2 {
	margin-bottom: 12px;
	font-size: 27px;
}

.success p {
	color: var(--muted);
	line-height: 1.7;
}

.response-code {
	margin: 24px 0;
	padding: 13px;
	border-radius: 12px;
	color: #365246;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	background: var(--soft);
	word-break: break-all;
}

.error-card {
	padding: 34px 24px;
	text-align: center;
}

.error-card p {
	color: var(--muted);
	line-height: 1.7;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0) rotate(-1deg);
	}
	50% {
		transform: translateY(-7px) rotate(1deg);
	}
}

@keyframes card-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (min-width: 620px) {
	.app-shell {
		padding-top: 34px;
		padding-bottom: 38px;
	}

	.topbar {
		margin-top: -34px;
	}

	.question-card {
		padding: 34px 32px 28px;
	}

	.welcome {
		padding: 38px 34px 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-pet,
	.loading-pet,
	.question-card,
	.success {
		animation: none;
	}

	.progress-fill,
	.option,
	.other-input,
	.text-answer {
		transition: none;
	}
}
