/* =====================================================================
   刻碑纪念平台 H5 · 深色庄重风格
   fill.html / show.html / status.html / invalid.html 共用
   ===================================================================== */
:root {
	--m-bg: #17171c;
	--m-card: #212128;
	--m-card2: #2a2a33;
	--m-gold: #c9a86a;
	--m-gold-dim: #9a8154;
	--m-text: #ece7db;
	--m-text-dim: #a09a8c;
	--m-line: #3a3a45;
	--m-red: #b0574f;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body.m-body {
	background: var(--m-bg);
	color: var(--m-text);
	font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
	min-height: 100vh;
}
.m-wrap { max-width: 480px; margin: 0 auto; padding: 24px 16px 40px; }

/* 头部 */
.m-head { text-align: center; padding: 18px 0 10px; }
.m-head-mark { color: var(--m-gold); font-size: 18px; letter-spacing: 6px; margin-bottom: 6px; }
.m-head h1 { font-size: 24px; letter-spacing: 8px; color: var(--m-text); font-weight: 600; }
.m-head-sub { margin-top: 10px; font-size: 13px; color: var(--m-text-dim); letter-spacing: 1px; }

/* 步骤条 */
.m-steps { display: flex; align-items: center; justify-content: center; margin: 20px 0 18px; }
.m-steps .step { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--m-text-dim); }
.m-steps .step i {
	font-style: normal; width: 22px; height: 22px; border-radius: 50%;
	border: 1px solid var(--m-line); display: inline-flex; align-items: center; justify-content: center;
	font-size: 12px; color: var(--m-text-dim);
}
.m-steps .step.active { color: var(--m-gold); }
.m-steps .step.active i { border-color: var(--m-gold); color: var(--m-gold); }
.m-steps .step-line { width: 44px; height: 1px; background: var(--m-line); margin: 0 10px; }

/* 卡片 */
.m-card {
	background: var(--m-card); border: 1px solid var(--m-line);
	border-radius: 10px; padding: 18px 16px; margin-bottom: 14px;
}
.m-card-title { font-size: 15px; margin-bottom: 14px; letter-spacing: 1px; }
.m-card-title em { color: var(--m-red); font-style: normal; margin-right: 2px; }
.m-tip { font-size: 12px; color: var(--m-text-dim); margin-left: 6px; font-weight: normal; }

