/* lernkarten.css — /tools/lernkarten (05.10.2026). Baut auf werkzeug.css auf. */
.lk { display: flex; flex-direction: column; gap: 1rem; max-width: 46rem; margin: 0 auto; }
.lk [hidden] { display: none !important; }

.lk-stapel { display: flex; flex-wrap: wrap; gap: 0.4rem; }
@media (max-width: 760px) {
  .lk-stapel { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -0.4rem -1rem 0; padding: 0.4rem 1rem 0.5rem; }
  .lk-stapel::-webkit-scrollbar { display: none; }
}
.lk-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--text2); font: 600 0.88rem 'Inter', sans-serif; cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.lk-chip:hover { border-color: var(--border2); color: var(--pri); }
.lk-chip:active { transform: scale(0.95); }
.lk-chip.an { background: var(--pri); border-color: var(--pri); color: #fff; box-shadow: 0 4px 12px rgba(26, 106, 170, 0.22); }
.lk-chip span { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-chip b { min-width: 1.3rem; padding: 0 0.35rem; border-radius: 99px; background: var(--bg2); color: var(--pri); font-size: 0.72rem; line-height: 1.3rem; text-align: center; }
.lk-chip.an b { background: rgba(255, 255, 255, 0.22); color: #fff; }
.lk-chip-neu { border-style: dashed; color: var(--sub); }
.lk-chip-neu svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.lk-kopfzeile { display: flex; justify-content: center; }
.lk-ansicht { width: min(100%, 20rem); }

/* ═══ Übersicht ═══ */
.lk-start { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.lk-faecher { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; width: min(100%, 24rem); }
.lk-fach { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.lk-fach-saeule { width: 100%; height: 5.5rem; border-radius: 12px; background: var(--bg2); display: flex; align-items: flex-end; overflow: hidden; }
.lk-fach-saeule i { display: block; width: 100%; border-radius: 12px 12px 0 0; transition: height 0.5s var(--ease-out); }
.lk-fach[data-f="1"] i { background: linear-gradient(#f0a17f, #e0715a); }
.lk-fach[data-f="2"] i { background: linear-gradient(#f7c46e, #f0a43a); }
.lk-fach[data-f="3"] i { background: linear-gradient(#9fd2f2, #5aaee8); }
.lk-fach[data-f="4"] i { background: linear-gradient(#5aaee8, #2288cc); }
.lk-fach[data-f="5"] i { background: linear-gradient(#69c891, #3aa76d); }
.lk-fach b { font: 800 1.05rem 'Sora', sans-serif; }
.lk-fach small { font-size: 0.68rem; color: var(--sub); font-weight: 600; }
.lk-start-text { display: flex; flex-direction: column; gap: 0.2rem; }
.lk-start-text b { font: 800 1.3rem 'Sora', sans-serif; letter-spacing: -0.02em; }
.lk-start-text span { font-size: 0.9rem; color: var(--sub); }
.lk-optionen { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem 1.2rem; text-align: left; }
.lk-los { height: 48px; padding: 0 1.6rem; font-size: 0.98rem; border-radius: 14px; }

/* ═══ Runde ═══ */
.lk-runde { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.lk-runde-kopf { width: 100%; display: flex; align-items: center; gap: 0.9rem; }
.lk-fortschritt { flex: 1; height: 8px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.lk-fortschritt i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #5aaee8, #1a6aaa); transition: width 0.4s var(--ease-out); }
.lk-zaehler { font-size: 0.82rem; font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; }
.lk-karte-buehne { width: min(100%, 32rem); perspective: 1200px; }
.lk-karte {
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(.3,.7,.35,1);
  -webkit-tap-highlight-color: transparent;
}
.lk-karte.gedreht { transform: rotateY(180deg); }
.lk-seite-a, .lk-seite-b {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 1.4rem; border-radius: var(--r2); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--card); border: 1px solid var(--border); box-shadow: 0 18px 40px rgba(15, 42, 74, 0.12);
}
.lk-seite-b { transform: rotateY(180deg); background: linear-gradient(150deg, #2288cc, #1a6aaa); border-color: transparent; color: #fff; }
.lk-seite-a small, .lk-seite-b small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sub); }
.lk-seite-b small { color: rgba(255, 255, 255, 0.7); }
.lk-seite-a b, .lk-seite-b b { font: 800 clamp(1.4rem, 5vw, 2.2rem)/1.2 'Sora', sans-serif; letter-spacing: -0.02em; overflow-wrap: anywhere; text-align: center; }
.lk-umdrehen kbd { font: 600 0.7rem 'Inter', sans-serif; padding: 0.1rem 0.4rem; border-radius: 6px; background: var(--bg2); color: var(--sub); }
@media (hover: none) { .lk-umdrehen kbd { display: none; } }
.lk-antworten { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; width: min(100%, 32rem); animation: wzRein 0.3s var(--ease-out); }
.lk-antworten button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 52px; border-radius: 16px;
  font: 700 0.95rem 'Inter', sans-serif; cursor: pointer; border: 2px solid transparent; transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.lk-antworten svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.lk-antworten button:active { transform: scale(0.96); }
.lk-nein { background: #fdecea; color: #c0392b; }
.lk-ja { background: #e5f5ec; color: #23824f; }
.lk-nein:hover { background: #fbdcd8; }
.lk-ja:hover { background: #d3efdf; }
.lk-antworten.ja-vorschlag .lk-ja { border-color: #3aa76d; box-shadow: 0 6px 16px rgba(58, 167, 109, 0.25); }
.lk-antworten.nein-vorschlag .lk-nein { border-color: #e05a47; box-shadow: 0 6px 16px rgba(224, 90, 71, 0.22); }
.lk-tippen { display: flex; gap: 0.5rem; width: min(100%, 32rem); }
.lk-tippen .wz-eingabe { flex: 1; font-size: 1.05rem; }
.lk-tipp-ergebnis { margin: 0; font-size: 0.9rem; font-weight: 600; }
.lk-tipp-ergebnis.richtig { color: #23824f; }
.lk-tipp-ergebnis.falsch { color: #c0392b; }

/* ═══ Ende ═══ */
.lk-ende { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-align: center; }
.lk-ende h2 { margin: 0; font: 800 1.4rem 'Sora', sans-serif; }
.lk-ende p { margin: 0; color: var(--sub); }
.lk-ende-ring {
  --p: 0; width: 7rem; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#3aa76d calc(var(--p) * 1%), var(--bg2) 0);
}
.lk-ende-ring b { width: 78%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font: 800 1.4rem 'Sora', sans-serif; }

/* ═══ Karten bearbeiten ═══ */
.lk-bearbeiten { display: flex; flex-direction: column; gap: 0.9rem; }
.lk-stapelkopf { display: flex; gap: 0.5rem; align-items: center; }
.lk-stapelname {
  flex: 1; min-width: 0; padding: 0.3rem 0.5rem; margin-left: -0.5rem; border-radius: 10px; border: 1.5px solid transparent; background: none;
  font: 800 clamp(1.2rem, 3.5vw, 1.5rem) 'Sora', sans-serif; letter-spacing: -0.02em; color: var(--text); outline: none;
}
.lk-stapelname:hover { background: var(--card2); }
.lk-stapelname:focus { border-color: var(--pri3); background: var(--card); }
.lk-neu { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.5rem; }
.lk-neu .wz-rund { height: auto; width: 46px; }
.lk-import { border-radius: 14px; background: var(--card2); border: 1px solid var(--border); padding: 0.2rem 0.9rem; }
.lk-import summary { cursor: pointer; padding: 0.55rem 0; font-size: 0.86rem; font-weight: 600; color: var(--pri); }
.lk-import[open] { padding-bottom: 0.9rem; }
.lk-import p { margin: 0 0 0.6rem; font-size: 0.82rem; color: var(--sub); line-height: 1.5; }
.lk-import code { padding: 0 0.3rem; border-radius: 5px; background: var(--bg2); }
.lk-import textarea { margin-bottom: 0.6rem; }
.lk-liste { display: flex; flex-direction: column; gap: 0.35rem; }
.lk-zeile { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 0.4rem; align-items: center; transition: opacity 0.2s, transform 0.2s; }
.lk-zeile.neu { animation: wzRein 0.35s var(--ease-out); }
.lk-zeile.geht { opacity: 0; transform: translateX(12px); }
.lk-zeile input {
  min-width: 0; padding: 0.5rem 0.65rem; border-radius: 10px; border: 1.5px solid transparent; background: var(--card2);
  font: 500 0.92rem 'Inter', sans-serif; color: var(--text); outline: none; transition: border-color 0.15s, background 0.15s;
}
.lk-zeile input:focus { border-color: var(--pri3); background: var(--card); }
.lk-fachmarke { width: 24px; height: 24px; border-radius: 8px; background: var(--bg2); color: var(--pri); display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; }
.lk-weg { width: 30px; height: 30px; border-radius: 9px; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lk-weg:hover { color: var(--danger); background: rgba(231, 76, 60, 0.08); }
.lk-weg svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 520px) {
  .lk-neu { grid-template-columns: 1fr auto; }
  .lk-neu input:nth-child(2) { grid-column: 1; }
  .lk-neu .wz-rund { grid-row: 1 / span 2; grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .lk-karte { transition: none; } }
