:root {
	--bg: #eef3f7;
	--text: #111;
	--muted: #6c727a;
	--cyan: #11d5e8;
	--blue: #1688f5;
	--red: #e51d28;
	--border: #edf0f4;
	--shadow: 0 18px 45px rgba(39, 92, 135, 0.16);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Microsoft YaHei", sans-serif;
}

a {
	color: inherit;
	text-decoration: none;
}

.phone {
	width: min(100%, 430px);
	min-height: 100vh;
	margin: 0 auto;
	background: #fff;
	overflow: hidden;
}

.topbar,
.simple-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 76px;
	padding: 12px 20px 0;
	background: #fff;
}

.topbar h1,
.simple-topbar h1 {
	flex: 1;
	margin: 0;
	font-size: 24px;
	font-weight: 500;
	letter-spacing: 0;
}

.simple-topbar {
	position: sticky;
	top: 0;
	z-index: 5;
	height: 58px;
	padding: 6px 16px 0;
	border-bottom: 1px solid #f0f0f0;
}

.simple-topbar h1 {
	overflow: hidden;
	font-size: 16px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.brand-mark,
.search-icon,
.refresh-icon,
.refresh-button {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	color: #111;
	font-size: 28px;
	line-height: 1;
}

.refresh-button {
	cursor: pointer;
	transition: transform 0.16s ease;
}

.refresh-button:active {
	transform: rotate(35deg) scale(0.94);
}

.page-home {
	background: linear-gradient(180deg, #fff 0%, #f5fbff 100%);
	height: 100dvh;
	overflow: hidden;
}

.app-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 106px 28px 22px;
	text-align: center;
}

.app-icon-card {
	display: grid;
	place-items: center;
	width: 152px;
	height: 152px;
	margin-bottom: 26px;
	border-radius: 38px;
	background: #fff;
	box-shadow: var(--shadow);
}

.app-icon-card img {
	width: 112px;
	height: 112px;
	object-fit: contain;
}

.tutorial-img {
	display: block;
	width: 100%;
	height: auto;
	margin: 14px 0 18px;
	border-radius: 8px;
}

.app-hero h2 {
	margin: 0;
	font-size: 44px;
	font-weight: 800;
	letter-spacing: 0;
}

.version {
	margin: 18px 0 0;
	color: var(--muted);
	font-size: 26px;
}

.tagline {
	margin: 28px 0 0;
	color: #30343a;
	font-size: 25px;
	line-height: 1.45;
}

.download-actions {
	display: grid;
	gap: 18px;
	padding: 20px 30px 24px;
}

.pill-button,
.submit-button {
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 60px;
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font-size: 25px;
	font-weight: 700;
	letter-spacing: 0;
	box-shadow: 0 14px 28px rgba(2, 128, 205, 0.15);
	transition:
		transform 0.16s ease,
		filter 0.16s ease,
		box-shadow 0.16s ease;
}

.pill-button:active,
.submit-button:active {
	transform: translateY(2px) scale(0.985);
	filter: brightness(0.96);
	box-shadow: 0 8px 18px rgba(2, 128, 205, 0.12);
}

.cyan {
	background: var(--cyan);
}

.black {
	background: #000;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.blue,
.submit-button {
	background: var(--blue);
}

.portal-body {
	min-height: 100vh;
	background-color: #f5f5f5;
	background-image: url("assets/manwagu-bg-collage-blur.jpg");
	background-position: center;
	background-repeat: repeat;
	background-size: auto 100%;
	animation: portal-background-scroll 60s linear infinite;
	background-attachment: fixed;
	color: #111;
	font-family: "Helvetica Neue", "Microsoft YaHei", "STHeiti", sans-serif;
	font-size: 16px;
	line-height: 1;
}

@keyframes portal-background-scroll {
	0% {
		background-position: center 0;
	}

	100% {
		background-position: center -1000px;
	}
}

.portal-body button,
.portal-body a {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
	transition:
		opacity 0.3s ease,
		transform 0.3s ease,
		background-color 0.3s ease;
}

.portal-body button:hover,
.portal-body a:hover {
	opacity: 0.8;
	transform: translateY(-2px);
}

.portal-body button:active,
.portal-body a:active {
	opacity: 1;
	transform: translateY(2px);
}

.portal-container {
	position: relative;
	width: 100%;
	padding: 0 1rem;
}

.portal-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	height: 100vh;
	padding-bottom: 110px;
}

.portal-main > .portal-container {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.portal-intro {
	display: flex;
	flex: 0;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	height: 100%;
	margin-bottom: 1rem;
	padding-top: 5rem;
	text-align: center;
}

.portal-logo {
	width: auto;
	height: 6rem;
	margin-bottom: 1rem;
}

.portal-logo img {
	width: auto;
	height: 100%;
}

.portal-intro p {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
}

.portal-links {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	height: 100%;
}

.portal-body .portal-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 245px;
	min-height: 78px;
	margin: 0.5rem 0;
	padding: 1rem 0;
	border-radius: 50px;
	background-color: #87c123;
	color: #fff;
	text-align: center;
}

.portal-link em {
	font-size: 1.5rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
}

.portal-link span {
	margin-top: 2px;
	font-size: 1rem;
	line-height: 1.1;
}

.portal-favorite {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.portal-favorite button {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	background: #342b29;
	color: #fff;
	font-size: 13.3333px;
}

.portal-favorite img,
.portal-app-link img {
	display: inline-flex;
	width: 1em;
	height: 1em;
	margin-left: 5px;
}

.portal-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	margin-top: 1rem;
	padding-bottom: 1rem;
}

.portal-footer .portal-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
}

