: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: center;
	justify-content: center;
	padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
	background: #f4f7f4;
}

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

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

.install-main h1 {
	margin: 20px 0 0;
	font-size: 28px;
	font-weight: 700;
}

.install-main p {
	margin: 12px 0 0;
	color: #6f7771;
	font-size: 15px;
}

.install-button {
	margin-top: 32px;
}

.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);
	}
}
