/* Lernnest – Schüler-Bereich (schueler.html, aufgabe.html). Ergänzt css/style.css. */

.page--schueler .container,
.page--aufgabe .container { max-width: 980px; }
.page--aufgabe .container { max-width: 820px; }
.s-loading { text-align: center; padding: 3rem 0; font-size: 1.2em; }
.s-center { text-align: center; }

/* ---------- Login ---------- */
.s-login { max-width: 680px; margin: 1.5rem auto; align-items: stretch; }
.s-me { display: flex; align-items: center; justify-content: center; gap: .6em; font-size: 1.4em; min-height: 72px; }
.s-me__avatar { font-size: 1.6em; line-height: 1; }
.s-or { text-align: center; margin: .2rem 0 0; }
.s-nameform { gap: .6rem; flex-wrap: wrap; align-items: center; }
.s-name-input { flex: 1 1 240px; min-height: 64px; font-size: 1.5em; padding: .3em .7em; }

.s-dots { display: flex; justify-content: center; gap: 1rem; margin: .4rem 0; }
.s-dot {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px dashed var(--line); background: var(--surface);
  display: grid; place-items: center; font-size: 2.1rem; line-height: 1;
  transition: transform .2s, background .2s;
}
.s-dot--on { border-style: solid; border-color: var(--peach); background: var(--peach-soft); transform: scale(1.05); }

.s-emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.s-emoji {
  min-height: 84px; font-size: 2.8rem; line-height: 1; cursor: pointer;
  border-radius: 20px; border: 2px solid var(--line);
  background: var(--surface); box-shadow: 0 3px 0 var(--line);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .12s;
}
.s-emoji:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.s-emoji:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.s-emoji:disabled { opacity: .55; }
.s-emoji--pop { animation: s-pop .3s ease; }
.s-code-actions { gap: .6rem; flex-wrap: wrap; }
@keyframes s-pop { 50% { transform: scale(1.15); } }

/* ---------- Begrüßung ---------- */
.s-hello { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.s-hello .mascot { flex: 1 1 380px; }
.s-avatar {
  font-size: 3.6rem; line-height: 1; width: 96px; height: 96px; flex: 0 0 96px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--peach);
}

/* ---------- Wochenplan ---------- */
.s-plan, .s-todo, .s-garden, .s-hello { margin-bottom: 1rem; }
.s-weeknav { align-items: center; gap: .6rem; }
.s-weeknav__label { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; }
.s-weeknav__label .card__title { margin: 0; }
.s-navbtn { min-width: 56px; min-height: 56px; font-size: 1.3em; }

.s-progress { display: flex; align-items: center; gap: .8rem; margin: .8rem 0; }
.s-progress .progress { flex: 1; }
.s-progress__text { font-weight: 600; white-space: nowrap; }

@media (min-width: 900px) { .s-week { grid-template-columns: repeat(var(--days, 5), minmax(0, 1fr)); } }
.s-week .week__day { min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.s-week .week__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; }
.s-day__name { font-weight: 700; font-size: 1.1em; }
.s-day__date { opacity: .7; font-size: .9em; }
.s-day__free { text-align: center; opacity: .6; }

.s-week .week__item { min-height: 56px; }
.s-item__icon { font-size: 1.35em; flex: 0 0 auto; line-height: 1; }
.s-item__title { flex: 1; min-width: 0; overflow-wrap: anywhere; hyphens: auto; line-height: 1.25; }
.s-item__state { font-size: .72em; opacity: .75; position: absolute; right: .5rem; bottom: .15rem; }

.s-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.s-anytime { margin-top: 1rem; }
.s-anytime__title { font-size: 1.1em; margin: 0 0 .5rem; }

