/* ==========================================================================
   Remlinger Calendar · rfcal.css
   Prefix: rfcal-  ·  Root: .rfcal-root  ·  Contexts: page | modal
   ========================================================================== */

/* ---------- Fonts (plugin asset; Montserrat comes from the Global Shell) --- */
@font-face {
	font-family: "RF Cal Young Serif";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/young-serif-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Animatable season tokens --------------------------------------- */
@property --rfcal-base   { syntax: "<color>"; inherits: true; initial-value: #1f3b2c; }
@property --rfcal-accent { syntax: "<color>"; inherits: true; initial-value: #d2632a; }
@property --rfcal-soft   { syntax: "<color>"; inherits: true; initial-value: #ee8a4e; }
@property --rfcal-cta    { syntax: "<color>"; inherits: true; initial-value: #b5501c; }
@property --rfcal-glow-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- Root + seasons ------------------------------------------------- */
.rfcal-root {
	--rfcal-paper: #f5efe3;
	--rfcal-card: #fffdf8;
	--rfcal-cream: #f5efe3;
	--rfcal-ink: #1e1c18;
	--rfcal-ink-soft: #6a6358;
	--rfcal-line: rgba(30, 28, 24, 0.12);
	--rfcal-header-h: 76px;
	--rfcal-cta-ink: #ffffff;
	--rfcal-fade: 0.6s;
	/* RF Glow Border: one palette per page, inherited everywhere below */
	--rf-glow-1: var(--rfcal-accent);
	--rf-glow-2: var(--rfcal-soft);
	--rf-glow-3: var(--rfcal-base);
	--rf-glow-speed: 6s;

	position: relative;
	isolation: isolate;
	container: rfcal / inline-size;
	background: var(--rfcal-paper);
	color: var(--rfcal-ink);
	font-family: "RF Shell Montserrat", Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
	text-align: left;
	transition: --rfcal-base var(--rfcal-fade) ease, --rfcal-accent var(--rfcal-fade) ease,
		--rfcal-soft var(--rfcal-fade) ease, --rfcal-cta var(--rfcal-fade) ease;
}
.rfcal-root[data-rfcal-season="strawberry"], .rfcal-progress[data-rfcal-season="strawberry"] { --rfcal-base: #4a1420; --rfcal-accent: #e2343f; --rfcal-soft: #ff8a8f; --rfcal-cta: #c21f30; --rfcal-cta-ink: #ffffff; }
.rfcal-root[data-rfcal-season="raspberry"], .rfcal-progress[data-rfcal-season="raspberry"] { --rfcal-base: #3b0f2e; --rfcal-accent: #c2185b; --rfcal-soft: #f27baa; --rfcal-cta: #c2185b; --rfcal-cta-ink: #ffffff; }
.rfcal-root[data-rfcal-season="fall"], .rfcal-progress[data-rfcal-season="fall"] { --rfcal-base: #1f3b2c; --rfcal-accent: #d2632a; --rfcal-soft: #ee8a4e; --rfcal-cta: #b5501c; --rfcal-cta-ink: #ffffff; }
.rfcal-root[data-rfcal-season="winter"], .rfcal-progress[data-rfcal-season="winter"] { --rfcal-base: #121c3a; --rfcal-accent: #e8b04a; --rfcal-soft: #f3cf83; --rfcal-cta: #e8b04a; --rfcal-cta-ink: #1e1c18; }

/* ---------- Scoped resets (X-Theme / Cornerstone defense) ------------------ */
.rfcal-root *, .rfcal-root *::before, .rfcal-root *::after { box-sizing: border-box; }
.rfcal-root h1, .rfcal-root h2, .rfcal-root h3, .rfcal-root p {
	margin: 0 !important;
	padding: 0;
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
	letter-spacing: normal;
	text-transform: none;
	font-weight: inherit;
}
.rfcal-root a { color: inherit !important; text-decoration: none; }
.rfcal-root button {
	font: inherit;
	color: inherit;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	text-transform: none;
	letter-spacing: normal;
	line-height: inherit;
	box-shadow: none;
}
.rfcal-root img { max-width: 100%; height: auto; display: block; }
.rfcal-root :focus-visible { outline: 3px solid var(--rfcal-soft); outline-offset: 2px; }
.rfcal-root [hidden] { display: none !important; }
.rfcal-sr {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rfcal-root .rfcal-serif { font-family: "RF Cal Young Serif", Georgia, "Times New Roman", serif !important; font-weight: 400; }

/* ---------- Season background + scrim ------------------------------------- */
.rfcal-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.rfcal-bg-img {
	position: absolute; inset: 0;
	background-position: center top; background-size: cover; background-repeat: no-repeat;
	opacity: 0;
	transition: opacity 0.7s ease;
}
.rfcal-bg-img.is-on { opacity: 1; }
.rfcal-bg-scrim {
	position: absolute; inset: 0;
	background: linear-gradient(180deg,
		color-mix(in srgb, var(--rfcal-base) 80%, transparent) 0%,
		color-mix(in srgb, var(--rfcal-base) 90%, transparent) 34%,
		var(--rfcal-base) 62%);
}

/* ---------- Panel (#month) ------------------------------------------------- */
.rfcal-panel {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--rfcal-base);
	color: var(--rfcal-cream);
	border-radius: 0 0 28px 28px;
	scroll-margin-top: calc(var(--rfcal-header-h) + 12px);
}
.rfcal-root[data-rfcal-context="page"] .rfcal-panel { padding-top: calc(var(--rfcal-header-h) + 6px); }
.rfcal-root[data-rfcal-context="modal"] .rfcal-panel { padding-top: 8px; }

.rfcal-toprow { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 0 16px; min-height: 50px; }
.rfcal-root .rfcal-eyebrow {
	font-size: 12px !important; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--rfcal-soft) !important;
}
.rfcal-root[data-rfcal-context="modal"] .rfcal-eyebrow { visibility: hidden; }
.rfcal-nav { display: flex; }
.rfcal-root .rfcal-navbtn {
	width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center;
	color: var(--rfcal-cream); transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.rfcal-navbtn svg { width: 22px; height: 22px; }
.rfcal-navbtn:disabled { opacity: 0.3; cursor: default; }
.rfcal-navbtn:active:not(:disabled) { transform: scale(0.92); background: rgba(245, 239, 227, 0.14); }

.rfcal-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 14px; }
.rfcal-root .rfcal-title { font-size: 34px !important; line-height: 1.05 !important; white-space: nowrap; color: var(--rfcal-cream) !important; }
.rfcal-title .rfcal-year { font-size: 20px; opacity: 0.72; }

/* iPhone-grade glass control */
.rfcal-root .rfcal-toggle {
	flex: none; min-height: 44px; padding: 0 16px; border-radius: 22px;
	background: rgba(245, 239, 227, 0.16);
	border: 1px solid rgba(245, 239, 227, 0.34);
	-webkit-backdrop-filter: blur(28px) saturate(180%);
	backdrop-filter: blur(28px) saturate(180%);
	box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.34), inset -1px -1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.2);
	color: var(--rfcal-cream); font-weight: 600; font-size: 14px;
	transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.2s;
}
.rfcal-root .rfcal-toggle:active { transform: scale(0.96); background: rgba(245, 239, 227, 0.26); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.rfcal-root .rfcal-toggle { background: color-mix(in srgb, var(--rfcal-base) 70%, #f5efe3); }
}

/* ---------- Day strip ------------------------------------------------------ */
.rfcal-root .rfcal-strip {
	position: relative; display: flex; flex-wrap: nowrap !important; gap: 6px;
	overflow-x: auto !important; overflow-y: hidden; overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
	padding: 2px 12px 18px; scrollbar-width: none; scroll-snap-type: x proximity;
	/* soft edges hint that the days keep going */
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
}
.rfcal-strip::-webkit-scrollbar { display: none; }
.rfcal-strip.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.rfcal-strip.is-dragging .rfcal-sday { pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
	.rfcal-root .rfcal-strip { cursor: grab; scrollbar-width: thin; scrollbar-color: rgba(245, 239, 227, 0.35) transparent; padding-bottom: 12px; margin-bottom: 6px; }
	.rfcal-strip::-webkit-scrollbar { display: block; height: 6px; }
	.rfcal-strip::-webkit-scrollbar-thumb { background: rgba(245, 239, 227, 0.35); border-radius: 3px; }
}
.rfcal-root .rfcal-sday {
	position: relative; flex: none; width: 50px; height: 76px; border-radius: 25px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	scroll-snap-align: center;
	background: rgba(245, 239, 227, 0.08); border: 1.5px solid transparent; color: var(--rfcal-cream);
	transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s;
}
.rfcal-sday:active { transform: scale(0.95); }
.rfcal-sday-dow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.rfcal-sday-num { font-size: 20px; font-weight: 700; line-height: 1; }
.rfcal-sday.is-out { opacity: 0.5; }
.rfcal-sday.is-today { border-color: var(--rfcal-soft); }
.rfcal-sday.is-today .rfcal-sday-dow { color: var(--rfcal-soft); }
.rfcal-sday.is-tint { background: var(--rfcal-tint); }
.rfcal-root .rfcal-sday.is-sel { background: var(--rfcal-cream); color: var(--rfcal-base); border-color: var(--rfcal-cream); opacity: 1; }
.rfcal-sday.is-sel .rfcal-sday-dow { color: inherit; }
.rfcal-sday.is-sel.is-tint { box-shadow: inset 0 0 0 3px var(--rfcal-tint-solid); }

/* ---------- Dots + closed mark --------------------------------------------- */
.rfcal-dots { display: flex; gap: 1.5px; height: 5px; align-items: center; }
.rfcal-dot { flex: none; width: 5px; height: 5px; border-radius: 3px; background: var(--d); }
.is-sel .rfcal-dot { background: var(--l); }
.rfcal-xmark { width: 12px; height: 2px; border-radius: 1px; background: currentColor; opacity: 0.75; transform: rotate(-35deg); }

/* ---------- Month grid ------------------------------------------------------ */
.rfcal-grid { padding: 0 10px 16px; }
.rfcal-dow {
	display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 6px;
	font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-align: center; color: rgba(245, 239, 227, 0.72);
}
.rfcal-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.rfcal-cell { height: 50px; display: flex; align-items: center; justify-content: center; }
.rfcal-cell.has-band { background: color-mix(in srgb, var(--rfcal-soft) 26%, transparent); }
.rfcal-cell.band-s { border-top-left-radius: 16px; border-bottom-left-radius: 16px; }
.rfcal-cell.band-e { border-top-right-radius: 16px; border-bottom-right-radius: 16px; }
.rfcal-root .rfcal-gday {
	width: 44px; height: 46px; border-radius: 14px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	color: var(--rfcal-cream); transition: background 0.25s, color 0.25s, transform 0.15s;
}
.rfcal-gday:active { transform: scale(0.94); }
.rfcal-gday-num { font-size: 16px; font-weight: 600; line-height: 1; }
.rfcal-gday .rfcal-dots { gap: 1.5px; height: 4px; }
.rfcal-gday .rfcal-dot { width: 4px; height: 4px; }
.rfcal-gday.is-past { opacity: 0.5; }
.rfcal-gday.is-closed .rfcal-gday-num { opacity: 0.6; }
.rfcal-gday.is-today { box-shadow: inset 0 0 0 2px var(--rfcal-soft); }
.rfcal-gday.is-tint { background: var(--rfcal-tint); }
.rfcal-root .rfcal-gday.is-sel { background: var(--rfcal-cream); color: var(--rfcal-base); opacity: 1; }
.rfcal-gday.is-sel.is-tint { box-shadow: inset 0 0 0 3px var(--rfcal-tint-solid); }

.rfcal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 6px 0; font-size: 12px; color: rgba(245, 239, 227, 0.88); }
.rfcal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rfcal-lg-band { width: 16px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--rfcal-soft) 40%, transparent); }
.rfcal-lg-today { width: 10px; height: 10px; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--rfcal-soft); }
.rfcal-lg-sel { width: 10px; height: 10px; border-radius: 4px; background: var(--rfcal-cream); }

/* ---------- Category chips (#categories) ----------------------------------- */
.rfcal-cats { padding: 16px 12px 4px; scroll-margin-top: calc(var(--rfcal-header-h) + 12px); }
.rfcal-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rfcal-root .rfcal-chip {
	min-height: 44px; padding: 4px 6px; border-radius: 22px;
	display: flex; align-items: center; justify-content: center; gap: 6px;
	font-size: clamp(12px, 3.3cqi, 14px); font-weight: 600; line-height: 1.15; text-align: center;
	background: var(--rfcal-card); color: var(--rfcal-ink); border: 1.5px solid rgba(30, 28, 24, 0.16);
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.rfcal-chip:active { transform: scale(0.96); }
.rfcal-chip-dot { width: 9px; height: 9px; border-radius: 5px; flex: none; background: var(--l); }
.rfcal-root .rfcal-chip[aria-pressed="true"] { background: var(--rfcal-base); color: var(--rfcal-cream); border-color: var(--rfcal-base); }
.rfcal-chip[aria-pressed="true"] .rfcal-chip-dot { background: var(--d); box-shadow: 0 0 0 1.5px var(--rfcal-cream); }

/* ---------- Day (#day) ----------------------------------------------------- */
.rfcal-day { padding: 16px 0 8px; scroll-margin-top: calc(var(--rfcal-header-h) + 12px); }
.rfcal-dayhead { padding: 0 16px 4px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rfcal-root .rfcal-dayhead h2 { font-size: 23px !important; line-height: 1.15 !important; text-wrap: balance; }
.rfcal-count { font-size: 13px; color: var(--rfcal-ink-soft); white-space: nowrap; }
.rfcal-root .rfcal-label {
	margin: 16px 16px 0 !important; font-size: 12px !important; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--rfcal-ink-soft) !important;
}

.rfcal-ev { margin: 8px 12px 0; background: var(--rfcal-card); border-radius: 16px; border: 1px solid rgba(30, 28, 24, 0.07); overflow: hidden; }
.rfcal-root .rfcal-ev-head {
	width: 100%; padding: 12px; display: grid; grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 12px;
	align-items: center; text-align: left; color: var(--rfcal-ink);
}
.rfcal-ev-thumb {
	width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
	background: color-mix(in srgb, var(--d) 30%, var(--rfcal-card)); color: var(--l);
}
.rfcal-ev-thumb img { width: 64px; height: 64px; object-fit: cover; }
.rfcal-ev-thumb svg { width: 28px; height: 28px; }
.rfcal-ev-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rfcal-ev-time { font-size: 13px; font-weight: 700; color: var(--l); }
.rfcal-ev-title { font-size: 16px; font-weight: 600; line-height: 1.25; text-wrap: pretty; overflow-wrap: anywhere; }
.rfcal-ev-meta { font-size: 13px; color: var(--rfcal-ink-soft); }
.rfcal-ev-chev { color: var(--rfcal-ink-soft); transition: transform 0.2s; display: grid; place-items: center; }
.rfcal-ev-chev svg { width: 18px; height: 18px; }
.rfcal-ev-head[aria-expanded="true"] .rfcal-ev-chev { transform: rotate(90deg); }
.rfcal-ev-body { padding: 0 14px 14px 88px; font-size: 14px; line-height: 1.5; color: #3d3830; }
.rfcal-root .rfcal-ev-sub { font-weight: 600 !important; color: var(--rfcal-ink) !important; margin-bottom: 4px !important; }
.rfcal-ev-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Buttons */
.rfcal-root .rfcal-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 18px; border-radius: 22px;
	font-size: 14px; font-weight: 700; line-height: 1.1; text-align: center;
	background: var(--rfcal-cta); color: var(--rfcal-cta-ink) !important; border: 1.5px solid var(--rfcal-cta);
	transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1), filter 0.2s;
}
.rfcal-root .rfcal-btn:active { transform: scale(0.96); filter: brightness(1.08); }
.rfcal-root .rfcal-btn--ghost { background: transparent; color: var(--rfcal-ink) !important; border-color: rgba(30, 28, 24, 0.35); }

/* Note card (closed banner, not-on-this-day, empty) with RF Glow Border */
.rfcal-note { margin: 10px 12px 0; padding: 18px 18px 16px; border-radius: 18px; background: var(--rfcal-card); }
.rfcal-root .rfcal-note-title { font-size: 20px !important; line-height: 1.2 !important; }
.rfcal-root .rfcal-note-sub { margin-top: 6px !important; font-size: 14px !important; font-weight: 600; }
.rfcal-root .rfcal-note-text { margin-top: 4px !important; font-size: 14px !important; line-height: 1.5 !important; color: #3d3830 !important; white-space: pre-line; }
.rfcal-note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rfcal-note .rfcal-xmark { display: inline-block; vertical-align: middle; margin-right: 8px; color: var(--rfcal-accent); }
.rfcal-dates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rfcal-root .rfcal-date {
	min-height: 44px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; gap: 7px;
	background: color-mix(in srgb, var(--d) 18%, var(--rfcal-card)); border: 1.5px solid color-mix(in srgb, var(--l) 45%, transparent);
	font-size: 14px; font-weight: 600; color: var(--rfcal-ink);
	transition: transform 0.15s;
}
.rfcal-date:active { transform: scale(0.96); }
.rfcal-date .rfcal-chip-dot { width: 8px; height: 8px; }

.rfcal-glow { position: relative; isolation: isolate; }
.rfcal-glow::before {
	content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
	background: conic-gradient(from var(--rfcal-glow-a), var(--rf-glow-1), var(--rf-glow-2), var(--rf-glow-3), var(--rf-glow-1));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
	animation: rfcal-glow-spin var(--rf-glow-speed) linear infinite;
}
@keyframes rfcal-glow-spin { to { --rfcal-glow-a: 360deg; } }

/* Skeleton */
.rfcal-skel { margin: 8px 12px 0; height: 88px; border-radius: 16px; background: linear-gradient(90deg, #eee6d8 0%, #f8f3ea 50%, #eee6d8 100%); background-size: 200% 100%; animation: rfcal-shimmer 1.2s linear infinite; }
@keyframes rfcal-shimmer { to { background-position: -200% 0; } }

/* ---------- Plan a visit (#visit) ------------------------------------------ */
.rfcal-visit { padding: 24px 12px 40px; scroll-margin-top: calc(var(--rfcal-header-h) + 12px); }
.rfcal-visit-card { padding: 22px 20px; border-radius: 22px; background: var(--rfcal-card); }
.rfcal-root .rfcal-visit-card h2 { font-size: 26px !important; line-height: 1.1 !important; text-wrap: balance; }
.rfcal-root .rfcal-visit-card p { margin-top: 6px !important; font-size: 15px !important; color: #3d3830 !important; text-wrap: pretty; }
.rfcal-visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Desktop / wide container (page or shell dialog) ---------------- */
@container rfcal (min-width: 900px) {
	.rfcal-app {
		display: grid;
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
		grid-template-areas: "panel side" "visit visit";
		gap: 28px;
		max-width: 1320px;
		margin-inline: auto;
		padding: 28px 32px 48px;
		align-items: start;
	}
	.rfcal-root[data-rfcal-context="page"] .rfcal-app { padding-top: calc(var(--rfcal-header-h) + 28px); }
	/* the season band becomes full-bleed behind both cards */
	/* the season band runs 80% of the way down the calendar and dissolves into the page:
	   an eased mask (no colour stop to paper), so there is no edge anywhere */
	.rfcal-bg {
		bottom: auto; height: 80%;
		-webkit-mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgba(0, 0, 0, 0.92) 40%, rgba(0, 0, 0, 0.78) 50%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.22) 80%, rgba(0, 0, 0, 0.09) 90%, rgba(0, 0, 0, 0.02) 96%, transparent 100%);
		mask-image: linear-gradient(180deg, #000 0%, #000 30%, rgba(0, 0, 0, 0.92) 40%, rgba(0, 0, 0, 0.78) 50%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.22) 80%, rgba(0, 0, 0, 0.09) 90%, rgba(0, 0, 0, 0.02) 96%, transparent 100%);
	}
	.rfcal-bg-scrim {
		background: linear-gradient(180deg,
			color-mix(in srgb, var(--rfcal-base) 70%, transparent) 0%,
			color-mix(in srgb, var(--rfcal-base) 80%, transparent) 100%);
	}
	.rfcal-root .rfcal-panel {
		grid-area: panel; position: static; overflow: visible; isolation: auto;
		border-radius: 28px; padding: 12px 8px 4px !important;
		/* no backdrop-filter here: it would trap the full-bleed season band inside the panel */
		background: color-mix(in srgb, var(--rfcal-base) 88%, transparent);
		box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.18), 0 30px 80px rgba(0, 0, 0, 0.28);
	}
	.rfcal-side { grid-area: side; background: var(--rfcal-card); border-radius: 28px; padding: 8px 4px 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16); }
	.rfcal-side .rfcal-ev { background: var(--rfcal-paper); }
	.rfcal-side .rfcal-note { background: var(--rfcal-paper); }
	.rfcal-visit { grid-area: visit; padding: 0; }
	.rfcal-visit-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 30px; }
	.rfcal-visit-actions { margin-top: 0; flex: none; }
	.rfcal-root .rfcal-title { font-size: 42px !important; }
	.rfcal-cell { height: 58px; }
	.rfcal-root .rfcal-gday { width: 52px; height: 52px; }
	.rfcal-strip { padding-inline: 16px; }
}

/* ---------- Motion + transparency preferences ------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.rfcal-root { --rfcal-fade: 0s; }
	.rfcal-root *, .rfcal-root *::before { animation: none !important; transition-duration: 0s !important; }
}
@media (prefers-reduced-transparency: reduce) {
	.rfcal-root .rfcal-toggle { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (hover: hover) and (pointer: fine) {
	.rfcal-root .rfcal-navbtn:hover:not(:disabled), .rfcal-root .rfcal-sday:hover:not(.is-sel), .rfcal-root .rfcal-gday:hover:not(.is-sel) { background: rgba(245, 239, 227, 0.16); }
	.rfcal-root .rfcal-chip:hover:not([aria-pressed="true"]) { border-color: rgba(30, 28, 24, 0.4); }
	.rfcal-root .rfcal-ev-head:hover .rfcal-ev-title { text-decoration: underline; text-underline-offset: 3px; }
	.rfcal-root .rfcal-btn:hover { filter: brightness(1.06); }
}

/* ---------- Page body (isolated template) ---------------------------------- */
body.rfcal-page { background: #f5efe3; margin: 0; }
/* Close the shell's 3px top slot on this page only (same fix as Fall Harvest and Fun Park);
   logged-in editors keep the WordPress-toolbar offset. */
body.rfcal-page .rf-shell-header { top: var(--rf-shell-admin-offset, 0px) !important; }

/* ---------- Scroll progress bar (page only, directly under the shell header) */
.rfcal-progress {
	position: fixed; left: 0; right: 0; top: var(--rfcal-header-h, 76px); z-index: 900;
	height: 3px; pointer-events: none;
	background: color-mix(in srgb, var(--rfcal-base) 14%, transparent);
	transition: --rfcal-base 0.6s ease, --rfcal-accent 0.6s ease, --rfcal-soft 0.6s ease;
}
.rfcal-progress > span {
	display: block; height: 100%; width: 100%;
	transform-origin: 0 50%; transform: scaleX(var(--rfcal-progress, 0));
	background: linear-gradient(90deg, var(--rfcal-base), var(--rfcal-accent) 45%, var(--rfcal-soft));
	border-radius: 0 2px 2px 0;
}
@media (prefers-reduced-motion: reduce) { .rfcal-progress { transition: none; } }