/* 表单 */
.m-form-row { display: flex; align-items: center; margin-bottom: 14px; }
.m-form-row:last-child { margin-bottom: 0; }
.m-label { width: 92px; font-size: 14px; flex-shrink: 0; letter-spacing: 1px; }
.m-label em { color: var(--m-red); font-style: normal; margin-right: 2px; }
.m-input {
	flex: 1; background: var(--m-card2); border: 1px solid var(--m-line); border-radius: 6px;
	color: var(--m-text); font-size: 14px; padding: 10px 12px; outline: none; width: 100%;
	transition: border-color .2s;
}
.m-input:focus { border-color: var(--m-gold-dim); }
.m-input::placeholder { color: #6d685e; }
input[type="date"].m-input { color-scheme: dark; }
.m-gender { display: flex; gap: 10px; flex: 1; }
.m-gender-item {
	flex: 1; text-align: center; padding: 9px 0; border: 1px solid var(--m-line);
	border-radius: 6px; background: var(--m-card2); font-size: 14px; color: var(--m-text-dim); cursor: pointer;
	transition: all .2s;
}
.m-gender-item.on { border-color: var(--m-gold); color: var(--m-gold); background: rgba(201,168,106,.08); }

/* 上传 */
.m-photo-box { display: flex; flex-wrap: wrap; gap: 10px; }
.m-upload {
	width: 76px; height: 76px; border: 1px dashed var(--m-gold-dim); border-radius: 8px;
	display: flex; align-items: center; justify-content: center; cursor: pointer; background: rgba(201,168,106,.04);
}
.m-upload:active { background: rgba(201,168,106,.12); }
.m-plus { color: var(--m-gold-dim); font-size: 28px; font-weight: 300; }
.m-photo-item { position: relative; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; }
.m-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.m-photo-del {
	position: absolute; top: 0; right: 0; width: 18px; height: 18px; background: rgba(0,0,0,.65);
	color: #fff; border: none; font-size: 12px; line-height: 17px; text-align: center; border-radius: 0 0 0 8px; cursor: pointer;
}
.m-video-item { position: relative; width: 100%; border-radius: 8px; overflow: hidden; background: #000; }
.m-video-item video { width: 100%; max-height: 200px; display: block; }
.m-progress { height: 6px; background: var(--m-card2); border-radius: 3px; margin-top: 12px; overflow: hidden; }
.m-progress-bar { height: 100%; width: 0; background: var(--m-gold); border-radius: 3px; transition: width .3s; }

/* 动态行（职务/荣誉） */
.m-dyn-row { display: flex; gap: 8px; margin-bottom: 10px; }
.m-dyn-row:last-child { margin-bottom: 0; }
.m-dyn-add {
	flex-shrink: 0; background: transparent; border: 1px solid var(--m-gold-dim); color: var(--m-gold);
	border-radius: 6px; padding: 0 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}

/* 按钮 */
.m-actions { margin-top: 22px; text-align: center; }
.m-actions-2 { display: flex; gap: 10px; }
.m-actions-2 .m-btn { flex: 1; }
.m-btn {
	width: 80%; margin: 0 auto; display: inline-block; background: linear-gradient(135deg, #c9a86a, #a8854e);
	color: #1c1710; border: none; border-radius: 8px; padding: 13px 0; font-size: 16px;
	letter-spacing: 6px; font-weight: 600; cursor: pointer;
}
.m-btn-ghost {
	background: transparent; border: 1px solid var(--m-gold-dim); color: var(--m-gold);
	letter-spacing: 3px; font-weight: normal;
}
.m-link-btn { background: transparent; border: none; color: var(--m-gold); font-size: 13px; cursor: pointer; text-decoration: underline; }

/* 悼词 */
.m-textarea {
	width: 100%; min-height: 200px; background: var(--m-card2); border: 1px solid var(--m-line);
	border-radius: 6px; color: var(--m-text); font-size: 15px; line-height: 1.9; padding: 14px;
	resize: none; outline: none; font-family: inherit;
}
.m-textarea:focus { border-color: var(--m-gold-dim); }
.m-eulogy-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.m-count { font-size: 12px; color: var(--m-text-dim); }
.m-count i { font-style: normal; color: var(--m-gold); }

/* 成功态 */
.m-success { text-align: center; padding: 34px 20px; }
.m-success-icon {
	width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--m-gold); color: var(--m-gold);
	font-size: 30px; line-height: 54px; margin: 0 auto 16px;
}
.m-success h2 { font-size: 20px; letter-spacing: 4px; margin-bottom: 12px; }
.m-success-text { font-size: 13px; color: var(--m-text-dim); line-height: 1.8; }
.m-token-box {
	margin: 18px 0 8px; background: var(--m-card2); border: 1px dashed var(--m-gold-dim);
	border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.m-token-label { font-size: 12px; color: var(--m-text-dim); }
.m-token-val { font-size: 17px; color: var(--m-gold); letter-spacing: 2px; font-family: monospace; }
.m-success-tip { font-size: 12px; color: var(--m-text-dim); }

/* 纪念页（show） */
.m-show-head { text-align: center; padding: 26px 0 20px; }
.m-show-head h1 { font-size: 30px; letter-spacing: 10px; color: var(--m-text); font-weight: 600; }
.m-show-dates { margin-top: 12px; font-size: 14px; color: var(--m-text-dim); letter-spacing: 1px; }
.m-show-dates b { color: var(--m-gold); font-weight: normal; }
.m-show-age { margin-top: 6px; font-size: 14px; color: var(--m-gold); }
.m-section { background: var(--m-card); border: 1px solid var(--m-line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.m-section-title { font-size: 14px; color: var(--m-gold); letter-spacing: 3px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.m-section-title::before, .m-section-title::after { content: ""; height: 1px; flex: 1; background: var(--m-line); }
.m-gallery { display: flex; overflow-x: auto; gap: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.m-gallery::-webkit-scrollbar { display: none; }
.m-gallery img { height: 180px; border-radius: 8px; scroll-snap-align: center; object-fit: cover; }
.m-show-video video { width: 100%; border-radius: 8px; background: #000; }
.m-list-item { padding: 9px 2px; font-size: 14px; line-height: 1.7; color: var(--m-text); border-bottom: 1px dashed var(--m-line); }
.m-list-item:last-child { border-bottom: none; }
.m-eulogy-text { font-size: 15px; line-height: 2.1; color: var(--m-text); text-align: justify; }
.m-qr-note { text-align: center; font-size: 11px; color: #6d685e; margin-top: 22px; letter-spacing: 1px; }

/* 锁定/维护态 */
.m-lock { text-align: center; padding: 60px 20px; }
.m-lock-icon { font-size: 40px; color: var(--m-gold-dim); margin-bottom: 18px; }
.m-lock h2 { font-size: 18px; letter-spacing: 3px; margin-bottom: 10px; }
.m-lock p { font-size: 13px; color: var(--m-text-dim); line-height: 1.8; }

/* 查询进度 */
.m-status-box { background: var(--m-card2); border-radius: 8px; padding: 16px; margin-top: 14px; text-align: left; font-size: 14px; line-height: 1.9; }
.m-status-box b { color: var(--m-gold); font-weight: normal; }

/* 预览弹层 */
.m-mask { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 99; display: flex; align-items: center; justify-content: center; padding: 20px; }
.m-preview { position: relative; background: var(--m-card); border: 1px solid var(--m-line); border-radius: 12px; max-width: 420px; width: 100%; max-height: 80vh; overflow-y: auto; }
.m-preview-close { position: absolute; top: 8px; right: 14px; font-size: 24px; color: var(--m-text-dim); cursor: pointer; z-index: 2; }
.m-preview-body { padding: 20px 18px; }
.m-preview-body h3 { text-align: center; letter-spacing: 6px; font-size: 20px; margin-bottom: 4px; }
.m-preview-body .m-pv-dates { text-align: center; font-size: 12px; color: var(--m-text-dim); margin-bottom: 14px; }
.m-preview-body img { max-width: 100%; border-radius: 6px; margin: 6px 0; }
.m-preview-body p { font-size: 14px; line-height: 1.9; color: var(--m-text); }
.m-pv-sec { font-size: 13px; color: var(--m-gold); margin: 12px 0 4px; letter-spacing: 2px; }

/* toast */
.m-toast {
	position: fixed; top: 18%; left: 50%; transform: translateX(-50%); background: rgba(30,30,36,.95);
	border: 1px solid var(--m-line); color: var(--m-text); padding: 12px 22px; border-radius: 8px;
	font-size: 14px; z-index: 999; display: none; max-width: 80vw; text-align: center;
}
.m-foot { text-align: center; margin-top: 30px; font-size: 12px; color: #6d685e; letter-spacing: 6px; }

/* 首页轮播广告 */
.m-slide { position: relative; width: 100%; height: 190px; border-radius: 10px; overflow: hidden; background: #2a2a33; margin-top: 22px; }
.m-slide-item { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.m-slide-item.active { opacity: 1; z-index: 1; }
.m-slide-item a { display: block; width: 100%; height: 100%; position: relative; }
.m-slide-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-slide-cap {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px; letter-spacing: 1px;
	color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72));
}
.m-slide-cap-t { font-size: 14px; font-weight: 500; }
.m-slide-cap-d { font-size: 11px; color: rgba(255,255,255,.78); margin-top: 3px; line-height: 1.5; }
.m-slide-dots { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; z-index: 2; }
.m-slide-dots i {
	display: inline-block; width: 6px; height: 6px; margin: 0 4px; border-radius: 50%;
	background: rgba(255,255,255,.45); cursor: pointer; transition: all .3s;
}
.m-slide-dots i.on { background: var(--m-gold); width: 16px; border-radius: 3px; }

/* 进度查询：纪念页链接与二维码卡片 */
.m-qr-card { margin-top: 16px; background: var(--m-card); border: 1px solid var(--m-line); border-radius: 10px; padding: 18px 16px; text-align: center; }
.m-qr-title { font-size: 14px; color: var(--m-gold); letter-spacing: 3px; margin-bottom: 14px; }
.m-qr-img { width: 190px; height: 190px; background: #fff; border-radius: 8px; padding: 8px; display: block; margin: 0 auto; }
.m-qr-code { margin-top: 10px; font-size: 13px; color: var(--m-text-dim); font-family: monospace; letter-spacing: 1px; }
.m-qr-link {
	margin: 12px 0 14px; background: var(--m-card2); border: 1px dashed var(--m-gold-dim); border-radius: 6px;
	padding: 10px 12px; font-size: 13px; color: var(--m-gold); word-break: break-all; font-family: monospace;
}
.m-qr-ops { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.m-qr-ops .m-btn { font-size: 13px; }
.m-qr-tip { margin-top: 14px; font-size: 12px; color: #8d877a; line-height: 1.9; }