/* Garten */
.s-garden__bed {
  display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; align-items: flex-end;
  padding: .6rem; min-height: 72px; border-radius: 16px;
  background: linear-gradient(to top, #c9a57a 0 18px, transparent 18px);
}
.s-plant { font-size: 2.2rem; line-height: 1; transform-origin: bottom center; }
.s-plant--bloom { font-size: 2.8rem; animation: s-grow .8s ease both; }
@keyframes s-grow { from { transform: scale(.3); } to { transform: scale(1); } }

.s-tiles { margin: 1rem 0 2rem; }
.s-tiles .tile { font: inherit; cursor: pointer; }

/* Einstellungen */
.s-pref { margin: .4rem 0; }
.s-pref__title { font-weight: 700; margin-bottom: .35rem; }
.s-pref__chips { flex-wrap: wrap; gap: .5rem; align-items: center; }
.s-pref .chip { min-height: 48px; padding: .3em 1em; font-size: 1em; cursor: pointer; }

/* iPad hochkant / schmal: Tage untereinander */
@media (max-width: 760px) {
  .s-emoji-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Aufgabe ---------- */
.a-main { padding-bottom: 3rem; }
.a-title { font-size: 1.7em; margin: 0; }
.a-title:focus, .a-question:focus { outline: none; }
.a-go { align-self: center; min-width: 260px; text-align: center; }
.a-resume { font-size: 1.15em; text-align: center; }
.s-example-title { font-weight: 700; margin-bottom: .4rem; }

.a-head { margin-bottom: 1rem; padding-top: .8rem; padding-bottom: .8rem; }
.a-head__row { align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.a-count { font-weight: 700; font-size: 1.15em; }

.a-stage { min-height: 260px; }
.a-q-row { align-items: center; gap: .6rem; margin-bottom: 1rem; }
.a-question { font-size: 1.9em; margin: 0; line-height: 1.25; flex: 1; }
.a-question--small { font-size: 1.4em; }

.a-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.a-options .option { min-height: 80px; font-size: 1.5em; }

.a-sentence { font-size: 1.8em; line-height: 2.1; margin: .5rem 0 1rem; overflow-wrap: anywhere; }
.a-sentence .gap-input { font-size: 1em; width: var(--w, 8ch); max-width: 100%; min-height: 1.6em; text-align: center; }
.gap-input--solution { border-color: var(--sky) !important; background: var(--sky-soft) !important; }
.a-actions { gap: .6rem; flex-wrap: wrap; align-items: center; }

.a-feedback:empty { display: none; }
.a-feedback { margin-top: 1rem; }

/* Zuordnen */
.a-card {
  display: flex; align-items: center; justify-content: center; gap: .8rem;
  margin: 0 auto 1.4rem; max-width: 420px; min-height: 110px; padding: 1rem 1.4rem;
  font-size: 2em; font-weight: 700; border-radius: 20px;
  background: var(--peach-soft); border: 3px solid var(--peach);
  box-shadow: 0 6px 0 var(--line);
  transition: transform .35s, opacity .35s;
}
.a-card--gone { transform: translateY(40px) scale(.8); opacity: .3; }
.a-baskets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.a-basket { display: flex; flex-direction: column; align-items: center; gap: .5rem; min-height: 120px; }
.a-basket__name { font-size: 1.4em; font-weight: 700; }
.a-basket__items { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.a-chip { font-size: .75em; padding: .1em .6em; border-radius: 999px; background: rgba(0, 0, 0, .07); }
.a-chip--new { animation: s-pop .4s ease; }

/* Praxis */
.a-steps-done { list-style: none; padding: 0; margin: 0 0 1rem; opacity: .7; }
.a-steps-done li { padding: .2rem 0; }
.a-step .a-question { font-size: 1.7em; }
.a-check { font-size: 1.5em; min-height: 72px; display: inline-flex; align-items: center; gap: .6em; cursor: pointer; }
.a-check input { width: 2em; height: 2em; }

/* Tippen (einfacher Modus) */
.a-typeline {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 2em; letter-spacing: .08em;
  padding: .6rem 1rem; border-radius: 14px; background: var(--peach-soft); margin-bottom: 1rem; white-space: pre-wrap;
}
.a-typeinput { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8em; width: 100%; min-height: 64px; }

/* Ende / Zusammenfassung */
.a-finish { text-align: center; align-items: center; }
.a-flower { font-size: 1.2em; }
.a-flower span { font-size: 1.6em; vertical-align: middle; }
.a-summary { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.a-summary li { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; border-radius: 12px; background: rgba(0, 0, 0, .04); }
.a-summary li > span:nth-child(2) { flex: 1; }
.a-summary__mark { font-size: 1.3em; }
.a-summary__note { font-size: .9em; white-space: nowrap; }

/* Wackeln bei falscher Antwort */
.a-shake { animation: a-shake .45s ease; }
@keyframes a-shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}

/* Ruhig-Modus / reduzierte Bewegung */
html[data-motion="ruhig"] .s-emoji--pop, html[data-motion="ruhig"] .s-plant--bloom,
html[data-motion="ruhig"] .a-shake, html[data-motion="ruhig"] .a-chip--new { animation: none; }
html[data-motion="ruhig"] .a-card { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .s-emoji--pop, .s-plant--bloom, .a-shake, .a-chip--new { animation: none; }
}

/* Sichtbarer Fokus für alles Klickbare */
.page--schueler :is(a, button, input, label):focus-visible,
.page--aufgabe :is(a, button, input, label):focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.week__item.week__item--done > span.s-item__icon:not(.badge) { text-decoration: none; }
@media (min-width: 900px) {
  .week__item > .s-item__icon { position: absolute; top: .4rem; right: .5rem; }
  .s-item__title { width: 100%; }
}
.a-feedback::before { display: none; }
/* Tippen: die Tipp-Komponente zeigt Zeile + Fortschritt selbst an */
.a-head--compact .a-count, .a-head--compact .progress { display: none; }
.a-head--compact .a-head__row { margin-bottom: 0; }
