:root {
	scrollbar-color: var(--accent) var(--background);
}

html.gaea,
:root {
	--background: #ccffddee;
	--masthead: #ccffdd;
	--text: #410;
	--image-border: #410;
	--accent: #032;
	--link-color: var(--accent);
	--accent-weak: #164;

	--table-header-bg: #1644;
	--table-odd-row-bg: #1642;

	--background_image: url("/images/bg.jpg");
	--sidebar-text: #cfd;
	--sidebar-accent: #fca;
	--sidebar-background: #0003;
}

html.pan {
	--background: #001810cc;
	--masthead: #4ec;
	--text: #fed;
	--image-border: #fed;
	--accent: #8ed;
	--accent-weak: #4ec;

	--table-header-bg: #4ec4;
	--table-odd-row-bg: #4ec2;

	--background_image: url("/garden/bg/grass_dark.jpg");
	--sidebar-text: var(--text);
	--sidebar-accent: var(--accent);
	--sidebar-background: transparent;
}

html.oceanos {
	--background: #ccddffee;
	--masthead: #e6eeff;
	--text: #023;
	--image-border: #023;
	--accent: #034;
	--accent-weak: #146;

	--table-header-bg: #1464;
	--table-odd-row-bg: #1462;

	--background_image: url("/images/bg.jpg");
	--sidebar-text: #cdf;
	--sidebar-accent: #bef;
	--sidebar-background: #0003;
}

html.salmacis {
	--background: #eeddffe8;
	--masthead: #eeddffe8;
	--text: #1e0a33;
	--image-border: #1e0a33;
	--accent: #351159;
	--accent-weak: #5b2b80;

	--table-header-bg: #5b2b8044;
	--table-odd-row-bg: #5b2b8022;

	--background_image: url("/shrines/hermaphroditos/hermaphroditusbg.gif");
	--sidebar-text: #edf;
	--sidebar-accent: #baf;
	--sidebar-background: #0003;
}

html.dionysos {
	--background: #120519;
	--masthead: #ec8;
	--text: #edf;
	--image-border: #edf;
	--accent: #ec8;
	--accent-weak: #ca7;

	--table-header-bg: #ca74;
	--table-odd-row-bg: #ca72;
	--sidebar-text: #edf;
	--sidebar-accent: #ec8;
	--sidebar-background: #12051988;

	--background_image: linear-gradient(to bottom, #20092c, #380f4d);
}

html.demeter {
	--background: #23160d;
	--masthead: #ff6a32;
	--text: #f1d1a7;
	--image-border: #f1d1a7;
	--accent: #ff6a32;
	--accent-weak: #ff6a32;

	--table-header-bg: #ff6a3244;
	--table-odd-row-bg: #ff6a3222;

	--background_image: url("/garden/bg/leaves.png");

	--sidebar-text: var(--text);
	--sidebar-accent: var(--accent);
	--sidebar-background: #150c07;
}

html.demeter #masthead {
	background: linear-gradient(to right, #23160daa, #150c07aa);
}

html.chaos {
	--background: #100000;
	--masthead: red;
	--text: #c00;
	--image-border: white;
	--accent: red;
	--accent-weak: #a80000;

	--table-header-bg: #f001;
	--table-odd-row-bg: #f002;

	--sidebar-text: #c00;
	--sidebar-accent: #f00;
	--sidebar-background: #080000;

	--background_image: black;
}

html.chaos body {
	box-shadow: 0 0.1em 1em #f004;
}

html.chaos :is(img, video, audio, iframe),
html.chaos a::after {
	filter: url('/garden/filter.svg#red');
}

html.chaos :is(img, video, audio, iframe):hover,
html.chaos a::after:hover {
	filter: none;
}

html.hemera {
	--background: transparent;
	--masthead: #04a;
	--text: #012;
	--image-border: #04a;
	--accent: #04a;
	--link-color: var(--accent);
	--accent-weak: #04ab;
	--table-header-bg: transparent;
	--table-odd-row-bg: transparent;
	--background_image: linear-gradient(to bottom, #fffff8, #ffeeef);
	--sidebar-text: var(--text);
	--sidebar-accent: var(--accent);
	--sidebar-background: transparent;
}

html.hemera #masthead,
html.jason #masthead {
	text-shadow: none;
}

html.hemera body,
html.jason body {
	box-shadow: none;
}

html.jason {
	--background: yellow;
	--masthead: black;
	--text: black;
	--image-border: black;
	--accent: black;
	--accent-weak: black;
	--table-header-bg: yellow;
	--table-odd-row-bg: yellow;
	--background_image: yellow;
	--sidebar-text: black;
	--sidebar-accent: black;

	--serif: Verdana, "Verdana Pro", "Bitstream Vera Sans", "Bitstream Vera",
		var(--system);
	--cormorant: Georgia, Charter, Times, serif;
	font-size: 0.9rem;
}

html.jason #body-container {
	max-inline-size: 65rem;
}