.portal-body .portal-app-link {
	display: flex;
	align-self: flex-end;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
	padding: 0.5rem 1rem;
	border: 1px solid #342b29;
	border-radius: 0.5rem;
	background: transparent;
	color: #111;
	font-size: 16px;
}

.portal-app-link:hover {
	background-color: rgba(52, 43, 41, 0.05);
}

.portal-app-link:active {
	background-color: inherit;
}

@media screen and (min-width: 1024px) {
	.portal-body {
		background-position: left top;
	}

	.portal-main > .portal-container {
		flex-direction: row;
		align-items: stretch;
		font-size: 1.25rem;
	}

	.portal-intro {
		flex: 1;
		align-items: flex-end;
		justify-content: center;
		padding-top: 0;
	}

	.portal-logo,
	.portal-intro p {
		width: 500px;
	}

	.portal-logo {
		height: auto;
	}

	.portal-logo img {
		width: 100%;
		height: auto;
	}

	.portal-links {
		flex: 1;
		align-items: flex-start;
		justify-content: center;
		height: 100%;
		padding-left: 1em;
	}

	.portal-body .portal-link {
		width: 350px;
	}
}

.page-content {
	background: #f7f8fa;
}

.upload-bg-page {
	position: relative;
	background: #fff;
}

.upload-bg-page::before {
	content: "";
	position: absolute;
	inset: 58px 0 0;
	z-index: 0;
	background-image: url("assets/tutorial-bg.png");
	background-position: top center;
	background-repeat: repeat-y;
	background-size: 100% auto;
	opacity: 0.38;
	filter: blur(3px);
	transform: scale(1.03);
	transform-origin: top center;
	pointer-events: none;
}

.upload-bg-page::after {
	content: "";
	position: absolute;
	inset: 58px 0 0;
	z-index: 0;
	background: rgba(255, 255, 255, 0.22);
	pointer-events: none;
}

.upload-bg-page .simple-topbar,
.upload-bg-page .tutorial {
	position: relative;
	z-index: 1;
}

.tutorial,
.result-card {
	padding: 18px 16px 28px;
}

.upload-bg-page .tutorial {
	margin: 0 12px;
	background: rgba(255, 255, 255, 0.66);
}

.notice-box,
.step-block,
.upload-panel,
.result-card {
	background: #fff;
}

.upload-bg-page .notice-box,
.upload-bg-page .step-block {
	background: transparent;
}

.upload-bg-page .upload-panel {
	background: rgba(255, 255, 255, 0.86);
}

.notice-box,
.step-block,
.upload-panel {
	margin-bottom: 16px;
	padding: 18px 16px;
	border-radius: 8px;
}

