/* OktoListe – Seiten-CSS; Farben, Schrift und Grundbausteine aus /assets/ui.css (oktopaul-ui, docs/design.md) */
.wrap { width: min(640px, 100% - 32px); margin: 0 auto; padding: 20px 0 96px; }
[hidden] { display: none !important; }
main { margin-top: 18px; }
h2 { font-size: .95rem; font-weight: 650; }
.ui-btn svg { flex: none; }

/* Start */
.neu-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.zeile { display: flex; gap: 8px; margin-top: 6px; }
.zeile .ui-input { flex: 1; min-width: 0; font-size: 16px; height: 44px; }
.zeile .ui-btn { height: 44px; }
.hinweis { color: var(--muted-foreground); font-size: .84rem; margin-top: 10px; }
.zuletzt { margin-top: 24px; }
.zuletzt-liste { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); }
.zuletzt-liste li + li { border-top: 1px solid var(--border); }
.zuletzt-liste a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; color: var(--foreground); text-decoration: none; }
.zuletzt-liste a span:last-child { color: var(--muted-foreground); font-size: .84rem; flex: none; }
@media (hover: hover) and (pointer: fine) { .zuletzt-liste a:hover { background: var(--accent); } }

/* Kopf der Liste */
.kopf { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.kopf h1 { flex: 1; min-width: 0; }
.titel-knopf { all: unset; cursor: text; display: block; overflow-wrap: anywhere; border-radius: 6px; }
.titel-knopf:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
#stand { margin-top: 2px; }
#stand.offline { color: var(--danger); }

/* Hinzufügen */
.hinzu { display: flex; gap: 8px; position: sticky; top: 0; z-index: 2; padding: 10px 0; background: var(--background); }
.hinzu .ui-input { flex: 1; min-width: 0; font-size: 16px; height: 44px; }
.hinzu .ui-btn { width: 44px; height: 44px; padding: 0; }
.hinzu .ui-btn svg { width: 20px; height: 20px; }

/* Einträge */
.eintraege { list-style: none; margin: 0; padding: 0; }
.eintrag { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--border); }
.haken { flex: none; width: 44px; height: 48px; display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; color: var(--primary); }
.haken span { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--input); display: grid; place-items: center;
  transition: background-color 160ms cubic-bezier(.23,1,.32,1), border-color 160ms cubic-bezier(.23,1,.32,1), transform 160ms cubic-bezier(.23,1,.32,1); }
.haken svg { width: 14px; height: 14px; opacity: 0; transition: opacity 120ms ease-out; }
.haken:active span { transform: scale(.9); }
.haken:focus-visible { outline: 2px solid var(--ring); outline-offset: -6px; border-radius: 10px; }
.erledigt-ja .haken span { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.erledigt-ja .haken svg { opacity: 1; }
.text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 4px 8px 2px; background: none; border: 0;
  font: inherit; color: var(--foreground); text-align: left; cursor: pointer; }
.text:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; border-radius: 6px; }
.text .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.erledigt-ja .text .t { color: var(--muted-foreground); text-decoration: line-through; text-decoration-color: var(--muted-foreground); }
.wer { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 550;
  padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-foreground); }
.erledigt-ja .wer { background: var(--muted); color: var(--muted-foreground); }
/* Farbe der OktoKennung (27.10.2026, /assets/kennung.css) als Punkt vor dem Namen */
.wer[class*="okto-p"]::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; vertical-align: 1px;
  border-radius: 50%; background: var(--okto-farbe); }
.kopf .okto-ich { width: 36px; height: 36px; }
.wer-zeile { display: flex; gap: 8px; margin-top: 6px; }
.blatt .wer-zeile .ui-input { flex: 1; min-width: 0; margin-top: 0; }
.wer-zeile .ui-btn { height: 44px; flex: none; }
@media (hover: hover) and (pointer: fine) { .text:hover .t { color: var(--primary); } .erledigt-ja .text:hover .t { color: var(--foreground); } }
.leer { color: var(--muted-foreground); font-size: .9rem; padding: 16px 0; }

.erledigt { margin-top: 22px; }
.erledigt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.erledigt-kopf h2 { color: var(--muted-foreground); }

/* Bearbeiten als Blatt: am Handy unten, am PC mittig */
.blatt { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--card-foreground);
  padding: 18px; width: min(440px, 100% - 24px); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.blatt::backdrop { background: rgba(10, 15, 23, .45); }
.blatt h2 { font-size: 1.05rem; margin-bottom: 4px; }
.blatt .ui-label { display: block; margin-top: 12px; }
.blatt .ui-input { width: 100%; margin-top: 6px; font-size: 16px; height: 44px; }
.blatt-knoepfe { display: flex; gap: 8px; margin-top: 18px; align-items: center; }
.blatt-knoepfe .frei { flex: 1; }
.ui-btn.loeschen { color: var(--danger); padding-left: 8px; padding-right: 8px; }
@media (max-width: 620px) {
  .blatt[open] { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: hoch 220ms cubic-bezier(.32,.72,0,1); }
}
@keyframes hoch { from { transform: translateY(100%); } }

/* Hinweis unten mit Rückgängig */
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px); padding: 10px 14px; border-radius: var(--radius);
  background: var(--foreground); color: var(--background); font-size: .9rem; box-shadow: 0 6px 20px rgba(0,0,0,.2);
  animation: rein 200ms cubic-bezier(.23,1,.32,1); }
.toast button { background: none; border: 0; color: inherit; font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; padding: 4px 0; }
@keyframes rein { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 620px) { .wrap { width: calc(100% - 24px); padding-top: 14px; } .ui-header h1 { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) {
  .haken span, .haken svg { transition: none; } .haken:active span { transform: none; }
  .blatt[open], .toast { animation: none; }
}
