.yec-app {
	--yec-navy: #1f2a37;
	--yec-ink: #2b2b2b;
	--yec-gold: #b08d57;
	--yec-gold-dark: #8f6f3f;
	--yec-accent: #8f6f3f;
	--yec-accent-text: #fff;
	--yec-border: #e6e1d6;
	--yec-muted: #6b6b6b;
	--yec-bg: #fff;
	--yec-soft: #f7f4ee;
	--yec-today: #f3ead8;
	--yec-birthday: #2e3b4b;
	--yec-anniversary: #8f6f3f;
	--yec-other: #5b7261;
	position: relative;
	max-width: 100%;
	color: var(--yec-ink);
	font-size: 16px;
	line-height: 1.4;
	box-sizing: border-box;
}
.yec-app *,
.yec-app *::before,
.yec-app *::after { box-sizing: border-box; }

.yec-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}
.yec-nav { display: flex; gap: 6px; }
.yec-title { margin: 0; flex: 1 1 auto; font-size: 1.3em; min-width: 140px; font-family: Georgia, "Times New Roman", serif; color: var(--yec-navy); }

.yec-btn {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--yec-border);
	border-radius: 6px;
	background: var(--yec-bg);
	color: inherit;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	line-height: 1.2;
}
.yec-btn:hover { background: var(--yec-soft); }
.yec-primary,
.yec-primary:hover {
	background: var(--yec-accent);
	border-color: var(--yec-accent);
	color: var(--yec-accent-text);
}
.yec-primary:hover { background: var(--yec-navy); border-color: var(--yec-navy); filter: none; }

.yec-addall { position: relative; }
.yec-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 20;
	min-width: 260px;
	background: var(--yec-bg);
	border: 1px solid var(--yec-border);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
	overflow: hidden;
}
.yec-menu[hidden] { display: none; }
.yec-menu-item {
	display: block;
	padding: 12px 14px;
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid var(--yec-border);
}
.yec-menu-item:last-child { border-bottom: 0; }
.yec-menu-item:hover { background: var(--yec-soft); }

/* Grid */
.yec-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid var(--yec-border);
	border-left: 1px solid var(--yec-border);
}
.yec-dow {
	padding: 8px 4px;
	text-align: center;
	font-weight: 600;
	font-size: .85em;
	background: var(--yec-soft);
	border-right: 1px solid var(--yec-border);
	border-bottom: 1px solid var(--yec-border);
}
.yec-cell {
	min-height: 96px;
	padding: 4px;
	border-right: 1px solid var(--yec-border);
	border-bottom: 1px solid var(--yec-border);
	overflow: hidden;
}
.yec-blank { background: var(--yec-soft); }
.yec-now { background: var(--yec-today); }
.yec-num { display: block; font-size: .85em; color: var(--yec-muted); margin-bottom: 3px; }
.yec-now .yec-num { color: inherit; font-weight: 700; }

.yec-chip {
	display: block;
	width: 100%;
	margin: 0 0 3px;
	padding: 3px 6px;
	border: 0;
	border-radius: 4px;
	background: var(--yec-other);
	color: var(--yec-accent-text);
	font: inherit;
	font-size: .8em;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}
.yec-chip:hover { filter: brightness(1.15); }

/* Agenda list */
.yec-list { margin-top: 20px; }
.yec-list-title { margin: 0 0 8px; font-size: 1.05em; font-family: Georgia, "Times New Roman", serif; color: var(--yec-navy); }
.yec-empty { color: var(--yec-muted); margin: 0; }
.yec-row {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 6px;
	border: 1px solid var(--yec-border);
	border-radius: 8px;
	background: var(--yec-bg);
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.yec-row:hover { background: var(--yec-soft); }
.yec-row-date { min-width: 64px; font-weight: 700; color: var(--yec-accent); }
.yec-row-info { display: flex; flex-direction: column; }
.yec-row-info em { font-size: .85em; color: var(--yec-muted); font-style: normal; }

/* Modal */
.yec-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .5);
}
.yec-overlay[hidden] { display: none; }
.yec-modal {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
	border-radius: 12px;
	background: var(--yec-bg);
	color: var(--yec-ink);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.yec-close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: 0;
	background: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: var(--yec-muted);
}
.yec-modal-title { margin: 0 28px 4px 0; font-size: 1.3em; font-family: Georgia, "Times New Roman", serif; color: var(--yec-navy); }
.yec-modal-date { margin: 0 0 12px; color: var(--yec-accent); font-weight: 600; }
.yec-modal-meta { margin: 0 0 6px; }
.yec-modal-details { margin: 12px 0; white-space: pre-line; }
.yec-modal-link { display: inline-block; margin-bottom: 8px; }
.yec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.yec-notice { padding: 12px; background: var(--yec-soft); border-left: 4px solid var(--yec-gold); color: var(--yec-ink); }

