/**
 * 模块说明：公共界面补充样式
 * 功能概述：延续绿色主题，补充表单、提示和移动端布局
 * 作者：云上遗珍项目组
 * 版本：2.0.0
 */
:root { --heritage-green: #258348; --heritage-light: #eef6ec; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #399554; outline-offset: 3px; }
.app-notice { display: none; position: fixed; z-index: 10000; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(92vw, 560px); padding: 16px 22px; border-radius: 12px; background: #215c36; color: white; box-shadow: 0 8px 28px #0003; font: 16px/1.6 'Microsoft YaHei', sans-serif; }
.app-notice.visible { display: block; }
.app-notice.error { background: #934032; }
.site-nav { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; min-height: 68px; padding: 12px max(24px, calc((100% - 1152px) / 2)); background: #ffffffe8; border-bottom: 1px solid #dce8d9; font: 15px/1.6 'Microsoft YaHei', sans-serif; }
.site-nav a, .site-footer a { color: #216c39; text-decoration: none; }
.site-nav a:hover, .site-footer a:hover { text-decoration: underline; }
.site-nav > a:first-child { flex-shrink: 0; font-weight: 600; letter-spacing: .03em; }
.site-nav [data-account-nav] { margin-left: auto; min-width: 0; max-width: min(55vw, 360px); padding: 7px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid #d4e4ce; border-radius: 999px; background: #f2f7ee; }
.site-footer { text-align: center; padding: 24px 16px; color: #536354; background: #ffffffe8; font: 14px/1.8 'Microsoft YaHei', sans-serif; }
.site-footer a { margin: 0 10px; }
.page-note { padding: 14px 18px; margin: 18px 0; border-left: 4px solid #6e9e66; background: #eff5e9; color: #42543c; font: 15px/1.8 'Microsoft YaHei', sans-serif; }
.page-error { padding: 24px; background: #fff2ee; color: #873c2c; border-radius: 12px; }
.page-error button { margin: 12px; }
.auth-actions, .code-row { display: flex; gap: 10px; align-items: center; }
.code-row input { min-width: 0; }
.code-row button, .small-button { flex-shrink: 0; padding: 12px; border-radius: 8px; border: 1px solid #78a88c; background: #f0f8f2; color: #226a3b; cursor: pointer; }
.auth-agreement { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.8; margin: 18px 0; }
.auth-agreement input { width: auto; margin-top: 6px; }
.auth-agreement a { color: #247a41; }
.auth-foot { margin-top: 20px; display: flex; justify-content: space-between; gap: 12px; }
.auth-foot a { color: #247a41; font-size: 14px; }
.form-hint { margin-top: 6px; color: #657465; font-size: 13px; line-height: 1.6; }
.account-page { background: #edf3e9 url('./img/4fefab86ae6423199a04b56cf5e2f930.jpg') center/cover fixed; color: #304533; font-family: 'Microsoft YaHei', sans-serif; margin: 0; }
.account-main { width: min(900px, 92%); margin: 36px auto; }
.account-card { background: #fffffff2; border: 1px solid #d7e4d1; border-radius: 16px; padding: 28px; margin-bottom: 22px; box-shadow: 0 4px 20px #34512c12; }
.account-card h1, .account-card h2 { color: #25773e; margin: 0 0 20px; }
.account-card label { display: block; margin: 14px 0 6px; }
.account-card input, .account-card textarea { display: block; width: 100%; padding: 12px; border: 1px solid #bdcdb9; border-radius: 8px; background: #fff; }
.account-card button, .green-button { padding: 12px 22px; border: 0; border-radius: 8px; background: #258348; color: white; margin-top: 16px; cursor: pointer; text-decoration: none; display: inline-block; }
.account-card .danger-button { background: #954637; }
.account-card p { line-height: 1.9; overflow-wrap: anywhere; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-tile { background: #eff6ea; padding: 22px; border-radius: 12px; text-align: center; }
.stat-tile strong { display: block; font-size: 28px; color: #25773e; margin-bottom: 8px; }
.resource-card { border: 1px solid #dce7d7; padding: 20px; border-radius: 12px; margin: 14px 0; background: #fff; overflow-wrap: anywhere; }
.resource-card h3 { color: #25773e; margin: 0 0 12px; }
.resource-card p { white-space: pre-wrap; line-height: 1.8; margin: 8px 0; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.resource-actions button, .resource-actions a { border: 1px solid #8cbb93; border-radius: 7px; color: #276c35; background: #f3f8ef; padding: 8px 14px; cursor: pointer; text-decoration: none; }
.search-row { display: flex; gap: 10px; margin-bottom: 20px; }
.search-row input { flex: 1; min-width: 0; border: 1px solid #b8cbb5; border-radius: 8px; padding: 12px; }
.search-row button { border: 0; background: #2e8b57; color: white; border-radius: 8px; padding: 10px 22px; cursor: pointer; }
.legal-detail { margin-top: 18px; padding: 16px; background: #f1f6ee; }
.legal-detail a { color: #216b37; }
.legal-detail[hidden] { display: none; }
@media (max-width: 768px) {
	.wrapper { width: 100% !important; }
	.service-container, .container { max-width: 100%; }
	.site-nav { min-height: 64px; padding: 10px 16px; gap: 10px; }
	.site-nav a { font-size: 14px; }
	.site-nav [data-account-nav] { max-width: 52vw; padding: 6px 10px; }
	.account-main { margin: 20px auto; }
	.account-card { padding: 20px; }
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.header-container { flex-direction: column; align-items: flex-start; gap: 16px; }
	.nav { display: flex; flex-wrap: wrap; gap: 16px; }
	.nav a { margin-left: 0; }
	.main { flex-direction: column; }
	.category { width: 100%; }
	.category-list { display: flex; flex-wrap: wrap; gap: 12px; }
	.category-item { margin: 0; }
	.content { width: 100%; min-width: 0; }
	.form-row, .asset-card { flex-direction: column; }
	.modal-content { width: 94% !important; max-height: 90vh; overflow-y: auto; }
	.service-container { margin: 20px 12px; padding: 18px; width: auto; }
	.service-title { font-size: 28px !important; }
	.permission-grid, .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.form-options, .auth-foot { flex-wrap: wrap; }
	.left-section { padding: 24px 20px; }
	.welcome-text h1 { font-size: 28px; margin-bottom: 8px; }
	.welcome-text p { margin-bottom: 0; }
	.illustration { display: none; }
}
@media print {
	body * { visibility: hidden; }
	#previewArea, #previewArea * { visibility: visible; }
	#previewArea { position: absolute; inset: 0; display: block !important; box-shadow: none; background: white; margin: 0; padding: 0; }
	#previewArea .preview-header { display: none; }
	#previewContent { font: 12pt/1.9 'Microsoft YaHei', serif; color: black; }
	#previewContent h2 { text-align: center; }
	#previewContent h3 { break-after: avoid; }
	@page { size: A4; margin: 22mm; }
}

/** 按需内容编辑器共享绿色主题及移动端布局。 */
.will-steps, .will-module-choices { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.will-steps a, .will-steps button { color: #276c35; background: #f3f8ef; border: 1px solid #aac7a0; border-radius: 8px; padding: 10px 16px; text-decoration: none; cursor: pointer; }
.will-module-choices label { display: flex; align-items: center; gap: 8px; border: 1px solid #b9d0af; padding: 12px; border-radius: 9px; background: #f7faf3; cursor: pointer; }
.will-module-choices input { width: auto; }
#digitalWillList label { display: block; margin: 10px 0; color: #365b37; }
#digitalWillList input:not([type=hidden]), #digitalWillList textarea { display: block; width: 100%; padding: 10px; border: 1px solid #c2d4b9; border-radius: 7px; margin-top: 6px; font: inherit; }
[data-will-module-section] > button, #digitalAssetChoices button { padding: 10px 14px; border: 1px solid #9abb8d; background: #eef6e8; color: #286538; border-radius: 8px; cursor: pointer; margin: 8px 8px 8px 0; }
#digitalWillList button { padding: 9px 12px; border: 1px solid #c0cbb8; background: #fff; color: #6d4b3d; border-radius: 6px; cursor: pointer; }
