/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
	color-scheme: light;
	--ink: #1e1b18;
	--muted: #6e6a65;
	--cream: #f7f2eb;
	--sand: #efe6dc;
	--paper: #ffffff;
	--paper-line: #e9e3db;
	--paper-edge: #cfc6bc;
	--accent: #1f6f8b;
	--accent-2: #e07a5f;
	--accent-3: #f2cc8f;
	--avatar-image-shape-radius: 50%;
	--shadow: 0 24px 60px rgba(32, 24, 16, 0.18);
}

body.avatar-shape-rounded-square {
	--avatar-image-shape-radius: 10px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
	color: var(--ink);
	background: radial-gradient(circle at top left, #fef9f2 0%, #f2e7da 45%, #e9d8c4 100%);
	height: 100vh;
	overflow: hidden;
}

.page {
	max-width: 100%;
	margin: 0;
	padding: 24px;
	display: flex;
	flex-direction: column;
	height: 100vh;
	animation: fade-in 0.8s ease both;
}

html[data-turbo-preview] .page {
	animation: none;
}

.hero {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	background: linear-gradient(120deg, #ffffff, #f7f1e8 60%, #efe2d3);
	padding: 24px 28px;
	border-radius: 20px;
	box-shadow: var(--shadow);
}

.hero__brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.hero__mark {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--accent);
	color: #fff;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 20px;
	letter-spacing: 0.03em;
	box-shadow: 0 12px 24px rgba(31, 111, 139, 0.35);
}

.hero__title {
	margin: 0;
	font-family: "Fraunces", "Times New Roman", serif;
	font-size: 32px;
}

.hero__tagline {
	margin: 4px 0 0;
	color: var(--muted);
}

.hero__actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	width: 100%;
}

@media (min-width: 900px) {
	.hero {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.hero__actions {
		width: auto;
		margin-left: auto;
		justify-content: flex-end;
	}
}

.btn {
	border: none;
	background: var(--accent);
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 12px 20px rgba(31, 111, 139, 0.25);
}

.btn:hover {
	transform: translateY(-2px);
}

.btn--ghost {
	background: transparent;
	color: var(--ink);
	border: 1px solid #d7c8b7;
	box-shadow: none;
}

.btn--link {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.dashboard {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	max-height: 100%;
	overflow: hidden;
}

.page > .hero + .dashboard {
	padding-top: 16px;
}

/* ─── People & Rules page ────────────────────────────────────────── */
.people-rules-panel {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
	flex: 1;
	min-height: 0;
	max-height: 100%;
	overflow-y: auto;
}

.people-rules-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.people-rules-mobile-tabs {
	display: none;
	margin-bottom: 1rem;
	padding: 4px;
	border: 1px solid #e4d7c7;
	border-radius: 999px;
	background: #fbf7f1;
	gap: 0.35rem;
}

.people-rules-mobile-tabs__tab {
	flex: 1;
	border: none;
	background: transparent;
	color: #6a5d4f;
	border-radius: 999px;
	padding: 0.7rem 0.9rem;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.people-rules-mobile-tabs__tab.is-active {
	background: #fff;
	color: var(--ink);
	box-shadow: 0 6px 16px rgba(28, 22, 16, 0.08);
}

.people-rules-section[hidden] {
	display: none;
}

.person-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid #e0e0e0;
	background: #fff;
}

.person-row__identity {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-grow: 1;
	min-width: 0;
}

.person-row__info {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	overflow: hidden;
}

.person-row__info small {
	color: #666;
	line-height: 1.15;
}

.person-row__birthday {
	color: #7b5b2e;
	font-weight: 600;
}

.person-row__colors {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.person-row__color-swatch-group {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.person-row__color-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #7a6d5f;
	text-transform: uppercase;
}

.person-row__color-swatch {
	width: 14px;
	height: 14px;
	border-radius: 999px;
	border: 1px solid #d7c8b7;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
	flex-shrink: 0;
}

.person-row__actions {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-left: -0.2rem;
	flex-shrink: 0;
}

.person-row__avatar {
	display: inline-block;
	width: 58px;
	height: 58px;
}

.rule-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.5rem 0.5rem 2.5rem;
	border-bottom: 1px solid #f0f0f0;
	flex-wrap: wrap;
}

.rule-row__keyword {
	color: #666;
	flex-grow: 1;
	min-width: 0;
	word-break: break-word;
}

.rule-row__priority {
	color: #999;
	font-size: 0.9rem;
	white-space: nowrap;
}

@media (max-width: 900px) {
	.people-rules-grid {
		grid-template-columns: 1fr;
	}
}

.whiteboard-page {
	gap: 14px;
}

.whiteboard-hero {
	position: relative;
	overflow: visible;
}

.whiteboard-hero::after {
	content: "";
	position: absolute;
	right: -120px;
	top: -80px;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(31, 111, 139, 0.2) 0%, rgba(31, 111, 139, 0) 70%);
	pointer-events: none;
	z-index: 0;
}

.whiteboard-hero__actions {
	gap: 10px;
	align-items: center;
	position: relative;
	z-index: 1;
}

.whiteboard-hero .hero__brand {
	position: relative;
	z-index: 1;
}

.whiteboard-control {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid #d7c8b7;
	background: rgba(255, 255, 255, 0.95);
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--ink);
}

.whiteboard-control input[type="color"] {
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
}

.whiteboard-control--range input[type="range"] {
	width: 130px;
	accent-color: var(--accent);
	cursor: pointer;
}

.whiteboard-panel {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: 12px;
	padding: 16px;
	min-height: 0;
	flex: 1;
}

.whiteboard-panel__hint {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.whiteboard-canvas-wrap {
	position: relative;
	width: 100%;
	flex: 1;
	background: repeating-linear-gradient(
		0deg,
		#ffffff,
		#ffffff 39px,
		#f1eee9 40px
	);
	border: 1px solid #dfd4c6;
	border-radius: 14px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
	min-height: 0;
	height: 100%;
	overflow: hidden;
}

.whiteboard-canvas-wrap canvas {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 14px;
	touch-action: none;
	cursor: crosshair;
}

@media (max-width: 860px) {
	.whiteboard-hero__actions {
		width: 100%;
		justify-content: flex-start;
	}

	.whiteboard-control--range input[type="range"] {
		width: 110px;
	}
}

@media (max-width: 700px) {
	.whiteboard-page {
		padding: 16px;
	}

	.whiteboard-control {
		width: 100%;
		justify-content: space-between;
	}

	.whiteboard-hero__actions .btn {
		width: 100%;
	}

	.whiteboard-panel {
		padding: 12px;
	}
}

@media (max-width: 580px) {
	.people-rules-panel {
		padding: 0.5rem;
	}

	.people-rules-grid {
		gap: 1.25rem;
	}

	.person-row {
		gap: 0.4rem;
		padding: 0.4rem 0.5rem;
	}

	.person-row__avatar {
		width: 44px;
		height: 44px;
	}

	.person-row__colors {
		font-size: 11px;
	}

	.person-row__color-swatch {
		width: 12px;
		height: 12px;
	}

	.person-row__actions {
		gap: 0.2rem;
		margin-left: -0.35rem;
	}

	.person-row__actions .btn {
		padding: 6px 9px;
		font-size: 13px;
	}

	.rule-row {
		padding: 0.5rem;
		row-gap: 0.25rem;
	}

	.rule-row__keyword {
		flex-basis: 100%;
	}
}

@media (max-width: 720px) {
	.people-rules-mobile-tabs {
		display: flex;
	}

	.people-rules-grid {
		display: block;
	}

	.people-rules-section {
		min-width: 0;
	}
}

.calendar-filter {
	background: #fff9f2;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 0;
	border: 1px solid #e4d7c7;
}

.calendar-filter--header-center {
	background: transparent;
	border-radius: 0;
	padding: 0;
	margin-bottom: 0;
	border: none;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.calendar-filter--header-center .calendar-filter__list {
	gap: 12px;
}

.calendar-filter--header-center .calendar-filter__item {
	background: transparent;
	padding: 0;
}

.calendar-filter__header {
	margin-bottom: 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.calendar-filter__header h3 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
}

.calendar-filter__manage {
	font-size: 12px;
	color: var(--accent);
	text-decoration: none;
	font-weight: 600;
}

.calendar-filter__manage:hover {
	text-decoration: underline;
}

.calendar-filter__list {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.calendar-filter--sidebar .calendar-filter__list {
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 12px;
}

.calendar-filter--top-center .calendar-filter__list {
	gap: 12px;
}

.calendar-filter__item {
	background: #fff;
	border-radius: 8px;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

/* Sidebar layout item */
.calendar-filter--sidebar .calendar-filter__item {
	flex-direction: column;
	background: transparent;
	padding: 0;
	gap: 8px;
}

/* Top center layout item */
.calendar-filter--top-center .calendar-filter__item {
	flex-direction: row;
	background: transparent;
	padding: 0;
	gap: 0;
}

.calendar-filter__avatar-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.calendar-filter__item:hover {
	background: #f9f6f2;
}

.calendar-filter__item--readonly {
	cursor: default;
}

.calendar-filter__checkbox {
	width: 18px;
	height: 18px;
	border: 2px solid #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	flex-shrink: 0;
	transition: all 0.15s ease;
	background: var(--calendar-filter-checkbox-color, var(--accent));
	color: #fff;
	position: absolute;
	bottom: -2px;
	right: -2px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.calendar-filter__checkbox:not(.calendar-filter__checkbox--checked) {
	background: #fff;
	color: transparent;
	border-color: #d0c4b7;
}

.calendar-filter__checkbox--checked {
	background: var(--calendar-filter-checkbox-color, var(--accent));
	border-color: var(--calendar-filter-checkbox-color, var(--accent));
	color: #fff;
}

.calendar-filter__color {
	width: 16px;
	height: 16px;
	border-radius: 4px;
	flex-shrink: 0;
}

.calendar-filter__name {
	color: var(--ink);
	font-weight: 500;
	font-size: 14px;
}

.global-nav-slot {
	display: contents;
}

.global-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.global-nav--inline {
	margin-left: auto;
}

.chip--menu {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-inline: 14px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #d9cbb8;
	box-shadow: 0 8px 24px rgba(28, 22, 16, 0.14);
	backdrop-filter: blur(4px);
}

.chip__icon {
	font-size: 13px;
	line-height: 1;
}

.chip--calendar-home {
	text-decoration: none;
	color: var(--ink);
	border: 1px solid #d9cbb8;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 8px 24px rgba(28, 22, 16, 0.12);
	backdrop-filter: blur(4px);
}

.chip--calendar-home:hover,
.chip--menu:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(28, 22, 16, 0.18);
}

.dropdown {
	position: relative;
	display: inline-block;
}

.dropdown__content {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	margin-top: 8px;
	background: var(--paper);
	border: 1px solid #e4d7c7;
	border-radius: 12px;
	box-shadow: var(--shadow);
	min-width: 220px;
	padding: 8px;
	z-index: 10000;
}

.dropdown__label {
	margin: 6px 8px 8px;
	padding: 0 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8b7f72;
}

.dropdown__content.show {
	display: block;
}

.dropdown__item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 10px 14px;
	text-decoration: none;
	color: var(--ink);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.15s ease;
	border: none;
	background: none;
	cursor: pointer;
	font-family: inherit;
	box-sizing: border-box;
}

.dropdown__item-group {
	position: relative;
}

.dropdown__item--has-children {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
}

.dropdown__item--has-children::before {
	content: "‹";
	font-size: 14px;
	color: #7a6d5f;
}

.dropdown__submenu {
	display: none;
	position: absolute;
	top: 0;
	left: auto;
	right: calc(100% - 4px);
	min-width: 220px;
	padding: 8px;
	border: 1px solid #e4d7c7;
	border-radius: 12px;
	background: var(--paper);
	box-shadow: var(--shadow);
	z-index: 10001;
}

.dropdown__item-group:hover .dropdown__submenu,
.dropdown__item-group:focus-within .dropdown__submenu {
	display: block;
}

.dropdown__subitem {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--ink);
	text-align: left;
	cursor: pointer;
	text-decoration: none;
}

.dropdown__subitem:hover {
	background: #f7f2eb;
}

.dropdown__item--home {
	font-weight: 700;
	color: var(--accent);
	background: #eef7fb;
}

.dropdown__item:hover {
	background: #f7f2eb;
}

.dropdown__item--toggle {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
}

.dropdown__item--toggle.is-active {
	color: var(--accent);
	background: #eef7fb;
}

.dropdown__item-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
	flex-shrink: 0;
}

.dropdown__item--separator {
	border-top: 1px solid #e4d7c7;
	margin-top: 4px;
	padding-top: 14px;
}

.dropdown__item--danger {
	color: #b42318;
}

.dropdown__item--danger:hover {
	background: #fff0ef;
}

/* ─── Quick-actions menu: mobile ─────────────────────────────────── */
@media (max-width: 640px) {
	.hero {
		padding: 20px 16px;
	}

	.hero__title {
		font-size: 26px;
	}

	.hero__tagline {
		font-size: 13px;
	}

	/* Dropdown content */
	.dropdown__content {
		min-width: 260px;
		max-width: calc(100vw - 24px);
		max-height: 82vh;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Comfortable tap targets (min 44px height) */
	.dropdown__item {
		padding: 13px 16px;
		font-size: 15px;
		min-height: 44px;
		display: flex;
		align-items: center;
	}

	/* Hide flyout chevron — no flyout on mobile */
	.dropdown__item--has-children::before {
		display: none;
	}

	/* Convert flyout submenus to inline accordion */
	.dropdown__submenu {
		position: static;
		top: auto;
		right: auto;
		box-shadow: none;
		border: none;
		border-left: 2px solid #e4d7c7;
		border-radius: 0;
		background: transparent;
		min-width: 0;
		padding: 0;
		margin: 0 0 4px 22px;
		display: block;
	}

	.dropdown__subitem {
		padding: 10px 12px;
		font-size: 14px;
		color: #5a5048;
		min-height: 40px;
		display: flex;
		align-items: center;
		border-radius: 6px;
	}
}

.weather-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 13000;
}

.weather-modal.show {
	display: flex;
}

.weather-modal__card {
	width: min(560px, 100%);
	background: #fff;
	border-radius: 14px;
	padding: 18px;
	box-shadow: var(--shadow);
}

.weather-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.weather-modal__header h3 {
	margin: 0;
	font-family: "Fraunces", "Times New Roman", serif;
	font-size: 24px;
}

.weather-modal__close {
	border: none;
	background: transparent;
	font-size: 24px;
	cursor: pointer;
	color: #6e6a65;
}

.weather-modal__lookup-row,
.weather-modal__coord-row,
.weather-modal__actions {
	display: flex;
	gap: 10px;
}

.weather-modal__actions {
	align-items: stretch;
}

.weather-modal__actions > * {
	flex: 1;
}

.weather-modal__actions form {
	margin: 0;
}

.weather-modal__actions .btn {
	width: 100%;
}

.weather-modal__coord-row > div {
	flex: 1;
}

.weather-modal__form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.weather-modal__label {
	font-size: 13px;
	font-weight: 600;
	color: #5b534c;
}

.weather-modal__input {
	width: 100%;
	border: 1px solid #d6c9ba;
	border-radius: 8px;
	padding: 9px 10px;
	font: inherit;
}

.weather-modal__status {
	min-height: 1.2em;
	font-size: 13px;
	margin-top: 4px;
}

.weather-modal__results {
	display: none;
	border: 1px solid #ddd;
	border-radius: 8px;
	max-height: 180px;
	overflow-y: auto;
	margin-top: 4px;
	background: #fff;
}

.weather-modal__result-item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 9px 10px;
	border: none;
	border-bottom: 1px solid #f0f0f0;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
}

.weather-modal__result-item:hover {
	background: #f7f2eb;
}

.weather-modal__clear {
	margin-top: 0;
}

.day-view-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.day-view-overlay.show {
	display: flex;
}

.day-view {
	position: relative;
	background: var(--paper);
	border-radius: 24px;
	box-shadow: var(--shadow);
	max-width: 1100px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.day-view__header {
	padding: 24px 28px;
	border-bottom: 1px solid #e4d7c7;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.day-view__header h2 {
	margin: 0;
	font-family: "Fraunces", "Times New Roman", serif;
	font-size: 28px;
	color: var(--ink);
}

.day-view__badge {
	display: inline-block;
	padding: 4px 12px;
	background: var(--accent-2);
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	margin-left: 12px;
}

.day-view__close {
	width: 40px;
	height: 40px;
	border: none;
	background: #f7f2eb;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	transition: background 0.15s ease;
}

.day-view__close:hover {
	background: #e9e0d1;
}

.day-view__content {
	flex: 1;
	overflow-y: auto;
	padding: 24px 28px;
}

.day-view__all-day {
	margin: 0;
	padding: 24px 28px 24px 28px;
	border-bottom: 2px solid #e4d7c7;
	background: var(--paper);
	flex-shrink: 0;
}

.day-view__all-day h3 {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
}

.day-view__all-day-event {
	padding: 8px 16px;
	border-radius: 8px;
	margin-bottom: 2px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
}

.day-view__all-day-title {
	font-weight: 600;
	font-size: 14px;
}

.day-view__all-day-location {
	font-size: 12px;
	opacity: 0.9;
}

.day-view__empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--muted);
}

