/*
Theme Name: Of Stars
Theme URI: https://ofstars.org
Author: Of Stars
Description: A dusk-lit, ethereal blog theme with twinkling fireflies, a starry sky, polaroid-framed images, hand-drawn SVG moons, leaves and mushrooms, a styled sidebar and a woodland footer. IM Fell DW Pica body text with Pinyon Script flourishes.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ofstars
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, dark, accessibility-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--night: #0e0b26;
	--indigo: #1b1445;
	--plum: #352060;
	--mauve: #6a3a73;
	--rose: #e79aa6;
	--peach: #f3b79a;
	--gold: #f2d38b;
	--lilac: #c9b8ee;
	--sage: #a9c8a3;
	--cream: #f4ede1;
	--text: #e8e0ec;
	--muted: #b3a6c6;
	--card: rgba(24, 18, 56, .72);
	--line: rgba(242, 211, 139, .22);
	--footer-top: #150f33;

	--font-body: 'IM Fell DW Pica', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
	--font-script: 'Pinyon Script', 'Snell Roundhand', 'Apple Chancery', cursive;

	/* small svg ornaments used as css backgrounds */
	--ico-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2d38b' d='M12 1C12.8 7.5 16.5 11.2 23 12 16.5 12.8 12.8 16.5 12 23 11.2 16.5 7.5 12.8 1 12 7.5 11.2 11.2 7.5 12 1z'/%3E%3C/svg%3E");
	--ico-star-lilac: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c9b8ee' d='M12 1C12.8 7.5 16.5 11.2 23 12 16.5 12.8 12.8 16.5 12 23 11.2 16.5 7.5 12.8 1 12 7.5 11.2 11.2 7.5 12 1z'/%3E%3C/svg%3E");
	--ico-leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23a9c8a3' d='M3 21C3 11 9 4 21 3c0 11-6 18-18 18z'/%3E%3Cpath d='M3 21L14 10' fill='none' stroke='%23141028' stroke-opacity='.45' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
	--ico-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2d38b' d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
	--ico-mushroom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e79aa6' d='M3 12a9 8 0 0 1 18 0z'/%3E%3Cpath fill='%23f4ede1' d='M9.5 12h5l.6 7.5a3 2 0 0 1-6.2 0z'/%3E%3Ccircle cx='8' cy='9' r='1.3' fill='%23fff' opacity='.75'/%3E%3Ccircle cx='14' cy='6.8' r='1' fill='%23fff' opacity='.75'/%3E%3C/svg%3E");
	--ico-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24'%3E%3Cg fill='none' stroke='%23f2d38b' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M12 12q10-7 20 0t20 0 20 0 20 0 20 0'/%3E%3Cpath d='M188 12q10-7 20 0t20 0 20 0 20 0 20 0'/%3E%3C/g%3E%3Cpath fill='%23f2d38b' transform='translate(144 6) scale(.5)' d='M12 1C12.8 7.5 16.5 11.2 23 12 16.5 12.8 12.8 16.5 12 23 11.2 16.5 7.5 12.8 1 12 7.5 11.2 11.2 7.5 12 1z'/%3E%3C/svg%3E");
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.2rem;
	line-height: 1.75;
	color: var(--text);
	background: var(--night);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* The dusk sky: deep night at the top, rose and peach at the horizon */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -3;
	background:
		radial-gradient(ellipse 80% 40% at 50% 108%, rgba(243, 183, 154, .55), transparent 70%),
		linear-gradient(180deg, #0e0b26 0%, #1b1445 22%, #352060 42%, #6a3a73 62%, #b4607a 84%, #e59a8a 100%);
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-body);
	font-weight: 400;
	line-height: 1.25;
	color: var(--cream);
	margin: 1.8em 0 .6em;
}
h1 { font-size: 2.3rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; color: var(--gold); }
h4 { font-size: 1.3rem; }
h5, h6 { font-size: 1.15rem; font-style: italic; }

p { margin: 0 0 1.3em; }
strong, b { font-weight: 400; color: var(--gold); }
em, i { font-style: italic; }