html.jason #primary,
html.jason #secondary {
	box-shadow: none;
	background-color: transparent;
}

html.jason #primary {
	background-color: white;
	border: 1px solid black;
}

html.jason h1 {
	font-family: var(--cormorant);
	font-weight: normal;
}

html.jason .sidenotes aside.note {
	padding: 0.2em;
	background: white;
	border: 1px solid black;
}

body {
	max-inline-size: 52rem;
	margin: auto;
	margin-block: 1rem;

	color: var(--text);
	hyphens: auto;
	font-family: var(--serif);
	line-height: 1.45;
	
	background: var(--background_image);
	background-attachment: fixed;
	/* background-repeat: repeating; */
    background-size:     cover;                      /* <------ */
    background-repeat:   no-repeat;
    background-position: center center;              /* optional, center the image */
	border-radius: 1.5rem;
	box-shadow: 0 0.1em 1em black;
}
@media (max-width: 52rem) {
	body {
		margin-block: 0;
		border-radius: 0;
	}
}  

#body-container {
	display: grid;
	grid-template-rows: auto auto;
	grid-template-columns: minmax(0, 16fr) minmax(0, 7fr);
	grid-template-areas: "masthead masthead" "articles sidebar";
}

@media only screen and (max-width: 799px) {
	#body-container {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto auto;
		grid-template-areas: "masthead" "articles" "sidebar";
		margin: auto;
	}

	#secondary aside.note {
		display: none !important;
	}
}

#recent-comments {
	font-size: 0.85rem;
	padding: 0;
}
#recent-comments li {
	margin-block-end: 0.5em;
	display: block;
}

#masthead {
	grid-area: masthead;
	padding: clamp(1rem, 5vi, 1.5rem);

	font-size: clamp(1rem, 5vi, 1.5rem);
	text-shadow: 0 0 0.25rem rgb(0, 0, 0);
}

#masthead h1 {
	margin: 0;
	
	color: var(--masthead);
	font-size: 1em;
	font-weight: normal;
	text-align: start;
}

#masthead h1 strong {
	display: inline-block;

	color: inherit;
	font-size: 2.5em;
	font-family: var(--cormorant);
	font-style: italic;
	font-weight: 600;
}

#masthead h1 a {
	text-decoration: none;
	color: inherit;
}

#masthead h1 small {
	display: inline-block;
	margin-inline-start: 1.333em;

	color: var(--masthead);
	font-feature-settings: "dlig", "clig", "hlig";
	font-size: 1em;
}


#site-navigation {
	display: none;
}

#primary {
	grid-area: articles;
	z-index: 20;

	max-inline-size: none;
	padding: clamp(1.5rem, 7.5vi, 2rem);

	border-radius: 0 0 0 1.5rem;
	background-color: var(--background);
    height: 100%;
    width: 100%;
}
@media (max-width: 52rem) {
	#primary {
		border-radius: 0;
	}
}  

h2#collation {
	margin-block: 0 1.5rem;

	text-align: center;

	font-variant-caps: small-caps;
	letter-spacing: var(--caps-spacing);
}

h2#collation strong {
	display: block;
	font-size: 1.6rem;
	font-weight: normal;
}

h2#collation small {
	display: block;
	font-variant-caps: all-small-caps;
}

#secondary {
	grid-area: sidebar;
	background: var(--sidebar-background);
	border-radius: 0 0 1.5rem 0;
	padding: 0;
	padding-block-end: 1em;
}
@media (max-width: 52rem) {
	#secondary {
		border-radius: 0;
	}
}  

