:root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
	color: #292d2a;
	background: #ffffff;
	font-synthesis: none;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
	margin: 0;
}

body,
button,
input {
	font: inherit;
	letter-spacing: 0;
}

button,
input {
	-webkit-tap-highlight-color: transparent;
}

button {
	cursor: pointer;
}

.app-shell {
	width: 100%;
	max-width: 520px;
	min-height: 100vh;
	margin: 0 auto;
	background: #ffffff;
}

.register-hero {
	position: relative;
	height: clamp(310px, 72vw, 430px);
	overflow: hidden;
}

.register-hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.brand {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: calc(52px + env(safe-area-inset-top));
}

.brand-logo {
	width: 76px;
	height: 76px;
	object-fit: contain;
}

.brand h1 {
	margin: 10px 0 0;
	font-size: 22px;
	font-weight: 650;
}

.register-sheet {
	position: relative;
	z-index: 2;
	margin-top: -14px;
	border-radius: 8px 8px 0 0;
	background: #ffffff;
}

.register-form {
	padding: 28px 30px calc(30px + env(safe-area-inset-bottom));
}

.register-form h2 {
	margin: 0 0 8px;
	text-align: center;
	font-size: 20px;
	font-weight: 600;
}

.field-row {
	display: flex;
	align-items: center;
	height: 58px;
	border-bottom: 1px solid #e2e7e3;
}

.field-row input {
	width: 100%;
	min-width: 0;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 0;
	outline: none;
	background: transparent;
	color: #242825;
	font-size: 16px;
}

.field-row input::placeholder {
	color: #a2a8a3;
}

.field-row input:focus {
	border-bottom-color: #52a363;
}

.code-row input {
	flex: 1 1 0;
	width: auto;
}

.code-button {
	flex: 0 0 112px;
	height: 32px;
	padding: 0 0 0 16px;
	border: 0;
	border-left: 1px solid #c7cdc8;
	background: transparent;
	color: #4e9f60;
	font-size: 15px;
}

.code-button:disabled {
	color: #9da69f;
	cursor: default;
}

.primary-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 50px;
	margin-top: 42px;
	padding: 0 20px;
	border: 0;
	border-radius: 8px;
	background: #55a966;
	color: #ffffff;
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
}

.primary-button:disabled {
	background: #a8c8ae;
	cursor: default;
}

.agreement-row {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 5px;
	margin-top: 20px;
	color: #666d68;
	font-size: 13px;
	line-height: 20px;
}

.agreement-row input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.custom-checkbox {
	position: relative;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin-right: 2px;
	border: 1px solid #a7afa8;
	border-radius: 3px;
	background: #ffffff;
}

.agreement-row input:checked + .custom-checkbox {
	border-color: #52a363;
	background: #52a363;
}

.agreement-row input:checked + .custom-checkbox::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 2px;
	width: 5px;
	height: 9px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.link-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: #4e9f60;
	font-size: inherit;
}

.dialog-backdrop {
	position: fixed;
	z-index: 20;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(22, 29, 24, .54);
}

.dialog-backdrop[hidden] {
	display: none;
}

.dialog {
	display: flex;
	flex-direction: column;
	width: min(100%, 460px);
	max-height: min(76vh, 680px);
	padding: 22px;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 18px 50px rgba(18, 31, 21, .2);
}

.dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.dialog-header h2 {
	margin: 0;
	font-size: 18px;
}

.close-button {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #525a54;
	font-size: 30px;
	line-height: 34px;
}

.agreement-content {
	min-height: 180px;
	margin-top: 16px;
	overflow-y: auto;
	color: #49504b;
	font-size: 14px;
	line-height: 1.75;
}

.agreement-content img,
.agreement-content table {
	max-width: 100%;
}

.dialog-button {
	height: 44px;
	margin-top: 18px;
	border: 0;
	border-radius: 8px;
	background: #55a966;
	color: #ffffff;
	font-size: 16px;
}

.toast {
	position: fixed;
	z-index: 40;
	left: 50%;
	top: 46%;
	max-width: calc(100% - 48px);
	padding: 10px 16px;
	transform: translate(-50%, -50%);
	border-radius: 6px;
	background: rgba(24, 29, 25, .9);
	color: #ffffff;
	font-size: 14px;
	text-align: center;
}

.toast.success {
	background: #397d47;
}

.install-page {
	min-height: 100vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 20px calc(32px + env(safe-area-inset-bottom));
	background: #ffffff;
}

.install-main {
	width: min(100%, 440px);
	text-align: center;
}

.install-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
}

.install-logo {
	width: 112px;
	height: 112px;
	object-fit: contain;
}

.install-main h1 {
	margin: 0;
	font-size: 25px;
	font-weight: 700;
	color: #111111;
}

.install-subtitle {
	margin: 13px 0 0;
	font-size: 17px;
	font-weight: 600;
	color: #147ef5;
}

.install-tabs {
	display: flex;
	gap: 10px;
	margin: 32px 0 16px;
	padding: 4px;
	border-radius: 12px;
	background: #f3f5f7;
}

.install-tab {
	flex: 1;
	height: 42px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #73777c;
	font-size: 15px;
}

.install-tab.is-active {
	background: #147ef5;
	color: #ffffff;
	font-weight: 600;
}

.install-panel {
	padding: 24px 22px 22px;
	border: 1px solid #edf0f2;
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(32, 55, 85, .06);
}

.install-panel[hidden],
.install-guide [hidden] {
	display: none;
}

.platform-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	border-radius: 14px;
	font-size: 28px;
	font-weight: 700;
}

.android-icon {
	background: #e4f7e8;
	color: #2eae52;
}

.ios-icon {
	background: #eef1f5;
	color: #111111;
}

.install-panel h2 {
	margin: 0;
	font-size: 20px;
	color: #1a1c1e;
}

.install-panel p {
	margin: 10px 0 0;
	color: #777d83;
	font-size: 14px;
	line-height: 1.7;
}

.install-action {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	margin-top: 20px;
	border-radius: 24px;
	background: #147ef5;
	box-shadow: 0 7px 14px rgba(20, 126, 245, .2);
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.install-action:active {
	transform: translateY(1px);
}

.install-note {
	font-size: 12px !important;
	color: #a0a5aa !important;
}

.install-guide {
	margin-top: 18px;
	padding: 15px 16px;
	border-radius: 8px;
	background: #ff9848;
	color: #ffffff;
	text-align: left;
}

.install-guide p {
	margin: 0 0 7px;
	font-size: 15px;
}

.install-guide ol {
	margin: 0;
	padding-left: 22px;
	font-size: 14px;
	line-height: 1.9;
	}

.install-footnote {
	margin: 16px 0 0;
	color: #a0a5aa;
	font-size: 12px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (min-width: 700px) {
	.register-page {
		background: #eef3ef;
	}

	.app-shell {
		box-shadow: 0 0 42px rgba(41, 68, 47, .1);
	}
}
