/* Originalschrift: separate, unveränderte TTF-Dateien. Lizenz siehe schriften/OFL.txt. */
@font-face {
  font-family: "Tardi Original";
  src: url("./schriften/GRUSCHUDRU_BAS.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Tardi Original";
  src: url("./schriften/GRUSCHUDRU_BAS_BOLD.TTF") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 20px "Tardi Original","Gruschudru basic",Arial,sans-serif;
  color: #17212a;
  background: #FAF8F5;
}
main {
  max-width: 1100px;
  margin: auto;
  padding: clamp(16px,4vw,42px);
  min-height: 100vh;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 18px;
}
h1 {
  font-size: clamp(25px,4vw,38px);
  margin: 0;
}
h2 {
  font-size: clamp(24px,4vw,36px);
}
button,select,input {
  font: inherit;
  padding: 12px 18px;
  border: 1px solid #b6c2cc;
  border-radius: 9px;
  background: white;
  color: #17212a;
}
button {
  cursor: pointer;
  min-height: 48px;
}
button.primary {
  background: #24577e;
  color: #fff;
  border-color: #24577e;
}
button:focus-visible,select:focus-visible,input:focus-visible {
  outline: 3px solid #0073bb;
  outline-offset: 3px;
}
button:disabled {
  opacity: .5;
  cursor: default;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
}
.sentence {
  font-size: clamp(30px,5.1vw,60px);
  line-height: 1.45;
  overflow-wrap: break-word;
  hyphens: none;
  text-align: center;
  margin: clamp(38px,9vh,115px) 0;
  min-height: 2em;
}
.center {
  text-align: center;
}
.progress {
  display: flex;
  gap: 5px;
  margin: 16px 0 5px;
}
.progress span {
  height: 10px;
  border-radius: 3px;
  background: #dce1e5;
  flex: 1;
}
.progress .done {
  background: #377c5a;
}
.muted {
  color: #52616d;
  font-size: 16px;
}
.panel {
  background: white;
  border: 1px solid #d8dfe4;
  border-radius: 14px;
  padding: 24px;
  margin: 24px 0;
}
.error {
  color: #a21b26;
  font-size: 17px;
  min-height: 1.4em;
}
.hidden {
  display: none!important;
}
input[type=password] {
  width: 155px;
  text-align: center;
}
a {
  color: #24577e;
}
.gate form {
  justify-content: center;
}
.gate .controls {
  justify-content: center;
}
@media(max-width:600px) {
  main {
    padding: 16px;
  }
  .controls {
    gap: 8px;
  }
  .sentence {
    margin: 45px 0;
  }
  header {
    font-size: 16px;
  }
}
.heftmotiv {
  display: grid;
  grid-template-columns: 32.53% 15.06% 11.45% 32.53%;
  column-gap: 2.5%;
  align-items: center;
  justify-content: center;
  width: min(100%,500px);
  margin: 16px auto 20px;
  aspect-ratio: 1660/480;
}
.heftmotiv img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.heftmotiv .heftkind {
  transform: scaleX(-1);
}
.heftmotiv.gespiegelt {
  transform: scaleX(-1);
}
.packet-choice {
  justify-content: center;
}
.packet-choice button {
  min-width: 145px;
}
.gate .panel .controls {
  justify-content: center;
}
.teacher-panel {
  background: #f2f2f2;
  padding: 20px 16px;
  margin: 24px 0 0;
}
.teacher-choices {
  width: min(100%,340px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 12px;
}
.teacher-choices select {
  grid-column: 1/-1;
  width: 100%;
  text-align: center;
  text-align-last: center;
  min-height: 48px;
  background: white;
  color: #17212a;
}
.teacher-choices button {
  width: 100%;
  min-width: 0;
  white-space: pre-line;
  line-height: 1.3;
  padding: 12px 6px;
}
.teacher-panel .teacher-next {
  display: flex;
  justify-content: center;
  margin: 20px 0 0;
}
/* Schüleroberfläche: Schriftgröße nur für Übungssätze, Gruppierung der Fortschrittsanzeige. */
:root {
  --sentence-scale: 1;
}
.panel {
  background: #FAF8F5;
}
.teacher-panel {
  background: #f2f2f2;
}
header .font-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
header h1 {
  flex: 1;
  min-width: 0;
}
header.task-header h1 {
  font-size: clamp(21.25px,3.4vw,32.3px);
}
.font-controls button {
  width: 56px;
  min-height: 32px;
  height: 32px;
  line-height: 1;
  padding: 0;
  border-radius: 20px;
  box-shadow: none;
  background: #fff;
  touch-action: manipulation;
  flex: none;
}
.font-controls button:disabled {
  opacity: .42;
}
.sentence {
  font-size: clamp(calc(30px * var(--sentence-scale)),calc(5.1vw * var(--sentence-scale)),calc(60px * var(--sentence-scale)));
}
.progress {
  align-items: center;
  min-height: 20px;
  margin-top: 12px;
}
.progress .group-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 20px;
  background: #939393;
  border-radius: 0;
}
.progress-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.progress-caption .stage-label {
  text-align: right;
  margin-left: auto;
}
.packet-choice {
  gap: 36px;
}
.heftmotiv {
  grid-template-columns: 31% 21% 9% 31%;
  column-gap: 2.666666%;
  aspect-ratio: auto;
  min-height: 0;
}
.heftmotiv img {
  max-height: 140px;
}
.heftmotiv .heft {
  max-height: none;
}
.heftmotiv .heftpfeil {
  max-height: none;
}
.pin-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: center;
  align-items: stretch;
}
.pin-form input[type=password] {
  width: 135px;
  min-width: 0;
  max-width: 50%;
  border-radius: 8px 0 0 8px;
  min-height: 48px;
}
.pin-form button.primary {
  border-radius: 0 8px 8px 0;
  margin-left: -1px;
  min-height: 48px;
  white-space: nowrap;
}
.teacher-panel .teacher-next {
  width: min(100%,340px);
  margin: 20px auto 0;
}
.teacher-next button {
  width: 100%;
  white-space: normal;
}
@media(max-width:600px) {
  .packet-choice {
    gap: 24px;
  }
  .packet-choice button {
    min-width: 0;
  }
  .font-controls button {
    width: 48px;
  }
  .heftmotiv img {
    max-height: 100px;
  }
}