::selection { background: rgba(231, 154, 166, .55); color: #fff; }

/* Links: lilac at rest, warm gold with a soft glow and a growing underline on hover */
a {
	color: var(--lilac);
	text-decoration: none;
	transition: color .3s ease, text-shadow .3s ease, background-size .35s ease;
}
a:hover, a:focus-visible {
	color: var(--gold);
	text-shadow: 0 0 14px rgba(242, 211, 139, .45);
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 2px dashed var(--gold);
	outline-offset: 3px;
}

.entry-content a:not(.wp-block-button__link):not(:has(img)),
.entry-summary a,
.comment-content a,
.archive-description a,
.site-info a,
.widget p a,
.page-links a {
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	padding-bottom: 1px;
	border-bottom: 1px dotted rgba(201, 184, 238, .55);
}
.entry-content a:not(.wp-block-button__link):not(:has(img)):hover,
.entry-summary a:hover,
.comment-content a:hover,
.archive-description a:hover,
.site-info a:hover,
.widget p a:hover,
.page-links a:hover {
	background-size: 100% 1px;
	border-bottom-color: transparent;
}

hr, .wp-block-separator {
	border: 0;
	height: 24px;
	margin: 2.5rem auto;
	max-width: 320px;
	background: var(--ico-wave) center / contain no-repeat;
	opacity: .9;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
	background: var(--indigo); color: var(--gold); clip: auto; clip-path: none;
	display: block; height: auto; width: auto; left: 8px; top: 8px; padding: .8rem 1.2rem;
	z-index: 100000; border: 1px solid var(--gold); border-radius: 6px;
}

.container { width: min(1140px, calc(100% - 2.5rem)); margin-inline: auto; }
.site { position: relative; overflow-x: clip; }

/* ==========================================================================
   3. Sky: stars + fireflies
   ========================================================================== */
.starfield {
	position: fixed; inset: 0; width: 100%; height: 100%;
	z-index: -2; pointer-events: none;
}
.tw { fill: #fff7e0; animation: twinkle 5s ease-in-out infinite; }
.tw-sparkle { fill: var(--gold); }

@keyframes twinkle {
	0%, 100% { opacity: .2; }
	50% { opacity: 1; }
}

.fireflies {
	position: fixed; inset: 0; z-index: 5;
	pointer-events: none; overflow: hidden;
}
.firefly {
	position: absolute; border-radius: 50%;
	background: radial-gradient(circle, #fffbe0 0%, #ffe48a 45%, rgba(255, 214, 102, 0) 72%);
	box-shadow: 0 0 8px 3px rgba(255, 220, 120, .55), 0 0 20px 7px rgba(255, 200, 90, .22);
	opacity: 0;
	animation: ff-drift var(--drift, 26s) ease-in-out infinite alternate,
	           ff-glow var(--glow, 5s) ease-in-out infinite;
	will-change: transform, opacity;
}
.firefly--green {
	background: radial-gradient(circle, #f6ffd0 0%, #d4f57a 45%, rgba(190, 240, 100, 0) 72%);
	box-shadow: 0 0 8px 3px rgba(205, 245, 120, .5), 0 0 20px 7px rgba(180, 235, 100, .2);
}
@keyframes ff-drift {
	0%   { transform: translate(0, 0); }
	33%  { transform: translate(var(--x1, 8vw), var(--y1, -6vh)); }
	66%  { transform: translate(var(--x2, -6vw), var(--y2, 8vh)); }
	100% { transform: translate(var(--x3, 5vw), var(--y3, 4vh)); }
}
@keyframes ff-glow {
	0%, 100% { opacity: 0; }
	18% { opacity: .95; }
	42% { opacity: .12; }
	70% { opacity: 1; }
}

/* ==========================================================================
   4. Header + navigation
   ========================================================================== */
.site-header {
	position: relative;
	padding: 2.8rem 0 0;
	text-align: center;
}

.header-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.header-moon {
	position: absolute; top: 1.6rem; right: 9%;
	width: clamp(46px, 7vw, 88px);
	color: #f8ebc6;
	filter: drop-shadow(0 0 16px rgba(248, 235, 198, .65));
	animation: bob 10s ease-in-out infinite;
}
.header-sparkle { position: absolute; color: var(--gold); fill: currentColor; }
.hs-1 { top: 2.4rem; right: 20%; width: 16px; }
.hs-2 { top: 6rem; right: 5%; width: 11px; animation-delay: -2s; }
.header-firefly { position: absolute; top: 5rem; left: 10%; width: 26px; color: #ffe48a; animation: bob 7s ease-in-out infinite reverse; opacity: .85; }
.header-sparkle { animation: twinkle 4s ease-in-out infinite; }

@keyframes bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

.site-branding { position: relative; padding-bottom: 1.4rem; }
.brand-mark {
	display: block; width: 52px; margin: 0 auto .3rem; color: var(--gold);
	filter: drop-shadow(0 0 10px rgba(242, 211, 139, .55));
	transition: transform .5s ease, color .3s ease;
}
.brand-mark:hover { transform: rotate(-8deg) scale(1.08); color: var(--peach); }
.brand-mark .logo-mark { display: block; width: 100%; height: auto; }
.custom-logo-wrap img { max-height: 110px; width: auto; margin: 0 auto .4rem; }

.site-title {
	margin: 0;
	font-family: var(--font-script);
	font-weight: 400;
	font-size: clamp(3.4rem, 10vw, 6rem);
	line-height: 1.15;
	padding: .05em 0 .1em;
}
.site-title a {
	display: inline-block;
	padding: .1em .2em .35em;
	margin-bottom: -.25em;
	background: linear-gradient(100deg, #f8e6b8 0%, #f3b79a 35%, #d9b7f3 70%, #f8e6b8 100%);
	background-size: 200% 100%;
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
	text-shadow: none;
	filter: drop-shadow(0 0 16px rgba(243, 183, 154, .35));
	transition: background-position 1s ease, filter .5s ease;
}
.site-title a:hover, .site-title a:focus-visible {
	background-position: 100% 0;
	filter: drop-shadow(0 0 22px rgba(217, 183, 243, .6));
	text-shadow: none;
}

.site-description {
	margin: .2rem 0 0;
	font-style: italic;
	font-size: 1.1rem;
	letter-spacing: .16em;
	color: var(--peach);
}
.site-description::before, .site-description::after {
	content: ""; display: inline-block; width: .8em; height: .8em; margin: 0 .8em;
	background: var(--ico-star) center / contain no-repeat; vertical-align: -.05em; opacity: .8;
}

/* Navigation */
.main-navigation {
	position: relative;
	padding: .55rem 0;
	background:
		linear-gradient(90deg, transparent, rgba(242, 211, 139, .55), transparent) 0 0 / 100% 1px no-repeat,
		linear-gradient(90deg, transparent, rgba(242, 211, 139, .55), transparent) 0 100% / 100% 1px no-repeat;
}
.main-navigation ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
}
.main-navigation li { position: relative; display: flex; align-items: center; margin: 0; }
.main-navigation > ul > li + li::before,
.main-navigation > div > ul > li + li::before {
	content: ""; width: 9px; height: 9px; margin: 0 .35rem;
	background: var(--ico-star) center / contain no-repeat; opacity: .5;
}
.main-navigation a {
	display: block; padding: .45rem .7rem;
	font-size: 1.25rem; letter-spacing: .04em;
	color: var(--lilac);
	background: none;
}
.main-navigation a:hover,
.main-navigation a:focus-visible,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	color: var(--gold);
	text-shadow: 0 0 14px rgba(242, 211, 139, .5);
}
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: var(--rose); text-shadow: 0 0 14px rgba(231, 154, 166, .5); }
.main-navigation li:hover > a { transform: translateY(-1px); }

/* Email button in the menu */
.main-navigation .menu-item-email { margin-left: .6rem; }
.main-navigation .menu-item-email::before { display: none; }
.nav-email {
	display: grid !important; place-items: center;
	width: 2.3rem; height: 2.3rem; padding: 0 !important;
	border: 1px solid rgba(201, 184, 238, .45); border-radius: 50%;
	font-size: 1rem !important;
	transition: all .3s ease;
}
.nav-email:hover, .nav-email:focus-visible {
	background: linear-gradient(135deg, var(--gold), var(--peach));
	color: #2a1a4a !important; border-color: transparent;
	box-shadow: 0 0 18px rgba(242, 211, 139, .6);
	text-shadow: none !important;
}

/* Dropdowns */
.main-navigation .sub-menu {
	display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
	min-width: 13rem; padding: .5rem .4rem; flex-direction: column; align-items: stretch;
	background: rgba(20, 14, 48, .96); border: 1px solid var(--line); border-radius: 10px;
	box-shadow: 0 14px 30px rgba(4, 2, 18, .5); z-index: 60;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display: flex; }
.main-navigation .sub-menu li::before { display: none; }
.main-navigation .sub-menu a { font-size: 1.1rem; text-align: center; }

.menu-toggle {
	display: none; margin: 0 auto; padding: .5rem 1.2rem;
	font: inherit; font-size: 1.2rem; color: var(--lilac);
	background: rgba(201, 184, 238, .08); border: 1px solid rgba(201, 184, 238, .4);
	border-radius: 999px; cursor: pointer; transition: all .3s ease;
}
.menu-toggle:hover { color: var(--gold); border-color: var(--gold); }

/* ==========================================================================
   5. Layout + cards
   ========================================================================== */
.site-content { position: relative; z-index: 1; padding-top: 2.5rem; }

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 2.5rem;
	align-items: start;
}
.layout--single { grid-template-columns: minmax(0, 760px); justify-content: center; }

.card {
	position: relative;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 2.2rem 2.4rem;
	box-shadow: 0 14px 40px rgba(4, 2, 18, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}
.card + .card, .card + .navigation, .navigation + .card { margin-top: 2.2rem; }

.entry.card::before {
	content: ""; position: absolute; top: -9px; left: 50%;
	width: 18px; height: 18px; margin-left: -9px;
	background: var(--ico-star) center / contain no-repeat;
	filter: drop-shadow(0 0 6px rgba(242, 211, 139, .85));
}

.page-header { text-align: center; margin-bottom: 2.2rem; }
.header-leaf { width: 26px; color: var(--sage); margin: 0 auto .3rem; display: block; }
.archive-title {
	margin: 0; font-family: var(--font-script); font-size: clamp(2.6rem, 6vw, 3.6rem);
	font-weight: 400; line-height: 1.2; color: var(--gold);
	text-shadow: 0 0 20px rgba(242, 211, 139, .25);
}
.archive-description { margin-top: .6rem; font-style: italic; color: var(--muted); }

/* ==========================================================================
   6. Posts
   ========================================================================== */
.entry-header { margin-bottom: 1.2rem; }
.entry-title { margin: 0; font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.2; color: var(--cream); }
.entry-title a { color: var(--cream); }
.entry-title a:hover, .entry-title a:focus-visible { color: var(--rose); text-shadow: 0 0 18px rgba(231, 154, 166, .5); }

.entry-meta { margin: 0 0 .4rem; font-style: italic; font-size: 1.02rem; color: var(--muted); }
.entry-meta a { color: var(--peach); }
.entry-meta a:hover { color: var(--gold); }
.meta-star { width: .75em; height: .75em; margin-right: .5em; color: var(--gold); vertical-align: -.02em; }
.meta-sep { margin: 0 .3em; opacity: .6; }

/* Post list */
.entry-summary-card::after { content: ""; display: block; clear: both; }
.entry-summary-card .entry-title { font-size: 1.9rem; }
.entry-summary p { margin-bottom: .9em; }
.entry-summary-card.has-thumb .post-thumbnail { float: left; width: 240px; margin: .3rem 1.9rem 1rem 0; }

.read-more {
	display: inline-flex; align-items: center; gap: .5rem;
	font-style: italic; font-size: 1.1rem; color: var(--rose);
}
.read-more-leaf { width: 1.05em; height: 1.05em; color: var(--sage); transition: transform .4s ease; }
.read-more:hover, .read-more:focus-visible { color: var(--gold); gap: .85rem; }
.read-more:hover .read-more-leaf { transform: rotate(35deg) scale(1.15); }
.read-more { transition: color .3s ease, gap .3s ease, text-shadow .3s ease; }

/* Post content */
.entry-content { overflow-wrap: break-word; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.6rem; margin: 0 0 1.4em; }
.entry-content ul li::marker { content: "\2726  "; color: var(--gold); font-size: .8em; }
.entry-content ol li::marker { color: var(--gold); }
.entry-content li { margin-bottom: .35em; }

blockquote, .wp-block-quote {
	position: relative; margin: 2rem 0; padding: 1.2rem 1.6rem 1.2rem 3.4rem;
	font-style: italic; font-size: 1.3rem; color: var(--cream);
	background: linear-gradient(90deg, rgba(201, 184, 238, .1), transparent);
	border-left: 2px solid var(--gold); border-radius: 0 10px 10px 0;
}
blockquote::before {
	content: ""; position: absolute; left: .9rem; top: 1.3rem; width: 1.6rem; height: 1.6rem;
	background: var(--ico-moon) center / contain no-repeat; opacity: .85;
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; margin-top: .6rem; font-size: 1rem; color: var(--muted); }

pre, code, kbd {
	font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .9em;
}
code { background: rgba(201, 184, 238, .14); padding: .1em .4em; border-radius: 4px; color: var(--peach); }
pre {
	overflow-x: auto; padding: 1.1rem 1.3rem; line-height: 1.55;
	background: rgba(8, 5, 28, .6); border: 1px solid var(--line); border-radius: 8px;
}
pre code { background: none; padding: 0; color: var(--text); }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: 1.05rem; }
th, td { padding: .6rem .8rem; border-bottom: 1px solid rgba(201, 184, 238, .2); text-align: left; }
th { color: var(--gold); font-weight: 400; border-bottom-color: var(--line); }
.entry-content table, .entry-content .wp-block-table { display: block; overflow-x: auto; }

.entry-footer:empty { display: none; }
.entry-footer { margin-top: 1.8rem; }
.tag-links a, .tagcloud a, .wp-block-tag-cloud a {
	display: inline-block; margin: 0 .35rem .5rem 0; padding: .2rem .85rem;
	font-size: .95rem !important; line-height: 1.6; font-style: italic;
	color: var(--lilac);
	background: rgba(201, 184, 238, .08);
	border: 1px solid rgba(201, 184, 238, .38); border-radius: 999px;
	transition: all .3s ease;
}
.tag-links a::before, .tagcloud a::before, .wp-block-tag-cloud a::before {
	content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .45em;
	background: var(--ico-star) center / contain no-repeat; opacity: .6; transition: transform .4s ease, opacity .3s;
}
.tag-links a:hover, .tagcloud a:hover, .wp-block-tag-cloud a:hover,
.tag-links a:focus-visible, .tagcloud a:focus-visible, .wp-block-tag-cloud a:focus-visible {
	color: #2a1a4a; border-color: transparent;
	background: linear-gradient(135deg, var(--gold), var(--peach));
	box-shadow: 0 0 16px rgba(242, 211, 139, .45); text-shadow: none;
	transform: translateY(-2px);
}
.tag-links a:hover::before, .tagcloud a:hover::before, .wp-block-tag-cloud a:hover::before { transform: rotate(90deg) scale(1.2); opacity: 1; }

/* The divider banner at the bottom of posts and pages */
.entry-divider { margin-top: 2rem; text-align: center; color: var(--gold); }
.divider-svg { display: block; width: min(100%, 440px); height: auto; margin: 0 auto; filter: drop-shadow(0 0 6px rgba(242, 211, 139, .25)); }
.entry-divider .divider-svg { animation: none; }

.page-links { margin-top: 1.4rem; font-style: italic; }
.page-links a { margin: 0 .3rem; }

/* ==========================================================================
   7. Polaroid images (posts + pages only; the sidebar gets a simple border)
   ========================================================================== */
.polaroid,
.entry-content figure.wp-block-image,
.entry-content .wp-caption,
.entry-content img:not(.emoji):not(.wp-smiley) {
	background: #f8f2e5;
	padding: 14px 14px 18px;
	border-radius: 2px;
	box-shadow: 0 12px 30px rgba(5, 3, 20, .55), 0 2px 6px rgba(5, 3, 20, .4);
	transition: transform .4s ease, box-shadow .4s ease;
}
/* bare images get the thick polaroid chin */
.entry-content img:not(.emoji):not(.wp-smiley) { padding: 14px 14px 52px; display: inline-block; vertical-align: top; }
.entry-content p > img, .entry-content > img, .entry-content a > img { max-width: 100%; height: auto; }
.entry-content a:has(> img) { background: none; border: 0; }

/* images that live inside a figure: the figure becomes the polaroid */
.entry-content figure img:not(.emoji):not(.wp-smiley),
.entry-content .wp-caption img,
.polaroid img {
	padding: 0; background: none; box-shadow: none; border-radius: 0;
	display: block; max-width: 100%; height: auto; margin: 0;
}
.polaroid img { width: 100%; }
.entry-content figure.wp-block-image, .entry-content .wp-caption { margin: 2rem auto; max-width: 100%; width: fit-content; }
.entry-content figure.wp-block-image.alignwide, .entry-content figure.wp-block-image.alignfull { width: auto; }
.entry-content figure.wp-block-image:not(:has(figcaption)) { padding-bottom: 52px; }
.polaroid:not(:has(figcaption)) { padding-bottom: 46px; }
.polaroid { display: block; margin: 0 0 1.6rem; }

.entry-content figcaption, .entry-content .wp-caption-text, .polaroid figcaption {
	margin: 0; padding: .7rem .4rem .1rem; text-align: center;
	font-family: var(--font-script); font-size: 1.6rem; line-height: 1.25;
	color: #3f3158;
}
.entry-content figcaption a { color: #6a3a73; }

/* a gentle scattered-on-a-table tilt */
.entry-content figure:nth-of-type(odd):not(.alignwide):not(.alignfull),
.single .post-thumbnail { transform: rotate(-.7deg); }
.entry-content figure:nth-of-type(even):not(.alignwide):not(.alignfull) { transform: rotate(.7deg); }
.entry-content figure:hover, .entry-content img:hover, .polaroid:hover {
	transform: rotate(0) translateY(-3px);
	box-shadow: 0 18px 40px rgba(5, 3, 20, .65), 0 0 28px rgba(242, 211, 139, .18);
}
.entry-summary-card .post-thumbnail { transform: rotate(-1.2deg); }
.entry-summary-card:nth-of-type(even) .post-thumbnail { transform: rotate(1.2deg); }
.entry-summary-card .post-thumbnail:hover { transform: rotate(0) translateY(-3px); }

.alignleft { float: left; margin: .4rem 1.8rem 1rem 0; max-width: 50%; }
.alignright { float: right; margin: .4rem 0 1rem 1.8rem; max-width: 50%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignwide, .entry-content .alignfull { margin-inline: -1rem; max-width: none; width: auto; }
.entry-content::after { content: ""; display: block; clear: both; }

.entry-content .wp-block-gallery, .entry-content .gallery { display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 2rem 0; padding: 0; list-style: none; }
.entry-content .gallery-item { margin: 0; flex: 1 1 200px; max-width: 100%; }
.entry-content .gallery-item img:not(.emoji) { padding: 10px 10px 36px; }
.entry-content .wp-block-gallery figure.wp-block-image { margin: 0; }

.entry-content iframe, .entry-content video, .wp-block-embed iframe { border-radius: 6px; max-width: 100%; }

/* ==========================================================================
   8. Pagination, post nav, comments, forms
   ========================================================================== */
.pagination, .post-navigation, .comment-navigation { margin-top: 2.4rem; }
.pagination .nav-links, .comment-navigation .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.page-numbers {
	display: inline-block; padding: .3rem 1rem; font-style: italic;
	color: var(--lilac); border: 1px solid rgba(201, 184, 238, .38); border-radius: 999px;
	background: rgba(24, 18, 56, .6);
}
a.page-numbers:hover { color: #2a1a4a; background: linear-gradient(135deg, var(--gold), var(--peach)); border-color: transparent; text-shadow: none; box-shadow: 0 0 16px rgba(242, 211, 139, .4); }
.page-numbers.current { color: #2a1a4a; background: var(--rose); border-color: transparent; }
.page-numbers.dots { border: 0; background: none; }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-previous { grid-column: 1; }
.post-navigation a {
	display: block; height: 100%; padding: 1rem 1.3rem;
	background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.post-navigation a:hover { border-color: var(--gold); box-shadow: 0 0 24px rgba(242, 211, 139, .18); }
.nav-sub { display: block; font-size: .9rem; font-style: italic; color: var(--muted); letter-spacing: .1em; text-transform: lowercase; }
.nav-title { font-size: 1.15rem; }

.comments-title, .comment-reply-title {
	margin-top: 0; font-family: var(--font-script); font-size: 2.3rem; color: var(--gold);
}
.comment-reply-title::before {
	content: ""; display: inline-block; width: 1.1rem; height: 1.1rem; margin-right: .5rem;
	background: var(--ico-mushroom) center / contain no-repeat;
}
.comment-reply-title small { font-family: var(--font-body); font-size: 1rem; margin-left: .8rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 1.6rem; border-left: 1px dotted rgba(201, 184, 238, .3); }
.comment-body { padding: 1.2rem 0; border-bottom: 1px dotted rgba(201, 184, 238, .25); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; font-size: 1rem; color: var(--muted); }
.comment-author { display: flex; align-items: center; gap: .8rem; }
.comment-author .avatar { border-radius: 50%; border: 2px solid var(--gold); padding: 2px; }
.comment-author .fn { font-style: normal; color: var(--cream); }
.comment-metadata a { color: var(--muted); font-style: italic; }
.reply a { font-style: italic; font-size: 1rem; color: var(--rose); }
.comment-form label { display: block; font-style: italic; color: var(--muted); margin-bottom: .2rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-notes, .logged-in-as { font-size: 1rem; color: var(--muted); }

input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], textarea, select {
	width: 100%; padding: .65rem 1rem; font: inherit; font-size: 1.1rem;
	color: var(--cream); background: rgba(10, 7, 32, .55);
	border: 1px solid rgba(201, 184, 238, .38); border-radius: 8px;
	transition: border-color .3s ease, box-shadow .3s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); font-style: italic; opacity: .8; }
input:focus, textarea:focus, select:focus {
	outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 211, 139, .18), 0 0 18px rgba(242, 211, 139, .15);
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: baseline; }
.comment-form-cookies-consent input { width: auto; }
.comment-form-cookies-consent label { margin: 0; }

button, .button, input[type="submit"], .wp-block-button__link {
	display: inline-block; padding: .6rem 1.6rem; font: inherit; font-size: 1.15rem;
	color: #2a1a4a; background: linear-gradient(135deg, var(--lilac), var(--rose));
	border: 0; border-radius: 999px; cursor: pointer; text-shadow: none;
	transition: all .3s ease; box-shadow: 0 4px 16px rgba(4, 2, 18, .35);
}
button:hover, .button:hover, input[type="submit"]:hover, .wp-block-button__link:hover {
	color: #2a1a4a; background: linear-gradient(135deg, var(--gold), var(--peach));
	box-shadow: 0 0 22px rgba(242, 211, 139, .5); transform: translateY(-2px); text-shadow: none;
}

.not-found { text-align: center; }
.not-found .search-form { max-width: 420px; margin: 1.4rem auto; }
.big-mushroom { width: 84px; height: 84px; margin: 0 auto 1rem; display: block; filter: drop-shadow(0 0 14px rgba(231, 154, 166, .4)); animation: bob 8s ease-in-out infinite; }

/* ==========================================================================
   9. Sidebar + widgets
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 2rem; }
.widget {
	position: relative;
	padding: 1.6rem 1.7rem 1.5rem;
	font-size: 1.1rem; line-height: 1.6;
	background: var(--card);
	border: 1px solid var(--line); border-radius: 12px;
	box-shadow: 0 14px 40px rgba(4, 2, 18, .4);
	-webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.widget > *:last-child { margin-bottom: 0; }
.widget p { margin-bottom: 1em; }

.widget-title,
.widget h2.wp-block-heading,
.widget_block > h2,
.widget .wp-block-search__label {
	margin: 0 0 1.2rem; padding-bottom: 1.1rem;
	font-family: var(--font-script); font-size: 2rem; font-weight: 400; line-height: 1.2;
	color: var(--gold); text-align: center; text-transform: none; letter-spacing: 0;
	background: var(--ico-wave) center bottom / 220px 16px no-repeat;
	text-shadow: 0 0 18px rgba(242, 211, 139, .25);
}
.widget .wp-block-search__label { display: block; font-size: 2rem; }

.widget ul, .widget ol { list-style: none; margin: 0; padding: 0; }
.widget li { color: var(--muted); }

/* list-style widgets: leaf bullets, dotted rules, slide-and-glow hover */
.widget_categories li, .widget_archive li, .widget_pages li, .widget_meta li,
.widget_recent_entries li, .widget_recent_comments li, .widget_nav_menu li, .widget_rss li,
.wp-block-categories-list li, .wp-block-archives-list li, .wp-block-latest-posts li,
.wp-block-latest-comments li, .wp-block-page-list li {
	position: relative; padding: .5rem 0 .5rem 1.75rem;
	border-bottom: 1px dotted rgba(201, 184, 238, .25);
}
.widget_categories li:last-child, .widget_archive li:last-child, .widget_pages li:last-child,
.widget_recent_entries li:last-child, .widget_meta li:last-child, .widget_nav_menu li:last-child,
.wp-block-categories-list > li:last-child, .wp-block-archives-list > li:last-child,
.wp-block-latest-posts > li:last-child { border-bottom: 0; }

.widget_categories li::before, .widget_archive li::before, .widget_pages li::before, .widget_meta li::before,
.widget_recent_entries li::before, .widget_recent_comments li::before, .widget_nav_menu li::before, .widget_rss li::before,
.wp-block-categories-list li::before, .wp-block-archives-list li::before, .wp-block-latest-posts li::before,
.wp-block-latest-comments li::before, .wp-block-page-list li::before {
	content: ""; position: absolute; left: 0; top: .85rem; width: 1.05rem; height: 1.05rem;
	background: var(--ico-leaf) center / contain no-repeat;
	transition: transform .4s ease, filter .3s ease;
}
.widget_categories li:hover::before, .widget_archive li:hover::before, .widget_pages li:hover::before,
.widget_recent_entries li:hover::before, .widget_nav_menu li:hover::before,
.wp-block-categories-list li:hover::before, .wp-block-archives-list li:hover::before, .wp-block-latest-posts li:hover::before {
	transform: rotate(35deg) scale(1.25); filter: drop-shadow(0 0 5px rgba(169, 200, 163, .8));
}

/* categories + archives: name on the left, post count on the right */
.widget_categories li, .widget_archive li, .wp-block-categories-list li, .wp-block-archives-list li {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 .6rem;
}
.widget_categories li > ul, .widget_archive li > ul,
.wp-block-categories-list li > ul { flex-basis: 100%; margin-top: .4rem; }
.widget ul ul { margin-left: .2rem; }

.widget li a {
	display: inline-block; font-size: 1.12rem; color: var(--lilac);
	transition: color .3s ease, transform .3s ease, text-shadow .3s ease;
}
.widget li a:hover, .widget li a:focus-visible {
	color: var(--gold); transform: translateX(5px); text-shadow: 0 0 14px rgba(242, 211, 139, .5);
}
.widget .post-date { display: block; font-size: .95rem; font-style: italic; color: var(--muted); }

/* tag cloud */
.tagcloud, .wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: .1rem 0; }
.widget .tagcloud a, .widget .wp-block-tag-cloud a { margin: 0 .35rem .5rem 0; }

/* search: pill input + glowing moon button */
.search-form { display: flex; align-items: center; gap: .5rem; width: 100%; }
.search-form label { flex: 1; margin: 0; }
.search-field { border-radius: 999px !important; padding: .65rem 1.2rem !important; }
.search-submit {
	flex: 0 0 auto; display: grid; place-items: center;
	width: 2.9rem; height: 2.9rem; padding: 0; border-radius: 50%;
	color: #2a1a4a; background: linear-gradient(135deg, var(--lilac), var(--rose));
}
.search-moon { width: 1.35rem; height: 1.35rem; transition: transform .5s ease; }
.search-submit:hover { background: linear-gradient(135deg, var(--gold), var(--peach)); box-shadow: 0 0 22px rgba(242, 211, 139, .6); }
.search-submit:hover .search-moon { transform: rotate(-25deg) scale(1.1); }

.wp-block-search__inside-wrapper { display: flex; gap: .5rem; }
.wp-block-search__input { border-radius: 999px !important; padding: .65rem 1.2rem !important; flex: 1; min-width: 0; }
.wp-block-search__button { border-radius: 999px !important; padding: .55rem 1.2rem !important; margin: 0 !important; }

/* SIDEBAR IMAGES: simple border that complements the palette (no polaroid here) */
.widget img, .sidebar img, .footer-widgets img {
	display: block; max-width: 100%; height: auto;
	padding: 4px; background: rgba(255, 255, 255, .04);
	border: 2px solid rgba(242, 211, 139, .55); border-radius: 6px;
	box-shadow: 0 0 20px rgba(201, 184, 238, .12);
	transition: border-color .3s ease, box-shadow .3s ease;
}
.widget a:hover img { border-color: var(--rose); box-shadow: 0 0 22px rgba(231, 154, 166, .35); }
.widget figure { margin: 0; }
.widget img.emoji { display: inline; padding: 0; border: 0; background: none; box-shadow: none; }
.widget .wp-block-image figcaption, .widget figcaption { margin-top: .5rem; font-size: .95rem; font-style: italic; color: var(--muted); text-align: center; }
.widget .avatar { border-radius: 50%; }

.widget select { background-image: none; }
.widget table { font-size: .95rem; }
.widget caption { color: var(--gold); padding-bottom: .5rem; font-style: italic; }
.widget_calendar td, .widget_calendar th { text-align: center; padding: .3rem; border: 0; }
.widget_calendar #today { color: #2a1a4a; background: var(--gold); border-radius: 50%; }
.widget_calendar tfoot td { padding-top: .6rem; }

/* ==========================================================================
   10. Social icons
   ========================================================================== */
.social-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.social-links li { margin: 0; }
.social-link {
	display: grid; place-items: center; width: 2.7rem; height: 2.7rem;
	font-size: 1.1rem; color: var(--lilac);
	border: 1px solid rgba(201, 184, 238, .45); border-radius: 50%;
	background: rgba(201, 184, 238, .07);
	transition: all .35s ease;
}
.social-link:hover, .social-link:focus-visible {
	color: #2a1a4a; background: linear-gradient(135deg, var(--gold), var(--peach)); border-color: transparent;
	box-shadow: 0 0 22px rgba(242, 211, 139, .55); transform: translateY(-3px) rotate(-6deg); text-shadow: none;
}

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-footer {
	position: relative; z-index: 1;
	margin-top: 8rem; padding: 2.5rem 0 2.2rem;
	background: linear-gradient(180deg, var(--footer-top) 0%, #0a0820 100%);
	text-align: center; color: var(--muted);
}
.footer-scenery { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; }
.footer-hills {
	position: absolute; left: 0; bottom: 0; z-index: 2;
	display: block; width: 100%; height: 80px; margin-bottom: -1px;
	color: var(--footer-top);
}
.footer-flora {
	position: absolute; bottom: 40px; z-index: 1; width: 120px; height: auto;
	filter: drop-shadow(0 0 12px rgba(231, 154, 166, .25));
}
.flora-left { left: 4%; }
.flora-right { right: 4%; transform: scaleX(-1); }
.fl-cap { fill: #b3607f; }
.fl-stem { fill: #e3d3c0; }
.fl-leaf { fill: #6f8f6c; }
.fl-spot { fill: #fff; opacity: .7; }

.footer-inner { position: relative; z-index: 3; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; text-align: left; margin-bottom: 1.5rem; }
.footer-widgets .widget { background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.footer-divider { color: var(--gold); margin-bottom: 1.8rem; opacity: .8; }
.footer-divider .divider-svg { width: min(100%, 360px); }

.footer-brand { margin-bottom: 1.2rem; }
.footer-moon { display: block; width: 34px; margin: 0 auto .2rem; color: var(--gold); filter: drop-shadow(0 0 10px rgba(242, 211, 139, .6)); }
.footer-title { font-family: var(--font-script); font-size: 2.8rem; line-height: 1.2; color: var(--peach); }
.footer-title:hover { color: var(--gold); text-shadow: 0 0 20px rgba(242, 211, 139, .5); }
.footer-tagline { margin: .1rem 0 0; font-style: italic; letter-spacing: .12em; color: var(--muted); }

.site-footer .social-links { margin: 1.2rem 0; }

.footer-navigation { margin: 1.2rem 0; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.4rem; }
.footer-menu a { font-size: 1.1rem; color: var(--lilac); }
.footer-menu a:hover { color: var(--gold); text-shadow: 0 0 14px rgba(242, 211, 139, .5); }

.footer-ornament { display: flex; justify-content: center; align-items: center; gap: .9rem; margin: 1.4rem 0 .8rem; }
.fo-icon { width: 16px; height: 16px; color: var(--gold); opacity: .8; }
.fo-icon:nth-child(1), .fo-icon:nth-child(5) { color: var(--sage); }
.fo-icon:nth-child(3) { width: 20px; height: 20px; }
.fo-flip { transform: scaleX(-1); }

.site-info { margin: 0; font-size: 1rem; }
.site-info a { color: var(--lilac); }
.site-closing { margin: .2rem 0 0; font-family: var(--font-script); font-size: 1.5rem; color: var(--rose); opacity: .9; }

/* ==========================================================================
   12. Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.6rem; }
	.header-moon { right: 6%; }
}

@media (max-width: 720px) {
	body { font-size: 1.12rem; }
	.menu-toggle { display: inline-flex; gap: .5rem; align-items: center; }
	.main-navigation { padding: .8rem 0; text-align: center; }
	.main-navigation > ul, .main-navigation > div > ul { display: none; flex-direction: column; margin-top: .8rem; }
	.main-navigation.is-open > ul, .main-navigation.is-open > div > ul { display: flex; }
	.main-navigation > ul > li + li::before { display: none; }
	.main-navigation li { justify-content: center; flex-wrap: wrap; width: 100%; }
	.main-navigation a { width: 100%; text-align: center; padding: .6rem; }
	.main-navigation .menu-item-email { margin: .4rem 0 0; }
	.nav-email { width: 2.6rem !important; }
	.main-navigation .sub-menu { display: flex; position: static; transform: none; min-width: 0; width: 100%; background: none; border: 0; box-shadow: none; padding: 0; }

	.card { padding: 1.6rem 1.35rem; border-radius: 10px; }
	.widget { padding: 1.4rem 1.3rem; }
	.entry-summary-card.has-thumb .post-thumbnail { float: none; width: 100%; max-width: 360px; margin: .4rem auto 1.4rem; }
	.alignleft, .alignright { float: none; display: block; max-width: 100%; margin: 1.4rem auto; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: 1; text-align: left; }
	.header-moon { top: 1rem; right: 5%; }
	.header-firefly { display: none; }
	.site-description { letter-spacing: .08em; font-size: 1rem; }
	.site-description::before, .site-description::after { margin: 0 .4em; }
	.entry-content .alignwide, .entry-content .alignfull { margin-inline: 0; }
	blockquote { padding-left: 2.8rem; }
	.footer-flora { width: 84px; bottom: 30px; }
	.site-footer { margin-top: 6rem; }
}

@media (max-width: 420px) {
	.site-header { padding-top: 2.2rem; }
	.entry.card::before { top: -8px; }
	.entry-content figure.wp-block-image, .entry-content .wp-caption { padding: 10px 10px 14px; }
	.entry-content img:not(.emoji):not(.wp-smiley) { padding: 10px 10px 38px; }
	.entry-content figure.wp-block-image:not(:has(figcaption)) { padding-bottom: 38px; }
	.entry-content figcaption, .entry-content .wp-caption-text { font-size: 1.4rem; }
	.sidebar { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   13. Motion preferences + print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.firefly { opacity: .7; }
	.tw { opacity: .8; }
}

@media print {
	body::before, .starfield, .fireflies, .header-sky, .footer-scenery, .sidebar, .main-navigation { display: none !important; }
	body, .card { background: #fff; color: #000; box-shadow: none; border: 0; }
	a { color: #000; }
}
