:root {
	--tint: rgba(223,96,81,1);
	--tint-background: rgba(223,96,81,0.1);
	--tint-text: rgba(255,255,255,0.85);
	
	
	--background: rgba(240,238,234,1);
	
	--title: rgba(0,0,0,0.7);
	--text: rgba(0,0,0,0.7);
	--secondary-text: rgba(0,0,0,0.4);
	--tertiary-text: rgba(0,0,0,0.3);
	--separator: rgba(0,0,0,0.1);
	
	--empty-background: var(--tint);
	--empty-title: rgba(255,255,255,0.85);
	--empty-text: rgba(0,0,0,0.4);
	--empty-secondary-text: rgba(0,0,0,0.3);
	--empty-tint: rgba(0,0,0,0.8);
	
	--form-background: rgba(250,249,247,1);
	--form-text: rgba(0,0,0,0.6);;
	--form-shadow:
		0px 5px 30px rgba(0,0,0,0.1), 
		0px 0px 2px rgba(0,0,0,0.2), 
		inset 0px -1px 1px rgba(0,0,0,0.1), 
		inset 0px 1px 1px rgba(255,255,255,1);		
	
	--card-background: rgba(253,252,250,1);
	
	--card-shadow:
		0px 2px 10px rgba(0,0,0,0.1), 
		0px 0px 1px rgba(0,0,0,0.4), 
		inset 0px -1px 2px rgba(0,0,0,0.05), 
		inset 0px 3px 1px rgba(255,255,255,1);		
	
	--image-background: rgba(0,0,0,0.03);
	--image-border: rgba(0,0,0,0.1);
	
	--font: ui-rounded, system-ui, Helvetica, Arial;
	--title-font: ui-rounded, system-ui, Helvetica, Arial;
	--mela-font: ui-serif, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--tint: rgba(254,215,9,1);
		--tint-background: rgba(254,215,9,0.1);
		--tint-text: rgba(0,0,0,0.85);
		
		--background: rgba(40,40,40,1);
		
		--title: rgba(255,255,255,0.95);
		--text: rgba(255,255,255,0.75);
		--secondary-text: rgba(255,255,255,0.45);
		--tertiary-text: rgba(255,255,255,0.35);
		--separator: rgba(255,255,255,0.1);
	
		--empty-background: var(--background);
		--empty-title: var(--title);
		--empty-text: var(--title);
		--empty-secondary-text: var(--title);
	
		--form-background: rgba(50,50,50,1);
		--form-text: rgba(255,255,255,0.8);;
		/*--form-shadow:
			0px 2px 30px rgba(0,0,0,0.3), 
			inset 0px 0px 1px rgba(255,255,255,0.5);*/
		--form-shadow:
			0px 5px 20px rgba(0,0,0,0.3),
			inset 0px 1px 1px rgba(255,255,255,0.1), 
			inset 0px 0 1px rgba(255,255,255,0.1), 
			inset 0px -2px 0px rgba(0,0,0,0.0);
		
	
		/*--card-background: rgba(60,60,60,1);			
		--card-shadow:
			0px 2px 10px rgba(0,0,0,0.3), 
			inset 0px 0px 1px rgba(255,255,255,0.6);*/
		--card-background: rgba(55,55,55,1);
		--card-shadow: 
			0px 1px 5px rgba(0,0,0,0.5), 	
			inset 0px 1px 1px rgba(255,255,255,0.2), 
			inset 0px -1px 0px rgba(0,0,0,0.2);
	
		--image-background: rgba(255,255,255,0.03);
		--image-border: rgba(255,255,255,0.1);
	
	}
}

* {
	box-sizing: border-box;
	-webkit-text-size-adjust: none;
}

/*html.mela.mac {
    transform: scale(0.85);
    transform-origin: top center;
}
html.mela header {
}
html.mela article h2  {
	font-family: var(--mela-font);
}
*/
body > div {
    container-type: inline-size;
}



body {
    background-color: var(--background);
	font-size: 13px;
	font: -apple-system-body;
	font-family: var(--font);
	color: var(--text);
	margin: 0;
	padding: 0 0 0 0;
}

html,body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body > div {
    flex: 1 0 auto;
}
body > footer {
    flex-shrink: 0;
}




footer {
	padding: 2em 0 0 0;
	text-align: center;
}


