:root {
	--tap-size: 44px;
	--app-max: 720px;
	--gutter: 12px;
}
html,
body {
	background-color: #f8f9fa;
}
body {
	padding-bottom: 110px;
}
.app-container {
	width: min(var(--app-max), calc(100vw - 2 * var(--gutter)));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* 顶栏布局：三列，中央永远居中 */
.appbar-grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.5rem;
	min-height: 56px;
}
.appbar-left .btn,
.appbar-right .btn {
	height: 32px;
	display: flex;
	align-items: center;
}
.appbar-center {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.appbar-center .btn {
	padding-inline: 0.5rem;
}

/* 中间内容（备注名 · 日期）过长时截断 */
.center-chip {
	max-width: 72vw;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.center-chip .user-ellip {
	max-width: 9em;
	display: inline-block;
	vertical-align: bottom;
}
.date-mono {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

/* 任务卡片 */
.task-card .card-body {
	padding-left: 10px;
	padding-right: 10px;
}
.task-title {
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
}
.task-note {
	font-size: 0.9rem;
	color: var(--bs-secondary-color);
	margin-top: 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.btn-check-circle {
	width: var(--tap-size);
	height: var(--tap-size);
	border-radius: 9999px;
	border: 2px solid var(--bs-border-color);
	background-color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.btn-check-circle i {
	font-size: 1.1rem;
	opacity: 0.5;
}
.btn-check-circle.completed {
	background-color: #198754;
	border-color: #198754;
	color: #fff;
}
.btn-check-circle.completed i {
	opacity: 1;
}
.task-done {
	text-decoration: line-through;
	opacity: 0.6;
}

/* 漂浮新增按钮 */
.fab {
	position: fixed;
	right: max(var(--gutter), calc(50vw - (var(--app-max) / 2) + var(--gutter)));
	bottom: calc(20px + env(safe-area-inset-bottom));
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.action-kebab {
	width: var(--tap-size);
	height: var(--tap-size);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 日历 */
.cal-modal .modal-dialog {
	max-width: 420px;
}
.cal {
	user-select: none;
}
.cal-weekdays,
.cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
}
.cal-weekdays {
	margin-bottom: 8px;
	text-align: center;
	color: var(--bs-secondary-color);
	font-weight: 600;
}
.cal-weekdays > span {
	display: block;
}
.cal-grid {
	min-height: 260px;
}
.cal-cell {
	position: relative;
	display: block;
	width: 100%;
	border: 1px solid var(--bs-border-color);
	border-radius: 0.6rem;
	min-height: 52px;
	padding: 6px 8px;
	background: #fff;
	text-align: left;
}
.cal-cell.is-out {
	background: #f3f4f6;
	color: var(--bs-secondary-color);
}
.cal-daynum {
	font-weight: 600;
}

/* —— 月历小气泡：橙色背景，白色数字居中 —— */
.cal-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	background: #ff8c00 !important;
	color: #fff !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	font-size: 0.75rem;
	line-height: 1;
}

/* 小屏进一步压缩 */
@media (max-width: 390px) {
	.center-chip .user-ellip {
		max-width: 7.2em;
	}
	.appbar-left .btn,
	.appbar-right .btn {
		height: 30px;
	}
}
/* 顶部日期触发按钮（你现在用的 .center-chip；兼容历史 id） */
.center-chip,
#date,
#date-btn {
	cursor: pointer;
}

/* 日历模态里的日期格 */
#datePickerModal .cal-cell {
	cursor: pointer;
	border-radius: 0.75rem;
	padding: 0.5rem 0.4rem;
	text-align: center;
}
#datePickerModal .cal-cell.is-out {
	opacity: 0.45;
}
#datePickerModal .cal-daynum {
	font-weight: 600;
}

/* —— 模态里的小气泡也改成橙色 —— */
#datePickerModal .cal-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	font-size: 0.75rem;
	border-radius: 50%;
	margin-left: 0.25rem;
	background: #ff5a00 !important;
	color: #fff !important;
}
