/* Speiseplan auf der Website.

   Gezeigt wird das fertige Blatt als Bild (inc/render.php) – der erste Teil
   dieser Datei kümmert sich nur darum, dass es sauber auf der Seite sitzt.

   Alles danach ist der Notnagel: derselbe Plan aus HTML, falls die
   Installation keine Bilder zeichnen kann. Farben kommen aus den Theme-Tokens
   in coco.css; die Rückfallwerte halten den Block auch unter einem anderen
   Theme lesbar. Alle Regeln sind mit .sp vorangestellt – sowohl gegen die
   Prosa-Styles des Themes als auch, weil kurze Klassennamen wie .rows im Theme
   schon vergeben sind. */

/* =========================================================================
   Das Blatt als Bild
   ====================================================================== */

.sp .sp-blatt {
	margin: 0;
}

.sp .sp-blatt + .sp-blatt,
.sp .sp-worte + .sp-blatt {
	margin-top: 30px;
}

.sp .sp-blatt a {
	display: block;
}

/* Das Blatt hat denselben Cremeton wie die Seite – ohne Schatten schwämme es. */
.sp .sp-blatt img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 10px 30px rgba(60, 55, 40, 0.16);
}

/* Auf dem Telefon ist ein A4-Blatt klein; der Hinweis sagt, dass es größer geht. */
.sp .sp-tipp {
	margin-top: 8px;
	font-size: 13px;
	text-align: right;
	color: var(--ink3, #8a8473);
}

@media (min-width: 700px) {
	.sp .sp-tipp {
		display: none;
	}
}

/* Der Plan in Worten: nur für Vorlesehilfen und die Suche. */
.sp .sp-worte {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* =========================================================================
   Notnagel: derselbe Plan aus HTML
   ====================================================================== */

.sp {
	--sp-paper: #fffdf7;
	--sp-ink: var(--ink, #3d3a2e);
	--sp-ink3: var(--ink3, #8a8473);
	--sp-sage-d: var(--sage-d, #3f5126);
	--sp-sage-t: var(--sage-t, #e2edd4);
	--sp-terra: var(--terra, #c2724e);
	--sp-terra-d: var(--terra-d, #7c3c24);
	--sp-terra-t: #f6e4d6;
	--sp-gold-d: var(--gold-d, #6b5012);
	--sp-gelb-t: var(--gelb-t, #f7ebcb);
	--sp-blau-d: var(--blau-d, #2c465b);
	--sp-blau-t: var(--blau-t, #dfeaf1);
	--sp-on-dark: #cdd7bb;
	--sp-on-dark-em: #f3ecdc;

	/* Seitenrand des Blattes (im Entwurf 15 mm) und Höhe der Wellenkante. */
	--sp-edge: clamp(20px, 4.4vw, 50px);
	--sp-wave: calc(100% * 28 / 210);

	max-width: 860px;
	margin: 0 auto;
}

.sp.alignwide,
.sp.alignfull {
	max-width: none;
}

.sp .sp-defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* Nur für Vorlesehilfen: „Inhaltsstoffe:" vor der Aufzählung. */
.sp .sp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Das Blatt ---------------------------------------------------------- */

.sp .sp-sheet {
	position: relative;
	overflow: hidden;
	border-radius: 22px;
	background: var(--sp-paper);
	box-shadow: 0 10px 30px rgba(60, 55, 40, 0.1);
}

.sp .sp-sheet + .sp-sheet {
	margin-top: 30px;
}

/* --- Grünes Kopfband mit Wellenkante ------------------------------------ */

.sp .sp-band {
	position: relative;
	padding: clamp(22px, 3.6vw, 32px) var(--sp-edge) calc(var(--sp-wave) + clamp(4px, 1vw, 10px));
	background: var(--sp-sage-d);
}

/* Die Welle behält ihr Seitenverhältnis (210 : 28) – sonst sitzt das Logo
   neben der Kuppe statt darauf. */
.sp .sp-wave {
	position: absolute;
	left: 0;
	bottom: -1px;
	display: block;
	width: 100%;
	height: auto;
	color: var(--sp-paper);
}

/* Sitzt auf der Kuppe der Welle (im Entwurf bei x = 174 von 210 mm). */
.sp .sp-logo {
	position: absolute;
	left: 82.6%;
	bottom: calc(var(--sp-wave) * -0.32);
	width: clamp(56px, 8.6vw, 78px);
	height: auto;
	transform: translateX(-50%);
}

.sp .sp-head {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2.4vw, 22px);
}

.sp .sp-emblem {
	display: grid;
	flex: 0 0 auto;
	place-items: center;
	width: clamp(54px, 9vw, 76px);
	height: clamp(54px, 9vw, 76px);
	background: #f6f8ef;
	border: 2px solid #fff;
	border-radius: 58% 42% 47% 53% / 56% 47% 53% 44%;
}

.sp .sp-emblem svg {
	display: block;
	width: 66%;
	height: 66%;
}

.sp .sp-title {
	margin: 0;
	font-family: "Caveat", cursive;
	font-size: clamp(34px, 6.2vw, 52px);
	font-weight: 700;
	line-height: 0.92;
	color: var(--sp-on-dark-em);
}

.sp .sp-when {
	margin: 5px 0 0;
	font-family: "Caveat", cursive;
	font-size: clamp(19px, 3.2vw, 27px);
	font-weight: 700;
	line-height: 1;
	color: var(--sp-on-dark);
}

/* --- Die fünf Zeilen ---------------------------------------------------- */

.sp .sp-rows {
	margin: 0;
	padding: clamp(20px, 3.4vw, 34px) var(--sp-edge) clamp(10px, 1.8vw, 18px);
	list-style: none;
}

.sp .sp-row {
	display: grid;
	grid-template-columns: minmax(150px, 200px) 1fr;
	column-gap: clamp(16px, 3vw, 34px);
	align-items: center;
	padding: clamp(14px, 2.4vw, 22px) 0;
}

/* --- Wochentag auf dem Textmarker-Strich -------------------------------- */

.sp .sp-lab {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-left: 6px;
}

.sp .sp-name {
	position: relative;
	z-index: 0;
	display: inline-block;
	padding: 0 10px 0 8px;
	font-family: "Caveat", cursive;
	font-size: clamp(28px, 4.9vw, 42px);
	font-weight: 700;
	line-height: 0.95;
}

.sp .sp-name::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: -4px;
	right: -5px;
	top: 22%;
	bottom: 4%;
	border-radius: 46% 54% 42% 58% / 62% 38% 62% 38%;
	transform: rotate(-1.6deg);
}

.sp .sp-alt .sp-name::before {
	border-radius: 56% 44% 60% 40% / 40% 62% 38% 60%;
	transform: rotate(1.3deg);
}

.sp .sp-sage .sp-name {
	color: var(--sp-sage-d);
}
.sp .sp-sage .sp-name::before {
	background: var(--sp-sage-t);
}
.sp .sp-sand .sp-name {
	color: var(--sp-gold-d);
}
.sp .sp-sand .sp-name::before {
	background: var(--sp-gelb-t);
}
.sp .sp-rose .sp-name {
	color: var(--sp-terra-d);
}
.sp .sp-rose .sp-name::before {
	background: var(--sp-terra-t);
}
.sp .sp-blau .sp-name {
	color: var(--sp-blau-d);
}
.sp .sp-blau .sp-name::before {
	background: var(--sp-blau-t);
}

.sp .sp-date {
	display: block;
	margin-top: 9px;
	padding-left: 8px;
	font-family: "Caveat", cursive;
	font-size: clamp(17px, 2.8vw, 24px);
	font-weight: 700;
	line-height: 1;
	color: var(--sp-ink);
}

/* Der Entwurf kennt kein „heute" – auf der Website hilft es beim Überfliegen. */
.sp .sp-now {
	display: inline-block;
	margin-left: 7px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--sp-terra-t);
	font-family: inherit;
	font-size: 11px;
	font-style: normal;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	vertical-align: middle;
	color: var(--sp-terra-d);
}

/* --- Gericht, Inhaltsstoffe, geschlossene Tage -------------------------- */

.sp .sp-meal {
	margin: 0;
	font-size: clamp(16.5px, 2.2vw, 20px);
	font-weight: 600;
	line-height: 1.32;
	color: var(--sp-ink);
}

.sp .sp-allerg {
	margin: 7px 0 0;
	font-size: clamp(13.5px, 1.8vw, 15px);
	font-weight: 400;
	line-height: 1.35;
	color: var(--sp-ink3);
}

.sp .sp-holiday {
	margin: 0;
	font-size: clamp(16.5px, 2.2vw, 20px);
	font-style: italic;
	font-weight: 600;
	line-height: 1.32;
	color: var(--sp-terra);
}

.sp .sp-pill {
	display: inline-block;
	margin: 9px 0 0;
	padding: 5px 14px;
	border-radius: 999px;
	background: var(--sp-gelb-t);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.12em;
	line-height: 1.2;
	text-transform: uppercase;
	color: var(--sp-gold-d);
}

.sp .sp-open {
	margin: 0;
	font-size: clamp(15px, 2vw, 17px);
	font-style: italic;
	color: var(--sp-ink3);
}

/* --- Fußzeile des Blattes ----------------------------------------------- */

.sp .sp-tools {
	margin: 0;
	padding: 0 var(--sp-edge) clamp(18px, 2.6vw, 26px);
	text-align: right;
}

.sp .sp-insta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	color: var(--sp-terra);
}

.sp .sp-insta:hover,
.sp .sp-insta:focus-visible {
	text-decoration: underline;
}

.sp .sp-insta svg {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sp .sp-none {
	margin: 0;
	padding: 22px 24px;
	border-radius: 18px;
	background: var(--sage-bg, #eff3e7);
	font-size: 15px;
	text-align: center;
	color: var(--ink2, #6e6a5c);
}

/* --- Telefon ------------------------------------------------------------ */

@media (max-width: 640px) {
	.sp .sp-sheet {
		border-radius: 16px;
	}

	.sp .sp-logo {
		display: none;
	}

	.sp .sp-row {
		grid-template-columns: 1fr;
	}

	/* Der Textmarker braucht links Luft; damit das Wort trotzdem bündig unter
	   dem Gericht anfängt, wird sie hier wieder herausgerechnet. */
	.sp .sp-lab {
		flex-direction: row;
		align-items: baseline;
		gap: 10px;
		margin-bottom: 7px;
		padding-left: 0;
	}

	.sp .sp-name {
		margin-left: -8px;
	}

	.sp .sp-date {
		margin-top: 0;
		padding-left: 0;
	}
}

/* Wer die Seite ausdruckt, soll keinen Schatten und keine Knöpfe sehen. */
@media print {
	.sp .sp-sheet {
		box-shadow: none;
		break-inside: avoid;
	}

	.sp .sp-tools {
		display: none;
	}
}