aside.note {
	display: grid;
	grid-template-columns: auto 1fr;
	margin-inline-start: 0;
	padding-block-end: 1em;
	font-size: 0.8em;
	text-align: justify;
}

sup.note,
.note-number {
	margin: 0 0.2em;

	color: var(--accent);
	text-align: center;
	text-decoration: none;
	white-space: nowrap;

	background-color: transparent;
	border: none;
}

.note-number {
	margin: 0;
	padding-inline: 0.5rem;
	margin-inline-end: 0.5rem;
	font-style: normal;
	font-weight: normal;
	color: var(--accent-weak);
	display: inline-block;
	font-size: 2em;
}

#secondary aside.note {
	margin-block: 0.5rem;
	padding-block-end: 0;
	padding-inline-start: 0;
}

#secondary .note-number {
	color: var(--text);
	background-color: var(--background);
}

#secondary > * {
	--accent: var(--sidebar-accent);
	--accent-weak: var(--sidebar-accent);
	color: var(--sidebar-text);
}

#secondary > *:not(.note),
#secondary aside.note > div {
	--text: var(--sidebar-text);
}

#secondary > * {
	padding-inline: 1rem;
}

article.post:not(.single .post) {
	padding-block-end: 3rem;
}

article.format-note .entry-content {
	font-size: 1.167em;
}

article.format-note .entry-content p:last-child {
	margin-block-end: 0;
}

article.post :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--cormorant);
}

article.post h1 {
	margin-block-end: 0;

	font-size: 2rem;
	hyphens: initial;
}

article.post h1:first-child {
	margin-block-start: 0;
}

header .entry-metadata {
	margin-block-end: 1rem;
}

.entry-header a,
.entry-metadata a {
	text-decoration: none;
}

.entry-header a:hover,
.entry-header a:focus,
.entry-metadata a:hover,
.entry-metadata a:focus {
	text-decoration: underline;
}

h3.widget-title,
.widget-link-thru {
	font-size: 1em;
	color: var(--accent);
	font-variant-caps: all-small-caps;
	letter-spacing: var(--caps-spacing);
	margin-block-end: 0.5rem;
}

h3.widget-title + ul,
h3.widget-title + * ul {
	margin-block-start: 0;
	padding-inline-start: 1em;
}

.widget > p {
	margin-block-start: 0;
}

.blogroll {
	margin-block-start: 0;
	margin-block-end: 0;
	padding-inline-start: 1em;
}

.blogroll.blogroll-legend {
	font-size: 0.9em;
	margin-block-start: 0.5rem;
}

.blogroll li::marker {
	content: "✨\FE0E\00A0";

	color: var(--accent);
}

.blogroll li.daily::marker {
	content: "⁂\00A0";
}

.blogroll li.weekly::marker {
	content: "⁑\00A0";
}

.blogroll li.monthly::marker {
	content: "*\00A0";
}

.blogroll li.infrequently::marker {
	content: "†\00A0";
}

.blogroll li.hibernating::marker {
	content: "‡\00A0";
}

.widget img {
	max-inline-size: 128px;
	border: 3px double var(--accent);
}

#archives > ul {
	padding-inline-start: 0;
}

#archives *::marker {
	color: var(--accent);
}

#archives details {
	border: none;
}

#archives summary {
	padding: 0;
	color: inherit;
	font-weight: normal;
	text-align: start;
}

#archives li:not(details details li)::marker {
	content: "";
}

#archives details details li {
	font-size: 0.85em;
}

#archives details details li::marker {
	content: "❧ ";
	padding-inline-end: 1em;
}

#archives details details li a {
	text-decoration: none;
}

#archives details details li a:hover {
	text-decoration: 1px dotted underline;
}

#archives li.foreign {
	font-size: 0.75em;
	font-style: italic;

	opacity: 0.9;
}

#language-archive {
	display: flex;
	flex-wrap: wrap;

	padding: 0;
}

#language-archive li::marker {
	content: "";
	display: none;
}

#language-archive li {
	margin: 0;
	margin-inline-end: 1em;
	padding: 0;
	font-size: 0.8em;
}

