/* ==========================================================
   树 · 家庭网站 — 账号与云内容组件样式
   仅新增，不改动模板原有样式
   ========================================================== */

/* ---------- 右上角账号入口 ---------- */
.fc-topbar {
	position: fixed;
	top: 1.1em;
	right: 1.4em;
	z-index: 9000;
	text-shadow: none;
	font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', sans-serif;
}
.fc-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	margin: 0;
	padding: 0.34em 0.95em 0.34em 0.34em;
	background: #fff;
	background-image: none;
	color: #364050;
	border: 1px solid rgba(54, 64, 80, 0.1);
	border-radius: 999px;
	box-shadow: 0 8px 22px rgba(54, 64, 80, 0.16), 0 1px 2px rgba(54, 64, 80, 0.08);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: none;
	text-shadow: none;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fc-chip:hover,
.fc-chip:focus,
.fc-chip:active {
	background: #fff;
	color: #364050;
	transform: translateY(-1px);
	box-shadow: 0 12px 28px rgba(54, 64, 80, 0.22);
	outline: none;
}
.fc-avatar {
	width: 2.05em;
	height: 2.05em;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #e0688a 0%, #c94663 100%);
	color: #fff;
	font-size: 0.9em;
	font-weight: 700;
	text-shadow: none;
	flex: none;
}
.fc-chip.is-guest .fc-avatar {
	background: linear-gradient(135deg, #9aa5b4 0%, #79879b 100%);
}
.fc-caret {
	font-size: 0.7em;
	color: #9aa5b4;
	line-height: 1;
}

/* 下拉小菜单 */
.fc-menu {
	position: absolute;
	top: calc(100% + 0.65em);
	right: 0;
	min-width: 15.5em;
	padding: 0.45em;
	background: #fff;
	border: 1px solid rgba(54, 64, 80, 0.08);
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(24, 31, 44, 0.26);
	text-align: left;
	opacity: 0;
	transform: translateY(-6px) scale(0.97);
	transform-origin: top right;
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease;
}
.fc-menu.show {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
.fc-menu-head {
	padding: 0.75em 0.85em 0.7em;
	border-bottom: 1px solid #eef0f3;
	margin-bottom: 0.35em;
}
.fc-menu-name {
	margin: 0 0 0.35em;
	font-size: 0.92em;
	font-weight: 700;
	color: #364050;
	line-height: 1.5;
}
.fc-menu-sub {
	margin: 0;
	font-size: 0.72em;
	color: #98a3b3;
	line-height: 1.6;
}
.fc-menu-item {
	display: block;
	width: 100%;
	padding: 0.6em 0.85em;
	background: none;
	background-image: none;
	border: none;
	border-radius: 9px;
	color: #364050;
	font-family: inherit;
	font-size: 0.82em;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	text-decoration: none;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.15s ease, color 0.15s ease;
}
.fc-menu-item:hover {
	background: #f4f6f8;
	color: #c94663;
}
.fc-menu-item.fc-danger-text {
	color: #b0435a;
}
.fc-menu-item.fc-danger-text:hover {
	background: #fdf0f2;
}
.fc-menu-item.fc-primary {
	background: #c94663;
	color: #fff;
	text-align: center;
}
.fc-menu-item.fc-primary:hover {
	background: #b23a56;
	color: #fff;
}
.fc-menu-tip {
	margin: 0.35em 0.4em 0.5em;
	padding: 0.6em 0.7em;
	background: #fdf3e3;
	color: #a2620f;
	border-radius: 9px;
	font-size: 0.74em;
	line-height: 1.7;
}

/* ---------- 登录弹窗 ---------- */
.fc-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
}
.fc-modal.show {
	display: block;
}
.fc-modal-mask {
	position: absolute;
	inset: 0;
	background: rgba(24, 30, 42, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	animation: fc-fade 0.2s ease;
}
.fc-modal-card {
	position: relative;
	max-width: 25em;
	margin: 7vh auto 3em;
	background: #fff;
	color: #364050;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 28px 80px rgba(16, 22, 34, 0.45);
	text-shadow: none;
	font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Source Han Sans SC', sans-serif;
	animation: fc-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes fc-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes fc-pop {
	from { opacity: 0; transform: translateY(14px) scale(0.97); }
	to { opacity: 1; transform: none; }
}
.fc-modal-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.9em;
	padding: 1.5em 1.8em 1.3em;
	background: linear-gradient(135deg, #d9567a 0%, #c94663 55%, #a83a55 100%);
	color: #fff;
}
.fc-modal-mark {
	width: 2.6em;
	height: 2.6em;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.18);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05em;
	font-weight: 700;
	color: #fff;
	text-shadow: none;
	flex: none;
}
.fc-modal-headtext {
	min-width: 0;
}
.fc-modal-head h3 {
	margin: 0;
	font-size: 1.05em;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.02em;
	font-family: inherit;
	line-height: 1.4;
	text-shadow: none;
}
.fc-modal-sub {
	margin: 0.15em 0 0;
	font-size: 0.73em;
	color: rgba(255, 255, 255, 0.85);
	letter-spacing: 0.06em;
}
.fc-close {
	position: absolute;
	top: 0.9em;
	right: 0.9em;
	width: 1.9em;
	height: 1.9em;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	background-image: none;
	color: #fff;
	font-size: 1.05em;
	font-family: inherit;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-shadow: none;
	transition: background 0.15s ease;
}
.fc-close:hover,
.fc-close:active {
	background: rgba(255, 255, 255, 0.34);
	color: #fff;
}
.fc-modal-body {
	padding: 1.5em 1.8em 1.6em;
}
.fc-hint {
	font-size: 0.76em;
	color: #8a93a3;
	line-height: 1.7;
	margin: 0 0 0.9em;
	padding: 0.7em 0.85em;
	background: #f6f8fb;
	border-radius: 10px;
}
/* 弹窗底部的次要链接 */
.fc-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	margin-top: 1.1em;
	padding-top: 0.9em;
	border-top: 1px solid #eef0f3;
}
.fc-foot a {
	font-size: 0.75em;
	color: #9aa3b0;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.fc-foot a:hover {
	color: #c94663;
	border-bottom-color: #e3b3bf;
}
.fc-form input,
.fc-form select {
	width: 100%;
	margin-bottom: 0.75em;
	padding: 0.72em 0.9em;
	border: 1px solid #dde2e9;
	border-radius: 10px;
	font-size: 0.88em;
	font-family: inherit;
	box-sizing: border-box;
	background: #fafbfc;
	color: #364050;
	text-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.fc-form input::placeholder {
	color: #a9b1bd;
}
.fc-form input:focus,
.fc-form select:focus {
	background: #fff;
	border-color: #c94663;
	box-shadow: 0 0 0 3px rgba(201, 70, 99, 0.12);
	outline: none;
}
.fc-form .button {
	width: 100%;
	margin: 0.3em 0 0.6em;
	padding: 0.78em 1em;
	font-size: 0.88em;
	font-family: inherit;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: none;
	border: none;
	border-radius: 10px;
	background: #c94663;
	background-image: none;
	color: #fff;
	text-shadow: none;
	box-shadow: 0 8px 20px rgba(201, 70, 99, 0.3);
	transition: background 0.15s ease, box-shadow 0.15s ease;
}
.fc-form .button:hover {
	background: #b23a56;
	box-shadow: 0 10px 24px rgba(201, 70, 99, 0.36);
}
.fc-row {
	display: flex;
	gap: 0.6em;
	align-items: stretch;
}
.fc-row input {
	flex: 1;
	width: auto;
	min-width: 0;
	margin-bottom: 0.75em;
}
.fc-row .button {
	flex: none;
	width: auto;
	min-width: 7.5em;
	white-space: nowrap;
	font-size: 0.78em;
	padding: 0.7em 0.9em;
	margin-bottom: 0.75em;
	background: #eef1f5;
	color: #c94663;
	box-shadow: none;
}
.fc-row .button:hover {
	background: #e3e7ee;
	box-shadow: none;
}
.fc-msg {
	min-height: 1.3em;
	font-size: 0.78em;
	margin: 0.3em 0 0;
	color: #3d7a4f;
	line-height: 1.6;
}
.fc-msg.err {
	color: #c0392b;
}
.is-hidden {
	display: none !important;
}

/* 小屏适配 */
@media screen and (max-width: 736px) {
	.fc-topbar {
		top: 7px;
		right: 9px;
	}
	.fc-chip {
		font-size: 0.8em;
		padding: 0.3em 0.8em 0.3em 0.3em;
	}
	.fc-avatar {
		width: 1.95em;
		height: 1.95em;
		font-size: 0.85em;
	}
	.fc-menu {
		min-width: 14em;
	}
	.fc-modal-card {
		margin: 3vh 0.8em 2em;
	}
	.fc-modal-head,
	.fc-modal-body {
		padding-left: 1.2em;
		padding-right: 1.2em;
	}
}

/* ---------- 轻提示 ---------- */
.fc-toast {
	position: fixed;
	left: 50%;
	bottom: 2.5em;
	transform: translateX(-50%) translateY(1.5em);
	background: #364050;
	color: #fff;
	padding: 0.6em 1.3em;
	border-radius: 4px;
	font-size: 0.85em;
	opacity: 0;
	pointer-events: none;
	transition: all 0.25s ease;
	z-index: 10001;
	max-width: 80vw;
}
.fc-toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}
.fc-toast.err {
	background: #a94438;
}

/* ---------- 登录遮罩（受限页面） ---------- */
.fc-gate-tip {
	text-align: center;
	padding: 4em 1em;
	color: #999;
}
.fc-gate-tip .button {
	margin-top: 1.5em;
}

/* ---------- 表单区（写日记 / 上传相册 / 添加好书） ---------- */
.fc-editor {
	background: #fdf6f7;
	border: 1px solid #ecd5da;
	border-radius: 6px;
	padding: 1.4em 1.6em;
	margin-bottom: 2em;
}
.fc-editor h3 {
	margin: 0 0 0.8em;
	font-size: 1em;
	color: #c94663;
}
.fc-editor input[type=text],
.fc-editor input[type=number],
.fc-editor select,
.fc-editor textarea {
	width: 100%;
	margin-bottom: 0.8em;
	padding: 0.55em 0.7em;
	border: 1px solid #d5d9e0;
	border-radius: 4px;
	font-size: 0.9em;
	box-sizing: border-box;
	background: #fff;
	color: #364050;
	font-family: inherit;
}
.fc-editor textarea {
	min-height: 8em;
	resize: vertical;
	line-height: 1.8;
}
.fc-editor label {
	display: block;
	font-size: 0.78em;
	color: #8a93a3;
	margin-bottom: 0.3em;
}
.fc-editor .fc-actions {
	display: flex;
	gap: 0.8em;
	align-items: center;
	flex-wrap: wrap;
}
.fc-editor .fc-file-note {
	font-size: 0.75em;
	color: #999;
}

/* ---------- 操作按钮（条目上） ---------- */
.fc-item-actions {
	list-style: none;
	margin: 0.8em 0 0;
	padding: 0;
	display: flex;
	gap: 1em;
}
.fc-item-actions a,
.fc-item-actions button {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.75em;
	color: #b0485e;
	cursor: pointer;
	border-bottom: 1px dotted #b0485e;
	font-family: inherit;
}
.fc-item-actions .fc-danger {
	color: #a33;
}

/* ---------- 相册网格 ---------- */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.2em;
	list-style: none;
	margin: 0;
	padding: 0;
}
.gallery-grid li {
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(54, 64, 80, 0.12);
}
.gallery-grid img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
	cursor: zoom-in;
}
.gallery-grid .g-info {
	padding: 0.7em 0.9em 0.9em;
}
.gallery-grid .g-title {
	font-size: 0.85em;
	font-weight: 700;
	margin: 0 0 0.25em;
	color: #364050;
}
.gallery-grid .g-note {
	font-size: 0.75em;
	color: #8a93a3;
	line-height: 1.5;
	margin: 0 0 0.4em;
}