footer > a {
	position: relative;
	display: inline-block;
	text-align: center;
	margin: 0 auto;		
	color: var(--tint);
	text-decoration: none;
	display: inline-flex;
	flex-direction: row;
	justify-content: center;
	min-width: 0;
	opacity: 0.85;
	transition: opacity 0.3s;
	margin-right: 2.1em;
	padding: 0 0.5em;
	border-radius: 0.3em;
}


footer div + div {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: left;
}

footer > a:hover {
	opacity: 1.0;
}
		
footer > a span {
	line-height: 1.2;
	display: block;
	opacity: 0.5;
	color: var(--title);
	font-weight: 700;
	font-size: 0.7em;
	text-transform: uppercase;
}
footer > a span.symbol {
	opacity: 1.0;
	color: var(--tint);
	font-weight: 900;
	font-size: 1.5em;
	line-height: 1.4;
	padding-right: 0.4em;
	margin-right: 0.4em;
	padding-top: 0.1em;
	padding-bottom: 0.1em;
	border-right: 1px solid var(--separator);
}
footer > a strong {
	line-height: 1.2;
	display: block;
	font-weight: 700;
	font-size: 1em;
	color: var(--title);
}

footer p {
	margin: 1em 0 0 0;
	padding: 0;
	color: var(--tertiary-text);
	font-size: 0.8em;
	font-weight: 600;
}

footer p .sep {
	display: inline-block;
	padding: 0 0.1em;
}

footer p a {
	color: var(--title);
}


#language {
	display: inline-block;
	padding: 1em 2em;
	margin-top: 1em;
	border-top: 1px solid var(--separator);
	text-align: center;
}

#language a, #language span {
	text-transform: uppercase;
	display: inline-block;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.8em;
	padding: 0.4em 0.8em;
}

#language a {
	color: var(--secondary-text);
}
#language a:hover {
	color: var(--text);
}
#language span {
	color: var(--text);
    background-color: var(--card-background);
	box-shadow: var(--card-shadow);
	border-radius: 0.4em;
	margin: 0 0.3em;
}

header {
	padding: 2em 0 0 0;
	margin: 0 auto;
}

/*html.mela header {
	padding-top: 1em;
}
html.mela header div.title h1 > span {
	display: none;
}
html.mela h1 {
	font-size: 0.6em;
}
html.mela #plate {
	width: 7em;
	height: 7em;
	transform: scale(0.6);
}
html.mela header #filter {
	margin-top: 1em;
}
html.mela footer a, html.mela footer p {
	display: none;
}
*/

h1 {
	display: block;
	text-align: center;
	font-size: 1em;
	margin: 0 1em 2em 1em;
}


h1 > a.title {
	position: relative;
	display: inline-block;
	font-family: var(--mela-font);
	color: var(--title);
	font-size: 3em;
	font-weight: 800;	
	margin-top: auto;	
	line-height: 1.2;
	text-decoration: none;
}

@supports(mask-image: url("")) {

	h1 > a.title {
		color: rgba(0,0,0,0);
		mask-position: center;
		mask-repeat: no-repeat;
		width: 3.5em;
		mask-size: auto 0.76em;
		mask-image: url(foodle.svg);
	    background-color: var(--title);
	}
	
}

h1 > span {
	color: var(--secondary-text);
	display: block;
	font-size: 0.9em;
	line-height: 1;
	font-weight: 500;
}

h1 a.link {
	font-weight: 700;
	color: var(--tint);
	text-decoration: none;
}


#plate {
	margin: 0 auto;
	width: 13em;
	height: 13em;
	position: relative;
}
#plate::before {
	content: '';
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -5em;
	margin-top: -5em;
	width: 10em;
	height: 10em;
	border-radius: 50%;
	background: rgba(251,250,248,1);
	box-shadow: 0px 4px 10px rgba(0,0,0,0.05), inset 0px 6px 4px rgba(255,255,255,1);
	border: 1px solid rgba(0,0,0,0.1);
}
#plate::after {
	content: '';
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -3.5em;
	margin-top: -3.5em;
	width: 7em;
	height: 7em;
	border-radius: 50%;
	box-shadow: inset 0px 1px 8px rgba(0,0,0,0.1), inset 0px -4px 4px rgba(255,255,255,1);
	border: 1px solid rgba(0,0,0,0.05);
}