/* ---- Event types ---- */
.yec-chip.yec-t-birthday, .yec-badge.yec-t-birthday { background: var(--yec-birthday); }
.yec-chip.yec-t-anniversary, .yec-badge.yec-t-anniversary { background: var(--yec-anniversary); }
.yec-chip.yec-t-other, .yec-badge.yec-t-other { background: var(--yec-other); }
.yec-row { border-left: 5px solid var(--yec-other); }
.yec-row.yec-t-birthday { border-left-color: var(--yec-birthday); }
.yec-row.yec-t-anniversary { border-left-color: var(--yec-anniversary); }
.yec-row.yec-t-birthday .yec-row-date { color: var(--yec-birthday); }
.yec-row.yec-t-anniversary .yec-row-date { color: var(--yec-anniversary); }
.yec-row.yec-t-other .yec-row-date { color: var(--yec-other); }
.yec-badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 2px 10px;
	border-radius: 999px;
	color: #fff;
	font-size: .75em;
	font-weight: 600;
}

/* ---- Filters / search ---- */
.yec-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.yec-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.yec-filter {
	padding: 6px 12px;
	border: 1px solid var(--yec-border);
	border-radius: 999px;
	background: var(--yec-bg);
	color: inherit;
	font: inherit;
	font-size: .85em;
	cursor: pointer;
}
.yec-filter[aria-pressed="true"] { background: var(--yec-navy); border-color: var(--yec-navy); color: #fff; }
.yec-f-birthday::before, .yec-f-anniversary::before, .yec-f-other::before {
	content: "";
	display: inline-block;
	width: 8px; height: 8px;
	margin-right: 6px;
	border-radius: 50%;
}
.yec-f-birthday::before { background: var(--yec-birthday); }
.yec-f-anniversary::before { background: var(--yec-anniversary); }
.yec-f-other::before { background: var(--yec-other); }
.yec-search {
	flex: 1 1 160px;
	min-width: 140px;
	padding: 8px 12px;
	border: 1px solid var(--yec-border);
	border-radius: 6px;
	font: inherit;
}
.yec-submit-link { white-space: nowrap; }

/* ---- Submission form ---- */
.yec-formwrap { max-width: 640px; }
.yec-form label { display: block; margin-bottom: 14px; font-weight: 600; }
.yec-form input[type="text"], .yec-form input[type="email"], .yec-form input[type="url"],
.yec-form select, .yec-form textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 9px 10px;
	border: 1px solid var(--yec-border);
	border-radius: 6px;
	font: inherit;
	font-weight: 400;
}
.yec-form small { display: block; margin-top: 4px; font-weight: 400; color: var(--yec-muted); }
.yec-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.yec-hint { margin: -6px 0 14px; color: var(--yec-muted); font-size: .9em; }
.yec-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.yec-flash { margin-bottom: 16px; padding: 12px 14px; border-radius: 6px; }
.yec-flash-ok { background: #eef3ee; border-left: 4px solid var(--yec-other); }
.yec-flash-err { background: #fbeceb; border-left: 4px solid #a8322d; }

/* ---- Upcoming list ---- */
.yec-upcoming { list-style: none; margin: 0; padding: 0; }
.yec-up {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	margin-bottom: 6px;
	border: 1px solid var(--yec-border);
	border-left: 5px solid var(--yec-other);
	border-radius: 8px;
}
.yec-up.yec-t-birthday { border-left-color: var(--yec-birthday); }
.yec-up.yec-t-anniversary { border-left-color: var(--yec-anniversary); }
.yec-up-date { min-width: 52px; font-weight: 700; }
.yec-up-title { flex: 1; }
.yec-up-when { color: var(--yec-muted); font-size: .85em; white-space: nowrap; }

/* ---- Homepage month list ---- */
.yec-up-head { margin: 0 0 10px; font-size: 1.25em; font-family: Georgia, "Times New Roman", serif; color: var(--yec-navy); }
.yec-up-more { margin: 12px 0 0; }
.yec-up-more a { font-weight: 600; text-decoration: none; color: var(--yec-gold-dark); }
.yec-up-more a:hover { color: var(--yec-navy); }

/* Phones: dots-style compact grid, agenda list does the heavy lifting */
@media (max-width: 640px) {
	.yec-cell { min-height: 54px; padding: 3px; }
	.yec-chip {
		height: 6px;
		padding: 0;
		margin-bottom: 2px;
		font-size: 0;
		border-radius: 3px;
	}
	.yec-addall, .yec-addall .yec-btn { width: 100%; }
	.yec-menu { left: 0; right: 0; min-width: 0; }
	.yec-two { grid-template-columns: 1fr; }
	.yec-search { flex-basis: 100%; }
}

/* ---- Theme polish ---- */
.yec-app a:focus-visible, .yec-app button:focus-visible, .yec-app input:focus-visible,
.yec-app select:focus-visible, .yec-app textarea:focus-visible {
	outline: 2px solid var(--yec-gold);
	outline-offset: 2px;
}
.yec-up, .yec-row { background: var(--yec-bg); }