/* ---------- 大图查看 ---------- */
.fc-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10002;
	background: rgba(15, 18, 24, 0.88);
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	cursor: zoom-out;
}
.fc-lightbox.show {
	display: flex;
}
.fc-lightbox img {
	max-width: 92vw;
	max-height: 84vh;
	border-radius: 4px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.fc-lightbox p {
	color: #ddd;
	font-size: 0.85em;
	margin-top: 1em;
}

/* ---------- 好书卡片 ---------- */
.books-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.4em;
	list-style: none;
	margin: 0;
	padding: 0;
}
.books-grid li {
	background: #fff;
	border-radius: 6px;
	padding: 1.2em 1.3em;
	box-shadow: 0 2px 10px rgba(54, 64, 80, 0.12);
	border-top: 3px solid #c94663;
	display: flex;
	flex-direction: column;
}
.books-grid .b-cover {
	width: 100%;
	height: 170px;
	object-fit: contain;
	border-radius: 4px;
	background: #f5f6f8;
	margin-bottom: 0.8em;
}
.books-grid .b-title {
	font-size: 1em;
	margin: 0 0 0.2em;
	color: #364050;
}
.books-grid .b-author {
	font-size: 0.78em;
	color: #8a93a3;
	margin: 0 0 0.6em;
}
.books-grid .b-cat {
	display: inline-block;
	font-size: 0.7em;
	background: #fdf0f2;
	color: #c94663;
	padding: 0.15em 0.7em;
	border-radius: 10px;
	margin-bottom: 0.6em;
	align-self: flex-start;
}
.books-grid .b-reason {
	font-size: 0.82em;
	color: #556;
	line-height: 1.7;
	flex: 1;
	margin: 0 0 0.6em;
}
.books-grid .b-stars {
	color: #e6a23c;
	font-size: 0.85em;
	letter-spacing: 0.1em;
}