#language-archive li a {
	text-decoration: solid underline;
}

summary {
	cursor: pointer;
}

header, #secondary {
	backdrop-filter: blur(0.75rem);
}

#secondary button {
	font-family: inherit;
	background-color: transparent;
	border: none;
	color: var(--text);
	text-decoration: underline;
	padding: 0.125rem;
	cursor: pointer;
	font-size: 0.8em;
}

#secondary button.enabled {
	color: var(--accent);
	font-weight: bold;
}

nav.previous-next ul {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 1em;

	padding: 0;
	margin: 0;

	align-items: center;

	color: var(--accent-weak);
	line-height: 1.125;
}

nav.previous-next ul li::marker {
	content: "";
}

nav.previous-next ul li:nth-child(1) {
	text-align: end;
}

nav.previous-next ul li:nth-child(2) {
	text-align: center;
}

nav.previous-next a {
	display: block;

	inline-size: 100%;

	color: var(--accent-weak);
	text-decoration: none;
}

nav.previous-next a:is(:hover, :focus) {
	text-decoration: 1px solid underline;
}

/* Generic stuff */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: normal;
	text-align: start;
}

img,
video,
iframe {
	max-inline-size: 100%;
	margin-inline: auto;
	max-block-size: 66.667vh;
	border: 1px solid var(--image-border);
}

:is(figure, img, video, iframe, audio):is(.align-start, .align-end) {
	max-inline-size: 33%;
}

.align-start {
	margin-inline-end: 1em;
}

.align-end {
	margin-inline-start: 1em;
}

iframe {
	inline-size: 100%;
	aspect-ratio: 16 / 9;
}

:is(img, video, iframe):not(figure > *) {
	display: block;
}

img.flag {
	border: 1px solid var(--accent);
}

figure {
	margin-block-end: 1em;
}

figcaption {
	color: var(--accent-weak);
	font-size: 0.9em;
	line-height: 1.1;
	text-align: center;
	text-wrap: balance;
}

p.has-drop-cap::first-letter {
	float: left;

	margin: 0.167em 0.083em 0 0;

	color: var(--accent);
	font-size: 3em;
	font-style: normal;
	font-variant-caps: normal;
	font-weight: normal;
	line-height: 0.67;
	text-transform: uppercase;
}

p.has-drop-cap::first-line {
	font-variant-caps: all-small-caps;
	letter-spacing: var(--caps-spacing);
	color: var(--accent);
}

.searchbar input[type="text"]{
	background: transparent;
	border: 1px solid var(--accent) !important; 
    width: 0;
    flex-grow: 1;
}

.searchbar input[type="image"]{
    display: inline-flex;
    height: 100%;
}

.searchbar{
    display: flex;

    flex-direction: row;
    height: 2em;

}
#searchmsg{
    font-weight: bold;
    color: #ffff66;
}

/* Reset and Basic Styling */
/* https://www.browserstack.com/guide/responsive-image-gallery-html-css */

/* Gallery Container */

.gallery {

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 900px;
    margin: auto;
}

/* Gallery Items */

.gallery a {

    flex: 1 1 calc(25% - 10px);
    max-width: calc(25% - 10px);
    overflow: hidden;
    border-radius: 10px;
    <!--box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);-->
}

.gallery img {
    border: 0 none;
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */

@media (max-width: 600px) {

    .gallery a {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}


@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 400;
	src: local("Cormorant Garamond Regular"), local("CormorantGaramond-Regular"),
		url("/assets/fonts/cormorant-regular.woff2") format("woff2");
	font-display: fallback;
}

@font-face {
	font-family: "Cormorant Garamond";
	font-style: italic;
	font-weight: 400;
	src: local("Cormorant Garamond Italic"), local("CormorantGaramond-Italic"),
		url("/assets/fonts/cormorant-italic.woff2") format("woff2");
	font-display: fallback;
}

@font-face {
	font-family: "Cormorant Garamond";
	font-style: italic;
	font-weight: 600;
	src: local("Cormorant Garamond SemiBold Italic"),
		local("CormorantGaramond-SemiBoldItalic"),
		url("/assets/fonts/cormorant-bold-italic.woff2") format("woff2");
	font-display: fallback;
}
