/* ==========================================================================
   Regenwald – Deine Lernexpedition
   Mobile- & Tablet-optimiertes Designsystem (iPad, Android-Tablets & Smartphones)
   Schweizer Rechtschreibung · Fingerfreundliche Touch-Ziele (min. 44-48px)
   ========================================================================== */

:root {
  --ink: #193d33;
  --muted: #68766b;
  --green: #195540;
  --green-hover: #103e30;
  --light: #e9eee0;
  --cream: #f7f7ee;
  --line: #dde3d5;
  --lime: #d6e5a5;
  --yellow: #f0cc73;
  --red: #ad4436;
  --radius: 20px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  color: inherit;
}

button:disabled {
  cursor: default;
  opacity: 0.65;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #b37b17;
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 1000;
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.skip:focus {
  top: 10px;
}

/* ==========================================================================
   Sidebar & Navigation (Desktop Default)
   ========================================================================== */
.sidebar {
  width: 250px;
  position: fixed;
  inset: 0 auto 0 0;
  background: #eef0e5;
  padding: 32px 20px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 1.2px;
  color: var(--ink);
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 4px;
  color: var(--muted);
}

.brand-icon {
  font-family: Georgia, serif;
  font-size: 44px;
  line-height: 1;
  transform: rotate(-24deg);
  color: var(--green);
}

.side-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--muted);
  font-weight: 700;
  margin: 35px 10px 14px;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 650;
  min-height: 44px;
  transition: background 0.15s ease;
}

nav a span {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

nav a small {
  margin-left: auto;
  font-size: 10px;
  border-radius: 5px;
  background: #d7deca;
  padding: 3px 6px;
  font-weight: 700;
}

nav a:hover {
  background: #e2e8d7;
}

nav a.active {
  background: var(--green);
  color: white;
}

nav a.active small {
  background: #276953;
  color: white;
}

.side-bottom {
  margin-top: auto;
  padding: 24px 8px 0;
  font-size: 12px;
}

.side-bottom p {
  line-height: 1.6;
  color: var(--muted);
  margin: 6px 0 10px;
}

.side-bottom a {
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.companion {
  font-size: 40px;
  margin-bottom: 12px;
}

/* ==========================================================================
   Shell Layout & Topbar
   ========================================================================== */
.shell {
  margin-left: 250px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 1.2px;
  font-weight: 700;
  background: rgba(247, 247, 238, 0.95);
  backdrop-filter: blur(8px);
}

.topbar a {
  font-size: 12px;
  letter-spacing: 0;
  background: #e9eddf;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar a:hover {
  background: #dde4d0;
}

main {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 4% 60px;
  min-height: 75vh;
  flex: 1;
}

main:focus {
  outline: none;
}

footer {
  max-width: 1200px;
  width: 100%;
  padding: 20px 4% 30px;
  margin: auto;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
}

footer span {
  margin: 0 8px;
}

/* ==========================================================================
   Typography & Elements
   ========================================================================== */
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 800;
  color: #5b765a;
  text-transform: uppercase;
  margin: 0 0 12px;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.15;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  margin-bottom: 14px;
}

h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 10px;
}

p {
  line-height: 1.7;
  font-size: 15px;
}

small, .muted {
  color: var(--muted);
}