@media (prefers-color-scheme: dark) {
	#plate::before {
		background: rgba(251,250,248,0.9);
		box-shadow: 0px 4px 30px rgba(0,0,0,0.5), inset 0px 6px 4px rgba(255,255,255,1);
		border: 1px solid rgba(0,0,0,0.1);
	}
	#plate::after {
		box-shadow: inset 0px 1px 8px rgba(0,0,0,0.15), inset 0px -4px 4px rgba(255,255,255,1);
		border: 1px solid rgba(0,0,0,0.05);
	}
}

#search {
	display: flex;
    background-color: var(--form-background);
	box-shadow: var(--form-shadow);
    border-radius: 0.7em;
	padding: 0;	
	margin: 0;
	white-space: nowrap;
}

label {
    font-size: 1em;
	border: 1px solid transparent;
}

#search-label {
    flex: 0 0 auto; /* size to fit content */
	
	
	font-weight: 500;
    padding: 1em 0 1em 1em;
	border: 1px solid transparent;
	
	color: var(--form-text);
	opacity: 0.5;
	
	margin: 0;
}

#search-text {


    flex: 1 1 auto; /* take up remaining space */
    min-width: 0; /* prevent overflow when container shrinks */

	color: var(--form-text);
	background-color: rgba(255,255,255,0);
	border: 1px solid transparent;
	
    font-size: 1em;
	font-weight: 800;
    font-family: inherit;
    padding: 1em 0 1em 0.2em;
	margin: 0;
	

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	
	

}

#search-text:focus {
  outline: none;
}

#search-submit {
    flex: 0 0 auto; /* size to fit content */
	
	color: var(--tint);
	background-color: rgba(255,255,255,0);
	border: 1px solid transparent;
	padding: 0 1em 0 0;
	
    font-size: 1em;
    font-family: inherit;
	font-weight: 800;
	line-height: 1;
	
	text-transform: uppercase;
	margin: 2px;
}

#filter {
	margin: 3em 0 2em 0;
	padding: 0 0.4em;
	text-align: center;
}

#filter > div {
	display: inline-block;
	background: var(--image-background);
	border: 1px solid var(--image-background);
	padding: 0.3em;
	border-radius: 0.6em;
	border: 1px solid rgba(0,0,0,0.05);
	background: rgba(0,0,0,0.02);
	box-shadow: 0px 0px 2px rgba(255,255,255,1), inset 0px 0px 5px rgba(0,0,0,0.05);
	
}

@media (prefers-color-scheme: dark) {
	#filter > div {
		border: 1px solid rgba(0,0,0,0.2);
		background: rgba(0,0,0,0);
		box-shadow: 0px 0px 2px rgba(255,255,255,0.2), inset 0px 0px 4px rgba(0,0,0,0.3);
	}
}


#filter input[type="radio"] {
	display: none;
}

#filter input[type="radio"] + label {
	font-size: 0.8em !important;
	display: inline-block;
	font-family: var(--font);
	font-weight: 700;
	/*background: var(--image-background);*/
	color: var(--tertiary-text);
	padding: 0.4em 0.6em;
	margin-bottom: 1em;
	border-radius: 0.4em;
	margin: 0;
	border: none;
}

#filter input[type="radio"]:checked + label {
	color: var(--text);
    background-color: var(--card-background);
	box-shadow: var(--card-shadow);
}

.search-sep {
    flex: 0 0 auto;
	display: inline-block;
	
	margin: 0.8em 0;
	
	width: 1px;
	background: var(--separator);
}


main {
	margin: 0 auto;
}



main > div {
    display: grid;
    grid-template-columns: repeat(2, 18em);
    gap: 2em;
    justify-content: center; 
    padding: 0;
    margin: 0;
}

main > div > a {		
	display: block;
	text-decoration: none;
	color: var(--text);
    border-radius: 0.7em;
    box-shadow: var(--card-shadow);
	overflow: hidden;
    background: var(--card-background);

}

main > div > button {
	cursor: pointer;
	height: 8em;
	font-size: 1em;
    border-radius: 0.7em;
	border: 1px solid rgba(0,0,0,0.05);
	background: rgba(0,0,0,0.02);
	box-shadow: 0px 0px 2px rgba(255,255,255,1), inset 0px 0px 5px rgba(0,0,0,0.05);
	transition: background 0.2s;
}

		
@media (prefers-color-scheme: dark) {
	main > div > button {
		border: 1px solid rgba(255,255,255,0.05);
		background: rgba(255,255,255,0.03);
		box-shadow: 0px 0px 3px rgba(0,0,0,0.7);
	}
}
main > div > button > span {
	font-family: var(--font);
	font-size: 1em;
	font-weight: 600;
	color: var(--secondary-text);
	transition: color 0.2s;
}