.day-view__empty p {
	margin: 0;
	font-size: 16px;
}

.day-view__timeline {
	position: relative;
}

.day-view__hours {
	display: flex;
	flex-direction: column;
}

.day-view__hour {
	display: flex;
	align-items: flex-start;
	height: 60px;
	position: relative;
}

.day-view__hour-label {
	width: 80px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	padding-right: 12px;
	text-align: right;
	flex-shrink: 0;
	transform: translateY(-8px);
}

.day-view__hour-line {
	flex: 1;
	border-top: 1px solid #e9e3db;
	margin-top: 0;
}

.day-view__events {
	position: absolute;
	top: 0;
	left: 92px;
	right: 0;
	height: 1440px;
}

.day-view__event {
	position: absolute;
	border-radius: 8px;
	padding: 10px 14px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-right: 4px;
	box-sizing: border-box;
	overflow: hidden;
	cursor: pointer;
}

.day-view__event--compact {
	padding: 6px 10px;
	justify-content: center;
	gap: 0;
}

.day-view__event-time {
	font-size: clamp(9px, 1.4vh, 11px);
	font-weight: 700;
	opacity: 0.95;
	flex-shrink: 0;
	line-height: 1.15;
	white-space: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.day-view__event-title {
	font-size: clamp(10px, 1.7vh, 14px);
	font-weight: 600;
	line-height: 1.3;
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}

.day-view__event--compact .day-view__event-title {
	font-size: clamp(10px, 1.4vh, 13px);
	line-height: 1.2;
	-webkit-line-clamp: 1;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.day-view__event-compact-text {
	font-size: clamp(9px, 1.3vh, 12px);
	font-weight: 600;
	line-height: 1.15;
	white-space: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.day-view__event:not(.day-view__event--roomy) .day-view__event-time {
	font-size: clamp(8px, 1.25vh, 10px);
	line-height: 1.15;
}

.day-view__event:not(.day-view__event--roomy) .day-view__event-title {
	font-size: clamp(9px, 1.5vh, 12px);
	-webkit-line-clamp: 3;
}

.day-view__event--compact.day-view__event--roomy {
	align-items: flex-start;
	justify-content: flex-start;
	padding-top: 8px;
}

.day-view__event--compact.day-view__event--roomy .day-view__event-compact-text {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
}

.day-view__event-location {
	font-size: clamp(10px, 1.5vh, 13px);
	opacity: 0.9;
	line-height: 1.2;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.day-view__event:focus-visible,
.day-view__all-day-event:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.75);
	outline-offset: -2px;
}

.panel {
	background: var(--paper);
	border-radius: 24px;
	padding: 24px;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.panel--calendar {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	max-height: 100%;
	overflow: hidden;
	gap: 0;
}

.panel.people-rules-panel {
	flex: 1;
	min-height: 0;
	max-height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
}

.calendar {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	max-height: 100%;
	overflow: hidden;
}

.calendar-content {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	max-height: 100%;
	overflow: hidden;
}

.calendar--kids {
	overflow: auto;
}

.kids-view {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-bottom: 12px;
}

.kids-view__schedule-card {
	background: #f4f8ff;
	border: 1px solid #cfdcf2;
	border-radius: 14px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.kids-view__schedule-head h3 {
	margin: 0;
	font-size: 18px;
}

.kids-view__schedule-head p {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--muted);
}

.kids-recurring-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.kids-recurring-presets {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.kids-recurring-presets__btn {
	border: 1px solid #b8caeb;
	background: #fff;
	color: #2c446e;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 10px;
	border-radius: 999px;
	cursor: pointer;
}

.kids-recurring-presets__btn:hover {
	background: #ebf2ff;
}

.kids-recurring-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.kids-recurring-form__row--dates {
	grid-template-columns: auto auto auto;
	align-items: end;
}

.kids-recurring-form__row--dates label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #5e6470;
}

.kids-recurring-form__input {
	width: 100%;
	border: 1px solid #b9c8e6;
	border-radius: 8px;
	padding: 8px;
	font-size: 13px;
	background: #fff;
}

.kids-recurring-form__days {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.kids-recurring-form__day {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #44506b;
	background: #ffffff;
	border: 1px solid #c7d5ee;
	border-radius: 999px;
	padding: 4px 8px;
}

.kids-recurring-form__people {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kids-recurring-form__timeframe {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kids-recurring-form__timeframe-options {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.kids-recurring-form__timeframe-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #44506b;
	background: #ffffff;
	border: 1px solid #c7d5ee;
	border-radius: 999px;
	padding: 6px 10px;
	cursor: pointer;
}

.kids-recurring-form__row--times {
	grid-template-columns: 1fr 1fr;
}

.kids-recurring-form__row--times[hidden] {
	display: none;
}

.kids-recurring-form__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	color: #44506b;
}

.kids-recurring-form__toggle input[type="checkbox"] {
	width: 15px;
	height: 15px;
}

.kids-recurring-form__people-label {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	color: #4e5767;
}

.kids-recurring-form__people-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.kids-recurring-form__person {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #44506b;
	background: #ffffff;
	border: 1px solid #c7d5ee;
	border-radius: 999px;
	padding: 4px 8px 4px 4px;
	cursor: pointer;
}

.kids-recurring-form__person__avatar {
	width: 22px;
	height: 22px;
	border-radius: var(--avatar-image-shape-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
	overflow: hidden;
}

.kids-recurring-form__person__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kids-emoji-picker {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
	border: 1px solid #c9d6ee;
	border-radius: 10px;
	background: #f8fbff;
}

.kids-emoji-picker__search {
	border: 1px solid #c5d2ea;
	border-radius: 8px;
	padding: 6px 8px;
	font-size: 13px;
	background: #fff;
}

.kids-emoji-picker__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-content: flex-start;
	max-height: 126px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: stable;
}

.kids-emoji-picker__item {
	border: 1px solid #cfdbef;
	background: #fff;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	cursor: pointer;
	font-size: 20px;
}

.kids-emoji-picker__item:hover {
	background: #eef4ff;
}

.kids-emoji-picker__image {
	width: 24px;
	height: 24px;
	object-fit: contain;
	border-radius: 6px;
}

.emoji-manage-panel {
	max-width: 920px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.emoji-manage-create h3,
.emoji-manage-list-wrap h3 {
	margin: 0 0 10px;
}

.emoji-manage-list-wrap__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.emoji-manage-list-wrap__head h3 {
	margin: 0;
}

.emoji-manage-create {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.emoji-manage-form {
	display: grid;
	grid-template-columns: 80px 1fr 170px 220px auto;
	gap: 8px;
}

.emoji-manage-form__emoji,
.emoji-manage-form__name,
.emoji-manage-form__category,
.emoji-manage-form__file {
	border: 1px solid #d5c8bb;
	border-radius: 10px;
	padding: 10px;
	font-size: 15px;
	background: #fff;
}

.emoji-manage-form__emoji {
	text-align: center;
	font-size: 24px;
}

.emoji-manage-form__hint {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--muted);
}

.emoji-manage-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.emoji-manage-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.emoji-manage-group__title {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6f6458;
}

.emoji-manage-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid #e0d4c6;
	border-radius: 12px;
	background: #fffdf9;
}

.emoji-manage-item__content {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.emoji-manage-item__actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.emoji-manage-item__emoji {
	font-size: 26px;
}

.emoji-manage-item__emoji--image {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emoji-manage-item__emoji--image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.emoji-manage-item__name {
	font-weight: 700;
	font-size: 15px;
}

.emoji-manage-empty {
	margin: 0;
	color: var(--muted);
}

.emoji-manage-form--modal {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.person-form__birthday-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex-wrap: nowrap;
}

.person-form__appearance-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex-wrap: nowrap;
}

.person-form__swatch-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	color: #666;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	flex: 0 0 auto;
}

.person-form__birthday-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	color: #666;
	font-size: 0.85rem;
	flex: 0 1 154px;
}

.person-form__birthday-upload {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	color: #666;
	font-size: 0.85rem;
	flex: 0 1 190px;
	min-width: 170px;
}

.person-form__birthday-input {
	width: 100%;
	border: 1px solid #d0c4b7;
	border-radius: 6px;
	padding: 0.5rem 0.65rem;
	background: #fff;
	color: #2b2118;
	font: inherit;
}

.person-form__file-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex: 1;
	min-width: 0;
	flex-wrap: nowrap;
}

.person-form__avatar-upload {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	color: #666;
	font-size: 0.85rem;
	flex: 0 1 190px;
	min-width: 160px;
}

.person-form__file-input {
	width: 100%;
	max-width: 190px;
	border: 1px solid #d0c4b7;
	border-radius: 6px;
	padding: 0.32rem 0.45rem;
	background: #fff;
	color: #2b2118;
	font: inherit;
	font-size: 0.8rem;
}

.person-form__current-image-inline {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	padding-top: 0.05rem;
	flex: 0 0 auto;
}

.person-form__current-avatar-button {
	all: unset;
	display: inline-flex;
	cursor: zoom-in;
	border-radius: 8px;
}

.person-form__current-avatar-button:focus-visible {
	outline: 2px solid #7a5c2a;
	outline-offset: 2px;
}

.person-form__remove-button {
	border: 1px solid #d7b98a;
	border-radius: 999px;
	padding: 0.34rem 0.78rem;
	background: #fff7ea;
	color: #8a4d12;
	font: inherit;
	font-size: 0.79rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.person-form__remove-button:hover {
	background: #ffe7c8;
	border-color: #c88d4c;
}

.person-form__remove-button.is-active {
	background: #9f2f1b;
	border-color: #9f2f1b;
	color: #fff8f4;
}

.person-form__token-jar {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 0.7rem;
	padding: 0.55rem 0.65rem;
	border: 1px solid #e6d7c5;
	border-radius: 10px;
	background: #fff9f1;
}

.person-form__token-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.88rem;
	font-weight: 600;
}

.person-form__token-max {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.88rem;
	color: #5d5147;
}

.person-form__token-max input {
	width: 90px;
	border: 1px solid #d7c8b7;
	border-radius: 8px;
	padding: 0.35rem 0.45rem;
	font: inherit;
	font-size: 0.85rem;
}

.manage-modal__actions.person-form__actions {
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.32rem;
	overflow-x: auto;
	scrollbar-width: thin;
}

.manage-modal__actions.person-form__actions .btn,
.manage-modal__actions.person-form__actions .person-form__remove-button {
	white-space: nowrap;
	flex-shrink: 0;
	padding: 0.42rem 0.72rem;
	font-size: 0.78rem;
	line-height: 1.15;
}

.manage-modal__actions.person-form__actions .btn:first-of-type,
.manage-modal__actions.person-form__actions .person-form__remove-button:first-of-type {
	margin-left: auto;
}

@media (max-width: 720px) {
	.person-form__birthday-row,
	.person-form__appearance-row,
	.person-form__file-row {
		flex-wrap: wrap;
	}

	.person-form__avatar-upload {
		flex-basis: 100%;
		max-width: none;
	}

	.person-form__file-input {
		max-width: none;
	}
}

.emoji-manage-form--modal .emoji-manage-form__emoji,
.emoji-manage-form--modal .emoji-manage-form__name,
.emoji-manage-form--modal .emoji-manage-form__category,
.emoji-manage-form--modal .emoji-manage-form__file {
	width: 100%;
}

.emoji-manage-form__current-image {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.emoji-manage-form__current-label {
	font-size: 13px;
	font-weight: 700;
	color: #6f6458;
}

.emoji-manage-form__or-divider {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #9e9185;
	margin: 2px 0;
}

.emoji-manage-form__or-divider::before,
.emoji-manage-form__or-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e4d7c7;
}

.emoji-manage-form__url-input {
	border: 1px solid #d5c8bb;
	border-radius: 10px;
	padding: 10px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}

.emoji-manage-form__url-input::placeholder {
	color: #b8a898;
	font-size: 12px;
}

.kids-recurring-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kids-recurring-list__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #d0def5;
	border-radius: 10px;
	font-size: 13px;
}

.kids-recurring-list__item span {
	color: var(--muted);
}

.kids-recurring-list__actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.kids-recurring-list__remove {
	border: 0;
	background: #e76666;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	cursor: pointer;
}

.btn--sm {
	font-size: 12px;
	padding: 5px 10px;
}

.kids-view__days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 10px;
}

.kids-day {
	background: #fff;
	border: 1px solid var(--paper-line);
	border-radius: 12px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 220px;
}

.kids-day--today {
	border-width: 2px;
	border-color: var(--accent);
	box-shadow: inset 0 0 0 1px rgba(31, 111, 139, 0.2);
}

.calendar--kids.calendar--dim-past .kids-day--past:not(.kids-day--today) {
	opacity: 0.45;
	filter: saturate(0.7);
}

.calendar--kids.calendar--dim-past .kids-day__event.day__event--past {
	opacity: 0.58;
	filter: saturate(0.75);
}

.kids-day__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.kids-day__date-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.kids-day__date {
	font-weight: 700;
	font-size: 14px;
}

.kids-day__meta {
	font-size: 12px;
	color: var(--muted);
	display: flex;
	gap: 6px;
	align-items: center;
}

.kids-day__weather {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px;
	border: 1px solid var(--paper-line);
	border-radius: 8px;
	background: linear-gradient(180deg, #fff9ef 0%, #fff3df 100%);
}

.kids-day__weather--clickable {
	appearance: none;
	width: 100%;
	text-align: inherit;
	font: inherit;
	color: inherit;
	cursor: zoom-in;
}

.kids-day__weather--clickable:focus-visible {
	outline: 3px solid #d8b77f;
	outline-offset: 2px;
}

.kids-day__weather-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.kids-day__weather-icon {
	font-size: 40px;
	flex-shrink: 0;
}

.kids-day__weather-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.kids-day__weather-label {
	font-weight: 700;
	font-size: 15px;
	color: #4d3f32;
	line-height: 1.2;
}

.kids-day__weather-temps {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	font-weight: 600;
}

.kids-day__weather-temp {
	font-size: 16px;
	font-weight: 700;
}

.kids-day__weather-temp-divider {
	font-size: 12px;
	color: #999;
}

.kids-day__wear-row {
	display: flex;
	justify-content: center;
	align-items: center;
	padding-top: 6px;
}


.kids-day__wear-image {
	max-height: 120px;
	width: auto;
	display: block;
}

.kids-day__wear-item {
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid #d7c8b7;
	background: #fff;
}

.kids-day__wear-emoji {
	font-size: 32px;
	line-height: 1;
}

.kids-day__add-link {
	font-size: 12px;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
}

.kids-day__add-link:hover {
	text-decoration: underline;
}

.kids-day__events {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	overflow: auto;
}

.kids-day__events > li {
	min-height: 72px;
}

.kids-day__events > .kids-day__recurring-item {
	display: flex;
}

.kids-day__event {
	-webkit-line-clamp: unset;
	cursor: pointer;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72px;
}

.kids-day__events > .kids-day__event {
	padding: 12px 12px !important;
}

.kids-day__event--calendar .day__title {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	line-height: 1;
}

.kids-day__event--calendar .event-display-title {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	line-height: 1;
}

.kids-day__event--calendar .sized-person-token,
.kids-day__event--calendar .sized-custom-emoji-token,
.kids-day__event--calendar .sized-emoji {
	vertical-align: middle;
}

.kids-day__event--calendar {
	flex-direction: column;
	gap: 6px;
}

.kids-day__calendar-time {
	font-size: 11px;
	font-weight: 700;
	opacity: 0.9;
	line-height: 1;
}

.kids-day__event--recurring {
	background: #e6f0ff;
	border: 1px solid #c3d4f7;
	color: #1d355e;
	cursor: pointer;
	padding: 8px 10px;
	border-radius: 8px;
	flex-direction: column;
	gap: 4px;
	min-height: 64px;
}

.kids-day__event--recurring-trigger {
	width: 100%;
	text-align: center;
	border: 0;
	font: inherit;
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	justify-content: center;
	min-height: 72px;
}

.kids-day__event--recurring .day__title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	flex-wrap: wrap;
	width: 100%;
	line-height: 1.2;
}

.kids-day__event--recurring .event-display-title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	line-height: 1;
	flex-wrap: wrap;
}

.kids-day__event--recurring .sized-emoji {
	flex-shrink: 0;
}

