@charset "utf-8";

html {
	-ms-touch-action: manipulation;
	height: 100%;
	overflow: hidden;
}

* {
	box-sizing: border-box;
}

body,
div,
p {
	margin: 0;
	padding: 0;
}

ul {
	list-style: none;
}

body {
	width: 100%;
	height: 100%;
	font: 16px/1.5 "Microsoft YaHei", Helvetica, STHeiti STXihei, Microsoft JhengHei, Arial;
	background: #fff;
	overflow: hidden;
	color: #fff;
}

body.is-loading .fullpage,
body.is-loading .scroll-tip,
body.is-loading .bgm-btn,
body.is-loading .ai-tip {
	visibility: hidden;
}

/* ========== Loading 页面 ========== */
.loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EBE4D4;
	transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading.loading-out {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.loading-inner {
	width: 70%;
	max-width: 5rem;
	text-align: center;
}

.loading-title {
	margin: 0 0 0.48rem;
	font-size: 0.36rem;
	color: rgba(80, 70, 55, 0.85);
	letter-spacing: 0.16rem;
}

.loading-bar {
	width: 100%;
	height: 0.06rem;
	border-radius: 0.03rem;
	background: rgba(80, 70, 55, 0.15);
	overflow: hidden;
}

.loading-bar-fill {
	width: 0;
	height: 100%;
	border-radius: 0.03rem;
	background: linear-gradient(90deg, #c4b89a, #8a7d62);
	transition: width 0.25s ease;
}

.loading-percent {
	margin: 0.24rem 0 0;
	font-size: 0.24rem;
	color: rgba(80, 70, 55, 0.55);
	letter-spacing: 0.04rem;
}

/* ========== 整屏滑动 ========== */
.fullpage {
	width: 100vw;
	height: 100vh;
	overflow-x: hidden;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.fullpage::-webkit-scrollbar {
	display: none;
}

.page {
	width: 100vw;
	height: 100vh;
	min-height: 100vh;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.page-inner {
	width: 100%;
	text-align: center;
	position: relative;
	z-index: 2;
}

/* 各屏背景 */
.page-1 {
	background: #EBE4D4;
}

.page-2 {
	background: #D2D2D0;
}

.page-3 {
	background:url(../images/p2.jpg) no-repeat center center;
	background-size: 100% auto;
}

.page-5 {
	background:#F4F4ED;
}



/* ========== 元素动画 ========== */
.anim {
	opacity: 0;
	transition: opacity 0.8s ease, transform 0.8s ease;
	will-change: opacity, transform;
}

.anim.fade-up {
	transform: translateY(0.6rem);
}

.anim.fade-down {
	transform: translateY(-0.6rem);
}

.anim.fade-left {
	transform: translateX(0.6rem);
}

.anim.fade-right {
	transform: translateX(-0.6rem);
}

.anim.fade-in {
	transform: none;
}

.anim.scale-in {
	transform: scale(0.5);
}

.anim.anim-play {
	opacity: 1;
	transform: translate(0, 0) scale(1);
}

/* ========== 献花特效（缅怀） ========== */
.flower-trigger {
	cursor: pointer;
	z-index: 5;
	-webkit-tap-highlight-color: transparent;
	transition: filter 0.8s ease, opacity 0.8s ease;
}

.flower-trigger.flower-clicked {
	filter: brightness(1.06);
	opacity: 0.92;
}

.flower-layer {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 350;
	overflow: hidden;
}

.flower-veil {
	position: fixed;
	inset: 0;
	background: radial-gradient(ellipse at center 65%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 250, 240, 0.06) 45%, transparent 75%);
	animation: veilFade 2.8s ease-out forwards;
}

.flower-petal {
	position: fixed;
	opacity: 0;
	animation: petalMemorialFly var(--duration) ease-in-out var(--delay) forwards;
}

.flower-petal-white {
	border-radius: 50% 50% 50% 0;
	box-shadow: 0 0 0.06rem rgba(255, 255, 255, 0.6);
}

.flower-petal-char {
	border-radius: 0;
	background: none;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	opacity: 0.85;
}

.flower-chrys {
	position: fixed;
	margin-left: -0.25rem;
	margin-top: -0.25rem;
	opacity: 0;
	animation: chrysMemorialFly var(--duration) ease-in-out var(--delay) forwards;
}

.flower-chrys-petal {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 18%;
	height: 42%;
	margin-left: -9%;
	margin-top: -42%;
	border-radius: 50% 50% 20% 20%;
	background: linear-gradient(to top, #f0ead6, #ffffff);
	box-shadow: 0 0 0.04rem rgba(255, 255, 255, 0.5);
	transform-origin: 50% 100%;
}

.flower-chrys-core {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 22%;
	height: 22%;
	margin-left: -11%;
	margin-top: -11%;
	border-radius: 50%;
	background: #e8dcc0;
}

.flower-glow {
	position: fixed;
	width: 1rem;
	height: 1rem;
	margin-left: -0.5rem;
	margin-top: -0.5rem;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(240, 230, 210, 0.2) 45%, transparent 70%);
	animation: flowerGlow 2.2s ease-out forwards;
}

.flower-toast {
	position: fixed;
	left: 50%;
	top: 42%;
	transform: translate(-50%, -50%);
	padding: 0.18rem 0.56rem;
	font-size: 0.32rem;
	color: rgba(255, 255, 255, 0.95);
	background: rgba(60, 55, 50, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 0.06rem;
	opacity: 0;
	transition: opacity 1s ease, transform 1s ease;
	letter-spacing: 0.12rem;
	white-space: nowrap;
	font-weight: normal;
	box-sizing: border-box;
}

.flower-toast.show {
	opacity: 1;
	transform: translate(-50%, -50%);
}

.flower-save-mask {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(0, 0, 0, 0.72);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.flower-save-mask.show {
	opacity: 1;
}

.flower-save-close {
	position: absolute;
	top: 0.36rem;
	right: 0.36rem;
	z-index: 1;
	width: 0.64rem;
	height: 0.64rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.flower-save-close::before,
.flower-save-close::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0.28rem;
	height: 0.03rem;
	margin-left: -0.14rem;
	margin-top: -0.015rem;
	background: #fff;
	border-radius: 0.02rem;
}

.flower-save-close::before {
	transform: rotate(45deg);
}

.flower-save-close::after {
	transform: rotate(-45deg);
}

.flower-save-box {
	width: 72%;
	max-width: 5.4rem;
	text-align: center;
}

.flower-save-img {
	display: block;
	width: 100%;
	border-radius: 0.08rem;
	box-shadow: 0 0.08rem 0.4rem rgba(0, 0, 0, 0.25);
	-webkit-touch-callout: default;
	user-select: none;
	-webkit-user-select: none;
}

.flower-save-img-download {
	cursor: pointer;
}

.flower-save-tip {
	margin-top: 0.28rem;
	font-size: 0.28rem;
	color: rgba(255, 255, 255, 0.85);
	letter-spacing: 0.04rem;
}

@keyframes petalMemorialFly {
	0% {
		opacity: 0;
		transform: translate(0, 0.2rem) rotate(0deg) scale(0.6);
	}
	20% {
		opacity: 0.85;
	}
	55% {
		transform: translate(calc(var(--drift-x) * 0.6), calc(-1 * var(--rise) * 0.55)) rotate(calc(var(--rotate) * 0.5)) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(var(--drift-x), calc(-1 * var(--rise))) rotate(var(--rotate)) scale(0.95);
	}
}

@keyframes chrysMemorialFly {
	0% {
		opacity: 0;
		transform: translate(0, 0.3rem) scale(0.4);
	}
	25% {
		opacity: 0.9;
	}
	100% {
		opacity: 0;
		transform: translate(var(--drift-x), calc(-1 * var(--rise))) scale(1);
	}
}

@keyframes flowerGlow {
	0% {
		opacity: 0.7;
		transform: scale(0.6);
	}
	100% {
		opacity: 0;
		transform: scale(3.5);
	}
}

@keyframes veilFade {
	0% {
		opacity: 0;
	}
	30% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

/* ========== 背景音乐按钮 ========== */
.bgm-btn {
	position: fixed;
	top: 0.1rem;
	left: 0.1rem;
	right: auto;
	z-index: 200;
	width: 0.72rem;
	height: 0.72rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-tap-highlight-color: transparent;
}

.bgm-icon {
	display: block;
	width: 0.36rem;
	height: 0.36rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E") no-repeat center;
	background-size: contain;
	transform-origin: center center;
}

.bgm-btn.playing {
	animation: bgmRotate 2s linear infinite;
	transform-origin: center center;
}

.bgm-btn.playing .bgm-icon {
	opacity: 1;
}

.bgm-btn.paused .bgm-icon {
	opacity: 0.5;
}

.bgm-btn.paused::after {
	content: '';
	position: absolute;
	width: 0.04rem;
	height: 0.5rem;
	background: #fff;
	transform: rotate(45deg);
	border-radius: 0.02rem;
}

@keyframes bgmRotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* ========== 滑动提示 ========== */
.scroll-tip {
	position: fixed;
	left: 50%;
	bottom: 0.3rem;
	transform: translateX(-50%);
	z-index: 100;
	display: flex;
	flex-direction: column;
	align-items: center;
	pointer-events: none;
	animation: tipBounce 2s ease-in-out infinite;
}

.scroll-tip-arrow {
	display: block;
	width: 0.24rem;
	height: 0.24rem;
	border-left: 2px solid rgba(66, 64, 64, 0.8);
	border-top: 2px solid rgba(66, 64, 64, 0.8);
	transform: rotate(45deg);
	margin-bottom: 0.08rem;
}

.scroll-tip-text {
	font-size: 0.22rem;
	color: rgba(66, 64, 64, 0.8);
}

@keyframes tipBounce {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(0.1rem); }
}

/* ========== AI 提示 ========== */
.ai-tip {
	position: fixed;
	right: 0.05rem;
	bottom: 1.84rem;
	z-index: 200;
	font-size: 0.2rem;
	color: rgba(0, 0, 0, 0.45);
	line-height: 1.6;
	letter-spacing: 0.04rem;
	writing-mode: vertical-rl;
	text-orientation: upright;
	pointer-events: none;
	text-shadow: 0 0 0.06rem rgba(255, 255, 255, 0.8);
}

.ai-tip-ai {
	text-combine-upright: all;
	-webkit-text-combine: horizontal;
}

/* ========== 通用 ========== */
.pos_abs {
	position: absolute;
}

.clear {
	zoom: 1;
}

.clear:after {
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
}

.auto {
	margin: 0 auto;
}

.mt20 {
	margin-top: 0.2rem;
}

.mb20 {
	margin-bottom: 0.2rem;
}

.share-img-box {
	width: 100%;
	height: 100%;
	position: fixed;
	left: 0;
	top: 0;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

#shaer-img {
	height: 80%;
}

.close {
	font-size: 30px;
	color: #fff;
}

.tips {
	color: #fff;
	font-size: 12px;
	margin-top: 20px;
}

.ios,
.android {
	display: none;
}