main > div > button:not(.loading):hover {
	background: var(--tint-background) !important;
}
main > div > button:hover > span {
	color: var(--tint);
}


article {
	
	height: 8em;
    display: flex;
    flex-direction: row;
}


main {
	padding: 1em 0;
}
main > div {
    grid-template-columns: repeat(1, calc(min(26em,100vw - 2em))); /* 3 fixed-size columns */
	gap: 1em; /* smaller gap for 1-column layout */
}
header {
	width: calc(min(26em,100vw - 2em));
}


@media (height < 600px) {
	#plate {
		width: 7.5em;
		height: 7.5em;
		transform: scale(0.6);
	}
}
 
@container (width < 42em) {
	#filter {
		margin-top: 2.5em;
	}
	#plate {
		width: 7.5em;
		height: 7.5em;
		transform: scale(0.6);
	}
}

@container (width >= 42em) {
	#filter {
		padding: 0 0.6em;
	}
	label, #search-text, #search-submit {
		font-size: 1.2em;
	}
	main {
		padding: 2em 0;
	}
	main > div {
		gap: 2em;
	}
	
	
	main > div {
	    grid-template-columns: repeat(2, 18em);
	}
	header {
		width: 38em;
	}
}
@container (width >= 62em) {
	
	main > div {
	    grid-template-columns: repeat(3, 18em);
	}
	header {
		width: 58em;
	}
}


article > .img-container {
	position: relative;
    flex: 0 0 6em; 
	background-color: var(--image-background);
	margin: 0.6em;	
	border-radius: 0.4em;	
}

article > .img-container > div {
	border-radius: 0.4em;	
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

article > .img-container > .img {
	width: 100%;
	height: 100%;
    background-size: cover;
    background-position: center;
	background-repeat: no-repeat;
	opacity: 0.85;
	outline: 1px solid var(--image-border);
	outline-offset: -1px;
}

article > .img-container > .placeholder::before {
	content: '';
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -1.75em;
	margin-top: -1.75em;
	width: 3.5em;
	height: 3.5em;
	border-radius: 50%;
	background: rgba(251,250,248,1);
	box-shadow: 0px 2px 5px rgba(0,0,0,0.05), inset 0px 3px 1px rgba(255,255,255,1);
	border: 1px solid rgba(0,0,0,0.1);
}
article > .img-container .placeholder::after {
	content: '';
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -1.25em;
	margin-top: -1.25em;
	width: 2.5em;
	height: 2.5em;
	border-radius: 50%;
	box-shadow: inset 0px 0.5px 2px rgba(0,0,0,0.15), inset 0px -1px 0px rgba(255,255,255,1);
	border: 1px solid rgba(0,0,0,0.03);
}

@media (prefers-color-scheme: dark) {
	article > .img-container > .placeholder::before {
		background: rgba(80,80,80,1);
		box-shadow: 0px 2px 10px rgba(0,0,0,0.1), inset 0px 3px 1px rgba(255,255,255,0.03);
		border: 0.5px solid rgba(255,255,255,0.2);
	}
	article > .img-container .placeholder::after {
		box-shadow: inset 0px 0.5px 2px rgba(0,0,0,0.3), inset 0px -1px 3px rgba(255,255,255,0.1);
		border: 1px solid rgba(0,0,0,0.1);
	}
}

article > .text {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1em 1em 1em 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

article h2 {
	margin: 0;
	padding: 0;
	font-family: var(--title-font);
	font-size: 1em;
	font-weight: 600;
    hyphens: auto;
    overflow-wrap: break-word;
	
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
	overflow: hidden;
	
	line-height: 1.2;
	

}

article cite {
	padding: 0 0 0 0;
	display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	
	
	font-size: 0.9em;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	
	opacity: 0.5;
}

article time {
	padding: 0 0 0 0;
	font-size: 0.9em;
	font-weight: 600;
	display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	font-style: normal;
	line-height: 1.2;

	opacity: 0.85;
}

p.message {
	display: block;
	text-align: center;
	font-weight: 600;
	color: var(--secondary-text);
	padding: 0;
	margin: 0 auto;
	padding: 0 2em;
	max-width: 35em;
}