.kids-day__event--recurring .sized-emoji--xl {
	font-size: 1.2em;
}

.kids-day__recurring-time {
	font-size: 11px;
	font-weight: 700;
	opacity: 0.9;
	line-height: 1;
}

.kids-day__birthday-item {
	list-style: none;
}

.kids-day__birthday-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: stretch;
	width: 100%;
	padding: 10px;
	border-radius: 14px;
	border: 1px solid color-mix(in srgb, var(--birthday-accent) 35%, #ffffff);
	background:
		radial-gradient(circle at top right, rgba(255, 255, 255, 0.95), transparent 34%),
		linear-gradient(135deg, color-mix(in srgb, var(--birthday-accent) 16%, #fff6d6), color-mix(in srgb, var(--birthday-accent) 42%, #fff));
	box-shadow: 0 12px 24px rgba(110, 74, 22, 0.12);
}

.kids-day__birthday-card--clickable {
	appearance: none;
	text-align: inherit;
	cursor: zoom-in;
	font: inherit;
	color: inherit;
}

.kids-day__birthday-card--clickable:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--birthday-accent) 72%, #ffffff);
	outline-offset: 2px;
}

.kids-day__birthday-media {
	width: 88px;
	height: 88px;
	margin: 0 auto;
	border-radius: 18px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.82);
	border: 3px solid rgba(255, 255, 255, 0.85);
	box-shadow: 0 8px 18px rgba(83, 56, 18, 0.14);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.kids-day__birthday-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kids-day__birthday-fallback {
	font-size: 3rem;
	line-height: 1;
}

.kids-day__birthday-fallback--initial {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--birthday-accent);
	color: var(--birthday-text);
	font-size: 2.4rem;
	font-weight: 800;
}

.kids-day__birthday-content {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	text-align: center;
}

.kids-day__birthday-kicker {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--birthday-accent) 68%, #8a5b10);
}

.kids-day__birthday-title {
	font-size: 1.05rem;
	font-weight: 800;
	line-height: 1.2;
	color: #503311;
}

.kids-day__birthday-date {
	font-size: 0.82rem;
	font-weight: 700;
	color: #7a5c2a;
}

.kids-day__recurring-open-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #506792;
}

.kids-day__recurring-actions {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.kids-day__recurring-people-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}

.kids-day__recurring-person {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 8px 4px 4px;
	border-radius: 999px;
	border: 1px solid #bfd1f3;
	background: #fff;
	color: #3d4f6f;
	cursor: pointer;
}

.kids-day__recurring-person__avatar {
	width: 22px;
	height: 22px;
	border-radius: var(--avatar-image-shape-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
	overflow: hidden;
}

.kids-day__recurring-person__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kids-day__recurring-form {
	display: flex;
	gap: 4px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}

.kids-day__recurring-input {
	border: 1px solid #bfd1f3;
	border-radius: 6px;
	font-size: 12px;
	padding: 4px 6px;
	background: #fff;
	min-width: 0;
	max-width: 130px;
}

.kids-day__recurring-btn {
	border: 0;
	background: #2f6ec9;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 999px;
	cursor: pointer;
}

.kids-day__recurring-btn--revert {
	background: #8a94a8;
}

.kids-day__recurring-btn--delete {
	background: #e76666;
}

.kids-day__title--kids-note {
	font-weight: 700;
	line-height: 1.35;
	display: block;
	width: 100%;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.kids-day__kids-note {
	font-size: 1.35em;
}

.kids-day__title--kids-note .event-extra-info,
.kids-day__title--kids-note .event-extra-info--emoji-only {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.2em;
	line-height: 1;
}

.kids-day__title--kids-note .sized-emoji,
.kids-day__title--kids-note .sized-person-token {
	vertical-align: middle;
}

.kids-day__event .sized-emoji--sm {
	font-size: 1.55em;
}

.kids-day__event .sized-emoji--md {
	font-size: 2em;
}

.kids-day__event .sized-emoji--lg {
	font-size: 2.4em;
}

.kids-day__event .sized-emoji--xl {
	font-size: 3.2em;
}

.kids-day__empty {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--muted);
}

@media (max-width: 1200px) {
	.kids-view__days {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(220px, 1fr);
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 6px;
		scroll-snap-type: x proximity;
	}

	.kids-day {
		scroll-snap-align: start;
	}
}

@media (max-width: 800px) {
	.kids-view__schedule-description {
		display: none;
	}

	.kids-day__birthday-media {
		width: 72px;
		height: 72px;
	}

	.kids-view__schedule-actions {
		gap: 6px;
	}

	.kids-view__schedule-actions .btn,
	.kids-view__schedule-actions .btn--link {
		font-size: 14px;
		padding: 8px 12px;
	}

	.kids-view__days {
		grid-auto-columns: minmax(240px, 82vw);
	}

	.kids-day__weather {
		padding: 9px;
	}

	.kids-day__weather-icon {
		font-size: 32px;
	}

	.kids-day__weather-label {
		font-size: 14px;
	}

	.kids-day__weather-temp {
		font-size: 14px;
	}

	.kids-day__wear-item {
		width: 44px;
		height: 44px;
	}

	.kids-day__wear-emoji {
		font-size: 29px;
	}

	.kids-recurring-form__row,
	.kids-recurring-form__row--dates {
		grid-template-columns: 1fr;
	}

	.kids-recurring-presets {
		flex-direction: column;
		align-items: stretch;
	}

	.kids-recurring-list__item {
		flex-direction: column;
		align-items: flex-start;
	}

	.emoji-manage-form {
		grid-template-columns: 1fr;
	}

	.kids-emoji-picker__grid {
		max-height: 86px;
	}

	.kids-occurrence-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(180px, 78vw);
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 6px;
		scroll-snap-type: x proximity;
	}

	.kids-occurrence-day {
		scroll-snap-align: start;
	}
}

.panel__header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
	flex-shrink: 0;
	justify-content: space-between;
	position: relative;
}

/* Sidebar layout option */
.calendar-filter--sidebar {
	background: transparent;
	border-radius: 0;
	padding: 12px;
	margin-bottom: 0;
	border: none;
	border-right: 1px solid #e4d7c7;
	flex-shrink: 0;
	width: auto;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.calendar-filter__list--vertical {
	flex-direction: column !important;
	gap: 12px;
	flex-wrap: nowrap;
}

/* When panel is in row mode with sidebar */
.panel--calendar.panel--calendar--sidebar {
	flex-direction: row;
}

.panel__title {
	flex: 1;
	min-width: 0;
}

.panel__status {
	display: none;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	border-radius: 12px;
	border: 1px solid #e4d7c7;
	background: #fff9f2;
	white-space: nowrap;
	flex-shrink: 0;
}

.panel__status-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.panel__status-trigger {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 0;
	border: none;
	background: transparent;
	font: inherit;
	text-align: left;
	cursor: pointer;
	color: inherit;
}

.panel__status-trigger:hover .panel__status-value,
.panel__status-trigger:focus-visible .panel__status-value {
	color: var(--accent);
}

.panel__status-trigger:focus-visible {
	outline: 2px solid rgba(31, 111, 139, 0.35);
	outline-offset: 4px;
	border-radius: 8px;
}

.panel__status-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.panel__status-value {
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
	line-height: 1.2;
}

.panel__status-divider {
	width: 1px;
	height: 28px;
	background: #d9cbb8;
}

.panel__status-weather-text {
	margin-left: 4px;
	font-size: 12px;
	font-weight: 500;
	color: var(--muted);
}
.panel__status-meta {
	font-size: 11px;
	font-weight: 500;
	color: var(--muted);
}
.panel__status-item--home-tools {
	gap: 6px;
}
.panel__status-icons {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.panel__status-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #d8cab8;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	position: relative;
}
.panel__status-icon-btn:hover,
.panel__status-icon-btn:focus-visible {
	border-color: #b89f84;
	background: #fff4e8;
}

.panel__status-icon-btn.is-loading {
	opacity: 0.65;
	pointer-events: none;
}
.panel__status-icon-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: #c44b34;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.panel__status-icon-state {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: #6a5f55;
}

.panel__status-icon-btn--garage {
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
}