.lead {
  font-size: 16px;
  max-width: 680px;
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================================================
   Buttons (Optimiert für Kinderhände auf Tablets / Smartphones)
   ========================================================================== */
.btn {
  border: 1px solid var(--line);
  background: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 48px;
  touch-action: manipulation;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.btn:hover {
  background: var(--light);
  border-color: #9bae8d;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 3px 10px rgba(25, 85, 64, 0.25);
}

.btn.primary:hover {
  background: var(--green-hover);
}

.btn.light {
  background: var(--lime);
  color: #1e4231;
  border-color: #c4d78f;
}

.btn.small {
  padding: 8px 14px;
  min-height: 40px;
  font-size: 13px;
}

.btn.danger {
  color: var(--red);
  border-color: #e5b3ac;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ==========================================================================
   Hero Banner & Stats
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border: 1px solid #dbe2cc;
  border-radius: var(--radius);
  overflow: hidden;
  background: #edf0df;
  min-height: 360px;
  box-shadow: 0 4px 16px rgba(25, 61, 51, 0.05);
}

.hero-copy {
  padding: 36px 32px;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  font-size: clamp(28px, 3.5vw, 46px);
  margin-bottom: 16px;
}

.hero-copy h1 em {
  color: #557538;
  font-style: italic;
}

.hero-copy p {
  max-width: 420px;
  color: #485c42;
  font-size: 15px;
}

.hero-art {
  position: relative;
  overflow: hidden;
  background: #1b493c;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-stamp {
  position: absolute;
  right: 16px;
  bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 40px;
  padding: 8px 14px;
  background: rgba(23, 74, 60, 0.9);
  color: #e4edc7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
  padding: 18px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-right: 1px solid var(--line);
  padding: 0 10px;
}

.stat:last-child {
  border: 0;
}

.stat-icon {
  background: #ecf0df;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.stat small {
  font-size: 12px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 18px;
}

.section-heading h2 {
  margin-bottom: 4px;
}

.section-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}

.section-heading a {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-decoration: underline;
  white-space: nowrap;
}

/* ==========================================================================
   Lernstationen Grid & Cards
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.station-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffefa;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(25, 61, 51, 0.04);
}

.station-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(25, 61, 51, 0.08);
  border-color: #9cb393;
}

.station-picture {
  height: 126px;
  display: grid;
  place-items: center;
  background: #e4ead8;
  position: relative;
  overflow: hidden;
}

.station-picture > span {
  font-size: 54px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.station-card .number {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #4a5c3e;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.station-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.station-body .eyebrow {
  font-size: 9px;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}

.station-body h3 {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  min-height: 50px;
  margin-bottom: 8px;
}

.station-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  min-height: 40px;
  margin-bottom: 14px;
  flex: 1;
}

.station-status {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: #48633c;
  font-weight: 600;
}

.progress-track {
  height: 7px;
  background: #e2e7d9;
  border-radius: 10px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: #628c3e;
  border-radius: 10px;
}

.trail-banner {
  margin-top: 28px;
  padding: 24px 28px;
  border-radius: 16px;
  background: #e9eddd;
  display: flex;
  gap: 20px;
  align-items: center;
  border: 1px solid #d4ddc4;
}

.trail-banner .big {
  font-size: 38px;
}

.trail-banner p {
  font-size: 13px;
  margin: 4px 0 0;
  color: var(--muted);
}

.trail-banner .btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* ==========================================================================
   Station Details & Panels
   ========================================================================= */
.page-head {
  margin-bottom: 26px;
}

.page-head h1 {
  max-width: 850px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}

.breadcrumb:hover {
  text-decoration: underline;
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.panel {
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.lesson-section {
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.lesson-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
  margin-bottom: 0;
}

.goalbox {
  background: #eaf0de;
  border-radius: 14px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  border: 1px solid #d1ddbf;
}

.goalbox .eyebrow {
  font-size: 9px;
  margin-bottom: 6px;
}

.remember {
  border-left: 4px solid #8ba159;
  padding: 16px 20px;
  background: #f1f3e7;
  border-radius: 0 10px 10px 0;
  margin: 22px 0;
  font-size: 14px;
  line-height: 1.7;
}

.remember strong {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 4px;
  color: #485c3b;
}

.lesson-aside {
  position: sticky;
  top: 20px;
}

.lesson-aside .btn {
  width: 100%;
  margin-bottom: 10px;
}

.lesson-aside h3 {
  font-size: 15px;
}

.confidence {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.confidence button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 9px;
  min-height: 48px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.confidence button:hover {
  background: var(--light);
}

.confidence button.selected {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.source-list {
  font-size: 13px;
  line-height: 2;
}

.source-list a {
  display: block;
  color: var(--green);
  text-decoration: underline;
}

.label {
  font-size: 13px;
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
}

.select, input[type=text], textarea {
  width: 100%;
  border: 1.5px solid #becbb6;
  border-radius: 10px;
  background: #fffefa;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 15px;
  min-height: 46px;
}

.select:focus, input[type=text]:focus, textarea:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 85, 64, 0.15);
}

textarea {
  min-height: 115px;
  resize: vertical;
}

.note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================================================
   Tier- & Pflanzen-Atlas
   ========================================================================== */
.atlas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.creature {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fafbf2;
}

.creature summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  min-height: 64px;
}

.creature summary::-webkit-details-marker {
  display: none;
}

.creature summary::after {
  content: '+';
  margin-left: auto;
  font-size: 20px;
  color: var(--green);
}

.creature[open] summary::after {
  content: '−';
}

.creature summary img {
  width: 60px;
  height: 70px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.creature .details {
  padding: 0 18px 18px;
  font-size: 14px;
  line-height: 1.7;
}

.creature ul {
  padding-left: 18px;
  margin: 0;
}

.creature li {
  margin-bottom: 8px;
}

.bonus {
  background: #f1eee0;
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
}

.bonus p {
  font-size: 14px;
  margin: 0;
}

/* ==========================================================================
   Weltkarte
   ========================================================================== */
.map-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #e0eeeb;
  overflow: hidden;
}

.world-map {
  display: block;
  width: 100%;
  height: auto;
  touch-action: manipulation;
}

.land {
  fill: #f0eedb;
  stroke: #97a992;
  stroke-width: 1.5;
}

.equator {
  stroke: #b78c3d;
  stroke-dasharray: 5 5;
  stroke-width: 1.5;
}

.map-spot {
  fill: #277d52;
  stroke: white;
  stroke-width: 2.5;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.map-spot:hover, .map-spot:focus {
  fill: #d49c38;
  stroke: #154d3e;
  outline: none;
}

.map-spot.chosen {
  fill: #d49c38;
  stroke: #154d3e;
}

.map-spot.revealed {
  fill: #d49c38;
}

.map-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  font-size: 11px;
  background: #eff4e9;
  font-weight: 600;
}

.map-feedback {
  min-height: 52px;
  font-size: 14px;
  line-height: 1.6;
  padding: 14px 0 0;
}

.map-task {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}

/* ==========================================================================
   Stockwerke (Layers)
   ========================================================================== */
.layers {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #e4ead5;
}

.layer-row {
  width: 100%;
  display: flex;
  text-align: left;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  min-height: 84px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.layer-row:nth-child(2) { background: #bfd3a4; }
.layer-row:nth-child(3) { background: #9db884; }
.layer-row:nth-child(4) { background: #799665; color: #fff; }

.layer-row:hover {
  box-shadow: inset 6px 0 #d9b85e;
}

.layer-row.active {
  box-shadow: inset 6px 0 #b77d1d;
}

.layer-row .tree-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.layer-row strong {
  display: block;
  font-size: 15px;
}

.layer-row small {
  display: block;
  margin-top: 4px;
  color: inherit;
  font-size: 12px;
  opacity: 0.85;
}

.layer-info {
  min-height: 100px;
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
}

/* ==========================================================================
   Tagesablauf
   ========================================================================== */
.day-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.day-buttons button {
  font-size: 26px;
  min-height: 52px;
  padding: 8px 0;
  border: 1px solid var(--line);
  background: #eff1e4;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-buttons button.active {
  border-color: var(--green);
  background: #d6e3b5;
  box-shadow: 0 0 0 2px var(--green);
}

.day-stage {
  background: #e6edda;
  padding: 26px;
  border-radius: 15px;
  min-height: 180px;
}

.day-stage .weather {
  font-size: 44px;
  float: right;
  margin-left: 16px;
}

.day-stage p {
  margin: 8px 0 0;
}

/* ==========================================================================
   Quiz & Prüfungstraining
   ========================================================================== */
.quiz-shell {
  max-width: 820px;
  margin: 0 auto;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.quiz-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
  margin-top: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.quiz-card h2 {
  font-family: inherit;
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.4;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  border: 1.5px solid #d2dcca;
  background: #fafbf5;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  min-height: 52px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option:before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid #aab8a1;
  border-radius: 50%;
  flex-shrink: 0;
}

.options.multi .option:before {
  border-radius: 6px;
}

.option.selected {
  background: #e7eed6;
  border-color: #557d42;
}

.option.selected:before {
  background: #557d42;
  box-shadow: inset 0 0 0 4px white;
}

.option.correct {
  border-color: #3b7b32;
  background: #edf5e5;
}

.option.incorrect {
  border-color: #b35948;
  background: #faeee8;
}

.feedback {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  background: #eaf2de;
  font-size: 14px;
  line-height: 1.6;
}

.feedback.bad {
  background: #f8ede4;
}

.feedback strong {
  display: block;
  margin-bottom: 4px;
}

.quiz-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

/* ==========================================================================
   Order-List (Reihenfolgen & Pfeiltasten für Kinderhände)
   ========================================================================== */
.order-list {
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  counter-reset: item;
}

.order-item {
  padding: 12px 14px;
  background: #f1f3e8;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.order-item:before {
  counter-increment: item;
  content: counter(item);
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #dfe7d2;
  display: grid;
  place-items: center;
}

.order-item span {
  flex: 1;
}

.order-item button {
  border: 1px solid #c6d1be;
  background: white;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.order-item button:hover {
  background: var(--light);
}

.result-big {
  font-family: Georgia, serif;
  font-size: clamp(48px, 8vw, 70px);
  line-height: 1;
  margin: 20px 0;
  color: #3f6e3e;
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.result-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.result-row strong {
  display: block;
  margin-bottom: 4px;
}

.result-row.bad {
  border-left: 4px solid #b86c48;
}

.result-row.good {
  border-left: 4px solid #6b9347;
}

/* ==========================================================================
   Karteikarten (Flashcards)
   ========================================================================== */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filterbar select {
  width: auto;
  max-width: 100%;
}

.flashcard {
  width: 100%;
  border: 1px solid #b6c79e;
  border-radius: 20px;
  background: #e7edda;
  min-height: 260px;
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 4px 14px rgba(25, 61, 51, 0.05);
}

.flashcard .eyebrow {
  margin-bottom: 18px;
}

.flashcard .card-text {
  font-family: Georgia, serif;
  font-size: clamp(22px, 4vw, 29px);
  line-height: 1.5;
  max-width: 650px;
}

.flashcard .hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.flash-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 22px 0;
  flex-wrap: wrap;
}

.goal-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 44px 1fr 140px;
  gap: 14px;
  align-items: center;
}

.goal-row .emoji {
  font-size: 26px;
}

.goal-row p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
}

.goal-row .progress-track {
  margin-top: 6px;
}

.goal-row .goal-score {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   Entdeckerwerkstatt (Drawing & Tabs)
   ========================================================================== */
.workshop-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.workshop-tabs a {
  min-height: 42px;
  font-size: 13px;
  padding: 8px 14px;
}

.workshop-tabs .active {
  background: var(--green);
  color: white;
}

.drawing {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 480px;
  background: #fafbf4;
  border: 1px solid #c7d1bf;
  border-radius: 14px;
  touch-action: none;
  cursor: crosshair;
}

.drawing-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}

.drawing-toolbar label {
  font-size: 13px;
  font-weight: 700;
}

.drawing-toolbar select {
  width: auto;
  max-width: 220px;
  min-height: 42px;
}

.drawing-toolbar input[type=color] {
  width: 44px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.source-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  text-decoration: none;
  font-size: 13px;
  transition: transform 0.15s ease;
}

.source-card:hover {
  transform: translateY(-2px);
}

.source-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  margin-bottom: 8px;
}

.notice {
  padding: 18px 20px;
  background: #f0ead8;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 22px;
}

.checklist {
  display: grid;
  gap: 12px;
  font-size: 14px;
}

.checklist label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.5;
  cursor: pointer;
}

.checklist input {
  margin-top: 3px;
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}

#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #143f32;
  color: white;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

#toast.show {
  opacity: 1;
}

.source-view img {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.match-grid label {
  font-size: 14px;
  line-height: 1.5;
  display: block;
}

.match-grid select {
  margin-top: 8px;
}

/* ==========================================================================
   TABLET & MOBILE BREAKPOINTS (iPad, Tablets, Smartphones)
   ========================================================================== */

/* 1. Große Tablets (iPad Landscape & kleine Laptops, bis 1024px) */
@media (max-width: 1024px) {
  .sidebar {
    width: 220px;
    padding: 24px 14px;
  }
  .shell {
    margin-left: 220px;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-art {
    height: 220px;
  }
  .lesson-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .lesson-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .sources-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2. Tablet Portrait & Mobile (<= 880px) */
@media (max-width: 880px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 12px 16px 8px;
    border: 0;
    border-bottom: 1.5px solid var(--line);
    background: rgba(238, 240, 229, 0.98);
    backdrop-filter: blur(10px);
    z-index: 100;
  }

  .brand {
    font-size: 16px;
  }

  .brand-icon {
    font-size: 34px;
  }

  .brand small {
    display: none;
  }

  .side-label, .side-bottom {
    display: none;
  }

  nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 10px;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  nav a {
    white-space: nowrap;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: var(--radius-pill);
    background: #e2e8d7;
    flex-shrink: 0;
  }

  nav a span {
    font-size: 16px;
  }

  nav a small {
    display: none;
  }

  nav a.active {
    background: var(--green);
    color: white;
  }

  .shell {
    margin-left: 0;
  }

  .topbar {
    min-height: 52px;
    padding: 6px 4%;
    font-size: 10px;
  }

  .topbar span {
    display: none;
  }

  .topbar a {
    font-size: 12px;
    padding: 7px 12px;
  }

  main {
    padding: 24px 4% 48px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .match-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .atlas {
    grid-template-columns: 1fr;
  }
}

/* 3. Smartphones (< 600px) */
@media (max-width: 600px) {
  h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .hero-copy {
    padding: 24px 18px;
  }

  .hero-art {
    height: 180px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    justify-content: flex-start;
    padding-left: 20px;
  }

  .stat:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .station-picture {
    height: 110px;
  }

  .station-body h3 {
    min-height: auto;
  }

  .station-body p {
    min-height: auto;
  }

  .lesson-aside {
    grid-template-columns: 1fr;
  }

  .quiz-card {
    padding: 22px 16px;
  }

  .quiz-controls {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .quiz-controls .btn {
    width: 100%;
  }

  .actions {
    flex-direction: column;
    width: 100%;
  }

  .actions .btn {
    width: 100%;
  }

  .trail-banner {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .trail-banner .big {
    display: none;
  }

  .trail-banner .btn {
    margin-left: 0;
    width: 100%;
  }

  .drawing-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .drawing-toolbar select, .drawing-toolbar .btn {
    width: 100%;
    max-width: 100%;
  }

  .day-buttons button {
    font-size: 22px;
    min-height: 48px;
  }

  .sources-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
