/* Aufgabensammlung (08.11.2026): nur was die Seite braucht. Grundstile in /seite.css. */

.sammlung-raster {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20rem;
	gap: 1.6rem;
	align-items: start;
}

.sammlung-inhalt > h2 { font-size: 1.4rem; margin: 0.4rem 0 1rem; }

/* Pfad: Alle Jahrgangsstufen › 9 › Quadratwurzeln › … */
.pfad {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem 0.4rem;
	font-size: 0.95rem;
	color: var(--ink-light);
}

.pfad li + li::before { content: "›"; margin-right: 0.4rem; color: var(--ink-light); }
.pfad [aria-current] { color: var(--akzent-dark); font-weight: 700; }

.pfad-knopf {
	font: inherit;
	color: var(--akzent);
	background: none;
	border: none;
	padding: 0.5rem 0.1rem;
	min-height: 2.75rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Auswahl-Karten für Jahrgangsstufe, Thema, Unterthema */
.wahl-raster {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 0.9rem;
}

.wahl-karte {
	width: 100%;
	min-height: 5.5rem;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.25rem;
	padding: 1rem 1.2rem;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: 14px;
	font: inherit;
	text-align: left;
	color: var(--ink);
	cursor: pointer;
	box-shadow: 0 10px 24px -18px rgba(14, 61, 110, 0.35);
	transition: border-color 0.2s, background-color 0.2s;
}

.wahl-karte:hover { border-color: var(--akzent); background: var(--akzent-light); }
.wahl-name { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; color: var(--akzent-dark); font-size: 1.08rem; line-height: 1.3; }
.wahl-anzahl { color: var(--ink-light); font-size: 0.92rem; }

/* Filter */
.filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem 1.4rem;
	padding: 1rem 1.2rem;
}

.filter-feld { display: flex; flex-direction: column; gap: 0.25rem; min-width: 12rem; }
.filter-feld label { font-size: 0.92rem; color: var(--ink-light); }

.filter select {
	font: inherit;
	min-height: 2.75rem;
	padding: 0.4rem 0.6rem;
	border: 1.5px solid var(--ink-light);
	border-radius: 10px;
	background: var(--white);
	color: var(--ink);
}

.filter select:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }

/* Aufgaben */
.aufgaben-liste { list-style: none; display: grid; gap: 1.1rem; }

.aufgabe-karte { margin: 0; }
.aufgabe-karte h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.aufgabe-karte .merkmale { margin: 0 0 0.9rem; }
.merkmale .stufe-1, .merkmale .stufe-2 { background: #eaf5ee; color: #1d5c37; }
.merkmale .stufe-4, .merkmale .stufe-5 { background: #fbeeec; color: #8c2a1e; }

.aufgabe-text {
	background: var(--akzent-light);
	border-radius: 10px;
	padding: 1rem 1.1rem;
	line-height: 1.8;
	overflow-x: auto;
}

.aufgabe-aktionen { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.aufgabe-aktionen .knopf { min-height: 2.75rem; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

.loesung {
	margin-top: 1rem;
	padding: 0.9rem 1.1rem;
	border-left: 4px solid var(--akzent);
	background: #f4f3ef;
	border-radius: 0 10px 10px 0;
	line-height: 1.8;
	overflow-x: auto;
}

.loesung-titel { font-weight: 700; color: var(--akzent-dark); margin-bottom: 0.3rem; }

.leer { color: var(--ink-light); }

/* Meine Sammlung */
.sammlung { position: sticky; top: 5rem; margin: 0; scroll-margin-top: 5rem; }
.sammlung h2 { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 1.2rem; margin-bottom: 0.8rem; }

.zaehler {
	font-family: 'PT Serif', Georgia, serif;
	font-size: 0.9rem;
	min-width: 2rem;
	text-align: center;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	background: var(--akzent);
	color: var(--white);
}

.sammlung-liste { list-style: none; display: grid; gap: 0.5rem; max-height: 22rem; overflow-y: auto; }
.sammlung-liste .leer { font-size: 0.95rem; }

.sammlung-eintrag {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.4rem 0.4rem 0.4rem 0.75rem;
	background: var(--akzent-light);
	border-radius: 8px;
	font-size: 0.92rem;
	line-height: 1.35;
}

.entfernen {
	flex: none;
	min-height: 2.5rem;
	padding: 0.3rem 0.7rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: none;
	color: var(--falsch, #a12a1c);
	font: inherit;
	font-size: 0.88rem;
	cursor: pointer;
}

.entfernen:hover { border-color: currentColor; }

.sammlung-knoepfe { display: grid; gap: 0.5rem; }
.sammlung-knoepfe .knopf { width: 100%; }
.sammlung-knoepfe:has(> :not([hidden])) { margin-top: 1rem; }
#sammlung-status:empty { display: none; }
#sammlung-status { margin-top: 0.6rem; }

/* Leiste unten auf dem Handy, sobald etwas gesammelt ist */
.sammlung-leiste { display: none; }

@media (max-width: 900px) {
	.sammlung-raster { grid-template-columns: 1fr; }
	.sammlung { position: static; }

	.sammlung-leiste:not([hidden]) {
		display: flex;
		position: fixed;
		left: 50%;
		bottom: 16px;
		transform: translateX(-50%);
		z-index: 900;
		align-items: center;
		min-height: 3rem;
		padding: 0.6rem 1.3rem;
		border-radius: 999px;
		background: var(--akzent-dark);
		color: var(--white);
		font-weight: 700;
		text-decoration: none;
		box-shadow: 0 10px 24px -10px rgba(14, 61, 110, 0.6);
		white-space: nowrap;
	}

	.sammlung-leiste:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; }
	main.innen { padding-bottom: 5rem; }
}

/* Arbeitsblatt für das PDF: außerhalb des Bildschirms aufgebaut, html2pdf fotografiert es */
.pdf-ablage { position: absolute; left: -10000px; top: 0; width: 760px; }

.pdf-blatt {
	width: 760px;
	padding: 24px 32px;
	background: #ffffff;
	color: #1a1a1a;
	font-family: 'PT Serif', Georgia, serif;
	font-size: 15px;
	line-height: 1.6;
}

.pdf-blatt h1 { text-align: center; font-size: 26px; margin-bottom: 4px; }
.pdf-blatt h2 { text-align: center; font-size: 22px; margin: 0 0 24px; }
.pdf-blatt h3 { font-size: 17px; margin-bottom: 4px; }
.pdf-unterzeile { text-align: center; color: #54555c; margin-bottom: 32px; }
.pdf-aufgabe { margin-bottom: 26px; }
.pdf-meta { font-size: 12px; color: #54555c; margin-bottom: 8px; }
.pdf-text { background: #EAF1F8; border-radius: 8px; padding: 14px 16px; }
.pdf-loesung { border-left: 4px solid #185FA5; background: #f4f3ef; padding: 12px 16px; }
