/* die liste im browser (/web). baut auf heute.css auf: dieselbe zeile,
   dasselbe kästchen, dieselbe pille – hier kommt nur dazu, was die
   beispielliste nicht braucht: blättern, bearbeiten, neu, anmelden. */

.web .blatt { max-width: 560px; }

.leiste .leer { flex: 1; }
.zu-heute[hidden] { display: none; }
.konto { display: inline-flex; min-height: 34px; align-items: center; gap: 10px; }

.zahnrad {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	color: var(--zweit);
}
.zahnrad:hover, .zahnrad[aria-expanded="true"] { background: var(--hauch); color: var(--tinte); }
.zahnrad[hidden] { display: none; }

/* ── einstellungen: ein kleines blatt aus glas ────────── */

.einstellungen {
	position: absolute;
	right: max(16px, calc(50% - 270px));
	top: 54px;
	z-index: 10;
	width: min(340px, calc(100% - 32px));
	padding: 6px 16px 14px;
	border-radius: 20px;
	background: var(--glas);
	border: 0.5px solid var(--glas-rand);
	box-shadow: var(--schatten);
	backdrop-filter: blur(24px) saturate(1.8);
	-webkit-backdrop-filter: blur(24px) saturate(1.8);
}
.einstellungen[hidden] { display: none; }
.einstellungen .gruppe {
	margin: 12px 0 4px;
	color: var(--zweit);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.schalter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 38px;
	font-size: 15px;
	cursor: pointer;
}
.schalter + .schalter { border-top: 0.5px solid var(--hauch); }
.schalter input[type=checkbox] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 42px;
	height: 26px;
	margin: 0;
	border-radius: 999px;
	background: var(--hauch);
	position: relative;
	cursor: pointer;
	transition: background-color 0.2s ease-out;
}
.schalter input[type=checkbox]::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease-out;
}
.schalter input[type=checkbox]:checked { background: #34c759; }
.schalter input[type=checkbox]:checked::after { transform: translateX(16px); }
.schalter select {
	font: inherit;
	font-size: 14px;
	color: var(--zweit);
	background: none;
	border: 0;
	text-align: right;
	cursor: pointer;
}
.erinnerung-hinweis { margin-top: 6px; color: var(--dritt); font-size: 12px; line-height: 1.35; }

/* ── der kopf des tages ───────────────────────────────── */

.tageskopf {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
}

.tagesname { flex: 1; min-width: 0; }
.tagesname h1 {
	margin: 0;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.12;
}
.tagesname h1::first-letter { text-transform: uppercase; }
.tagesname .datum { margin-top: 2px; color: var(--zweit); font-size: 15px; }

.blaettern {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	color: var(--zweit);
	font-size: 26px;
	line-height: 1;
	padding-bottom: 3px;
}
.blaettern:hover { background: var(--hauch); color: var(--tinte); }

/* vergangene tage wirken blasser, wie in der app */
.vergangen .tagesliste, .vergangen .tagesname { opacity: 0.6; }

/* ── die zeile: knöpfe rechts statt wischen ───────────── */

.tagesliste { position: relative; }
.tagesliste .zeile { touch-action: pan-y; -webkit-touch-callout: none; }
.tagesliste .inhalt { cursor: default; }

/* ── ziehen ───────────────────────────────────────────── */

.zieht, .zieht * { cursor: grabbing !important; }
.eintrag.gehoben {
	position: relative;
	z-index: 3;
	overflow: visible;
	pointer-events: none;
}
.eintrag.gehoben .zeile {
	border-radius: 12px;
	box-shadow: var(--schatten);
	background: var(--papier);
	margin: 0 -8px;
	padding-left: 8px;
	padding-right: 8px;
}
.landelinie {
	position: absolute;
	right: 0;
	height: 2px;
	border-radius: 1px;
	background: var(--tinte);
	opacity: 0.5;
	pointer-events: none;
	transition: top 0.1s ease-out, left 0.1s ease-out;
}

.werkzeug { flex: none; display: flex; gap: 2px; align-items: center; margin-top: -2px; }

/* ein zeichen, der text dazu fährt erst über dem zeichen selbst heraus */
.aktion {
	display: inline-flex;
	align-items: center;
	height: 28px;
	padding: 0 6px;
	border-radius: 8px;
	color: var(--zweit);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color 0.2s ease-out, color 0.2s ease-out, opacity 0.2s ease-out;
}
.aktion svg { flex: none; }
.aktion-text {
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease-out, margin 0.25s ease-out;
}
.aktion:hover, .aktion:focus-visible { background: var(--hauch); color: var(--tinte); }
.aktion:hover .aktion-text, .aktion:focus-visible .aktion-text { max-width: 140px; opacity: 1; margin-right: 6px; }
.muell:hover, .muell:focus-visible { color: var(--rot); }

/* mit der maus: beides erst, wenn man über den eintrag fährt. auf dem
   telefon stehen die zeichen immer da */
@media (hover: hover) {
	.werkzeug .aktion { opacity: 0; }
	.eintrag:hover .werkzeug .aktion, .werkzeug .aktion:focus-visible { opacity: 1; }
	.zieht .werkzeug .aktion { opacity: 0 !important; }
}

/* der leere tag zeigt nur die frage */
.tagesliste:empty::before {
	content: attr(data-leer);
	display: block;
	padding: 8px 0 2px;
	color: var(--dritt);
	font-size: 17px;
	font-weight: 700;
}

/* ── bearbeiten ───────────────────────────────────────── */

.eintrag.offen .zeile { align-items: flex-start; }
.bearbeiten-reihe { display: flex; align-items: flex-start; gap: 7px; }

.tagesliste textarea, .tagesliste input, .neu textarea {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	outline: none;
	resize: none;
	width: 100%;
	overflow: hidden;
}

.tagesliste .titel-feld { font-size: 17px; font-weight: 700; line-height: 22px; }
.tagesliste .notiz-feld { margin-top: 4px; color: var(--zweit); font-size: 16px; line-height: 21px; }

.tagesliste .zeit-feld {
	flex: none;
	width: 52px;
	margin-top: 2px;
	padding: 1px 5px;
	border-radius: 4px;
	background: var(--hauch);
	color: var(--uhrzeit);
	font-family: "Martian Mono", ui-monospace, monospace;
	font-size: 11px;
	font-variation-settings: "wght" 300, "wdth" 75;
	line-height: 1.6;
	text-align: center;
}
.tagesliste .zeit-feld:placeholder-shown { background: transparent; box-shadow: inset 0 0 0 1px var(--hauch); }

.eintrag.offen { background: var(--hauch); border-radius: 12px; margin: 2px -10px; padding: 0 10px; }
.eintrag.offen .zeile { background: transparent; }

/* ── neu: das glasfeld unter der liste ────────────────── */

.neu {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-top: 22px;
	padding: 9px 14px 9px 12px;
	border-radius: 22px;
	/* ruhig, solange niemand schreibt: eine leise mulde, kein glas, kein schatten */
	background: var(--mulde);
	border: 0.5px solid var(--glas-rand);
	transition: background-color 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
	cursor: text;
}
.neu:hover { border-color: var(--dritt); }
.neu:focus-within {
	background: var(--glas);
	border-color: var(--glas-rand);
	box-shadow: var(--schatten);
}
.neu .neu-plus { color: var(--dritt); transition: color 0.2s ease-out; }
.neu:focus-within .neu-plus { color: var(--zweit); }
.neu-plus {
	flex: none;
	width: 22px;
	text-align: center;
	color: var(--zweit);
	font-size: 22px;
	line-height: 22px;
}
.neu-felder { flex: 1; min-width: 0; }
.neu .neu-titel { font-size: 17px; font-weight: 700; line-height: 22px; }
.neu .neu-notiz { margin-top: 3px; color: var(--zweit); font-size: 16px; line-height: 21px; }
.neu textarea::placeholder, .tagesliste textarea::placeholder { color: var(--dritt); }

.tasten { margin-top: 14px; color: var(--dritt); font-size: 12px; text-align: center; }
@media (hover: none) { .tasten { display: none; } }

/* ── vormerkungen: liegen bereit, stehen noch nicht fest ── */

.vormerkungen {
	margin-top: 16px;
	padding: 10px 14px;
	border-radius: 18px;
	background: var(--mulde);
	box-shadow: var(--mulde-schatten);
}
.vormerk-titel {
	color: var(--zweit);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.vormerk-liste { list-style: none; margin: 4px 0 0; padding: 0; }
.vormerkung {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 0;
	font-size: 16px;
	font-weight: 600;
}
.vormerkung.unter { margin-left: 22px; font-weight: 500; color: var(--zweit); }
.vormerkung .text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vormerkung .herein { min-height: 28px; padding: 0 12px; font-size: 13px; font-weight: 600; }

/* ── anmelden ─────────────────────────────────────────── */

.tor .kopf, .gesperrt .kopf { margin-top: 0; padding-top: 40px; }
.anmelden { margin-top: 26px; min-height: 44px; }
.kleingedruckt { margin-top: 18px; color: var(--dritt); font-size: 13px; line-height: 1.4; }
.gesperrt .banner-knopf { display: inline-block; margin-top: 22px; }

.meldung {
	margin-top: 14px;
	padding: 9px 14px;
	border-radius: 12px;
	background: var(--hauch);
	color: var(--zweit);
	font-size: 14px;
}
.meldung[hidden] { display: none; }

.web .fuss { margin-top: auto; padding-top: 40px; }
.web .tag { margin-bottom: 20px; }

/* abmelden: ganz unten im einstellungsblatt */
.einstellungen .abmelden { margin-top: 12px; text-align: right; }
.einstellungen .abmelden[hidden] { display: none; }
.abmelden-link { color: var(--zweit); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.abmelden-link:hover { color: var(--tinte); }
#apple-abmelden { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

/* ── der tag zum antippen: öffnet den kalender ────────── */

.tagesname { cursor: pointer; border-radius: 12px; outline: none; }
.tagesname:focus-visible { background: var(--hauch); box-shadow: 0 0 0 6px var(--hauch); }
.tagesname:hover .datum { color: var(--tinte); }
.tag { position: relative; }

/* ── kalender: glas, die zahlen in martian mono ───────── */

.kalender {
	position: absolute;
	left: 0;
	right: 0;
	top: 64px;
	z-index: 8;
	padding: 18px 16px 12px;
	border-radius: 24px;
	background: var(--glas);
	border: 0.5px solid var(--glas-rand);
	box-shadow: var(--schatten);
	backdrop-filter: blur(24px) saturate(1.8);
	-webkit-backdrop-filter: blur(24px) saturate(1.8);
}
.kalender[hidden] { display: none; }

.kalender-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.kalender-kopf .monat { font-size: 17px; font-weight: 700; }
.kalender-kopf button {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: var(--glas);
	border: 0.5px solid var(--glas-rand);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	color: var(--tinte);
	font-size: 22px;
	line-height: 1;
	padding-bottom: 3px;
}
.kalender-kopf button:hover { background: var(--hauch); }

.kalender-gitter {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	row-gap: 6px;
	column-gap: 4px;
	font-family: "Martian Mono", ui-monospace, monospace;
	font-size: 17px;
	font-variation-settings: "wght" 300, "wdth" 100;
	text-align: center;
}
.kalender-gitter .wochentag { color: var(--tinte); opacity: 0.3; padding-bottom: 10px; }
.kal-tag {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	min-height: 40px;
	padding-top: 6px;
	border-radius: 10px;
	font-family: inherit;
	font-variation-settings: inherit;
	color: var(--tinte);
}
.kal-tag:hover { background: var(--hauch); }
.kal-tag.vergangen { color: var(--zweit); }
.kal-tag.fett { font-variation-settings: "wght" 700, "wdth" 100; }
.kal-tag .punkt { width: 4px; height: 4px; border-radius: 999px; background: currentColor; opacity: 0; }
.kal-tag.belegt .punkt { opacity: 0.5; }

/* ── nachfragen: ein kleines glasblatt in der mitte ───── */

.dialog-grund {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.18);
	animation: einblenden 0.15s ease-out;
}
.dialog-grund[hidden] { display: none; }
.dialog {
	width: min(320px, 100%);
	padding: 20px 18px 14px;
	border-radius: 22px;
	background: var(--glas);
	border: 0.5px solid var(--glas-rand);
	box-shadow: var(--schatten);
	backdrop-filter: blur(24px) saturate(1.8);
	-webkit-backdrop-filter: blur(24px) saturate(1.8);
	text-align: center;
	animation: auftauchen 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dialog-text { font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.dialog-knoepfe { display: flex; gap: 8px; margin-top: 18px; }
.dialog-knoepfe button {
	flex: 1;
	min-height: 40px;
	border-radius: 999px;
	background: var(--hauch);
	font-size: 15px;
	font-weight: 600;
}
.dialog-knoepfe .dialog-ja { background: var(--tinte); color: var(--papier); }
.dialog-knoepfe .dialog-ja.rot { background: var(--rot); color: #fff; }

@keyframes einblenden { from { opacity: 0; } }
@keyframes auftauchen { from { opacity: 0; transform: scale(0.96); } }

@media (prefers-reduced-motion: reduce) {
	.aktion, .aktion-text, .neu, .dialog-grund, .dialog { transition: none; animation: none; }
}

/* ── probezeit und vollversion ────────────────────────── */

.probe {
	margin-top: 14px;
	padding: 9px 14px;
	border-radius: 14px;
	background: var(--mulde);
	color: var(--zweit);
	font-size: 13px;
	line-height: 1.4;
}
.probe[hidden] { display: none; }
.gesperrt .vorbei { margin-top: 18px; font-weight: 600; }

/* ── laden: das kästchen der liste hakt sich ab und leert sich wieder ── */

.laden {
	flex: 1;
	display: grid;
	place-items: center;
	min-height: 50vh;
	/* erst nach einem moment – ein schneller start soll nicht flackern */
	animation: einblenden 0.3s ease-out 0.25s both;
}
.laden-kaestchen {
	position: relative;
	width: 26px;
	height: 26px;
	border: 2px solid var(--zweit);
	border-radius: 6px;
	animation: kaestchenGrund 1.6s ease-in-out infinite;
}
.laden-kaestchen::after {
	content: "";
	position: absolute;
	left: 7.5px;
	top: 3px;
	width: 5px;
	height: 11px;
	border: solid var(--papier);
	border-width: 0 2.4px 2.4px 0;
	transform: rotate(45deg) scale(0.4);
	opacity: 0;
	animation: kaestchenHaken 1.6s ease-in-out infinite;
}
@keyframes kaestchenGrund {
	0%, 15% { background: transparent; border-color: var(--zweit); }
	35%, 70% { background: var(--erledigt); border-color: transparent; }
	90%, 100% { background: transparent; border-color: var(--zweit); }
}
@keyframes kaestchenHaken {
	0%, 20% { opacity: 0; transform: rotate(45deg) scale(0.4); }
	38%, 68% { opacity: 1; transform: rotate(45deg) scale(1); }
	85%, 100% { opacity: 0; transform: rotate(45deg) scale(0.4); }
}

/* ── bewegung: leicht und kurz ────────────────────────── */

.tagesliste .eintrag { transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tagesliste .eintrag.kommt { opacity: 0; transform: translateY(-6px); }
.tagesliste .eintrag.gehoben { transition: none; }
.tagesliste .eintrag.geht { opacity: 0; transform: scale(0.98); }
.vormerkung { transition: opacity 0.22s ease, transform 0.22s ease; }
.vormerkung.geht { opacity: 0; transform: translateY(-4px); }

/* blättern: der tag kommt aus der richtung, in die man geht */
.blaettert-vor .tagesname, .blaettert-vor .tagesliste, .blaettert-vor .vormerkungen { animation: vonRechts 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.blaettert-zurueck .tagesname, .blaettert-zurueck .tagesliste, .blaettert-zurueck .vormerkungen { animation: vonLinks 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes vonRechts { from { opacity: 0; transform: translateX(14px); } }
@keyframes vonLinks { from { opacity: 0; transform: translateX(-14px); } }

/* blätter und fenster tauchen auf */
.einstellungen:not([hidden]) { animation: auftauchen 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); transform-origin: top right; }
.kalender:not([hidden]) { animation: auftauchen 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); transform-origin: top center; }
.vormerkungen:not([hidden]), .meldung:not([hidden]), .zu-heute:not([hidden]),
.tag:not([hidden]), .tor:not([hidden]), .gesperrt:not([hidden]) { animation: einblenden 0.25s ease-out; }
.neu-notiz:not([hidden]) { animation: herunter 0.2s ease-out; }
.eintrag.offen { animation: einblenden 0.15s ease-out; }
.web .hinweis:not([hidden]) { animation: hochkommen 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes herunter { from { opacity: 0; transform: translateY(-4px); } }
@keyframes hochkommen { from { opacity: 0; transform: translate(-50%, 10px); } }

/* die tage im kalender und die pfeile reagieren weich */
.kal-tag, .blaettern, .kalender-kopf button, .zahnrad, .dialog-knoepfe button { transition: background-color 0.15s ease-out, color 0.15s ease-out, transform 0.1s ease-out; }
.kal-tag:active, .blaettern:active, .kalender-kopf button:active, .dialog-knoepfe button:active, .zahnrad:active { transform: scale(0.94); }

/* breites fenster: die pfeile stehen außerhalb des blatts */
@media (min-width: 720px) {
	.tageskopf { position: relative; }
	.tageskopf .blaettern { position: absolute; top: 50%; margin-top: -18px; }
	.tageskopf .blaettern.zurueck { left: -58px; }
	.tageskopf .blaettern.vor { right: -58px; }
}

@media (prefers-reduced-motion: reduce) {
	.web *, .web *::before, .web *::after { animation: none !important; transition: none !important; }
	.laden-kaestchen { opacity: 0.5; }
}