.upload-bg-page .notice-box,
.upload-bg-page .step-block {
	padding-right: 14px;
	padding-left: 14px;
	border-radius: 0;
}

.notice-box h2 {
	margin: 0 0 10px;
	color: var(--red);
	font-size: 18px;
	line-height: 1.65;
}

.notice-box p,
.step-block p,
.result-card p {
	margin: 0 0 16px;
	color: #20242a;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.9;
}

.notice-box p:last-child,
.step-block p:last-child,
.result-card p:last-child {
	margin-bottom: 0;
}

.small-red,
.red-text,
.step-block strong,
.result-steps strong {
	color: var(--red);
}

.small-red {
	color: red;
}

.blue-text {
	color: #3154d4 !important;
}

.step-block h3,
.upload-panel h2 {
	margin: 0 0 14px;
	color: var(--red);
	font-size: 17px;
	line-height: 1.7;
}

.example-image,
.guide-image {
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 230px;
	margin: 14px 0 18px;
	border: 2px dashed #d7dee8;
	border-radius: 8px;
	background:
		linear-gradient(
			135deg,
			rgba(22, 136, 245, 0.08),
			rgba(17, 213, 232, 0.08)
		),
		#fbfdff;
	color: #768292;
	font-size: 15px;
	text-align: center;
}

.example-image.tall {
	min-height: 360px;
}

.upload-panel {
	text-align: center;
}

.upload-panel h2 {
	color: #20242a;
}

.upload-dropzone {
	display: grid;
	place-items: center;
	min-height: 150px;
	padding: 18px;
	border: 2px dashed #d8e2ef;
	border-radius: 8px;
	background: #fbfdff;
	color: #596271;
	cursor: pointer;
	transition:
		border-color 0.16s ease,
		background 0.16s ease;
}

.upload-dropzone.drag-over {
	border-color: var(--blue);
	background: #eef7ff;
}

.upload-dropzone.is-full {
	border-color: #d7dce5;
	background: #f3f6fa;
	color: #9aa4b2;
	cursor: not-allowed;
}

.upload-dropzone.is-full .upload-icon {
	color: #9aa4b2;
}

.upload-dropzone input {
	display: none;
}

.upload-icon {
	color: var(--blue);
	font-size: 38px;
}

.upload-dropzone strong {
	margin-top: 8px;
	font-size: 15px;
	font-weight: 500;
}

.upload-dropzone em {
	margin-top: 5px;
	color: #a1a8b3;
	font-size: 13px;
	font-style: normal;
}

.preview-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: 14px 0 16px;
}

.preview-item {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1;
	border-radius: 8px;
	background: #eef2f6;
}

.preview-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.preview-remove {
	position: absolute;
	top: 5px;
	right: 5px;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	transition:
		transform 0.16s ease,
		background 0.16s ease;
}

.preview-remove:active {
	transform: scale(0.9);
	background: rgba(0, 0, 0, 0.9);
}

.submit-button {
	min-height: 46px;
	border-radius: 0;
	font-size: 16px;
}

.result-card {
	min-height: calc(100vh - 58px);
	padding-top: 38px;
	text-align: center;
}

.center-text {
	margin: 34px 0 !important;
}

.result-steps {
	margin: 42px 0 30px;
	text-align: left;
}

.result-steps p {
	text-align: center;
}

.guide-image {
	min-height: 310px;
}

@media (max-width: 360px) {
	.app-hero {
		padding-top: 78px;
	}

	.app-hero h2 {
		font-size: 38px;
	}

	.tagline,
	.pill-button {
		font-size: 21px;
	}

	.download-actions {
		padding-inline: 22px;
	}
}

@media (max-height: 740px) {
	.app-hero {
		padding-top: 72px;
		padding-bottom: 16px;
	}

	.app-icon-card {
		width: 132px;
		height: 132px;
		margin-bottom: 20px;
		border-radius: 34px;
	}

	.app-icon-card img {
		width: 98px;
		height: 98px;
	}

	.version {
		margin-top: 12px;
	}

	.tagline {
		margin-top: 24px;
	}

	.download-actions {
		gap: 14px;
		padding-top: 14px;
		padding-bottom: 16px;
	}

	.pill-button {
		min-height: 54px;
	}
}