.panel__status-garage-icon {
	display: inline-flex;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.panel__status-garage-icon svg {
	width: 100%;
	height: 100%;
}

.panel__status-garage-icon .garage-roof {
	fill: #b5885f;
	stroke: #8a6039;
	stroke-width: 1;
}

.panel__status-garage-icon .garage-wall {
	fill: #ecd7bc;
	stroke: #9c754d;
	stroke-width: 1;
}

.panel__status-garage-icon .garage-door {
	fill: #f8f0e3;
	stroke: #8f6942;
	stroke-width: 1;
}

.panel__status-garage-icon .garage-opening {
	fill: #312a24;
	opacity: 0.78;
}

.panel__status-garage-icon .garage-floor {
	stroke: #725943;
	stroke-width: 1.1;
	stroke-linecap: round;
}

.panel__status-garage-icon .garage-slat {
	stroke: #b6a184;
	stroke-width: 1;
	stroke-linecap: round;
}

.panel__status-garage-icon .garage-window {
	fill: #d8edf7;
	stroke: #8ba5b3;
	stroke-width: 0.6;
}

.panel__status-garage-icon.is-open .garage-door {
	fill: #e5ddd0;
}

.panel__status-garage-icon.is-open .garage-wall {
	fill: #e3d3bb;
}

.panel__status-garage-icon.is-closed .garage-door {
	fill: #faf3e9;
}

@media (min-width: 1200px) {
	.panel__header {
		display: flex;
		align-items: center;
		gap: 8px;
		justify-content: space-around;
		flex-wrap: nowrap;
	}

	.panel__title {
		flex: 0 0 auto;
		min-width: 0;
		max-width: 22%;
	}

	.panel__status--desktop {
		display: inline-flex;
		position: static;
		transform: none;
		margin: 0;
		flex: 0 0 auto;
	}

	.calendar-filter--header-center {
		position: static;
		left: auto;
		top: auto;
		transform: none;
		margin: 0;
		flex: 0 0 auto;
	}

	.panel__controls {
		margin-left: 0;
		flex: 0 0 auto;
	}
}

.panel__eyebrow {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.panel__title h2 {
	margin: 6px 0 0;
	font-family: "Fraunces", "Times New Roman", serif;
	font-size: 26px;
}

.panel__sync-status {
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--muted);
}
.kids-view__schedule-actions {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	align-items: center;
}

.kids-view__schedule-actions .btn,
.kids-view__schedule-actions .btn--link {
	white-space: nowrap;
	font-size: 15px;
	padding: 9px 14px;
}

.panel__controls {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-shrink: 0;
	justify-content: flex-end;
}

.panel__photo-display-button {
	padding: 8px 14px;
	font-size: 0.82rem;
	font-weight: 700;
	white-space: nowrap;
}

.panel__photo-display-button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.chip {
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid #e4d7c7;
	background: #fff6ec;
	font-size: 12px;
	font-weight: 600;
}

.view-toggle .chip {
	flex: 1;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.pager {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

.pager__group {
	display: inline-flex;
	gap: 0;
}

.pager__group .pager__btn {
	border-radius: 0;
	margin-left: -1px;
}

.pager__group .pager__btn:first-child {
	border-radius: 12px 0 0 12px;
	margin-left: 0;
}

.pager__group .pager__btn:last-child {
	border-radius: 0 12px 12px 0;
}

.pager__btn--today {
	width: auto;
	padding: 0 20px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

.kids-recurring-page {
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

.kids-recurring-page__occurrence-details {
	border: 1px solid #d8e3f7;
	border-radius: 12px;
	background: #f8fbff;
	padding: 10px;
}

.kids-recurring-page__occurrence-details > summary {
	cursor: pointer;
	font-weight: 700;
	font-size: 16px;
	list-style: none;
}

.kids-recurring-page__occurrence-details > summary::-webkit-details-marker {
	display: none;
}

.kids-recurring-page__occurrence-details[open] > summary {
	margin-bottom: 10px;
}

.kids-recurring-page__section h2 {
	margin: 0 0 10px;
	font-size: 20px;
}

.kids-recurring-page__empty {
	margin: 0;
	font-size: 14px;
	color: var(--muted);
}

.kids-occurrence-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.kids-occurrence-day {
	border: 1px solid #d8e3f7;
	border-radius: 12px;
	padding: 10px;
	background: #f8fbff;
}

.kids-occurrence-day__header {
	font-weight: 700;
	font-size: 13px;
	margin-bottom: 6px;
}

.kids-occurrence-day__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 13px;
}

.kids-occurrence-day__list li {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex-wrap: wrap;
}

.kids-occurrence-day__empty {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
}

.kids-recurring-list--page .kids-recurring-list__item {
	padding: 10px 12px;
}

.pager__btn {
	width: 36px;
	height: 36px;
	border-radius: 12px;
	border: 1px solid #e4d7c7;
	background: #fff;
	position: relative;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #6b6157;
	text-decoration: none;
	transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.pager__btn:hover {
	background: #fff6ec;
	border-color: #d8c8b6;
	transform: translateY(-1px);
}

.pager__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.pager__btn--loading .pager__icon {
	opacity: 0;
}

.pager__btn--loading::after {
	content: "";
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #cdb9a4;
	border-top-color: #6b6157;
	animation: pager-spin 0.7s linear infinite;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

@keyframes pager-spin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

.pager__btn:focus-visible {
	outline: 2px solid #4285f4;
	outline-offset: 2px;
}

.pager__icon {
	width: 18px;
	height: 18px;
}

.photo-display {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	background: radial-gradient(circle at top left, rgba(26, 26, 26, 0.95) 0%, rgba(9, 9, 9, 0.985) 60%, rgba(3, 3, 3, 1) 100%);
	padding: 0;
	gap: 0;
	backdrop-filter: blur(3px);
}

.photo-display[hidden] {
	display: none !important;
}

.photo-display__topbar {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	pointer-events: none;
}

.photo-display__frame {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 0;
	background: #050505;
	border: none;
	box-shadow: none;
	padding: 0;
}

.photo-display__frame img {
	width: 100%;
	height: 100%;
	max-width: 100vw;
	max-height: 100vh;
	object-fit: contain;
	object-position: center center;
	border-radius: 0;
	box-shadow: none;
	opacity: 0;
	transform: scale(1);
	user-select: none;
	-webkit-user-drag: none;
}

.photo-display__frame img.photo-display__image--visible {
	opacity: 1;
}

.photo-display__frame img.photo-display__image--enter {
	animation: photo-display-fade 0.45s ease;
}

.photo-display__frame img.photo-display__image--enter.photo-display__image--stretch-horizontal.photo-display__image--landscape {
	object-fit: cover;
	animation: photo-display-fill-settle 0.58s cubic-bezier(0.16, 0.84, 0.24, 1);
}

.photo-display__empty {
	margin: 0;
	text-align: center;
	font-size: 1rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.88);
	max-width: 420px;
	line-height: 1.4;
}

@keyframes photo-display-fade {
	from {
		opacity: 0.7;
		transform: scale(0.99);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes photo-display-fill-settle {
	from {
		opacity: 0.82;
		transform: scale(1.065);
	}

	to {
		opacity: 1;
		transform: scale(1);
	}
}

.calendar__weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.16em;
	color: #3a342f;
	background: #f6f2ed;
	border: 1px solid var(--paper-edge);
	flex-shrink: 0;
	border-bottom: none;
	min-width: 0;
}

.calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	grid-auto-rows: minmax(0, 1fr);
	border: 1px solid var(--paper-edge);
	border-top: none;
	min-width: 0;
	flex: 1;
	max-height: 100%;
	overflow: hidden;
	min-height: 0;
}

.calendar__weekdays span {
	padding: 10px 12px;
	border-right: 1px solid var(--paper-edge);
	font-weight: 600;
}

.calendar__weekdays span:last-child {
	border-right: none;
}

.day {
	background: #ffffff;
	max-height: 100%;
	border-right: 1px solid var(--paper-edge);
	border-bottom: 1px solid var(--paper-edge);
	min-height: 0;
	padding: clamp(4px, 0.8vw, 10px);
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 4px;
	position: relative;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;
	user-select: none;
	background-image: repeating-linear-gradient(
		to bottom,
		transparent 0,
		transparent 18px,
		var(--paper-line) 18px,
		var(--paper-line) 19px
	);
	overflow: hidden;
}

.calendar__grid .day:nth-child(7n) {
	border-right: none;
	background-color: #f7f7f7;
}

.calendar__grid .day:nth-child(7n + 1) {
	background-color: #fafafa;
}

.calendar__grid .day.day--range-hidden {
	display: none !important;
}

.day:hover {
	box-shadow: inset 0 0 0 1px #bfb6ac;
	background-color: #fffdf9;
}

.day:active {
	box-shadow: inset 0 0 0 2px #a79f96;
}

.day > span:first-of-type,
.day__header > span:first-child {
	font-weight: 700;
	font-size: clamp(11px, 1.3vw, 16px);
	color: #2c2621;
	line-height: 1.2;
}

.day__events {
	list-style: none;
	margin: 2px 0 0;
	padding: 0;
	display: grid;
	min-height: 0;
	max-height: 100%;
	gap: 3px;
	font-size: clamp(8px, 0.9vw, 10px);
	line-height: 1.3;
	overflow: hidden;

	align-self: start;
}
.day__event {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	line-height: 1.25;
	min-height: 0;
	transition: opacity 0.2s ease;
}

.day__event--hidden {
	display: none;
}

.day__event--collapsed {
	display: none;
}

.day__event-color {
	/* No longer needed - kept for backwards compatibility */
	display: none;
}

.day__time {
	font-weight: 600;
	white-space: nowrap;
	font-size: clamp(10px, 0.85vw, 14px);
	opacity: 0.95;
	color: inherit !important;
	overflow: visible;
	text-overflow: clip;
	display: inline;
}

.day__title {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	display: inline;
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-size: clamp(11px, 0.95vw, 15px);
	color: inherit !important;
}

.day__event--roomy .day__title {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	line-height: 1.2;
	display: inline;
}

.day__event--roomy {
	-webkit-line-clamp: 3;
	align-self: start;
}

.day__event--roomy .day__time {
	overflow: visible;
	text-overflow: clip;
	line-height: 1.1;
}

.day__event--roomy .day__title {
	margin-top: 0;
}
.home-assistant-modal__card {
	max-width: 620px;
	max-height: min(86vh, 760px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.laundry-toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 980;
	min-width: 260px;
	max-width: min(92vw, 460px);
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid #97c2a5;
	background: linear-gradient(160deg, rgba(250, 255, 252, 0.96), rgba(228, 244, 234, 0.97));
	box-shadow: 0 10px 24px rgba(40, 76, 50, 0.2);
	backdrop-filter: blur(5px);
	animation: laundryOverlayEnter 260ms ease-out;
}

.laundry-toast--hidden {
	display: none;
}

.laundry-toast__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 7px;
}

.laundry-toast__title {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #2a5f3c;
}

.laundry-toast__close {
	border: none;
	background: transparent;
	color: #386b49;
	font-size: 18px;
	line-height: 1;
	padding: 2px 6px;
	border-radius: 8px;
	cursor: pointer;
}

.laundry-toast__close:hover,
.laundry-toast__close:focus-visible {
	background: rgba(56, 107, 73, 0.12);
	outline: none;
}

.laundry-toast__items {
	display: grid;
	gap: 6px;
}

.laundry-toast__item {
	margin: 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	column-gap: 12px;
	row-gap: 2px;
	font-size: 14px;
	color: #204d31;
}

.laundry-toast__item[hidden] {
	display: none !important;
}

.laundry-toast__label {
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	white-space: nowrap;
	line-height: 1.3;
}

.laundry-toast__time {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: normal;
	text-align: right;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

@keyframes laundryOverlayEnter {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.home-assistant-modal__error {
	margin: 0 0 10px;
	padding: 10px;
	border-radius: 8px;
	background: #fdeaea;
	color: #7a2424;
	font-size: 13px;
}
.home-assistant-modal__sections {
	display: grid;
	gap: 12px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.home-assistant-modal__section {
	padding: 12px;
	border: 1px solid #eadfce;
	border-radius: 10px;
	background: #fffaf5;
}
.home-assistant-modal__section--active {
	border-color: #c8a77f;
	box-shadow: inset 0 0 0 1px rgba(200, 167, 127, 0.25);
}
.home-assistant-modal__section h4 {
	margin: 0 0 8px;
	font-size: 15px;
}
.home-assistant-modal__section p {
	margin: 6px 0;
	font-size: 14px;
}

.home-assistant-summary-link {
	border: none;
	background: transparent;
	padding: 0;
	font: inherit;
	font-weight: 700;
	color: #345f8d;
	text-decoration: underline;
	text-decoration-style: dotted;
	cursor: pointer;
}

.home-assistant-summary-link:hover,
.home-assistant-summary-link:focus-visible {
	color: #23496f;
	outline: none;
}
.home-assistant-modal__list {
	margin: 6px 0 0;
	padding-left: 20px;
	font-size: 14px;
}

.home-assistant-modal__light-list {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 8px;
}

.home-assistant-modal__light-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border: 2px solid #e5d7c4;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.home-assistant-modal__light-item.is-on {
	background: #fef9f0;
	border-color: #ffc947;
}

.home-assistant-modal__light-item.is-off {
	background: #f5f5f5;
	border-color: #d0d0d0;
}

.home-assistant-modal__light-item:hover {
	filter: brightness(0.98);
}

.home-assistant-modal__light-item:focus-visible {
	outline: 2px solid #23496f;
	outline-offset: 2px;
}

.home-assistant-modal__light-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.home-assistant-modal__light-name {
	font-weight: 700;
	line-height: 1.2;
	word-break: break-word;
}

.home-assistant-modal__light-state {
	font-size: 12px;
	color: #6d5a43;
	text-transform: capitalize;
}

.home-assistant-modal__light-actions {
	display: inline-flex;
	gap: 6px;
	flex-shrink: 0;
}

.home-assistant-modal__light-btn {
	padding: 4px 8px;
	font-size: 12px;
	min-width: 32px;
}

.home-assistant-modal__light-toggle {
	width: 32px;
	height: 32px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
}

.home-assistant-modal__light-bulb {
	font-size: 18px;
	line-height: 1;
	transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.home-assistant-modal__light-bulb.is-on {
	opacity: 1;
	filter: drop-shadow(0 0 4px rgba(255, 199, 87, 0.85));
	transform: scale(1.02);
}

.home-assistant-modal__light-bulb.is-off {
	opacity: 0.35;
	filter: grayscale(0.9);
}

.home-assistant-modal__light-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

.home-assistant-modal__lights-header {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 10px;
}

.home-assistant-modal__light-edit-list-container {
	display: grid;
	gap: 12px;
	max-height: 60vh;
	overflow-y: auto;
	padding-right: 4px;
}

.home-assistant-modal__light-edit-list-container::-webkit-scrollbar {
	width: 8px;
}

.home-assistant-modal__light-edit-list-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.home-assistant-modal__light-edit-list-container::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

.home-assistant-modal__light-edit-list-container::-webkit-scrollbar-thumb:hover {
	background: #999;
}

.home-assistant-modal__light-edit-list {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 6px;
}

.home-assistant-modal__light-edit-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	border: 1px solid #e5d7c4;
	border-radius: 6px;
	background: #fff;
}

.home-assistant-modal__light-edit-item-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 2px;
}

.home-assistant-modal__light-edit-item-id {
	font-size: 11px;
	color: #999;
	font-family: monospace;
	word-break: break-all;
	margin-bottom: 4px;
}

.home-assistant-modal__light-edit-form {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.home-assistant-modal__light-edit-form-group {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.home-assistant-modal__light-edit-form-group label {
	font-size: 11px;
	font-weight: 600;
	color: #333;
}

.home-assistant-modal__light-edit-form-group input[type="text"] {
	padding: 4px 6px;
	font-size: 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-family: inherit;
}

.home-assistant-modal__light-edit-form-actions {
	display: flex;
	gap: 4px;
	justify-content: flex-end;
	margin-top: 2px;
}

.home-assistant-modal__light-edit-form-actions .btn {
	padding: 3px 6px;
	font-size: 11px;
	min-width: auto;
}

.home-assistant-modal__light-edit-loading,
.home-assistant-modal__light-edit-error {
	text-align: center;
	padding: 20px;
	font-size: 14px;
}

.home-assistant-modal__light-edit-error {
	color: #d9534f;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #f9f3f3;
}

.home-assistant-modal__garage-state {
	margin-bottom: 10px;
}

.home-assistant-garage-toggle {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	padding: 12px;
	border: 1px solid #cdbca4;
	border-radius: 12px;
	background: linear-gradient(160deg, #fff9ef, #f6ead7);
	color: #4a3a27;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.home-assistant-garage-toggle:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(82, 59, 27, 0.14);
	border-color: #be9f78;
}

.home-assistant-garage-toggle:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.home-assistant-garage-toggle.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.home-assistant-garage-toggle__image {
	display: block;
	width: 120px;
	height: 88px;
}

.home-assistant-garage-toggle__image svg {
	width: 100%;
	height: 100%;
}

.home-assistant-garage-toggle .garage-roof {
	fill: #bd9468;
	stroke: #8d663e;
	stroke-width: 2;
}

.home-assistant-garage-toggle .garage-wall {
	fill: #ecd8bc;
	stroke: #a57b52;
	stroke-width: 2;
}

.home-assistant-garage-toggle .garage-opening-frame {
	fill: #cfb28f;
	stroke: #946d45;
	stroke-width: 1.5;
}

.home-assistant-garage-toggle .garage-track {
	stroke: #8f6841;
	stroke-width: 2;
}

.home-assistant-garage-toggle .garage-door {
	fill: #f6f0e7;
	stroke: #9e7a4e;
	stroke-width: 2;
}

.home-assistant-garage-toggle .garage-opening {
	fill: #2f2922;
	opacity: 0.78;
}

.home-assistant-garage-toggle .garage-floor {
	stroke: #6f5842;
	stroke-width: 2;
	stroke-linecap: round;
}

.home-assistant-garage-toggle .garage-slat {
	stroke: #b7a283;
	stroke-width: 2;
	stroke-linecap: round;
}

.home-assistant-garage-toggle .garage-window {
	fill: #d5ebf5;
	stroke: #8ca6b4;
	stroke-width: 1;
}

.home-assistant-garage-toggle__state {
	font-size: 14px;
	font-weight: 700;
}

.home-assistant-garage-toggle__hint {
	font-size: 12px;
	color: #6d5a43;
}

.home-assistant-garage-toggle.is-open {
	background: linear-gradient(160deg, #effaf2, #dff1e4);
	border-color: #9bbf9f;
}

.home-assistant-garage-toggle.is-closed {
	background: linear-gradient(160deg, #fff9ef, #f6ead7);
}

.home-assistant-garage-toggle.is-open .garage-open-shape,
.home-assistant-garage-toggle.is-closed .garage-closed-shape,
.panel__status-garage-icon.is-open .garage-open-shape,
.panel__status-garage-icon.is-closed .garage-closed-shape {
	display: initial;
}

.home-assistant-garage-toggle.is-open .garage-closed-shape,
.home-assistant-garage-toggle.is-closed .garage-open-shape,
.panel__status-garage-icon.is-open .garage-closed-shape,
.panel__status-garage-icon.is-closed .garage-open-shape {
	display: none;
}

@media (max-width: 640px) {
	.laundry-toast {
		right: 10px;
		left: 10px;
		bottom: 10px;
		max-width: none;
		min-width: 0;
	}

	.laundry-toast__item {
		font-size: 13px;
	}

	.home-assistant-garage-toggle {
		padding: 16px;
		min-height: 190px;
		gap: 8px;
	}

	.home-assistant-garage-toggle__image {
		width: 156px;
		height: 114px;
	}

	.home-assistant-garage-toggle__state {
		font-size: 16px;
	}

	.home-assistant-garage-toggle__hint {
		font-size: 13px;
	}
}

.day__more {
	font-size: clamp(8px, 0.9vw, 10px);
	font-weight: 600;
	color: #7a736d;
	margin-top: 2px;
}

.day__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2px;
	margin-bottom: 1px;
}

.day__weather {
	display: flex;
	align-items: center;
	gap: 2px;
	font-size: clamp(9px, 0.85vw, 11px);
	line-height: 1.2;
	color: #555;
	white-space: nowrap;
	flex-shrink: 0;
}

.day__weather-temp {
	font-size: clamp(8px, 0.78vw, 10px);
	color: #666;
}

@media (max-width: 900px) {
	.day__weather-temp { display: none; }
}

/* Hide 5th and 6th events on smaller screens */
@media (max-width: 1200px) {
	.day__events {
		/* event slot visibility handled in JavaScript */
	}
}

@media (max-width: 1100px) {
	.day__event {
		padding: 3px 4px !important;
		border-radius: 3px !important;
		gap: 3px;
	}

	.day__time {
		font-size: clamp(10px, 0.95vw, 13px);
	}

	.day__title {
		font-size: clamp(11px, 1.05vw, 14px);
	}
}

@media (max-width: 900px) {
	.day__events {
		gap: 1px;
	}

	.day__event {
		grid-template-columns: 1fr;
		align-items: start;
		padding: 2px 3px !important;
		gap: 1px;
	}

	.day__time {
		font-size: clamp(10px, 1vw, 12px);
		line-height: 1.15;
	}

	.day__title {
		font-size: clamp(10px, 1.1vw, 13px);
		line-height: 1.15;
	}
}

@media (max-height: 980px) {
	.day {
		padding: 3px;
		gap: 2px;
	}

	.day__events {
		gap: 1px;
		min-height: 0;
		max-height: calc(4 * 24px + 3px);
		overflow-y: auto;
		overflow-x: hidden;
	}

	.day__event {
		padding: 2px 4px !important;
		border-radius: 3px !important;
		gap: 2px;
	}

	.day__time {
		font-size: clamp(10px, 0.95vw, 12px);
		line-height: 1.1;
	}

	.day__title {
		font-size: clamp(10px, 1.05vw, 13px);
		line-height: 1.1;
	}

	.day__events {
		/* event slot visibility handled in JavaScript */
	}
}

.day--today {
	background-color: #fff5ee;
	box-shadow: inset 0 0 0 2px var(--accent-2);
}

.day--today:hover {
	background-color: #fff0e6;
}

.day--today em {
	font-style: normal;
	font-size: clamp(9px, 0.9vw, 11px);
	color: var(--accent-2);
	font-weight: 600;
	text-transform: uppercase;
	grid-row: 1;
	justify-self: start;
	align-self: start;
	margin-left: clamp(20px, 2.2vw, 30px);
	margin-top: 1px;
}
.weather-hourly-modal__card {
	width: min(720px, 100%);
	max-height: min(80vh, 760px);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.weather-hourly-modal__subtitle {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--muted);
}

.weather-hourly-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	padding-right: 4px;
}

.weather-hourly-list__expansion {
	margin-top: -2px;
	margin-bottom: 2px;
	padding: 0 8px 0 24px;
}

.weather-hourly-list__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid #e8ddd1;
	border-radius: 12px;
	background: #fffaf4;
	width: 100%;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.weather-hourly-list__item--current {
	border-color: #d9b36c;
	background: #fff4e2;
	box-shadow: 0 8px 24px rgba(224, 122, 95, 0.1);
}

.weather-hourly-list__item--selected {
	border-color: var(--accent);
	box-shadow: 0 10px 24px rgba(31, 111, 139, 0.14);
}

.weather-hourly-list__item:hover,
.weather-hourly-list__item:focus-visible {
	border-color: var(--accent);
	background: #fffef9;
	outline: none;
}

.weather-hourly-list__time {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.weather-hourly-list__summary {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.weather-hourly-list__emoji {
	font-size: 24px;
	line-height: 1;
}

.weather-hourly-list__temp {
	font-size: 18px;
	font-weight: 700;
	color: var(--ink);
}

.weather-hourly-list__condition {
	font-size: 13px;
	color: var(--muted);
}

.weather-hourly-list__meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
	font-size: 12px;
	color: var(--muted);
}

.weather-quarter-hour {
	border: 1px solid #e4d7c7;
	border-radius: 14px;
	padding: 12px;
	background: linear-gradient(180deg, #fffdf9, #fff8ef);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.weather-quarter-hour__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.weather-quarter-hour__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ink);
}

.weather-quarter-hour__hint {
	font-size: 12px;
	color: var(--muted);
}

.weather-quarter-hour__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 260px;
	overflow-y: auto;
	padding-right: 4px;
}

.weather-quarter-hour__item {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid #efe4d8;
	border-radius: 10px;
	background: #fff;
}

.weather-quarter-hour__time {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.weather-quarter-hour__summary {
	display: flex;
	align-items: center;
	gap: 10px;
}

.weather-quarter-hour__emoji {
	font-size: 20px;
	line-height: 1;
}

.weather-quarter-hour__temp {
	font-size: 16px;
	font-weight: 700;
	color: var(--ink);
}

.weather-quarter-hour__condition {
	font-size: 12px;
	color: var(--muted);
}

.weather-quarter-hour__meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
	font-size: 12px;
	color: var(--muted);
}

@media (max-width: 720px) {
	.weather-hourly-list__item {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.weather-hourly-list__meta {
		justify-content: flex-start;
	}

	.weather-quarter-hour__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.weather-hourly-list__expansion {
		padding: 0;
	}

	.weather-quarter-hour__item {
		grid-template-columns: 1fr;
	}

	.weather-quarter-hour__meta {
		justify-content: flex-start;
	}
}

.calendar--monthly.calendar--dim-past .day--past:not(.day--today) {
	opacity: 0.42;
	filter: saturate(0.7);
}

.calendar--monthly.calendar--dim-past .day__event.day__event--past {
	opacity: 0.58;
	filter: saturate(0.75);
}

.calendar--monthly.calendar--dim-past .day--past.day--out {
	opacity: 0.34;
}

.day--selected {
	box-shadow: inset 0 0 0 2px var(--accent);
	background-color: #fdf7f0;
}

.day--selected:hover {
	background-color: #fdf3ea;
}

.day--out {
	color: #b6aba0;
	background-color: #f6f3ef;
	opacity: 0.65;
}

.day--out:hover {
	opacity: 0.8;
	background-color: #f4efe8;
}

.dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	justify-self: end;
	transition: transform 0.15s ease;
	background: #1e1b18;
}

.day:hover .dot {
	transform: scale(1.2);
}

.dot--pink {
	background: #d67aa0;
}

.dot--blue {
	background: #4d94b8;
}

.dot--amber {
	background: #e6a95d;
}

.agenda {
	display: grid;
	gap: 16px;
}

.agenda__item {
	background: #fff7ef;
	border-radius: 18px;
	padding: 14px 16px;
	display: grid;
	gap: 6px;
	position: relative;
}

.agenda__time {
	font-weight: 600;
	color: var(--accent);
	font-size: 14px;
}

.agenda__item h3 {
	margin: 0;
	font-size: 16px;
}

.agenda__item p {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
}

.tag {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	color: #fff;
}

.tag--blue {
	background: #4d94b8;
}

.tag--amber {
	background: #e6a95d;
}

.tag--pink {
	background: #d67aa0;
}

.mini {
	margin-top: 24px;
	padding: 18px;
	border-radius: 18px;
	background: #f8efe5;
}

.mini h3 {
	margin: 0 0 12px;
	font-size: 16px;
}

.mini__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px dashed #e0d2c1;
	font-size: 14px;
}

.mini__row:last-child {
	border-bottom: none;
}

.footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	border-radius: 20px;
	background: linear-gradient(110deg, #fff8f0 0%, #f2e0cf 100%);
}

.footer h3 {
	margin: 0 0 6px;
	font-family: "Fraunces", "Times New Roman", serif;
}

.footer p {
	margin: 0;
	color: var(--muted);
}

.flash {
	margin: 0 auto;
	max-width: 1400px;
	padding: 16px 24px 0;
}

.flash__item {
	background: #fff7ea;
	border: 1px solid #f0d9c2;
	border-radius: 12px;
	padding: 10px 14px;
	margin-bottom: 10px;
}

#toast-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.toast {
	background: #2d5016;
	color: #fff;
	padding: 12px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	font-size: 14px;
	font-weight: 500;
	pointer-events: auto;
	animation: toastSlideIn 0.3s ease-out;
	min-width: 200px;
	max-width: 400px;
}

.toast.toast--hide {
	animation: toastSlideOut 0.3s ease-in forwards;
}

.toast.toast--success {
	background: #2d5016;
}

.toast.toast--error {
	background: #c41e3a;
}

.toast.toast--info {
	background: #1a5490;
}

@keyframes toastSlideIn {
	from {
		opacity: 0;
		transform: translateX(100%);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes toastSlideOut {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(100%);
	}
}

.auth {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 40px 20px;
}

.auth__card {
	width: min(420px, 100%);
	background: var(--paper);
	border-radius: 24px;
	padding: 32px;
	box-shadow: var(--shadow);
	display: grid;
	gap: 16px;
}

.auth__card h1 {
	margin: 0;
	font-family: "Fraunces", "Times New Roman", serif;
}

.auth__card p {
	margin: 0;
	color: var(--muted);
}

.auth__form {
	display: grid;
	gap: 14px;
}

.auth__form label {
	display: grid;
	gap: 6px;
	font-size: 14px;
	color: var(--muted);
}

.auth__form input {
	border: 1px solid #e5d7c7;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 15px;
}

.auth__footer {
	font-size: 14px;
}

@keyframes fade-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 980px) {
	.dashboard {
		flex-direction: column;
	}
}

@media (max-width: 720px) {
	.calendar__grid {
		gap: 4px;
	}

	.day__events {
		display: none;
	}

	.day__more {
		display: none;
	}
}

@media (max-width: 560px) {
	.page {
		padding: 16px;
	}

	.calendar__weekdays {
		font-size: 9px;
		letter-spacing: 0.12em;
	}

	.calendar__weekdays span {
		padding: 8px 6px;
	}

	.day {
		min-height: 120px;
	}

	.hero {
		padding: 18px 14px;
	}

	.hero__actions {
		width: 100%;
		justify-content: flex-end;
	}

	.hero__actions .global-nav {
		margin-left: auto;
	}

	.hero__title {
		font-size: 22px;
	}

	.panel {
		padding: 20px;
	}

	.panel__title h2 {
		font-size: 24px;
	}

	.agenda__item {
		padding: 16px 18px;
	}
}

@media (max-height: 820px) {
	.page {
		padding: 12px;
	}

	.panel {
		padding: 16px;
	}

	.panel__header {
		margin-bottom: 12px;
	}

	.calendar__weekdays span {
		padding: 6px 8px;
	}

	.day {
		padding: 4px;
		gap: 2px;
	}

	.day > span:first-of-type {
		font-size: clamp(10px, 1.1vw, 14px);
	}
}

@media (max-width: 1366px) and (max-height: 900px) {
	.calendar__weekdays span {
		padding: 6px 8px;
	}

	.day {
		padding: 3px;
		gap: 2px;
	}

	.day__events {
		gap: 2px;
		font-size: clamp(9px, 0.9vw, 11px);
	}

	.day__event {
		gap: 3px;
	}

	.day__time {
		font-size: clamp(10px, 0.95vw, 12px);
	}

	.day__title {
		font-size: clamp(10px, 1.05vw, 13px);
	}
}

@media (min-width: 1700px) {
	.day {
		min-height: 170px;
	}
}

/* Extra info (emoji/notes) on events */
.event-extra-info {
  font-size: 1em;
  margin-left: 2px;
	color: inherit !important;
}

.event-display-title {
	font-size: 1em;
	color: inherit;
}

.sized-emoji {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	vertical-align: -0.08em;
}

.sized-emoji--sm {
	font-size: 0.9em;
}

.sized-emoji--md {
	font-size: 1em;
}

.sized-emoji--lg {
	font-size: 1.25em;
}

.sized-emoji--xl {
	font-size: 1.85em;
}

.event-display-title--sm {
	font-size: inherit;
}

.event-display-title--md {
	font-size: inherit;
}

.event-display-title--lg {
	font-size: inherit;
}

.event-display-title--xl {
	font-size: inherit;
}

.event-display-title--emoji-only {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.event-extra-info--sm {
	font-size: inherit;
}

.event-extra-info--md {
	font-size: inherit;
}

.event-extra-info--lg {
	font-size: inherit;
}

.event-extra-info--xl {
	font-size: inherit;
}

.event-extra-info--emoji-only {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.sized-person-token {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--avatar-image-shape-radius);
	vertical-align: -0.12em;
	font-weight: 700;
	overflow: hidden;
	object-fit: cover;
	margin: 0 1px;
}

.sized-custom-emoji-token {
	border-radius: 0.28em;
	object-fit: contain;
}

.sized-person-token--sm {
	width: 1em;
	height: 1em;
	font-size: 0.9em;
}

.sized-person-token--md {
	width: 1.2em;
	height: 1.2em;
	font-size: 1em;
}

.sized-person-token--lg {
	width: 1.45em;
	height: 1.45em;
	font-size: 1.1em;
}

.sized-person-token--xl {
	width: 2em;
	height: 2em;
	font-size: 1.2em;
}

.kids-day__event .sized-person-token--sm {
	width: 1.45em;
	height: 1.45em;
	font-size: 1.05em;
}

.kids-day__event .sized-person-token--md {
	width: 1.8em;
	height: 1.8em;
	font-size: 1.15em;
}

.kids-day__event .sized-person-token--lg {
	width: 2.15em;
	height: 2.15em;
	font-size: 1.25em;
}

.kids-day__event .sized-person-token--xl {
	width: 2.75em;
	height: 2.75em;
	font-size: 1.35em;
}

.day-view__extra-info {
  font-size: 1em;
  margin-left: 2px;
}

.day-view__display-title {
	font-size: 1em;
	color: inherit;
}

.day-view__display-title--sm {
	font-size: inherit;
}

.day-view__display-title--md {
	font-size: inherit;
}

.day-view__display-title--lg {
	font-size: inherit;
}

.day-view__display-title--xl {
	font-size: inherit;
}

.day-view__display-title--emoji-only {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.day-view__extra-info--sm {
	font-size: inherit;
}

.day-view__extra-info--md {
	font-size: inherit;
}

.day-view__extra-info--lg {
	font-size: inherit;
}

.day-view__extra-info--xl {
	font-size: inherit;
}

.day-view__extra-info--emoji-only {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

/* ── Event editor dialog ─────────────────────────────────────────── */

.event-editor {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.event-editor[hidden] {
	display: none !important;
}

.event-editor__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 12, 8, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.event-editor__dialog {
	position: relative;
	width: min(540px, 100%);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fffdf9;
	color: #3b342e;
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,0.08), 0 60px 120px -20px rgba(0, 0, 0, 0.35);
	overscroll-behavior: contain;
	animation: editorSlideIn 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.event-editor__emoji--person {
	padding: 0;
	overflow: hidden;
	border-radius: var(--avatar-image-shape-radius);
}

.event-editor__emoji--person img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

@keyframes editorSlideIn {
	from { opacity: 0; transform: scale(0.94) translateY(10px); }
	to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Colored strip at top — JS sets background-color inline */
.event-editor__strip {
	height: 6px;
	border-radius: 22px 22px 0 0;
	background: var(--accent);
}

.event-editor__inner {
	padding: 28px 28px 28px;
}

/* ── Head row ── */
.event-editor__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 20px;
}

.event-editor__head-text {
	flex: 1;
	min-width: 0;
}

.event-editor__eyebrow {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.event-editor__title {
	margin: 0 0 8px;
	font-size: 24px;
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 700;
	color: var(--ink);
	line-height: 1.3;
	word-break: break-word;
	letter-spacing: -0.3px;
}

.event-editor__metas {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

.event-editor__meta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: #6b6157;
	margin: 0;
}

.event-editor__close {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: 1.5px solid #e8dfd4;
	background: linear-gradient(135deg, #f9f6f3 0%, #f7f2ec 100%);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9d8d7a;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	margin-top: 0;
}

.event-editor__close:hover {
	background: linear-gradient(135deg, #f5ede4 0%, #ede5db 100%);
	color: #7a6f66;
	border-color: #dcc9ba;
}

/* ── Form sections ── */
.event-editor__form {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.event-editor__read-view {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.event-editor__read-view[hidden] {
	display: none;
}

.event-editor__read-combined {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 136px;
	padding: 20px;
	border: 1px solid #eadccf;
	border-radius: 18px;
	background: linear-gradient(180deg, #fffdfa 0%, #f8efe6 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
	font-size: clamp(2rem, 6vw, 3rem);
	line-height: 1.15;
	text-align: center;
	flex-wrap: wrap;
}

.event-editor__read-combined[hidden] {
	display: none;
}

.event-editor__read-combined .event-editor__read-value,
.event-editor__read-combined .event-editor__read-value--title,
.event-editor__read-combined .event-editor__read-value--extra {
	font-size: inherit;
	line-height: 1.1;
	font-family: inherit;
	font-weight: 700;
	gap: 8px;
}

.event-editor__read-combined .sized-person-token,
.event-editor__read-combined .sized-custom-emoji-token {
	transform: scale(1.35);
	transform-origin: center;
	margin: 0 4px;
	box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.event-editor__read-section {
	padding: 14px 16px;
	border: 1px solid #eadccf;
	border-radius: 14px;
	background: linear-gradient(180deg, #fffdfa 0%, #f9f4ee 100%);
}

.event-editor__read-label {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #8f7e6e;
}

.event-editor__read-content {
	font-size: 17px;
	line-height: 1.45;
	color: #2f2924;
	word-break: break-word;
}

.event-editor__read-value {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	color: inherit;
}

.event-editor__read-value--title {
	font-size: clamp(1.2rem, 2.3vw, 1.55rem);
	font-weight: 700;
	line-height: 1.28;
	font-family: "Fraunces", "Times New Roman", serif;
}

.event-editor__read-value--extra {
	font-size: clamp(1.1rem, 2vw, 1.35rem);
	line-height: 1.35;
	letter-spacing: 0.01em;
}

.event-editor__read-content .sized-person-token,
.event-editor__read-content .sized-custom-emoji-token {
	margin: 0 2px;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
	transform: translateY(1px);
}

.event-editor__zoomable-image {
	cursor: zoom-in;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	max-width: 100%;
}

.event-editor__zoomable-image:hover {
	transform: scale(1.04);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.event-editor--read-only .event-editor__metas {
	display: none;
}

.event-editor--read-only .event-editor__head-text {
	display: none;
}

.event-editor--read-only .event-editor__head {
	justify-content: flex-end;
	margin-bottom: 8px;
}

.event-editor--kids-read-only .event-editor__head-text {
	display: none;
}

.event-editor--kids-read-only .event-editor__head {
	justify-content: flex-end;
	margin-bottom: 8px;
}

.event-viewer {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.event-viewer[hidden] {
	display: none !important;
}

.event-viewer__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 12, 8, 0.66);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.event-viewer__dialog {
	position: relative;
	width: min(620px, 100%);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fffdf9;
	color: #3b342e;
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 60px 120px -20px rgba(0, 0, 0, 0.35);
	padding: 18px 18px 22px;
	animation: editorSlideIn 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) both;
	overscroll-behavior: contain;
}

.event-viewer__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	border: 1.5px solid #e8dfd4;
	background: linear-gradient(135deg, #f9f6f3 0%, #f7f2ec 100%);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9d8d7a;
}

.event-viewer__inner {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 8px;
}

.event-viewer__eyebrow {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.event-viewer__title {
	margin: 0;
	font-size: clamp(1.55rem, 3.1vw, 2rem);
	line-height: 1.2;
	font-family: "Fraunces", "Times New Roman", serif;
	color: var(--ink);
}

.event-viewer__kids-title {
	margin: 6px 0 0;
	font-size: clamp(1.8rem, 4.5vw, 2.6rem);
	line-height: 1.15;
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 700;
	color: var(--ink);
}

.event-viewer__metas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	font-size: 13px;
	color: #6b6157;
	margin-bottom: 2px;
}

.event-viewer__meta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.event-viewer__meta[hidden] {
	display: none;
}

.event-viewer__combined {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 140px;
	padding: 20px;
	border: 1px solid #eadccf;
	border-radius: 18px;
	background: linear-gradient(180deg, #fffdfa 0%, #f8efe6 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
	font-size: clamp(1.7rem, 5vw, 2.8rem);
	line-height: 1.15;
	text-align: center;
	flex-wrap: wrap;
}

.event-viewer__combined .event-editor__read-value,
.event-viewer__combined .event-editor__read-value--title,
.event-viewer__combined .event-editor__read-value--extra {
	font-size: inherit;
	line-height: 1.1;
	font-family: inherit;
	font-weight: 700;
	gap: 8px;
	flex-wrap: nowrap;
}

.event-viewer__combined .sized-person-token,
.event-viewer__combined .sized-custom-emoji-token {
	transform: scale(1.35);
	transform-origin: center;
	margin: 0 22px;
	box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.event-viewer__combined-time {
	display: block;
	width: 100%;
	text-align: center;
	font-size: clamp(0.85rem, 2vw, 1rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-top: 10px;
	opacity: 0.85;
}

.event-editor__section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.event-editor__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #7a6f66;
}

.event-editor__hint {
	margin: 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}

.event-editor__input {
	width: 100%;
	margin-top: 6px;
	border: 1.5px solid #e5d7ca;
	border-radius: 14px;
	background: #fdfaf6;
	padding: 13px 16px;
	font: inherit;
	font-size: 15px;
	color: #2f2924;
	box-sizing: border-box;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
	outline: none;
}

.event-editor__input:focus {
	border-color: var(--accent);
	background-color: #fefcfb;
	box-shadow: 0 0 0 4px rgba(31, 111, 139, 0.15), inset 0 0 0 1px rgba(31, 111, 139, 0.05);
}

.event-editor__input--extra {
	letter-spacing: 0.04em;
}

/* ── Emoji bar ── */
.event-editor__extra-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.event-editor__emoji-bar {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 8px;
	margin-top: 12px;
	padding: 14px 14px;
	background: linear-gradient(135deg, #f8eee5 0%, #f5ede4 100%);
	border: 1px solid #ead9cc;
	border-radius: 16px;
	max-height: 168px;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: stable;
}

.event-editor__emoji {
	border: none;
	background: transparent;
	border-radius: 10px;
	width: 40px;
	height: 40px;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
}

.event-editor__emoji:hover {
	background: rgba(255,255,255,0.9);
	transform: scale(1.15);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-editor__emoji:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.event-editor__emoji-image {
	width: 28px;
	height: 28px;
	object-fit: contain;
	pointer-events: none;
}

.event-editor__emoji-size-bar {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.event-editor__emoji-size {
	border: 1px solid #d9cabc;
	background: #fff;
	color: #6b6157;
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: all 0.12s ease;
	min-width: 38px;
}

.event-editor__emoji-size:hover {
	background: #f7efe6;
	border-color: #cdb8a5;
}

.event-editor__emoji-size.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.event-editor__emoji-size:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* ── People list ── */
.event-editor__people-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px 0;
}

/* ── Related events checkbox ── */
.event-editor__related {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 16px 18px;
	border-radius: 16px;
	background: linear-gradient(135deg, #f0f8fb 0%, #eef6f9 100%);
	border: 1.5px solid #d0dfe8;
}

.event-editor__related[hidden] {
	display: none !important;
}

.event-editor__checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
	cursor: pointer;
}

.event-editor__checkbox-box {
	position: relative;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 1px;
}

.event-editor__checkbox-box input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
	margin: 0;
}

.event-editor__checkbox-check {
	position: absolute;
	inset: 0;
	border: 2px solid #8ab8c8;
	border-radius: 6px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: transparent;
	transition: background 0.12s, color 0.12s, border-color 0.12s;
	pointer-events: none;
}

.event-editor__checkbox-box input:checked ~ .event-editor__checkbox-check {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.event-editor__checkbox-text {
	flex: 1;
	font-size: 13px;
	color: #3a5a66;
	line-height: 1.45;
	padding-top: 1px;
}

/* ── Actions row ── */
.event-editor__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 20px;
	padding-bottom: 2px;
	border-top: 1.5px solid #ede5db;
	margin-top: 6px;
}

.event-editor__revert-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: none;
	background: transparent;
	padding: 10px 14px;
	border-radius: 999px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: #8a7060;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}

.event-editor__revert-btn:hover {
	background: #f7ece4;
	color: #b85c3a;
}

.event-editor__save-btn {
	border: none;
	background: var(--accent);
	color: #fff;
	padding: 13px 32px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(31, 111, 139, 0.32), 0 2px 4px rgba(31, 111, 139, 0.16);
	transition: transform 0.18s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.18s, background-color 0.18s;
	flex: 1;
	text-align: center;
}

.event-editor__save-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(31, 111, 139, 0.38), 0 2px 4px rgba(31, 111, 139, 0.16);
}

.calendar-filter__item--link {
	border: 1px dashed #d7c8b7;
	padding: 6px 10px;
	gap: 8px;
	text-decoration: none;
}

.calendar-filter__item--link:hover {
	background: #f7f2eb;
}

.calendar-filter__color--chores {
	border-radius: var(--avatar-image-shape-radius);
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	font-weight: 700;
}

.calendar-filter__shortcut-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ink);
}

.chores-panel {
	padding: 1rem;
	overflow-y: auto;
}

/* People row at the top */
.chores-people-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding: 0.75rem 0 1.25rem;
	border-bottom: 1px solid #e4d7c7;
	margin-bottom: 1.25rem;
}

.chores-person-chip {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.6rem 0.85rem;
	background: #faf6f1;
	border: 1px solid #e4d7c7;
	border-radius: 16px;
	min-width: 80px;
}

.chores-person-chip .chores-person-name {
	font-size: 0.9rem;
}

.chores-person-chip .chores-meta {
	font-size: 0.78rem;
}

/* Columns layout */
.chores-columns {
	display: grid;
	grid-template-columns: repeat(var(--chores-col-count, 1), minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
}

.chores-column {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.chores-column-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.6rem;
	padding: 0.6rem 0.75rem;
	background: #faf6f1;
	border-radius: 12px;
	border-left: 4px solid #ccc;
	font-size: 0.95rem;
	font-weight: 700;
}

.token-jar-complete-notice {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5rem;
	width: 100%;
	padding: 0.5rem 0.65rem;
	border: 1px solid #e7bf72;
	border-radius: 10px;
	background: linear-gradient(120deg, #fff6df 0%, #ffecc5 50%, #fff8e8 100%);
	color: #7a4a00;
	box-shadow: 0 6px 16px rgba(122, 74, 0, 0.16);
	animation: token-jar-complete-pop 1000ms ease-out;
}

.token-jar-global-celebration {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 130000;
	overflow: hidden;
	animation: token-jar-celebration-fade 5500ms ease-out forwards;
}

.token-jar-confetti {
	position: absolute;
	top: -10vh;
	width: 10px;
	height: 18px;
	border-radius: 3px;
	opacity: 0.95;
	animation: token-jar-confetti-fall 4800ms cubic-bezier(0.12, 0.8, 0.28, 1) forwards;
}

.token-jar-confetti--1 { left: 6%; background: #ff595e; animation-delay: 0ms; transform: rotate(12deg); }
.token-jar-confetti--2 { left: 14%; background: #ffca3a; animation-delay: 60ms; transform: rotate(-16deg); }
.token-jar-confetti--3 { left: 22%; background: #8ac926; animation-delay: 110ms; transform: rotate(20deg); }
.token-jar-confetti--4 { left: 31%; background: #1982c4; animation-delay: 80ms; transform: rotate(-8deg); }
.token-jar-confetti--5 { left: 40%; background: #6a4c93; animation-delay: 150ms; transform: rotate(24deg); }
.token-jar-confetti--6 { left: 48%; background: #f15bb5; animation-delay: 40ms; transform: rotate(-20deg); }
.token-jar-confetti--7 { left: 56%; background: #00bbf9; animation-delay: 95ms; transform: rotate(16deg); }
.token-jar-confetti--8 { left: 65%; background: #00f5d4; animation-delay: 130ms; transform: rotate(-10deg); }
.token-jar-confetti--9 { left: 73%; background: #ff924c; animation-delay: 70ms; transform: rotate(20deg); }
.token-jar-confetti--10 { left: 81%; background: #9b5de5; animation-delay: 120ms; transform: rotate(-18deg); }
.token-jar-confetti--11 { left: 89%; background: #2ec4b6; animation-delay: 170ms; transform: rotate(14deg); }
.token-jar-confetti--12 { left: 95%; background: #e71d36; animation-delay: 100ms; transform: rotate(-22deg); }

.token-jar-complete-notice__content {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	position: relative;
	z-index: 2;
}

.token-jar-complete-notice__fireworks {
	position: relative;
	width: 38px;
	height: 24px;
	flex-shrink: 0;
	border-radius: 999px;
	background: radial-gradient(circle at center, rgba(255, 232, 184, 0.95) 0%, rgba(255, 232, 184, 0) 75%);
	z-index: 2;
}

.token-jar-spark {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	animation: token-jar-firework 1200ms ease-out forwards;
}

.token-jar-spark--1 {
	background: #ff7a45;
	animation-delay: 0ms;
}

.token-jar-spark--2 {
	background: #ffd166;
	animation-delay: 40ms;
}

.token-jar-spark--3 {
	background: #06d6a0;
	animation-delay: 80ms;
}

.token-jar-spark--4 {
	background: #118ab2;
	animation-delay: 120ms;
}

.token-jar-spark--5 {
	background: #ef476f;
	animation-delay: 160ms;
}

.token-jar-complete-notice strong {
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.token-jar-complete-notice span {
	font-size: 0.82rem;
	font-weight: 600;
}

.chores-column-header__identity {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-width: 0;
}

.chores-column-avatar {
	width: 36px;
	height: 36px;
	border-radius: var(--avatar-image-shape-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	color: #fff;
	flex-shrink: 0;
	overflow: hidden;
	border: 2px solid #efe6dc;
}

@media (max-width: 700px) {
	.chores-columns {
		grid-template-columns: 1fr;
	}
	.chores-people-row {
		gap: 0.5rem;
	}
}

.chores-admin-section {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e4d7c7;
}

.chores-person-block {
	background: #fff;
	border: 1px solid #e4d7c7;
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.chores-person-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.85rem;
}

.chores-person-identity {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.chores-person-avatar {
	width: 52px;
	height: 52px;
	border-radius: var(--avatar-image-shape-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	color: #fff;
	flex-shrink: 0;
	overflow: hidden;
	border: 2px solid #efe6dc;
}

.chores-person-avatar--image {
	background: #f5f5f5;
}

.chores-person-name {
	display: block;
	font-size: 1.1rem;
}

.chores-cards {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.token-jar {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.6rem 0.7rem;
	border: 1px solid #d9c7ae;
	border-radius: 12px;
	background: linear-gradient(180deg, #fff8f0 0%, #fff 100%);
}

.token-jar--inline {
	margin-left: auto;
	padding: 0.3rem 0.45rem;
	gap: 0.45rem;
	background: rgba(255, 255, 255, 0.65);
}

.token-jar--inline .token-jar__glass {
	width: 26px;
	height: 36px;
	border-width: 2px;
}

.token-jar--inline .token-jar__meta {
	font-size: 0.74rem;
	line-height: 1.15;
}

.token-jar--inline .token-jar__incoming-token {
	left: 8px;
	top: -10px;
	width: 8px;
	height: 8px;
}

.token-jar--inline .token-jar__points-burst {
	top: -18px;
	font-size: 0.62rem;
}

.token-jar__glass {
	position: relative;
	width: 40px;
	height: 56px;
	border: 2px solid #a8c4d6;
	border-radius: 10px 10px 14px 14px;
	overflow: hidden;
	background: #f8fcff;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.token-jar__fill {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(180deg, #ffd07a 0%, #f4a847 100%);
	transition: height 220ms ease-out;
}

.token-jar__meta {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	font-size: 0.82rem;
	color: #5d5147;
}

.token-jar__congrats {
	color: #2f6b3d;
	font-weight: 700;
}

.token-jar__incoming-token {
	position: absolute;
	top: -14px;
	left: 14px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #f4a847;
	box-shadow: 0 0 0 2px #fce8bf;
	animation: token-jar-drop 520ms ease-out forwards;
}

.token-jar__points-burst {
	position: absolute;
	top: -22px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.7rem;
	font-weight: 700;
	color: #7a4a00;
	white-space: nowrap;
	animation: token-jar-points 650ms ease-out forwards;
}

@keyframes token-jar-drop {
	0% {
		transform: translateY(0);
		opacity: 1;
	}
	85% {
		opacity: 1;
	}
	100% {
		transform: translateY(44px);
		opacity: 0;
	}
}

@keyframes token-jar-points {
	0% {
		opacity: 0;
		transform: translateX(-50%) translateY(6px);
	}
	20% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translateX(-50%) translateY(-8px);
	}
}

@keyframes token-jar-complete-pop {
	0% {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes token-jar-confetti-fall {
	0% {
		opacity: 0;
		transform: translateY(0) rotate(0deg);
	}
	10% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translateY(115vh) rotate(520deg);
	}
}

@keyframes token-jar-celebration-fade {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes token-jar-firework {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.35);
	}
	20% {
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: translate(calc(-50% + var(--token-firework-x, 0px)), calc(-50% + var(--token-firework-y, 0px))) scale(1.1);
	}
}

.token-jar-spark--1 { --token-firework-x: -16px; --token-firework-y: -8px; }
.token-jar-spark--2 { --token-firework-x: -6px; --token-firework-y: -14px; }
.token-jar-spark--3 { --token-firework-x: 14px; --token-firework-y: -10px; }
.token-jar-spark--4 { --token-firework-x: 16px; --token-firework-y: 8px; }
.token-jar-spark--5 { --token-firework-x: -12px; --token-firework-y: 10px; }

.person-chore-cards-container {
	animation: person-chore-cards-fade-in 180ms ease-out;
}

@keyframes person-chore-cards-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.person-chore-cards-container {
		animation: none;
	}

	.token-jar__incoming-token,
	.token-jar__points-burst {
		animation: none;
	}

	.token-jar-complete-notice {
		animation: none;
	}

	.token-jar-spark {
		animation: none;
		opacity: 0.45;
	}

	.token-jar-global-celebration,
	.token-jar-confetti {
		animation: none;
		opacity: 0;
	}
}

.chore-card {
	border: 1px solid #e9e3db;
	border-radius: 14px;
	padding: 0.75rem;
	background: linear-gradient(180deg, #fff 0%, #fcfaf7 100%);
	box-shadow: 0 8px 20px rgba(32, 24, 16, 0.06);
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	width: 100%;
}

.chore-card--linked {
	margin-left: calc(min(var(--chore-depth), 3) * 14px);
	border-left: 4px solid #d7c8b7;
	padding-left: 0.65rem;
}

.chore-card--done {
	border-color: #bfd9c4;
	background: linear-gradient(180deg, #ffffff 0%, #f3fbf4 100%);
}

.chore-card--overdue {
	border-color: #efb0aa;
	background: linear-gradient(180deg, #fff8f7 0%, #fff0ed 100%);
}

.chore-card--today {
	border-color: #f2cc8f;
	background: linear-gradient(180deg, #fffdf7 0%, #fff6e8 100%);
}

.chore-card--tomorrow {
	border-color: #cfe0f1;
	background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
}

.chore-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
}

.chore-card__title {
	font-weight: 700;
	font-size: 0.96rem;
}

.chore-card__title-link {
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px dashed transparent;
	transition: border-color 0.15s ease;
}

.chore-card__title-link:hover {
	border-color: var(--accent);
}

.chore-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.35;
}

.chore-card__due {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	min-width: 185px;
	padding: 0.18rem 0.45rem;
	border-radius: 999px;
	background: #eef4fb;
	border: 1px solid #cfe0f1;
	color: #23506b;
	font-weight: 700;
	margin-bottom: 0.15rem;
}

.chore-card__due--pending {
	background: #fff3de;
	border-color: #f2cc8f;
	color: #7a4a00;
}

.chore-card__due--overdue {
	background: #fde8e5;
	border-color: #efb0aa;
	color: #9b2c1f;
}

.chore-card__due--today {
	background: #fff3de;
	border-color: #f2cc8f;
	color: #7a4a00;
}

.chore-card__due--tomorrow {
	background: #eef4fb;
	border-color: #cfe0f1;
	color: #23506b;
}

.chore-card__due--completed {
	background: #edf8ef;
	border-color: #bfd9c4;
	color: #2f6b3d;
}

.chore-card__description {
	margin: 0;
	font-size: 0.86rem;
	color: var(--ink);
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.chore-card__details {
	margin: 0;
}

.chore-card__details-toggle {
	cursor: pointer;
	list-style: none;
	font-size: 0.8rem;
	font-weight: 700;
	color: #23506b;
	user-select: none;
	width: fit-content;
}

.chore-card__details-toggle::-webkit-details-marker {
	display: none;
}

.chore-card__details-toggle::before {
	content: "+";
	display: inline-block;
	margin-right: 0.3rem;
	font-weight: 800;
}

.chore-card__details[open] .chore-card__details-toggle::before {
	content: "-";
}

.chore-card__details[open] .chore-card__details-toggle {
	color: #1f6f8b;
}

.chore-card__details[open] .chore-card__details-toggle {
	margin-bottom: 0.45rem;
}

.chore-card__details-body {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.chore-card__actions {
	margin-top: auto;
	display: flex;
	justify-content: flex-start;
}

.chore-card__actions .btn {
	padding: 0.45rem 0.8rem;
	font-size: 0.84rem;
	box-shadow: 0 8px 16px rgba(31, 111, 139, 0.18);
	min-width: 132px;
}

.chore-subtasks {
	border-top: 1px solid #ece3d6;
	padding-top: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.chore-subtasks__title {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.chore-subtasks__form {
	margin: 0;
}

.chore-subtasks__row-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.3rem 0.4rem;
	border: 1px solid #e9e3db;
	border-radius: 8px;
	background: #fff;
	width: 100%;
	text-align: left;
	box-shadow: none !important;
}

.chore-subtasks__left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.chore-subtasks__row-btn--done {
	background: #f1faef;
	border-color: #bfd9c4;
}

.chore-subtasks__row-btn--pending {
	background: #fff1f1;
	border-color: #efb0aa;
}

.chore-subtasks__name {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chore-subtasks__completed-at {
	display: none;
	font-size: 0.72rem;
	color: #5f7b66;
	font-weight: 600;
}

.chore-subtasks__completed-at--empty {
	visibility: hidden;
}

.chore-subtasks__status-icon {
	font-size: 0.9rem;
	font-weight: 800;
	min-width: 1.1rem;
	text-align: center;
}

.chore-subtasks__row-btn--done .chore-subtasks__status-icon {
	color: #2f6b3d;
}

.chore-subtasks__row-btn--pending .chore-subtasks__status-icon {
	color: #9b2c1f;
}

@media (min-width: 520px) {
	.chore-subtasks__completed-at {
		display: block;
	}
}

.chore-insights {
	border: 1px solid #e4d7c7;
	background: #fff9f2;
	border-radius: 10px;
	padding: 0.65rem;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.chore-insights__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
}

.chore-insights__hide-link {
	font-size: 0.8rem;
	color: var(--accent);
	text-decoration: none;
}

.chore-insights__hide-link:hover {
	text-decoration: underline;
}

.chore-insights__summary {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	font-size: 0.82rem;
}

.mini-calendar {
	border: 1px solid #e9e3db;
	border-radius: 10px;
	background: #fff;
	padding: 0.5rem;
}

.mini-calendar__month {
	font-size: 0.82rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.mini-calendar__weekdays,
.mini-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.2rem;
}

.mini-calendar__weekdays {
	font-size: 0.66rem;
	color: var(--muted);
	margin-bottom: 0.2rem;
}

.mini-calendar__weekdays span {
	text-align: center;
}

.mini-calendar__day {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	font-size: 0.72rem;
	border-radius: 6px;
	background: #f8f4ee;
	color: var(--ink);
	border: 1px solid transparent;
}

.mini-calendar__day--outside {
	opacity: 0.45;
}

.mini-calendar__day--completed {
	background: #edf8ef;
	border-color: #bfd9c4;
	font-weight: 700;
}

.chores-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0;
	border-top: 1px solid #f1ece5;
}

.chores-note,
.chores-meta {
	color: var(--muted);
	font-size: 0.88rem;
	line-height: 1.45;
}

.streak-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.5rem;
	font-size: 0.82rem;
	border-radius: 999px;
	background: #fff3de;
	border: 1px solid #f2cc8f;
	white-space: nowrap;
}

.chores-admin-card {
	background: #fff;
	border: 1px solid #e4d7c7;
	border-radius: 12px;
	padding: 0.75rem;
	margin-bottom: 0.75rem;
}

.manage-item-block {
	border-top: 1px solid #f1ece5;
	padding-top: 0.75rem;
	margin-top: 0.75rem;
}

.manage-item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.manage-item-row--child {
	margin-left: calc(min(var(--manage-chore-depth), 3) * 16px);
	padding-left: 0.55rem;
	border-left: 3px solid #e4d7c7;
}

.manage-item-row__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.manage-item-row__actions form {
	margin: 0;
}

.manage-chore-children {
	margin-left: 1rem;
	border-left: 3px solid #e4d7c7;
	padding-left: 0.55rem;
	margin-top: 0.25rem;
}

.manage-chore-children__toggle {
	cursor: pointer;
	list-style: none;
	padding: 0.35rem 0 0.5rem;
	color: #7a6e65;
	font-size: 0.82rem;
	user-select: none;
	display: block;
}

.manage-chore-children__toggle::-webkit-details-marker {
	display: none;
}

.manage-chore-children__toggle::before {
	content: '▸ ';
}

.manage-chore-children[open] > .manage-chore-children__toggle::before {
	content: '▾ ';
}

.manage-modal {
	position: fixed;
	inset: 0;
	z-index: 120000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.manage-modal[hidden] {
	display: none !important;
}

.manage-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 12, 8, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.manage-modal__dialog {
	position: relative;
	width: min(540px, 100%);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fffdf9;
	color: #3b342e;
	border-radius: 24px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,0.08), 0 60px 120px -20px rgba(0, 0, 0, 0.35);
	overscroll-behavior: contain;
	animation: editorSlideIn 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) both;
	z-index: 1;
}

.manage-modal__dialog--wide {
	width: min(760px, 100%);
}

.manage-modal__inner {
	padding: 24px;
}

.manage-modal__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 20px;
}

.manage-modal__eyebrow {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.manage-modal__title {
	margin: 0;
	font-size: 24px;
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 700;
	color: var(--ink);
	line-height: 1.3;
}

.manage-modal__title-with-time {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-start;
}

.manage-modal__title-time {
	font-size: 14px;
	font-weight: 500;
	color: var(--muted);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

.manage-modal__close {
	border: 1px solid #e3d7ca;
	background: #fff;
	color: #6b6157;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.manage-modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-top: 1rem;
	flex-wrap: wrap;
}

.manage-modal__actions form {
	display: contents;
}

.chores-admin-card h4 {
	margin: 0 0 0.75rem 0;
}

.chores-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 0.75rem;
}

.chores-field input,
.chores-field select,
.chores-field textarea {
	border: 1px solid #d7c8b7;
	border-radius: 8px;
	padding: 0.45rem 0.55rem;
	font: inherit;
}

.chores-form-error {
	margin: 0 0 0.4rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #b33a2f;
}

.chores-field-inline {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.chores-field-inline--schedule {
	align-items: flex-end;
	flex-wrap: nowrap;
}

.chores-field-inline--schedule .chores-field {
	margin-bottom: 0;
	min-width: 0;
}

@media (max-width: 900px) {
	.chores-field-inline--schedule {
		flex-wrap: wrap;
	}

	.chores-field-inline--schedule .chores-field {
		min-width: 220px;
	}
}

.chores-sub-group-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.9rem;
	padding: 0.4rem 0 0.2rem;
}

.chores-sub-group-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.chores-person-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.9rem;
}

.chores-person-checkboxes label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.chores-days-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.9rem;
}

.chores-days-checkboxes label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.weather-outfit-panel {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 1120px;
	margin: 0 auto;
	padding: 1rem 1.1rem;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

.weather-outfit-page__hero {
	flex-shrink: 0;
}

.weather-outfit-panel__section {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1;
	min-height: 0;
}

.weather-outfit-panel__section h3 {
	margin: 0 0 0.35rem;
}

.weather-outfit-panel__section-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.75rem;
	margin-bottom: 0;
	border-bottom: 1px solid #eadfce;
	flex-shrink: 0;
}

.weather-outfit-panel__hint {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.weather-outfit-panel__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.75rem;
	border-radius: 999px;
	background: #f6eee3;
	border: 1px solid #e4d6c5;
	color: #5e564e;
	font-size: 0.85rem;
	font-weight: 700;
	white-space: nowrap;
}

.weather-outfit-panel__empty {
	margin: 0.35rem 0 0;
	color: var(--muted);
}

.weather-outfit-list {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding-right: 0.35rem;
	margin-right: -0.35rem;
	overscroll-behavior: contain;
}

.weather-outfit-item {
	display: grid;
	grid-template-columns: 88px minmax(160px, 1fr) auto;
	gap: 0.8rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid #e6d7c7;
	border-radius: 12px;
	background: #fffcf7;
	align-items: center;
}

.weather-outfit-item__preview {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
}

.weather-outfit-item__image {
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid #e7ddd2;
}

.weather-outfit-item__meta {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	font-size: 0.92rem;
	min-width: 0;
}

.weather-outfit-item__headline {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.weather-outfit-item__meta strong {
	font-size: 1rem;
	margin: 0;
}

.weather-outfit-item__priority,
.weather-outfit-item__detail {
	display: inline-flex;
	align-items: center;
	padding: 0.22rem 0.5rem;
	border-radius: 999px;
	background: #f4ecdf;
	color: #5d544c;
	font-size: 0.8rem;
	font-weight: 600;
}

.weather-outfit-item__details {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.weather-outfit-item__actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.45rem;
	justify-content: center;
	flex-wrap: wrap;
}

.weather-outfit-item__actions .btn,
.weather-outfit-item__actions .weather-outfit-item__delete {
	padding: 0.5rem 0.9rem;
	font-size: 0.9rem;
}

.weather-outfit-item__actions form {
	margin: 0;
}

.weather-outfit-form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.weather-outfit-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(160px, 1fr));
	gap: 0.7rem 0.9rem;
}

.weather-outfit-form__grid label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
}

.weather-outfit-form__grid input,
.weather-outfit-form__grid select {
	border: 1px solid #d7c8b7;
	border-radius: 8px;
	padding: 0.45rem 0.55rem;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 400;
}

.weather-outfit-form__file-field {
	grid-column: 1 / -1;
}

.weather-outfit-form__errors {
	border: 1px solid #e7bbb6;
	background: #fff1ef;
	color: #8c2f26;
	border-radius: 8px;
	padding: 0.55rem 0.65rem;
	font-size: 0.9rem;
}

.weather-outfit-form__errors ul {
	margin: 0.45rem 0 0;
	padding-left: 1rem;
}

.weather-outfit-form__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.5rem;
	flex-wrap: wrap;
}

@media (max-width: 980px) {
	.weather-outfit-panel {
		padding: 0.9rem;
	}

	.weather-outfit-panel__section-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.weather-outfit-item {
		grid-template-columns: 1fr;
	}

	.weather-outfit-item__preview {
		justify-content: flex-start;
		align-self: auto;
	}

	.weather-outfit-item__image {
		max-width: 120px;
		height: auto;
	}

	.weather-outfit-form__grid {
		grid-template-columns: 1fr;
	}

	.weather-outfit-item__actions {
		flex-direction: row;
		justify-content: flex-start;
	}
}

/* ────────────────────────────────────────────────────────────────────
   MOBILE OPTIMIZATIONS - Nice calendar view for phones
   ──────────────────────────────────────────────────────────────────── */

/* Mobile responsive layout - switch to single column at 768px */
@media (max-width: 768px) {
	.page {
		padding: 12px 8px;
		height: 100vh;
	}

	.panel--calendar {
		display: flex;
		flex-direction: column;
		flex: 1;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.panel__header {
		gap: 12px;
		margin-bottom: 12px;
		flex-wrap: wrap;
		overflow: visible;
	}

	.panel__title {
		flex: 1;
		min-width: 100%;
		margin-bottom: 0;
	}

	.panel__title h2 {
		font-size: 22px;
		margin: 0;
	}

	.panel__eyebrow {
		font-size: 11px;
	}

	.panel__controls {
		display: flex;
		gap: 6px;
		justify-content: flex-start;
		flex-wrap: wrap;
		overflow-x: visible;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
	}

	.panel__controls .global-nav--inline {
		order: 2;
		margin-left: auto;
		flex-shrink: 0;
	}

	.panel__controls .view-toggle {
		order: -2;
		margin: 0 !important;
	}

	.panel__controls .panel__photo-display-button {
		order: -1;
	}

	.pager {
		position: absolute;
		top: 0;
		right: 0;
		gap: 4px;
		flex-shrink: 0;
		z-index: 2;
	}

	.pager__btn {
		width: 36px;
		height: 36px;
		padding: 0;
		flex-shrink: 0;
	}

	.pager__icon {
		width: 18px;
		height: 18px;
	}

	.chip {
		padding: 8px 12px;
		font-size: 13px;
		white-space: nowrap;
		flex-shrink: 0;
		min-width: auto;
	}

	.dropdown {
		position: relative;
		flex-shrink: 0;
		overflow: visible;
		z-index: 10001;
	}

	.global-nav {
		gap: 6px;
	}

	#actionsMenu {
		padding: 8px 12px;
		white-space: nowrap;
		font-size: 13px;
	}

	.dropdown__content {
		position: absolute;
		right: 0;
		top: 100%;
		background: white;
		border: 1px solid #e4d7c7;
		border-radius: 12px;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
		z-index: 10000;
		min-width: 200px;
		margin-top: 4px;
	}

	.dropdown__item {
		display: block;
		width: 100%;
		padding: 12px 16px;
		text-align: left;
		border: none;
		background: none;
		cursor: pointer;
		color: var(--ink);
		font-size: 14px;
		font-family: inherit;
		border-bottom: 1px solid #f1ece5;
		transition: background-color 0.2s ease;
	}

	.dropdown__item:last-child {
		border-bottom: none;
	}

	.dropdown__item:hover {
		background-color: #f9f6f2;
	}

	.dropdown__submenu {
		position: static;
		display: block;
		margin: 4px 8px 8px;
		padding: 6px;
		box-shadow: none;
		border-radius: 10px;
		min-width: 0;
	}

	.dropdown__item--has-children::before {
		content: "";
	}

	.weather-modal__lookup-row,
	.weather-modal__coord-row {
		flex-direction: column;
	}

	.weather-modal__actions {
		flex-direction: row;
	}

	.chip--calendar-home,
	.chip--menu {
		padding: 8px 11px;
		font-size: 13px;
	}

	/* Hide month/year label on very small screens */
	.panel__status--desktop {
		display: none;
	}

	.calendar-filter--header-center {
		display: flex;
		justify-content: center;
		position: static;
		transform: none;
		padding: 8px 0;
		margin-bottom: 8px;
		width: 100%;
		background: transparent;
		border: none;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.calendar-filter--header-center .calendar-filter__list {
		gap: 6px;
		justify-content: center;
		flex-wrap: nowrap;
		width: max-content;
		min-width: 100%;
	}

	.calendar-filter__item {
		background: white;
		border: 1px solid #e4d7c7;
		padding: 3px;
		border-radius: var(--avatar-image-shape-radius);
		width: 44px;
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* Improve calendar grid for tablets */
	.calendar__grid {
		grid-auto-rows: minmax(70px, 1fr);
	}

	.day {
		padding: 6px;
		gap: 3px;
		min-height: 70px;
	}

	.day > span:first-of-type {
		font-size: 14px;
	}

	.day__events {
		display: grid !important;
		gap: 2px;
		font-size: 11px;
		max-height: 100%;
		overflow: hidden;
	}

	.day__event {
		display: grid;
		grid-template-columns: 1fr;
		gap: 1px;
		padding: 3px 4px;
		border-radius: 3px;
		align-items: start;
	}

	.day__event--hidden {
		display: none !important;
	}

	.day__time {
		display: none;
	}

	.day__title {
		font-size: 11px;
		line-height: 1.2;
		white-space: normal;
		-webkit-line-clamp: 1;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.day__more {
		display: block !important;
		font-size: 10px;
		margin-top: 2px;
	}

	.photo-display {
		padding: 0;
	}

	.photo-display__frame {
		border-radius: 0;
		padding: 0;
	}
}

/* Phone breakpoint - 540px and below */
@media (max-width: 540px) {
	.page {
		padding: 8px;
		gap: 8px;
	}

	.panel {
		padding: 12px;
		border-radius: 12px;
	}

	.panel__header {
		padding: 0;
		gap: 8px;
		margin-bottom: 8px;
		overflow: visible;
	}

	.panel__title {
		min-width: 100%;
	}

	.panel__title h2 {
		font-size: 20px;
		margin: 0;
	}

	.panel__controls {
		display: flex;
		gap: 6px;
		flex-wrap: wrap;
		overflow-x: visible;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
		padding-top: 2px;
	}

	.panel__controls .global-nav--inline {
		order: 2;
		margin-left: auto;
		flex-shrink: 0;
	}

	.panel__controls .view-toggle {
		order: -2;
		margin: 0 !important;
	}

	.panel__controls .panel__photo-display-button {
		order: -1;
		padding: 8px 11px;
		font-size: 12px;
	}

	.view-toggle__label {
		display: none;
	}

	.pager__btn {
		width: 36px;
		height: 36px;
		padding: 0;
		flex-shrink: 0;
	}

	.pager {
		top: 1px;
		right: 0;
	}

	.chip {
		padding: 8px 12px;
		font-size: 12px;
		white-space: nowrap;
		flex-shrink: 0;
	}

	#actionsMenu {
		padding: 8px 12px;
		white-space: nowrap;
		flex-shrink: 0;
	}

	.calendar {
		border-radius: 8px;
		overflow: hidden;
	}

	.calendar__weekdays {
		font-size: 10px;
		letter-spacing: 0.1em;
	}

	.calendar__weekdays span {
		padding: 6px 4px;
		font-weight: 600;
	}

	.calendar__grid {
		grid-auto-rows: minmax(80px, 1fr);
		gap: 0;
	}

	.day {
		padding: 6px 4px;
		gap: 2px;
		min-height: 80px;
		border-radius: 0;
	}

	.day > span:first-of-type {
		font-size: 13px;
		font-weight: 700;
	}

	.day__events {
		gap: 1px;
		font-size: 10px;
	}

	.day__event {
		padding: 2px 3px;
		border-radius: 3px;
		gap: 0;
	}

	.day__title {
		font-size: 10px;
		line-height: 1.15;
	}

	.day__more {
		font-size: 9px;
		font-weight: 600;
	}

	/* Hide weekday labels on very small screens to save space */
	@media (max-width: 380px) {
		.calendar__weekdays span {
			padding: 4px 2px;
			font-size: 8px;
		}

		.day > span:first-of-type {
			font-size: 12px;
		}

		.day {
			min-height: 70px;
		}
	}
}

/* Small phones - landscape orientation support */
@media (max-width: 900px) and (max-height: 500px) {
	.page {
		padding: 6px;
	}

	.panel {
		padding: 8px;
	}

	.panel__header {
		margin-bottom: 6px;
	}

	.calendar__grid {
		grid-auto-rows: minmax(50px, 1fr);
	}

	.day {
		padding: 4px 2px;
		gap: 1px;
		min-height: 50px;
	}

	.day > span:first-of-type {
		font-size: 12px;
	}

	.day__events {
		font-size: 9px;
		gap: 1px;
	}

	.day__event {
		padding: 1px 2px;
	}

	.day__title {
		font-size: 9px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.day__more {
		font-size: 8px;
	}
}

/* iPad/medium tablet - improved layout */
@media (min-width: 769px) and (max-width: 1024px) {
	.page {
		padding: 16px;
	}

	.panel--calendar {
		display: flex;
		flex-direction: column;
	}

	.calendar__grid {
		grid-auto-rows: minmax(90px, 1fr);
	}

	.day {
		padding: 8px;
		gap: 3px;
		min-height: 90px;
	}

	.day__events {
		gap: 2px;
		font-size: 12px;
	}

	.day__event {
		gap: 2px;
		padding: 4px 6px;
	}

	.day__title {
		font-size: 12px;
		line-height: 1.25;
	}

	.day__more {
		font-size: 11px;
	}
}

/* Touch target improvements for mobile */
@media (hover: none) and (pointer: coarse) {
	/* Increase touch targets */
	button,
	a,
	.day {
		min-height: 44px;
	}

	.pager__btn {
		min-width: 44px;
		min-height: 44px;
	}

	.chip {
		min-height: 40px;
	}

	.calendar-filter__item {
		min-width: 52px;
		min-height: 52px;
	}

	/* Remove hover effects on touch devices */
	button:not(:active)::after,
	.day:not(:active)::before {
		content: none;
	}

	/* Add active state feedback */
	.day:active,
	button:active {
		opacity: 0.8;
	}
}

/* Focus visible for accessibility on mobile */
@media (max-width: 768px) {
	.chip:focus-visible,
	.pager__btn:focus-visible,
	button:focus-visible {
		outline: 2px solid var(--accent);
		outline-offset: 2px;
	}
}
/* Weekly Calendar View */
.calendar--weekly {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: var(--paper);
	border-radius: 12px;
}

.week-grid {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.week-header {
	display: grid;
	grid-template-columns: 80px repeat(7, 1fr);
	gap: 0;
	background: var(--paper);
	border-bottom: 2px solid var(--paper-line);
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 10;
	flex-shrink: 0;
}

.week-header__spacer {
	background: var(--paper);
	border-right: 2px solid var(--paper-line);
}

.week-header__day {
	padding: 12px 8px;
	text-align: center;
	border-right: 1px solid var(--paper-line);
	background: var(--paper);
	font-size: 0.875rem;
	font-weight: 500;
}

.week-header__day-name {
	color: var(--muted);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.week-header__day-date {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--ink);
	line-height: 1.4;
}

.week-header__day-date--today {
	background: var(--accent);
	color: var(--paper);
	border-radius: 6px;
	padding: 2px 6px;
	display: inline-block;
	width: auto;
}

.week-header__day--today {
	background: rgba(31, 111, 139, 0.04);
}

.calendar--weekly.calendar--dim-past .week-header__day--past:not(.week-header__day--today) {
	opacity: 0.4;
}

.week-header__weather {
	font-size: 0.75rem;
	margin-top: 4px;
	color: var(--muted);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

.week-header__temp {
	font-size: 0.7rem;
	font-weight: 500;
}

.week-body {
	display: grid;
	grid-template-columns: 80px 1fr;
	gap: 0;
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	background: var(--paper);
	position: relative;
}

.week-body__times {
	display: flex;
	flex-direction: column;
	background: var(--cream);
	border-right: 2px solid var(--paper-line);
	position: sticky;
	top: 0;
	left: 0;
	z-index: 5;
	flex-shrink: 0;
	overflow: hidden;
	grid-row: 1 / -1;
}

.week-body__hour-label {
	min-height: 60px;
	padding: 4px 8px;
	text-align: right;
	font-size: 0.75rem;
	color: var(--muted);
	font-weight: 500;
	line-height: 1.2;
	flex-shrink: 0;
	border-bottom: 1px solid var(--paper-line);
}

.week-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0;
	position: relative;
}

.week-day {
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--paper-line);
	background: var(--paper);
	position: relative;
	min-width: 0;
}

.week-day:last-child {
	border-right: none;
}

.week-day--today {
	background: rgba(31, 111, 139, 0.08);
}

.week-day--today .week-day__all-day {
	background: rgba(31, 111, 139, 0.1);
}

.week-day--today .week-day__hours {
	background-color: rgba(31, 111, 139, 0.04);
}

.calendar--weekly.calendar--dim-past .week-day--past:not(.week-day--today) {
	opacity: 0.42;
	filter: saturate(0.7);
}

.calendar--weekly.calendar--dim-past .week-event.week-event--past {
	opacity: 0.58;
	filter: saturate(0.72);
}

.week-day__all-day {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 6;
	overflow: hidden;
	padding: 4px 2px;
	border-bottom: 1px solid var(--paper-line);
	background: var(--cream);
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex-wrap: wrap;
}

.week-day__hours {
	display: flex;
	flex-direction: column;
	flex: 1;
	position: relative;
	min-height: 0;
	background-image: repeating-linear-gradient(
		to bottom,
		transparent 0,
		transparent 59px,
		var(--paper-line) 59px,
		var(--paper-line) 60px
	);
}

.week-day__events {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 7;
}

.week-day__hour {
	min-height: 60px;
	position: relative;
	flex-shrink: 0;
	pointer-events: none;
}

.week-event {
	position: absolute;
	left: 0;
	padding: 3px 5px;
	border-radius: 4px;
	font-size: 0.7rem;
	font-weight: 500;
	line-height: 1.2;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: box-shadow 0.2s, transform 0.2s;
	display: flex;
	flex-direction: column;
	gap: 2px;
	pointer-events: auto;
	box-sizing: border-box;
}

.week-event:not(.week-event--all-day) {
	display: flex;
	align-items: flex-start;
	font-size: clamp(11px, 0.76vw, 13px);
	line-height: 1.25;
}

.week-event__summary {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.week-event:not(.week-event--all-day) .week-event__summary {
	max-width: 100%;
}

.week-event:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16);
	transform: translateY(-1px);
	z-index: 11;
}

.week-event--all-day {
	position: static;
	margin-bottom: 2px;
	padding: 6px 4px;
	height: auto;
	border-radius: 3px;
	font-size: 0.7rem;
	min-height: 24px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	white-space: normal;
	text-overflow: ellipsis;
	word-break: break-word;
}

.week-event--recurring-main {
	border-style: dashed;
	border-color: rgba(255, 255, 255, 0.6);
	gap: 3px;
	padding: 4px 6px;
}

.week-event--recurring-main .event-display-title {
	display: flex;
	align-items: center;
	gap: 3px;
	flex-wrap: wrap;
}

.week-event--recurring-main .sized-emoji {
	flex-shrink: 0;
}

.week-event--recurring-main .sized-emoji--xl {
	font-size: 1.2em;
}

.week-event--recurring-main .week-event__time {
	font-size: 0.85em;
	line-height: 1;
	margin-top: 1px;
}

.week-event__time {
	font-size: 0.92em;
	opacity: 0.9;
	font-weight: 600;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.1;
}

.week-event__title {
	font-size: 1em;
	font-weight: 500;
	word-break: break-word;
	line-height: 1.15;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: normal;
	overflow-wrap: anywhere;
}

.week-event--compact {
	padding: 2px 3px;
	line-height: 1.1;
}

.week-event--compact .week-event__time {
	font-size: 0.88em;
	font-weight: 600;
}

.week-event--compact .week-event__title {
	font-size: 0.92em;
	line-height: 1.05;
	-webkit-line-clamp: 1;
	line-clamp: 1;
}

.week-event--cozy .week-event__title {
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.week-event--cozy {
	font-size: clamp(11px, 0.8vw, 13px);
}

.week-event--roomy {
	padding: 4px 6px;
	font-size: clamp(12px, 0.92vw, 15px);
}

.week-event--roomy .week-event__time {
	font-size: 0.98em;
}

.week-event--roomy .week-event__title {
	line-height: 1.2;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.day__event--recurring-main {
	border: 1px dashed rgba(255, 255, 255, 0.6);
}

.week-event--spacious {
	padding: 5px 7px;
	font-size: clamp(15px, 1.2vw, 20px);
}

.week-event--spacious .week-event__time {
	font-size: 1.04em;
	font-weight: 700;
}

.week-event--spacious .week-event__title {
	font-size: 1.08em;
	line-height: 1.22;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.week-event:not(.week-event--all-day).week-event--cozy {
	font-size: clamp(11px, 0.8vw, 13px);
}

.week-event:not(.week-event--all-day).week-event--roomy {
	font-size: clamp(12px, 0.92vw, 15px);
}

.week-event:not(.week-event--all-day).week-event--spacious {
	font-size: clamp(15px, 1.2vw, 20px);
}

/* Weekly view responsive adjustments */
@media (max-width: 1200px) {
	.week-grid {
		font-size: 0.875rem;
	}

	.week-body__hour-label {
		font-size: 0.7rem;
		min-height: 48px;
		padding: 2px 4px;
	}

	.week-day__hour {
		min-height: 48px;
	}

	.week-day__hours {
		background-image: repeating-linear-gradient(
			to bottom,
			transparent 0,
			transparent 47px,
			var(--paper-line) 47px,
			var(--paper-line) 48px
		);
	}

	.week-event {
		font-size: 0.72rem;
		padding: 3px 4px;
	}

	.week-event:not(.week-event--all-day).week-event--cozy {
		font-size: 0.78rem;
	}

	.week-event:not(.week-event--all-day).week-event--roomy {
		font-size: 0.88rem;
	}

	.week-event:not(.week-event--all-day).week-event--spacious {
		font-size: 1.08rem;
	}

	.week-header__day {
		padding: 8px 4px;
	}

	.week-header__day-date {
		font-size: 1rem;
	}

	.week-header__day-name {
		font-size: 0.7rem;
	}
}

@media (max-width: 768px) {
	.week-header {
		grid-template-columns: 50px repeat(7, 1fr);
	}

	.week-header__spacer {
		width: 50px;
	}

	.week-body {
		grid-template-columns: 50px 1fr;
	}

	.week-body__times {
		width: 50px;
	}

	.week-body__hour-label {
		font-size: 0.6rem;
		min-height: 36px;
		padding: 0 2px;
	}

	.week-day__hour {
		min-height: 36px;
	}

	.week-day__hours {
		background-image: repeating-linear-gradient(
			to bottom,
			transparent 0,
			transparent 35px,
			var(--paper-line) 35px,
			var(--paper-line) 36px
		);
	}

	.week-event {
		font-size: 0.52rem;
		padding: 1px 2px;
	}

	.week-event:not(.week-event--all-day).week-event--cozy {
		font-size: 0.55rem;
	}

	.week-event:not(.week-event--all-day).week-event--roomy {
		font-size: 0.62rem;
	}

	.week-event:not(.week-event--all-day).week-event--spacious {
		font-size: 0.8rem;
	}

	.week-header__day {
		padding: 6px 2px;
	}

	.week-header__day-date {
		font-size: 0.7rem;
	}

	.week-header__day-name {
		font-size: 0.5rem;
	}

	.week-header__weather {
		font-size: 0.6rem;
	}

	.week-header__temp {
		font-size: 0.5rem;
	}
}

/* Very small mobile devices (phones < 480px width) */
@media (max-width: 480px) {
	.week-header {
		grid-template-columns: 40px repeat(7, 1fr);
	}

	.week-header__spacer {
		width: 40px;
	}

	.week-body {
		grid-template-columns: 40px 1fr;
	}

	.week-body__times {
		width: 40px;
	}

	.week-body__hour-label {
		font-size: 0.55rem;
		min-height: 32px;
		padding: 0 1px;
	}

	.week-day__hour {
		min-height: 32px;
	}

	.week-day__hours {
		background-image: repeating-linear-gradient(
			to bottom,
			transparent 0,
			transparent 31px,
			var(--paper-line) 31px,
			var(--paper-line) 32px
		);
	}

	.week-event {
		font-size: 0.48rem;
		padding: 0.5px 1px;
	}

	.week-event:not(.week-event--all-day).week-event--cozy {
		font-size: 0.5rem;
	}

	.week-event:not(.week-event--all-day).week-event--roomy {
		font-size: 0.56rem;
	}

	.week-event:not(.week-event--all-day).week-event--spacious {
		font-size: 0.72rem;
	}

	.week-event__time {
		font-size: 0.88em;
	}

	.week-event__title {
		-webkit-line-clamp: 1;
		line-clamp: 1;
		font-size: 1em;
	}

	.week-header__day {
		padding: 4px 1px;
	}

	.week-header__day-date {
		font-size: 0.65rem;
	}

	.week-header__day-name {
		font-size: 0.45rem;
	}

	.week-header__weather {
		font-size: 0.5rem;
	}

	.week-header__temp {
		font-size: 0.45rem;
	}
}

/* Current Time Indicator */
.week-current-time-indicator {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(to right, #ff0000, #ff6b6b);
	z-index: 20;
	pointer-events: none;
	box-shadow: 0 0 4px rgba(255, 0, 0, 0.4);
}

.week-current-time-indicator::before {
	content: '';
	position: absolute;
	left: -6px;
	top: 50%;
	width: 12px;
	height: 12px;
	background: #ff0000;
	border-radius: 50%;
	transform: translateY(-50%);
	box-shadow: 0 0 6px rgba(255, 0, 0, 0.6);
}

/* Avatar lightbox */
.person-row__avatar--clickable {
	cursor: pointer;
}

.avatar-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 200000;
	padding: 24px;
	animation: fade-in 0.15s ease both;
}

.avatar-lightbox.show {
	display: flex;
}

.avatar-lightbox__content {
	max-width: min(560px, calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.avatar-lightbox__img {
	max-width: min(480px, 90vw);
	max-height: 90vh;
	border-radius: 16px;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
	object-fit: contain;
	background: #fff;
}

.avatar-lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.18);
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	font-size: 1.4rem;
	line-height: 1;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s;
}

.avatar-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.32);
}

.avatar-lightbox__card {
	width: min(560px, calc(100vw - 48px));
	max-height: calc(100vh - 48px);
	overflow: auto;
	cursor: default;
}

.avatar-lightbox__card--birthday {
	padding: 22px;
	gap: 18px;
	border-radius: 28px;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.avatar-lightbox__card--birthday .kids-day__birthday-content {
	gap: 8px;
}

.avatar-lightbox__card--birthday .kids-day__birthday-kicker {
	font-size: 1rem;
}

.avatar-lightbox__card--birthday .kids-day__birthday-title {
	font-size: clamp(2rem, 4.6vw, 3rem);
	line-height: 1.08;
}

.avatar-lightbox__card--birthday .kids-day__birthday-date {
	font-size: 1.5rem;
}

.avatar-lightbox__card--birthday .kids-day__birthday-media {
	width: min(320px, 62vw);
	height: min(320px, 62vw);
	border-radius: 30px;
	border-width: 6px;
}

.avatar-lightbox__card--birthday .kids-day__birthday-fallback {
	font-size: clamp(6rem, 16vw, 8rem);
}

.avatar-lightbox__card--birthday .kids-day__birthday-fallback--initial {
	font-size: clamp(4.5rem, 12vw, 6rem);
}

.avatar-lightbox__card--weather {
	width: min(560px, calc(100vw - 48px));
	padding: 24px;
	gap: 18px;
	border-radius: 28px;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.avatar-lightbox__card--weather .kids-day__weather-row {
	gap: 18px;
}

.avatar-lightbox__card--weather .kids-day__weather-icon {
	font-size: clamp(4rem, 11vw, 5.5rem);
}

.avatar-lightbox__card--weather .kids-day__weather-label {
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	line-height: 1.05;
}

.avatar-lightbox__card--weather .kids-day__weather-temps {
	gap: 10px;
}

.avatar-lightbox__card--weather .kids-day__weather-temp,
.avatar-lightbox__card--weather .kids-day__weather-temp-divider {
	font-size: clamp(2rem, 4.6vw, 3rem);
	line-height: 1;
}

.avatar-lightbox__card--weather .kids-day__wear-row {
	padding-top: 2px;
}

.avatar-lightbox__card--weather .kids-day__wear-image {
	max-height: min(420px, 56vh);
	max-width: 100%;
}