/* ---------- 管理页表格 ---------- */
.admin-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(54, 64, 80, 0.12);
}
.admin-table th,
.admin-table td {
	padding: 0.75em 1em;
	text-align: left;
	font-size: 0.85em;
	border-bottom: 1px solid #eef0f3;
	color: #364050;
}
.admin-table th {
	background: #f7f8fa;
	font-size: 0.78em;
	color: #8a93a3;
	text-transform: none;
}
.admin-table select {
	padding: 0.3em 0.5em;
	border: 1px solid #d5d9e0;
	border-radius: 4px;
	font-size: 0.85em;
	background: #fff;
	color: #364050;
}
.admin-table .fc-danger {
	background: none;
	border: none;
	color: #a33;
	cursor: pointer;
	font-size: 0.8em;
	border-bottom: 1px dotted #a33;
	font-family: inherit;
}
.fc-note-box {
	background: #f2f6fb;
	border-left: 4px solid #5b7fb4;
	padding: 0.9em 1.2em;
	border-radius: 4px;
	font-size: 0.8em;
	color: #556;
	line-height: 1.8;
	margin-bottom: 2em;
}

/* ---------- 权限说明徽标 ---------- */
.fc-role-badge {
	display: inline-block;
	font-size: 0.7em;
	padding: 0.15em 0.7em;
	border-radius: 10px;
	margin-left: 0.6em;
	vertical-align: middle;
}
.fc-role-badge.admin { background: #c94663; color: #fff; }
.fc-role-badge.editor { background: #e6a23c; color: #fff; }
.fc-role-badge.reader { background: #8a93a3; color: #fff; }
