/* Epochia – Aussehen. Hell, warm, fröhlich; große runde Knöpfe für den Finger. */

:root {
  color-scheme: only light;   /* kein automatischer Dunkelmodus des Handy-Browsers (machte Karten und Knöpfe schwarz) */
  --green: #4caf50;
  --green-dark: #2e7d32;
  --red: #e0533f;
  --gold: #f2b632;
  /* Farbwelt je Zeitalter (Plan docs/plan-design.md). applyEpochTheme setzt <html data-zeit="…">. Standard: Steinzeit. */
  --title-band: url(../bilder/epochia/oberflaeche/titelband-stein.webp);   /* gemaltes Titelband */
  --bar-top: url(../bilder/epochia/oberflaeche/leiste-oben-stein.webp);   /* gemalte obere Leiste */
  --bar-bottom: url(../bilder/epochia/oberflaeche/leiste-unten-stein.webp);   /* gemalte untere Leiste */
  --bar: #f3e9d0;        /* Leisten, helle Seite */
  --bar-2: #e6d8b4;      /* Leisten, dunklere Seite */
  --line: #b9a878;       /* Kanten */
  --line-soft: #e4dbc0;  /* feine Rahmen um Karten */
  --accent: #6f9e4f;     /* Überschriften und Balken */
  --accent-2: #e8843a;   /* zweite Farbe */
  --page: #fbf7ea;       /* Hintergrund der Seiten */
  --tint: #eef4dc;       /* getönte Flächen */
  --ink: #3a3a22;
  --ink-soft: #6e6a4a;
  --paper: #fffdf6;      /* Karten */
  --paper-dark: var(--tint);
  --wood: var(--accent);
  --wood-dark: var(--line);
  --shadow-rgb: 50, 50, 30;
  --shadow: 0 2px 7px rgba(var(--shadow-rgb), 0.22);
  --frame-bg: linear-gradient(#fff, var(--paper));
  --frame-shadow: 0 3px 12px rgba(var(--shadow-rgb), 0.3);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);   /* Kerbe oder Kamera-Insel oben (Handy hochkant, Vollbild) */
}

html[data-zeit=kupfer] { --title-band: url(../bilder/epochia/oberflaeche/titelband-kupfer.webp); --bar-top: url(../bilder/epochia/oberflaeche/leiste-oben-kupfer.webp); --bar-bottom: url(../bilder/epochia/oberflaeche/leiste-unten-kupfer.webp); --bar: #e4f1ea; --bar-2: #cde4d9; --line: #86b9a7; --line-soft: #d3e6dd; --accent: #2f8c7d; --accent-2: #d9794a; --page: #f6fbf7; --tint: #fbe9dd; --ink: #23423c; --ink-soft: #52756d; --paper: #ffffff; --shadow-rgb: 30, 60, 55; }
html[data-zeit=bronze] { --title-band: url(../bilder/epochia/oberflaeche/titelband-bronze.webp); --bar-top: url(../bilder/epochia/oberflaeche/leiste-oben-bronze.webp); --bar-bottom: url(../bilder/epochia/oberflaeche/leiste-unten-bronze.webp); --bar: #fdf1c4; --bar-2: #f8e298; --line: #d9b24d; --line-soft: #f0e2b0; --accent: #2f83ba; --accent-2: #d99a1e; --page: #fffcef; --tint: #e3f2fb; --ink: #3f3412; --ink-soft: #77693a; --paper: #ffffff; --shadow-rgb: 70, 55, 15; }
html[data-zeit=eisen]  { --title-band: url(../bilder/epochia/oberflaeche/titelband-eisen.webp); --bar-top: url(../bilder/epochia/oberflaeche/leiste-oben-eisen.webp); --bar-bottom: url(../bilder/epochia/oberflaeche/leiste-unten-eisen.webp); --bar: #e6eef4; --bar-2: #d0dee8; --line: #8fa8ba; --line-soft: #d5e0e8; --accent: #3f7d51; --accent-2: #b5473c; --page: #f6f9fb; --tint: #e4f0e6; --ink: #27353f; --ink-soft: #566a78; --paper: #ffffff; --shadow-rgb: 35, 50, 62; }
html[data-zeit=antike] { --title-band: url(../bilder/epochia/oberflaeche/titelband-eisen.webp); --bar-top: url(../bilder/epochia/oberflaeche/leiste-oben-eisen.webp); --bar-bottom: url(../bilder/epochia/oberflaeche/leiste-unten-eisen.webp); --bar: #f6ede4; --bar-2: #ead8c6; --line: #c49a7a; --line-soft: #eddccd; --accent: #a8432f; --accent-2: #3f6f8c; --page: #fcf8f3; --tint: #f3e3d6; --ink: #3b2a22; --ink-soft: #75584a; --paper: #ffffff; --shadow-rgb: 70, 45, 30; }   /* Antike: Marmor und roter Ziegel, Leisten vorläufig aus der Eisenzeit */

/* Fredoka (SIL Open Font License, siehe fonts/OFL.txt) – liegt im Spiel, damit sie auch offline da ist */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/fredoka.woff2) format('woff2');
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #3d7a2a;
  font-family: 'Fredoka', "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}

.hidden { display: none !important; }

button { font: inherit; color: inherit; cursor: pointer; }

.btn {
  border: 0;
  border-radius: 14px;
  padding: 9px 16px;
  background: var(--paper-dark);
  box-shadow: 0 2px 0 var(--line);
  font-weight: bold;
  margin: 4px;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.btn:disabled { opacity: 0.45; }
.btn.primary { background: linear-gradient(#7ed957, #4caf50); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); }
.btn.danger { background: linear-gradient(#f37b65, #d9472f); color: #fff; }
.btn.big { font-size: 22px; padding: 14px 30px; border-radius: 18px; }
.btn.small { font-size: 12px; padding: 5px 10px; }

.good { color: var(--green-dark); }
.bad { color: #c0392b; }
.warn { color: #b06a00; }

.emoji, .ic.emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ic { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; vertical-align: middle; object-fit: contain; }
.ic.mini { width: 15px; height: 15px; line-height: 15px; font-size: 12px; margin-right: 1px; vertical-align: -3px; }
.ic.big { width: 46px; height: 46px; line-height: 46px; font-size: 32px; }
.ic.huge { width: 72px; height: 72px; line-height: 72px; font-size: 52px; flex: none; }

/* ---------- Ladefenster und Startseite ---------- */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#ffd89b 0%, #ffb37a 35%, #8fd0ef 36%, #bfe6f7 60%, #8ccf5e 61%, #5fae45 100%);
  background-size: cover;
  background-position: center;
  z-index: 50;
}
#loading { background: radial-gradient(circle at 50% 70%, #ffcf7a 0%, #f4934a 30%, #6b8fc0 75%, #3c5f92 100%); background-size: cover; background-position: center; }

.logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 11vw, 96px);
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff7d6;
  -webkit-text-stroke: 2px #7a4e2a;
  text-shadow: 0 4px 0 #7a4e2a, 0 8px 18px rgba(0, 0, 0, 0.35);
}
.logo img { display: block; width: min(560px, 62vw); max-height: 34vh; max-height: 34dvh; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.tagline { margin: 4px 0 18px; color: #fff; font-weight: bold; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45); }
.load-track { width: min(420px, 70vw); height: 16px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); overflow: hidden; margin-top: 18px; border: 2px solid rgba(255, 255, 255, 0.6); }
#loading-bar { height: 100%; width: 0; background: linear-gradient(#ffe47a, #f2a832); transition: width 0.2s; }
#loading-text { color: #fff; font-style: italic; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.start-buttons { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* Startseite auf großen Bildschirmen: Logo oben im Himmel statt über der Burg, alles größer */
@media (min-width: 900px) and (min-height: 620px) {
  #start { justify-content: flex-start; padding-top: 5vh; }
  #start .logo img { width: min(860px, 50vw); max-height: 36vh; }
  #start .tagline { font-size: clamp(22px, 1.7vw, 32px); margin: 8px 0 22px; text-shadow: 0 2px 0 #4a2c10, 0 0 10px rgba(var(--shadow-rgb), 0.75), 0 3px 12px rgba(var(--shadow-rgb), 0.7); }
  #start .start-buttons { gap: 14px; }
  #start #start-continue { font-size: clamp(26px, 2vw, 36px); padding: 16px 52px; }
  #start .start-buttons .btn:not(#start-continue) { font-size: clamp(18px, 1.3vw, 24px); padding: 11px 30px; }
}
.start-note { position: absolute; bottom: 26px; font-size: 12px; color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); margin: 0; }
.start-umzug { margin-top: 14px; padding: 10px 16px; max-width: min(420px, calc(100vw - 32px)); text-align: center; font-size: 14px; line-height: 1.5;
  background: rgba(255, 248, 230, 0.94); color: #4a3520; border-radius: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.start-umzug a { color: #8a4b12; font-weight: bold; }
.start-umzug .btn { margin-top: 8px; }
.start-konto { margin-top: 2px; text-align: center; }
.start-konto .btn { font-size: 15px; padding: 7px 18px; }
.start-konto-schild { border: none; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 15px; color: #4a3520;
  background: rgba(255, 248, 230, 0.92); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); cursor: pointer; }
.start-copy { position: absolute; bottom: 8px; font-size: 10px; color: rgba(255, 255, 255, 0.75); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); margin: 0; }

/* ---------- Spiel ---------- */

#game { position: fixed; inset: 0; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: calc(5px + var(--safe-t)) calc(6px + var(--safe-r)) 9px calc(6px + var(--safe-l));
  pointer-events: none;
  /* später gemalt: Stoff oder helles Leder je Zeitalter (--bar-top) */
  background: var(--bar-top, none) bottom left / auto 100% repeat-x, linear-gradient(var(--bar), var(--bar-2));
  border-bottom: 2px solid var(--line);   /* feste Höhe: Naht bleibt klein, auch wenn die Leiste zweizeilig ist */
  box-shadow: 0 3px 8px rgba(var(--shadow-rgb), 0.35);
}
.chips { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; pointer-events: auto; flex: 1 1 auto; min-width: 0; }
.chips.right { flex: none; flex-wrap: nowrap; }
.chip {
  display: flex; align-items: center; gap: 3px;
  border: 0; border-radius: 20px;
  padding: 3px 9px 3px 4px;
  background: rgba(255, 246, 227, 0.92);
  box-shadow: var(--shadow);
  font-size: 14px;
}
.chip b { min-width: 18px; font-variant-numeric: tabular-nums; }
.chip.empty b { color: var(--red); }
.chip.full b { color: #b07800; }
.chip.warned { background: #ffe0d0; box-shadow: var(--shadow), inset 0 0 0 2px var(--red); }
.chip.warned b { color: var(--red); }
.lager-chip { padding-left: 6px; }
.chip { background: var(--paper); }

/* Lager: helle Karte je Bereich, je Ware ein Balken für den Füllstand */
.lager { width: 100%; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 0 14px; }
.lager-hof { border-radius: 18px; padding: 10px 12px 12px; color: #fff8e8;
  background: radial-gradient(120% 90% at 50% 0%, #a27a4c, #7a5632 70%, #644427); border: 3px solid #5a3b1e;
  box-shadow: inset 0 0 0 2px rgba(255, 230, 180, 0.25), var(--shadow); }
.hof-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 8px; }
.hof-kopf h3 { margin: 0; font-size: 17px; color: #fff3d6; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.hof-zahl { font-size: 14px; color: #f3e1bd; } .hof-zahl b { font-size: 18px; color: #fff; }
.hof-plaetze { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; justify-items: center; }
.hof-platz { width: 100%; max-width: 300px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 6px; border-radius: 10px;
  background: #b8925f; border: 4px solid #6b4a2a; box-shadow: inset 0 2px 6px rgba(60, 35, 10, 0.45), 0 2px 0 #4a3018; }
.hof-feld { position: relative; aspect-ratio: 1; border: 0; border-radius: 6px; padding: 4px 4px 2px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: linear-gradient(#cfae7c, #c09a66); box-shadow: inset 0 0 0 1px rgba(90, 60, 25, 0.35); color: #3d2a12; }
.hof-feld .ic { width: 62%; height: auto; aspect-ratio: 1; object-fit: contain; font-size: 28px; line-height: 1.2; filter: drop-shadow(0 2px 2px rgba(60, 35, 10, 0.4)); }
.hof-feld b { font-size: 14px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 rgba(255, 240, 210, 0.7); }
.hof-feld.frei { justify-content: center; font-size: 12px; font-style: italic; color: rgba(70, 45, 15, 0.5);
  background: repeating-linear-gradient(45deg, #c4a06d 0 6px, #bd9864 6px 12px); }
.hof-feld.voll { box-shadow: inset 0 0 0 2px var(--gold); }
.hof-feld:active { transform: translateY(1px); }
.hof-stand { position: absolute; right: 3px; top: 4px; bottom: 4px; width: 4px; border-radius: 2px; background: rgba(60, 35, 10, 0.2); display: flex; align-items: flex-end; }
.hof-stand i { display: block; width: 100%; border-radius: 2px; background: #6f9e4f; }
.hof-feld.voll .hof-stand i { background: var(--gold); }
.hof-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hof-fuss small { font-size: 13px; color: #f3e1bd; }
.lager-hof.eng .hof-fuss small { color: #ffe08a; font-weight: 700; }
.lager-speicher-reihe { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.lager-speicher { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px 11px; border-radius: 14px; overflow: hidden;
  background: var(--paper); border: 2px solid var(--line-soft); box-shadow: var(--shadow); }
.sp-ic { display: flex; } .sp-ic .ic { width: 34px; height: 34px; font-size: 26px; line-height: 34px; }
.sp-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; } .sp-text small, .sp-zahl small { font-size: 12px; color: var(--ink-soft); }
.sp-zahl { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; } .sp-zahl b { font-size: 17px; font-variant-numeric: tabular-nums; }
.lager-speicher.voll .lager-fill i { background: var(--gold); }
.lager-group { background: var(--paper); border: 2px solid var(--line-soft); border-radius: 16px; padding: 8px 10px 10px; box-shadow: var(--shadow); }
.lager-group h3 { margin: 0 2px 7px; font-size: 16px; color: var(--accent); }
.lager-group.achtung { border-color: var(--red); background: #fff4f0; }
.lager-group.achtung h3 { color: #b83a26; }
.lager-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.lager-row { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; border: 0; border-radius: 10px; padding: 5px 9px 9px 6px; background: var(--page); color: var(--ink); text-align: left; overflow: hidden; }
.lager-row .ic { width: 30px; height: 30px; line-height: 30px; font-size: 22px; flex: none; }
.lager-name { flex: 1 1 auto; min-width: 0; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.lager-row em { font-style: normal; font-size: 13px; font-variant-numeric: tabular-nums; }
.lager-row b { min-width: 34px; text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; }
.lager-row small { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.lager-mark { font-style: normal; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 0 6px; line-height: 16px; }
.lager-mark.voll { background: #fff0bf; color: #8a6200; }
.lager-mark.knapp { background: var(--red); color: #fff; }
.lager-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(var(--shadow-rgb), 0.1); }
.lager-fill i { display: block; height: 100%; background: var(--accent); }
.lager-row.voll .lager-fill i { background: var(--gold); }
.lager-row.knapp .lager-fill i { background: var(--red); }
.lager-row.leer { opacity: 0.55; }
.lager-row:active { transform: translateY(1px); }

/* Lagerfenster */

#side {
  position: absolute;
  left: calc(6px + var(--safe-l));
  top: calc(var(--top-h, 40px) + 6px);
  bottom: calc(var(--bar-h, 90px) + 40px);   /* nie unter Bauleiste und Reiter (V207: Reiter überdeckten den letzten Knopf) – reicht der Platz nicht, kommt eine zweite Spalte */
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  pointer-events: none;
}
#side > * { pointer-events: auto; }
.side-btn {
  position: relative;
  width: 58px; height: 54px;
  border: 0; border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--line), var(--shadow);
  font-size: 22px;
  color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.side-btn span { font-size: 10px; font-weight: bold; }
.side-btn .ic { width: 30px; height: 30px; }
.side-prog { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.side-prog i { display: block; height: 100%; width: 0; background: linear-gradient(#9be067, #4caf50); }
.side-btn:active { transform: translateY(2px); }
.badge, .dot {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 12px; font-style: normal; font-weight: bold;
  line-height: 20px; text-align: center;
}
.dot { min-width: 14px; height: 14px; background: var(--gold); border: 2px solid #fff; }

#research-pill {
  position: absolute;
  top: 46px; left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border-radius: 16px;
  padding: 4px 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  white-space: nowrap;
}
.mini-bar { display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.15); vertical-align: middle; overflow: hidden; }
.mini-bar.wide { width: 120px; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(#9be067, #4caf50); }

#info-pop {
  position: absolute;
  max-width: 320px;
  background: var(--paper);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: bold;
  border: 2px solid var(--paper-dark);
}
#info-pop small { display: block; font-weight: normal; color: var(--ink-soft); font-size: 11px; margin-top: 2px; }
#info-pop.tool { display: flex; align-items: center; gap: 8px; border-radius: 40px; padding: 5px 16px 5px 5px; border: 3px solid var(--line-soft); animation: pop-in 0.18s ease-out; }
#info-pop.tool .tool-ic {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(#fff, var(--tint)); border: 2px solid #d9b46a; animation: tool-wiggle 0.9s ease-in-out infinite;
}
#info-pop.tool .tool-ic .ic { width: 40px; height: 40px; }
@keyframes tool-wiggle { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Bauleiste */
#buildbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px calc(8px + var(--safe-r)) calc(6px + var(--safe-b)) calc(72px + var(--safe-l));
  /* später gemalt: helles Holz je Zeitalter (--bar-bottom) */
  background: var(--bar-bottom, none) top left / auto 100% repeat-x, linear-gradient(var(--bar), var(--bar-2));
  border-top: 2px solid var(--line);
  box-shadow: 0 -2px 7px rgba(var(--shadow-rgb), 0.18);
  touch-action: pan-x;
  scrollbar-width: none;
}
#buildbar::-webkit-scrollbar { display: none; }
#bar-tabs {
  position: absolute;
  left: calc(72px + var(--safe-l)); right: calc(8px + var(--safe-r));
  bottom: calc(var(--bar-h, 100px) - 2px);
  display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none;
  padding: 0 0 2px;
}
#bar-tabs::-webkit-scrollbar { display: none; }
.bar-tab {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 4px;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line-soft); border-radius: 14px 14px 6px 6px;
  padding: 3px 10px 3px 7px; box-shadow: 0 2px 6px rgba(var(--shadow-rgb), 0.25); cursor: pointer;
}
.bar-tab .emoji { font-size: 16px; }
.bar-tab.active { background: linear-gradient(#ffe9a8, #f2c24a); border-color: #d99a1f; box-shadow: 0 0 0 2px rgba(255, 210, 90, 0.5), 0 2px 6px rgba(var(--shadow-rgb), 0.3); }
.bar-tab .dot { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
@media (max-width: 560px) { .bar-tab .tname { display: none; } .bar-tab { padding: 4px 9px; } }
.bar-item {
  position: relative;
  flex: none;
  width: 92px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--paper-dark), var(--shadow);
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 3px 5px;
  touch-action: pan-x;
}
.bar-item .txt { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.bar-item .name { font-size: 11px; font-weight: bold; text-align: center; line-height: 1.1; }
.bar-item .costs { font-size: 10px; white-space: normal; text-align: center; line-height: 1.15; max-width: 100%; }   /* umbrechen statt abschneiden (Handy hochkant) */
.bar-item.locked { filter: grayscale(0.9); opacity: 0.6; }
.bar-item.poor .ic { opacity: 0.7; }
.bar-item .new { position: absolute; top: -5px; right: -3px; background: var(--red); color: #fff; font-size: 10px; font-weight: bold; border-radius: 8px; padding: 1px 6px; }
.cost { white-space: nowrap; }
.cost.short { color: #c0392b; font-weight: bold; }

/* Bauen / Verschieben: Preis und ✖ ↻ ✔ */
#action-bar {
  position: absolute;
  left: 50%; bottom: calc(10px + var(--safe-b));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: var(--paper);
  border-radius: 22px;
  padding: 6px 8px 6px 14px;
  box-shadow: var(--shadow);
  border: 2px solid var(--paper-dark);
  max-width: calc(100vw - 20px);
}
.action-text { font-weight: bold; font-size: 14px; }
.action-text small { display: block; font-size: 12px; }
.round {
  flex: none;
  width: 50px; height: 50px; border-radius: 50%; border: 0;
  font-size: 24px; font-weight: bold; color: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.round.no { background: linear-gradient(#f37b65, #d9472f); }
.round.turn { background: linear-gradient(#6fb6ec, #3b88c8); }
.round.yes { background: linear-gradient(#7ed957, #3e9d3f); }
.round:disabled { filter: grayscale(1); opacity: 0.5; }

/* Einstieg */
#tutorial {
  position: absolute;
  right: calc(10px + var(--safe-r));
  bottom: calc(var(--bar-h, 100px) + 40px);
  display: flex; align-items: flex-end; gap: 6px;
  max-width: min(440px, 70vw);
  pointer-events: auto;
}
#tutorial .elder { flex: none; width: 96px; height: 96px; border-radius: 50%; background: #fff3cf; border: 3px solid var(--wood); display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: var(--shadow); }
#tutorial .elder { position: relative; }
#tutorial .elder img { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); width: 118%; height: 118%; max-width: none; object-fit: cover; object-position: 50% 0; }   /* V269: Kopf ganz im Kreis (Emin: abgeschnitten) */
#tutorial .elder .emoji { font-size: 50px; }
#tutorial .speech { background: var(--paper); border-radius: 16px; padding: 8px 12px; box-shadow: var(--shadow); border: 2px solid var(--paper-dark); font-size: 14px; }
#tutorial .speech p { margin: 3px 0; }
#tutorial .speech small { color: var(--ink-soft); font-size: 11px; }
/* Einstieg: Sprechblase und Knöpfe des Ältesten. Fängt nichts ab – außer „Überspringen“ und dem Hinweis am Bildrand. */
#guide { position: absolute; top: 0; bottom: 0; left: var(--safe-l); right: var(--safe-r); pointer-events: none; overflow: hidden; }
#guide-bubble {
  position: absolute; left: 0; top: 0; width: max-content; max-width: 200px;
  background: var(--paper); border: 2px solid var(--paper-dark); border-radius: 14px; box-shadow: var(--shadow);
  padding: 5px 11px 6px; font-size: 14px; line-height: 1.15; font-weight: 500; transition: opacity 0.2s;
}
#guide-bubble.off { opacity: 0; }
#guide-bubble b { color: var(--green-dark); }
#guide-bubble em { font-style: normal; display: block; font-weight: 700; color: var(--wood); }
#guide-bubble em.ok { color: var(--green-dark); font-size: 16px; }
#guide-bubble .ic { width: 18px; height: 18px; line-height: 18px; font-size: 14px; vertical-align: -3px; }
#guide-bubble::after { content: ''; position: absolute; width: 11px; height: 11px; background: var(--paper); border: solid var(--paper-dark); border-width: 0 0 2px 2px; }
#guide-bubble.tail-l::after { left: -7px; top: 50%; margin-top: -6px; transform: rotate(45deg); }
#guide-bubble.tail-r::after { right: -7px; top: 50%; margin-top: -6px; transform: rotate(225deg); }
#guide-bubble.tail-b::after { left: var(--tail-x, 50%); bottom: -7px; margin-left: -6px; transform: rotate(-45deg); }
.guide-dots { display: flex; gap: 3px; margin-top: 4px; }
.guide-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--paper-dark); box-shadow: inset 0 0 0 1px #c9b080; transition: background 0.3s; }
.guide-dots i.ok { background: var(--green); box-shadow: none; }
.guide-dots i.now { background: var(--gold); box-shadow: none; }
#guide-skip, #guide-edge { position: absolute; pointer-events: auto; font: inherit; border: 0; border-radius: 99px; cursor: pointer; }
#guide-skip { top: 0; right: 6px; font-size: 12px; color: #fff; background: rgba(61, 42, 23, 0.6); padding: 4px 11px; }
#guide-edge { left: 0; top: 0; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--paper); border: 2px solid var(--gold); box-shadow: var(--shadow); padding: 4px 11px 4px 7px; white-space: nowrap; }
#guide-edge-arrow { display: inline-block; color: var(--wood); font-size: 16px; line-height: 1; }
#guide.gross #guide-bubble { max-width: 270px; font-size: 18px; padding: 7px 14px 8px; border-radius: 18px; }
#guide.gross #guide-bubble em.ok { font-size: 20px; }
#guide.gross .guide-dots i { width: 9px; height: 9px; }
#guide.gross #guide-skip { font-size: 15px; padding: 6px 14px; }
#guide.gross #guide-edge { font-size: 16px; }
.guide-fly { position: absolute; left: 0; top: 0; z-index: 8; pointer-events: none; display: flex; align-items: center; gap: 3px; background: var(--paper); border: 2px solid var(--gold); border-radius: 99px; padding: 1px 9px 1px 4px; font-weight: 700; color: var(--green-dark); font-size: 14px; box-shadow: var(--shadow); }
.guide-fly .ic { width: 20px; height: 20px; line-height: 20px; font-size: 15px; }

.tut-buttons { display: flex; align-items: center; flex-wrap: wrap; }

.glow { animation: glow 1s ease-in-out infinite alternate; }
@keyframes glow {
  from { box-shadow: 0 0 0 3px #ffe066, 0 0 10px 4px rgba(255, 220, 80, 0.7); }
  to { box-shadow: 0 0 0 5px #ffd23f, 0 0 22px 10px rgba(255, 220, 80, 0.95); }
}

/* Meldung */
#update-banner {
  position: fixed; left: 50%; top: calc(8px + var(--safe-t, 0px)); transform: translateX(-50%); z-index: 200;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: var(--paper); border: 3px solid var(--gold); border-radius: 18px; padding: 8px 14px;
  box-shadow: 0 6px 18px rgba(var(--shadow-rgb), 0.35); font-weight: 700; color: var(--ink);
  animation: pop-in 0.25s ease-out; max-width: calc(100vw - 24px);
}
#update-banner .btn { padding: 6px 14px; }
#turn-hint {
  position: fixed; left: 50%; bottom: calc(var(--bar-h, 90px) + 14px); transform: translateX(-50%); z-index: 150;
  display: flex; align-items: center; gap: 10px; background: var(--paper); border: 3px solid var(--gold); border-radius: 18px;
  padding: 8px 12px; box-shadow: 0 6px 18px rgba(var(--shadow-rgb), 0.35); font-weight: 600; color: var(--ink); font-size: 14px;
  width: max-content; max-width: calc(100vw - 24px); animation: pop-in 0.25s ease-out;
}
#turn-hint .emoji { font-size: 24px; }
#turn-hint .btn { padding: 6px 14px; }
#toast {
  position: fixed;
  left: 50%; top: auto; bottom: calc(var(--bar-h, 100px) + 18px + var(--safe-b));   /* unten: oben verdeckte sie die Titel der Fenster (07.11.) */
  transform: translate(-50%, 20px);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 14px;
  max-width: 80vw;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 100;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Fenster ---------- */

#dialog {
  position: fixed; inset: 0;
  background: rgba(30, 20, 10, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 70;
}
#dialog-box {
  background: var(--paper);
  border-radius: 20px;
  border: 3px solid var(--paper-dark);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);   /* iPhone-Safari: sichtbare Höhe ohne Adressleiste */
  overflow-y: auto;
  touch-action: pan-y;
}
#dialog-box h2 { margin: 2px 0 6px; font-size: 20px; }
#dialog-box h3 { margin: 6px 0 4px; font-size: 16px; }
#dialog-box p { margin: 4px 0; }
#dialog-box textarea { width: 100%; height: 90px; font-size: 11px; user-select: text; -webkit-user-select: text; }
.dlg-head { display: flex; gap: 12px; align-items: center; }
.lines { margin: 8px 0; padding-left: 18px; }
.lines li { margin: 2px 0; }
.upgrade { background: var(--tint); border-radius: 12px; padding: 6px 10px; margin: 6px 0; }
.buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; margin-top: 8px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { background: var(--paper-dark); border-radius: 10px; padding: 4px; text-align: center; font-size: 11px; }
.day small { display: block; font-size: 10px; }
.day.today { background: var(--gold); color: #fff; }
.day.past { opacity: 0.5; }

/* ---------- ganze Seite ---------- */

#page {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 60;
  display: flex; flex-direction: column;
}
.page-head {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(var(--bar), var(--bar-2));
  color: var(--ink);
  padding: 4px calc(10px + var(--safe-r)) 4px calc(10px + var(--safe-l));
}
.page-head h2 { margin: 0; font-size: 18px; }
.page-head .back { color: var(--ink); min-height: 40px; min-width: 64px; }
#guide-skip { min-height: 36px; padding-left: 12px; padding-right: 12px; }
#page-body { flex: 1; overflow: auto; touch-action: pan-x pan-y; padding: 8px calc(12px + var(--safe-r)) 8px calc(12px + var(--safe-l)); display: flex; flex-direction: column; }

/* Seiten: helle Fläche in der Farbe des Zeitalters */
#page { background: var(--page); }
.page-head { border-bottom: 2px solid var(--line); box-shadow: 0 2px 6px rgba(var(--shadow-rgb), 0.14); z-index: 1; }
/* Seitentitel: später auf einem gemalten Band je Zeitalter (--title-band) */
.page-head h2 {
  background: var(--title-band, none) center / 100% 100% no-repeat;
  color: var(--ink); text-shadow: none; font-size: 21px;
  width: fit-content; min-width: 220px; margin: 2px auto; box-sizing: border-box;
  padding: 9px 58px 11px; text-align: center;
}
.menu-logo { display: block; width: clamp(64px, 14vh, 120px); margin: 4px auto 8px; grid-column: 1 / -1; justify-self: center; filter: drop-shadow(0 3px 4px rgba(var(--shadow-rgb), 0.3)); }
.daily-chest { text-align: center; margin-bottom: -6px; }
.daily-chest .ic.big { width: 84px; height: 84px; }
#btn-daily .ic { width: 34px; height: 34px; }

.tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--paper); border: 2px solid var(--line-soft); border-radius: 999px;
  padding: 1px 9px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.tag.good { background: #e3f6d3; border-color: #9fd77d; color: var(--green-dark); }

/* ---------- Forschung: links Liste, rechts Detail ---------- */
.rs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; font-size: 18px; }
.rs button { font-family: inherit; color: inherit; }
.rs .cost { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; background: var(--tint); border-radius: 10px; padding: 1px 9px 1px 3px; }
.rs .cost.short { color: #c0392b; background: #fde3dc; }
.rs .cost .ic.mini { width: 26px; height: 26px; line-height: 26px; font-size: 19px; margin: 0; vertical-align: middle; }
.rs h4 { margin: 8px 4px 2px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-soft); }
.rs-goal { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-radius: 16px; background: linear-gradient(90deg, var(--bar), var(--bar-2)); border: 3px solid var(--gold); }
.rs-gmain { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.rs-gmain .ic { width: 46px; height: 46px; line-height: 46px; font-size: 32px; flex: none; }
.rs-gtext { display: flex; flex-direction: column; min-width: 0; }
.rs-gtext b { font-size: 21px; line-height: 1.15; }
.rs-gtext small { font-size: 17px; }
.rs-steps { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.rs-step { font-size: 15px; font-weight: 600; padding: 3px 10px; border-radius: 10px; background: var(--paper); border: 2px solid var(--line-soft); cursor: pointer; white-space: nowrap; }
.rs-step.run { background: #e3f4dc; border-color: #9fd394; color: var(--green-dark); }
.rs-know { flex: none; display: flex; align-items: center; gap: 6px; font-size: 22px; background: #fff; border: 2px solid var(--line-soft); border-radius: 999px; padding: 2px 14px 2px 5px; font-variant-numeric: tabular-nums; }
.rs-know .ic { width: 34px; height: 34px; line-height: 34px; font-size: 24px; }

.stage-tabs { flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 2px 3px; }
.stage-tabs::-webkit-scrollbar { display: none; }
.st-tab { flex: 1 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left; cursor: pointer; background: var(--paper); border: 2px solid var(--line-soft); border-radius: 14px; padding: 5px 12px 6px; box-shadow: 0 3px 0 rgba(var(--shadow-rgb), 0.15); }
.st-tab b { font-size: 16px; white-space: nowrap; }
.st-tab b small { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-left: 4px; }
.st-tab .st-bar { display: block; height: 6px; border-radius: 3px; background: linear-gradient(to right, #e7a92e var(--p), rgba(0, 0, 0, 0.1) var(--p)); }
.st-tab.complete .st-bar { background: #5cb84e; }
.st-tab.active { background: linear-gradient(#fff3c4, #ffe08a); border-color: #e0a52a; box-shadow: 0 0 0 2px rgba(255, 210, 90, 0.55), 0 3px 0 rgba(var(--shadow-rgb), 0.2); }
.st-tab.locked:not(.active) { opacity: 0.6; }

.rs-main { flex: 1; min-height: 0; display: flex; gap: 14px; padding-bottom: var(--safe-b); }
.rs-list, .rs-detail { scrollbar-width: thin; }
.rs-list { flex: 0 0 42%; min-width: 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 8px; padding: 0 5px 8px 2px; }
.rs-list > * { flex: none; }
.rs-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; background: var(--paper); border: 3px solid transparent; border-radius: 18px; padding: 8px 12px; box-shadow: 0 3px 0 var(--line-soft), 0 5px 12px rgba(var(--shadow-rgb), 0.08); }
.rs-pic { flex: none; width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(#fff, var(--tint)); box-shadow: inset 0 0 0 3px var(--line-soft); }
.rs-pic .ic { width: 52px; height: 52px; line-height: 52px; font-size: 36px; }
.rs-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rs-name { font-size: 23px; font-weight: 700; line-height: 1.1; }
.rs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 17px; }
.rs-time.bad, small.bad { color: #c0392b; }
small.ok { color: var(--green-dark); }
.rs-lock { color: var(--ink-soft); }
.rs-arrow { flex: none; font-size: 30px; line-height: 1; opacity: 0.35; }
.rs-prog { display: block; height: 11px; border-radius: 6px; background: #e3eed9; overflow: hidden; }
.rs-prog i { display: block; height: 100%; background: linear-gradient(90deg, #5cc45f, #8be08a); }
.rs-item.running { border-color: #9fd394; }
.rs-item.available { box-shadow: 0 3px 0 #e2c15a, 0 5px 12px rgba(242, 182, 50, 0.2); }
.rs-item.locked { opacity: 0.62; }
.rs-item.locked .rs-pic .ic { filter: grayscale(0.8); }
.rs-item.sel { border-color: var(--gold); background: #fff6dc; opacity: 1; }
.rs-item.sel .rs-arrow { opacity: 1; color: #c88a10; }
.rs-done { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; background: #e9f4e2; color: var(--green-dark) !important; border: 2px solid transparent; border-radius: 999px; padding: 2px 12px 2px 3px; cursor: pointer; }
.rs-chip .ic { width: 30px; height: 30px; line-height: 30px; font-size: 20px; }
.rs-chip.sel { border-color: var(--gold); }

.rs-detail { flex: 1; min-width: 0; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 12px; background: var(--paper); border: 3px solid var(--line-soft); border-radius: 22px; padding: 16px 20px; box-shadow: 0 8px 20px rgba(var(--shadow-rgb), 0.13); }
.rs-detail > * { flex: none; }
.rs-close { display: none; align-self: flex-start; font-weight: 600; font-size: 16px; background: var(--paper-dark); border: 0; border-radius: 12px; padding: 7px 14px; cursor: pointer; }
.rs-dhead { display: flex; align-items: center; gap: 16px; }
.rs-dhead h3 { margin: 0; font-size: 36px; line-height: 1.05; }
.rs-dhead p { margin: 4px 0 0; }
.rs-med { flex: none; width: 112px; height: 112px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(#fff, var(--tint)); box-shadow: 0 0 0 5px #e7c45a, 0 6px 12px rgba(var(--shadow-rgb), 0.2); }
.rs-med.running { box-shadow: 0 0 0 5px var(--green), 0 6px 12px rgba(var(--shadow-rgb), 0.2); }
.rs-med.locked .ic { filter: grayscale(0.8); opacity: 0.7; }
.rs-med .ic { width: 88px; height: 88px; line-height: 88px; font-size: 60px; }
.rs-effects { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rs-effects .tag { font-size: 16px; white-space: normal; }
.rs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.rs-fact { background: var(--tint); border-radius: 14px; padding: 7px 12px; font-size: 15px; }
.rs-fact b { display: block; font-size: 21px; margin-top: 1px; }
.rs-fact b small { font-size: 15px; font-weight: 600; }
.rs-fact .rs-req { font-size: 17px; line-height: 1.2; }
.rs-sec h4 { margin: 0 0 5px; }
.rs-new { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #f3f9ea, #e4f2d6); border-radius: 18px; padding: 8px 16px; }
.rs-new + .rs-new { margin-top: 6px; }
.rs-new .ic { flex: none; width: clamp(110px, 16vw, 230px); height: auto; line-height: 1; font-size: 64px; filter: drop-shadow(0 6px 8px rgba(var(--shadow-rgb), 0.25)); }
.rs-new b { display: block; font-size: 24px; }
.rs-new b small { font-size: 15px; font-weight: 600; }
.rs-new span { font-size: 18px; line-height: 1.25; }
.rs-costs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 23px; }
.rs-costs .cost .ic.mini { width: 34px; height: 34px; line-height: 34px; font-size: 25px; }
.rs-hint { margin: 0; color: #c0392b; font-size: 17px; }
.rs-soon { margin: 0; font-style: italic; }
.rs-action { position: sticky; bottom: -16px; margin-top: auto; padding: 6px 0 2px; background: linear-gradient(transparent, var(--paper) 30%); }
.rs-go { width: 100%; font-size: 25px !important; font-weight: 700; border: 0; border-radius: 18px; padding: 13px; background: var(--tint); color: var(--ink-soft) !important; box-shadow: 0 5px 0 var(--line); }
.rs-go.ready { cursor: pointer; background: linear-gradient(#7ed56f, #4caf50); color: #fff !important; box-shadow: 0 5px 0 var(--green-dark); }
.rs-go.ready:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--green-dark); }
.rs-go.run { background: #dff3cf; color: var(--green-dark) !important; box-shadow: 0 5px 0 #a8cf8f; }
.rs-go.good { background: #e3f6d3; color: var(--green-dark) !important; box-shadow: 0 5px 0 #a8cf8f; }

/* kleinere Laptops: alles eine Spur kleiner, damit das Detail ohne Scrollen passt */
@media (max-height: 820px) and (min-height: 521px) and (min-width: 700px) {
  .rs-med { width: 84px; height: 84px; } .rs-med .ic { width: 66px; height: 66px; line-height: 66px; font-size: 46px; }
  .rs-dhead h3 { font-size: 30px; }
  .rs-new .ic { width: clamp(100px, 11vw, 150px); }
  .rs-detail { gap: 9px; padding: 12px 16px; }
  .rs-action { bottom: -12px; }
  .rs-go { padding: 10px; font-size: 22px !important; }
}

/* Handy hochkant: nur die Liste, Antippen öffnet das Detail als ganze Seite */
@media (max-width: 699px) and (min-height: 521px) {
  .rs { font-size: 16px; gap: 6px; }
  .rs-goal { flex-wrap: wrap; gap: 6px 8px; padding: 6px 9px; }
  .rs-gmain { flex: 1; gap: 8px; }
  .rs-gmain .ic { width: 38px; height: 38px; line-height: 38px; font-size: 26px; }
  .rs-gtext b { font-size: 16px; } .rs-gtext small { font-size: 14px; }
  .rs-know { font-size: 18px; margin-left: auto; } .rs-know .ic { width: 26px; height: 26px; line-height: 26px; font-size: 18px; }
  .rs-steps { display: none; }
  .st-tab { flex: 0 0 auto; padding: 4px 10px 5px; }
  .st-tab b { font-size: 14px; }
  .rs-go { font-size: 21px !important; }
  .rs-list { flex: 1; padding-right: 0; }
  .rs-detail { display: none; }
  .rs.sheet .rs-detail { display: flex; position: fixed; inset: 0; z-index: 62; border: 0; border-radius: 0; padding: 12px calc(14px + var(--safe-r)) calc(12px + var(--safe-b)) calc(14px + var(--safe-l)); }
  .rs-close { display: block; }
  .rs-item { gap: 10px; padding: 7px 10px; }
  .rs-pic { width: 56px; height: 56px; } .rs-pic .ic { width: 44px; height: 44px; line-height: 44px; font-size: 30px; }
  .rs-name { font-size: 20px; } .rs-meta { font-size: 15px; }
  .rs .cost .ic.mini { width: 22px; height: 22px; line-height: 22px; font-size: 16px; }
  .rs-dhead h3 { font-size: 28px; }
  .rs-med { width: 84px; height: 84px; } .rs-med .ic { width: 66px; height: 66px; line-height: 66px; font-size: 46px; }
  .rs-new { gap: 10px; padding: 8px 10px; } .rs-new .ic { width: 120px; }
  .rs-new b { font-size: 20px; } .rs-new span { font-size: 15px; }
  .rs-facts { grid-template-columns: 1fr 1fr; }
  .rs-action { bottom: -12px; }
}

/* Handy quer: zwei Spalten nebeneinander, alles kompakt, oben nur eine Zeile Ziel und eine Zeile Reiter */
@media (max-height: 520px) {
  .rs { gap: 4px; font-size: 14px; }
  .rs h4 { font-size: 11px; margin: 3px 3px 0; }
  .rs-goal { border-width: 2px; border-radius: 12px; padding: 2px 8px; gap: 8px; }
  .rs-gmain { gap: 6px; }
  .rs-gmain .ic { width: 26px; height: 26px; line-height: 26px; font-size: 18px; }
  .rs-gtext { flex-direction: row; align-items: baseline; gap: 8px; }
  .rs-gtext b { font-size: 14px; white-space: nowrap; } .rs-gtext small { font-size: 12px; white-space: nowrap; }
  .rs-steps { display: none; }
  .rs-know { margin-left: auto; font-size: 15px; padding: 0 9px 0 2px; } .rs-know .ic { width: 22px; height: 22px; line-height: 22px; font-size: 15px; }
  .stage-tabs { padding-bottom: 1px; gap: 4px; }
  .st-tab { flex: 1 0 auto; padding: 1px 8px 2px; border-radius: 9px; gap: 1px; box-shadow: none; }
  .st-tab b { font-size: 12px; }
  .st-tab b small { font-size: 10px; margin-left: 2px; }
  .st-tab .st-bar { height: 3px; }
  .rs-main { gap: 7px; }
  .rs-list { flex: 0 0 44%; gap: 4px; padding: 0 3px 3px 1px; }
  .rs-item { gap: 7px; padding: 3px 7px; border-width: 2px; border-radius: 12px; box-shadow: 0 2px 0 var(--line-soft); }
  .rs-pic { width: 36px; height: 36px; box-shadow: inset 0 0 0 2px var(--line-soft); } .rs-pic .ic { width: 28px; height: 28px; line-height: 28px; font-size: 20px; }
  .rs-mid { gap: 1px; }
  .rs-name { font-size: 15px; } .rs-meta { font-size: 12px; gap: 1px 6px; }
  .rs-arrow { font-size: 18px; }
  .rs .cost { padding: 0 6px 0 1px; border-radius: 7px; }
  .rs .cost .ic.mini { width: 17px; height: 17px; line-height: 17px; font-size: 12px; }
  .rs-prog { height: 6px; }
  .rs-chip { font-size: 12px; padding: 0 8px 0 1px; } .rs-chip .ic { width: 20px; height: 20px; line-height: 20px; font-size: 14px; }
  .rs-detail { gap: 5px; padding: 6px 10px; border-width: 2px; border-radius: 13px; box-shadow: none; }
  .rs-med { width: 44px; height: 44px; box-shadow: 0 0 0 2px #e7c45a; } .rs-med.running { box-shadow: 0 0 0 2px var(--green); }
  .rs-med .ic { width: 35px; height: 35px; line-height: 35px; font-size: 24px; }
  .rs-dhead { gap: 9px; } .rs-dhead h3 { font-size: 19px; } .rs-dhead p { font-size: 13px; }
  .rs-effects { margin-top: 2px; } .rs-effects .tag { font-size: 12px; }
  .rs-facts { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 4px; }
  .rs-fact { padding: 2px 7px; font-size: 11px; border-radius: 8px; }
  .rs-fact b { font-size: 14px; } .rs-fact b small { font-size: 11px; } .rs-fact .rs-req { font-size: 12px; }
  .rs-sec { display: flex; align-items: center; gap: 7px; }
  .rs-sec h4 { margin: 0; flex: none; }
  .rs-sec-new { display: block; }
  .rs-sec-new h4 { display: none; }
  .rs-new { gap: 8px; padding: 2px 8px; border-radius: 10px; } .rs-new .ic { width: 62px; font-size: 34px; }
  .rs-new b { font-size: 14px; } .rs-new b small { font-size: 11px; } .rs-new span { font-size: 12px; line-height: 1.15; display: block; }
  .rs-costs { font-size: 14px; gap: 4px; } .rs-costs .cost .ic.mini { width: 20px; height: 20px; line-height: 20px; font-size: 14px; }
  .rs-hint { font-size: 12px; line-height: 1.15; }
  .rs-action { bottom: -6px; padding: 3px 0 0; }
  .rs-go { font-size: 15px !important; padding: 6px; border-radius: 11px; box-shadow: 0 3px 0 var(--line); }
  .rs-go.ready { box-shadow: 0 3px 0 var(--green-dark); }
  .rs-go.run, .rs-go.good { box-shadow: 0 3px 0 #a8cf8f; }
}
/* ganz flache Handys: noch etwas enger, damit Kosten und Knopf ohne Scrollen zu sehen sind */
@media (max-height: 380px) {
  .rs-detail { gap: 3px; padding: 4px 9px; }
  .rs-med { width: 34px; height: 34px; } .rs-med .ic { width: 27px; height: 27px; line-height: 27px; font-size: 19px; }
  .rs-dhead h3 { font-size: 17px; }
  .rs-new .ic { width: 46px; font-size: 26px; }
  .rs-action { bottom: -4px; padding: 1px 0 0; }
  .rs-go { padding: 4px; }
}

/* ---------- Aufträge ---------- */
.quests { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 0 16px; }
.quest-sum {
  display: flex; align-items: center; gap: 12px; font-size: 15px;
  background: var(--paper); border: 2px solid var(--line-soft); border-radius: 14px; padding: 8px 14px;
}
.quest-sum .q-bar { flex: 1; }
.quest-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border: 3px solid var(--line-soft); border-radius: 20px; padding: 10px 16px;
  box-shadow: 0 4px 0 rgba(var(--shadow-rgb), 0.15);
}
.quest-card.done { border-color: #8fd36a; background: linear-gradient(#f5fff0, #e4f7d6); animation: glow-green 2s ease-in-out infinite; }
@keyframes glow-green { 50% { box-shadow: 0 0 18px rgba(110, 200, 70, 0.55), 0 4px 0 rgba(var(--shadow-rgb), 0.15); } }
.q-medal { flex: none; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tint); border: 3px solid #d9c194; }
.quest-card.done .q-medal { background: #fff3c4; border-color: #f2c94c; }
.q-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-main b { font-size: 16px; }
.q-bar { position: relative; display: block; height: 18px; border-radius: 9px; background: var(--tint); overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.12); }
.q-bar.thin { height: 10px; }
.q-bar i { display: block; height: 100%; background: linear-gradient(#9be067, #4caf50); border-radius: 9px; }
.q-bar em { position: absolute; inset: 0; text-align: center; font-style: normal; font-size: 12px; font-weight: 700; line-height: 18px; color: var(--ink); }
.q-reward { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--ink-soft); }
.q-pct { flex: none; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink-soft); background: #f5ecd8; border: 3px dashed #d9c194; }
.empty-note { color: var(--ink-soft); text-align: center; }

/* ---------- Menü ---------- */
.menu { width: 100%; max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 6px 0 16px; align-content: start; }
.menu .card {
  background: var(--paper); border: 3px solid var(--line-soft); border-radius: 20px; padding: 10px 14px 14px;
  box-shadow: 0 4px 0 rgba(var(--shadow-rgb), 0.15);
}
.menu .card.wide, .menu .version { grid-column: 1 / -1; }
.menu h3 { margin: 2px 0 10px; font-size: 17px; color: var(--accent); }
.menu h3 small { font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--tint); border-radius: 14px; padding: 8px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat small { color: var(--ink-soft); font-size: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px dashed var(--line-soft); font-size: 15px; }
.switch-row small { display: block; color: var(--ink-soft); font-size: 11px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 28px; border-radius: 14px; background: var(--line-soft); position: relative; transition: background 0.2s; cursor: pointer; margin: 0; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: left 0.2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { left: 25px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 10px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font: inherit; font-weight: 600; font-size: 13px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line-soft); border-radius: 16px; padding: 10px 6px;
  box-shadow: 0 3px 0 var(--line); cursor: pointer;
}
.tile .emoji { font-size: 26px; }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.version { color: var(--ink-soft); font-size: 12px; text-align: center; }
@media (max-width: 640px) {
  .menu { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.pop-buttons { display: flex; gap: 14px; margin-top: 6px; }
.pop-buttons .btn { flex: 1; min-height: 38px; }

/* Spielstände: große Karten mit Bild des Zeitalters */
.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; width: 100%; max-width: 1240px; margin: auto; padding: 12px 0; }
.slot { display: flex; flex-direction: column; gap: 12px; background: var(--paper); border: 3px solid var(--line-soft); border-radius: 22px; padding: 18px; box-shadow: 0 5px 0 var(--line), 0 10px 22px rgba(var(--shadow-rgb), 0.14); }
.slot.current { border-color: var(--gold); box-shadow: 0 5px 0 #d9a93a, 0 10px 22px rgba(var(--shadow-rgb), 0.18); }
.slot-pic { height: 210px; display: flex; align-items: center; justify-content: center; font-size: 56px; background: radial-gradient(circle at 50% 45%, #fff, var(--tint)); border-radius: 16px; }
.slot-pic img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(var(--shadow-rgb), 0.3)); }
.slot.empty .slot-pic img { opacity: 0.45; filter: grayscale(0.5); }
.slot-text { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 18px; color: var(--ink); }
.slot-text b { font-size: 26px; color: var(--ink); }
.slot-text em { font-style: normal; font-size: 14px; font-weight: 600; color: #6d4c00; background: #ffe6a0; border-radius: 10px; padding: 2px 9px; margin-left: 6px; vertical-align: middle; }
.slot-stage { font-size: 20px; font-weight: 700; color: #a45f12; }
.slot small { font-size: 15px; color: var(--ink-soft); }
.slot-buttons { display: flex; gap: 10px; }
.slot-buttons .btn.primary { flex: 1; font-size: 21px; padding: 13px 16px; }
.slot-buttons .btn.danger { font-size: 20px; padding: 13px 16px; }
/* Handy hochkant und quer: flache Zeilen mit kleinem Bild */
@media (max-width: 700px), (max-height: 560px) {
  .slots { grid-template-columns: 1fr; gap: 10px; max-width: 760px; padding: 4px 0; margin: 0 auto; }
  .slot { flex-direction: row; align-items: center; padding: 10px; gap: 12px; border-radius: 16px; }
  .slot-pic { width: 86px; height: 72px; flex: none; font-size: 32px; }
  .slot-text { font-size: 15px; gap: 1px; min-width: 0; }
  .slot-text b { font-size: 18px; }
  .slot-text em { font-size: 12px; padding: 1px 7px; }
  .slot-stage { font-size: 15px; }
  .slot small { font-size: 12px; }
  .slot-buttons { flex: none; }
  .slot-buttons .btn.primary { font-size: 15px; padding: 9px 12px; }
  .slot-buttons .btn.danger { font-size: 15px; padding: 9px 10px; }
}
@media (max-width: 460px) {
  .slot { flex-wrap: wrap; }
  .slot-text { flex: 1 1 55%; }
  .slot-buttons { flex: 1 1 100%; }
}

/* schmale Handys hochkant: alle Waren und Anzeigen fließen gemeinsam über die Zeilen (statt untereinander gestapelt) */
@media (max-width: 480px) {
  #topbar { flex-wrap: wrap; justify-content: flex-start; gap: 4px; }
  #topbar .chips { display: contents; }
  .chip { padding: 2px 7px 2px 3px; font-size: 13px; }
}

/* niedrige Bildschirme (Handy quer) */
@media (max-height: 420px) {
  .side-btn { width: 50px; height: 46px; font-size: 19px; }
  .side-btn .ic { width: 25px; height: 25px; }
  .ic.big { width: 38px; height: 38px; line-height: 38px; font-size: 27px; }
  .bar-item { width: 82px; }
  #tutorial { bottom: calc(var(--bar-h, 90px) + 36px); }
  #tutorial .elder { width: 80px; height: 80px; }
  #tutorial .elder .emoji { font-size: 40px; }
  #tutorial .speech { font-size: 13px; }
  .page-head { padding-top: 2px; padding-bottom: 2px; }
  .page-head .btn { padding: 4px 12px; font-size: 13px; }
  .page-head h2 { font-size: 17px; padding: 6px 52px 8px; }
}

/* Bauleiste ein-/ausklappen */
#bar-toggle {
  position: absolute; right: calc(8px + var(--safe-r)); bottom: calc(var(--bar-h, 100px) + 4px); z-index: 5;
  min-width: 42px; height: 36px; border-radius: 18px; padding: 0 10px;
  font: inherit; font-size: 16px; color: var(--ink); cursor: pointer;
  background: var(--paper); border: 2px solid var(--line); box-shadow: 0 2px 0 var(--line);
  transition: bottom 0.25s;
}
#buildbar, #bar-tabs { transition: transform 0.25s ease-in; }
#game.bar-hidden #buildbar, #game.bar-hidden #bar-tabs { transform: translateY(calc(100% + var(--bar-h, 100px))); pointer-events: none; }
#game.bar-hidden #bar-toggle { bottom: calc(8px + var(--safe-b)); font-size: 14px; padding: 0 14px; height: 36px; border-radius: 18px; }

/* Handy quer: flache Leiste – Karten liegen quer, Kategorien als kleine Symbole links in der Leiste */
@media (max-height: 500px) {
  #buildbar { padding: 4px calc(52px + var(--safe-r)) calc(4px + var(--safe-b)) calc(112px + var(--safe-l)); gap: 5px; align-items: center; min-height: 60px; box-sizing: border-box; }
  .bar-item { width: auto; min-width: 118px; max-width: 150px; flex-direction: row; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 12px; }
  .bar-item .ic.big { width: 38px; height: 38px; line-height: 38px; font-size: 26px; flex: none; }
  .bar-item .name, .bar-item .costs { text-align: left; }
  .bar-item .txt { align-items: flex-start; min-width: 0; }
  #bar-tabs {
    left: calc(6px + var(--safe-l)); right: auto; bottom: calc(4px + var(--safe-b)); z-index: 2;
    display: grid; grid-template-columns: repeat(3, 32px); gap: 3px; padding: 0;
  }
  .bar-tab { padding: 0; width: 32px; height: 24px; justify-content: center; border-radius: 8px; }
  .bar-tab .tname { display: none; }
  .bar-tab::after { content: ''; position: absolute; inset: -2px; }   /* größere Tippfläche, sieht gleich aus */
  .bar-tab .emoji { font-size: 15px; }
  #bar-toggle { right: calc(8px + var(--safe-r)); bottom: calc(var(--bar-h, 60px) / 2 - 18px); }
  #side { bottom: calc(var(--bar-h, 60px) + 6px); }   /* quer liegen die Reiter in der Leiste */
}

/* Info-Fenster (Waren, Einwohner, Zufriedenheit, Wetter, Gebäude) */
.info-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; text-align: left; }
.info-list > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; background: var(--tint); border-radius: 10px; padding: 5px 10px; }
.info-list > div > span { flex: 1 1 auto; }
.info-list > div > small { flex: 1 0 100%; opacity: 0.75; }
.info-list > div.bad { background: rgba(200, 60, 40, 0.14); }
#dialog-box h3 { margin: 8px 0 2px; font-size: 14px; text-align: left; }
#dialog-box .hint { font-size: 12px; opacity: 0.8; }
.disaster-ic { font-size: 56px; line-height: 1; text-align: center; animation: pop-in 0.3s ease-out; }
details.more { margin: 6px 0; text-align: left; }
details.more summary { cursor: pointer; font-weight: 700; padding: 6px 10px; border-radius: 10px; background: rgba(var(--shadow-rgb), 0.12); list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 4px; }
.side-btn.on { outline: 3px solid var(--gold); background-color: #ffe7a8; }

/* Konto-Seite */
.konto { max-width: 520px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 6px 0 16px; }
.konto .card { display: flex; flex-direction: column; gap: 10px; background: var(--paper); border: 3px solid var(--line-soft);
  border-radius: 20px; padding: 12px 16px 16px; box-shadow: 0 4px 0 rgba(var(--shadow-rgb), 0.15); }
.konto h3 { margin: 2px 0 0; font-size: 17px; color: var(--accent); }
.konto-text { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.4; }
.konto-feld { width: 100%; box-sizing: border-box; padding: 11px 14px; font: inherit; font-size: 16px; border: 2px solid rgba(var(--shadow-rgb), 0.25); border-radius: 12px; background: #fff; user-select: text; -webkit-user-select: text; }
.konto-feld:focus { outline: none; border-color: #d8a23a; }
#dialog-box .konto-feld { margin: 8px 0; }
.konto .konto-breit { width: 100%; margin: 0; }
.konto .konto-google { width: 100%; margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #3c3c3c; }
.konto .konto-google b { font: 800 20px/1 Arial, sans-serif; color: #4285f4; }
.konto-oder { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.konto-oder::before, .konto-oder::after { content: ''; flex: 1; border-top: 1px solid rgba(var(--shadow-rgb), 0.2); }
.konto-links { display: flex; justify-content: space-between; gap: 8px; }
.konto-link { background: none; border: none; padding: 6px 2px; font: inherit; font-size: 15px; font-weight: 600; color: var(--accent); cursor: pointer; }
.konto-gefahr { align-self: center; color: #b8432a; font-size: 14px; font-weight: 500; }
.konto-profil { flex-direction: row !important; align-items: center; gap: 14px !important; }
.konto-bild { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.konto-wer { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.konto-wer b { font-size: 20px; }
.konto-wer small { color: var(--ink-soft); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-nummer { align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--tint); font-size: 13px; font-weight: 700; letter-spacing: 0.5px; }
.konto-zeile { display: flex; gap: 8px; align-items: stretch; }
.konto-zeile .btn { margin: 0; flex: none; }
.konto-stand { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--tint); font-size: 15px; }
.konto-stand span { color: var(--ink-soft); }
.konto-hinweis { margin: 0; text-align: center; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.konto-meldung { margin: 0; padding: 10px 14px; border-radius: 12px; background: #e6f4dc; color: #2c5a1e; }
.konto-meldung.fehler { background: #fbe3dc; color: #a33218; }

/* ---------- Einheitlicher Rahmen ----------
   Helle Karte mit Kante in der Farbe des Zeitalters. Gilt für alle Fenster und Sprechblasen. */
#dialog-box, #guide-bubble, #tutorial .speech, #info-pop, #action-bar, #update-banner, #turn-hint, #toast {
  border: 2px solid var(--line); color: var(--ink);
  background: var(--frame-bg);
  box-shadow: var(--frame-shadow);
}
#dialog-box { border-width: 3px; border-radius: 22px; padding: 12px 18px; }
#action-bar { border-width: 3px; border-radius: 26px; }
#info-pop, #tutorial .speech, #update-banner, #turn-hint, #toast { border-radius: 16px; }
#info-pop.tool { border-radius: 40px; }
#guide-bubble { border-radius: 14px; }
#guide.gross #guide-bubble { border-radius: 18px; }
#guide-bubble::after { background: var(--line); border: 0; width: 11px; height: 11px; }
#dialog { background: rgba(var(--shadow-rgb), 0.42); }
#dialog-box h2 { color: var(--ink); text-align: center; }

/* Tägliche Belohnung */
.daily-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.daily-head .ic.big { width: 72px; height: 72px; flex: none; }
.daily-head h2 { margin: 0 !important; }
.daily-head p { margin: 2px 0 0 !important; font-size: 14px; }
.days { display: grid; grid-template-columns: repeat(6, 1fr) 1.35fr; gap: 5px; margin: 8px 0 2px; }
.day {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #fff; border: 2px solid var(--paper-dark); border-radius: 12px; padding: 4px 2px 6px; font-size: 12px; color: var(--ink);
}
.day b { font-size: 12px; color: var(--wood); }
.day .day-goods { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; font-weight: 700; font-size: 12px; line-height: 1.2; }
.day .day-goods span { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.day .ic.mini { width: 16px; height: 16px; line-height: 16px; font-size: 12px; }
.day.past { opacity: 1; background: var(--tint); color: var(--ink-soft); filter: saturate(0.5); }
.day.past b { color: var(--ink-soft); }
.day.past::after { content: '✔'; position: absolute; top: 1px; right: 4px; color: var(--green-dark); font-weight: 700; font-size: 13px; }
.day.today { background: #fff3c4; border-color: var(--gold); color: var(--ink); box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(242, 182, 50, 0.7); animation: day-pulse 1.6s ease-in-out infinite; }
.day.today b { color: #a8650a; }
.day.chest .ic.big { width: 30px; height: 30px; }
@keyframes day-pulse { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 20px rgba(242, 182, 50, 0.95); } }
@media (max-height: 500px) {
  #dialog-box { border-width: 3px; padding: 8px 14px; }
  .daily-head .ic.big { width: 52px; height: 52px; }
  .daily-head h2 { font-size: 18px; }
  .daily-head p { font-size: 13px; }
}
@media (max-width: 560px) {
  /* hochkant: Tag 1–6 in drei Spalten, die große Truhe (Tag 7) als breite Zeile darunter – nichts wird lang gezogen */
  .days { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .day { padding: 5px 4px 7px; }
  .day.chest { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; padding: 6px 10px; }
  .day.chest .ic.big { width: 44px; height: 44px; }
  .day.chest .day-goods { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px 10px; }
}

/* Wunsch des Stammes (über den Aufträgen) */
.wish-card {
  display: flex; align-items: center; gap: 14px; border: 3px solid var(--gold); border-radius: 20px; padding: 10px 16px;
  background: linear-gradient(#fff8dc, #ffefc0); box-shadow: 0 4px 0 rgba(var(--shadow-rgb), 0.15);
}
.wish-card.later { border-color: var(--line-soft); background: var(--paper); opacity: 0.85; }
.wish-card .q-main > span:not(.q-reward) { font-size: 14px; }
.rs-hint.neutral { color: var(--ink-soft); }

/* Sehr kleine Handys quer: Waren in einer Zeile zum Wischen, damit die Karte Platz behält (vorher vier Zeilen) */
@media (max-height: 340px) {
  #topbar .chips:not(.right) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #topbar .chips:not(.right)::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* Schatzkiste */
.find-page { margin: 14px 4px 6px; font-size: 16px; color: var(--accent); }
.find-page small { font-weight: normal; opacity: 0.7; }
.find-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.find-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 8px 6px; border-radius: 12px; background: var(--paper); border: 2px solid var(--line-soft);
}
.find-card.got { background: linear-gradient(#fffbe8, #fff0c2); border-color: #e0b84c; }
.find-card:not(.got) .find-ic { filter: grayscale(1); opacity: 0.55; }
.find-card b { font-size: 13px; line-height: 1.15; }
.find-card em { font-style: normal; font-size: 12px; font-weight: bold; }
.find-card small { font-size: 11px; line-height: 1.2; opacity: 0.8; }
.find-card .btn { margin-top: 4px; padding: 3px 8px; font-size: 12px; }

/* Wunderwerke */
.wonder-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.wonder-head p { margin: 0; }
.ic.wonder-pic { width: 110px; height: 110px; line-height: 110px; font-size: 60px; object-fit: contain; flex: none; }
.wonder-bonus { margin-bottom: 8px; }
.wonder-step .q-main { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.wonder-step.locked { opacity: 0.65; }
.wonder-cost { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wonder-album { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px; border-radius: 12px; background: var(--paper); border: 2px solid var(--line-soft); }
.wonder-album div { display: flex; flex-direction: column; }
.wonder-album.got { background: linear-gradient(#fffbe8, #fff0c2); border-color: #e0b84c; }
.wonder-step .q-bar { width: 100%; align-self: stretch; }
.wonder-step .btn { align-self: flex-start; }

/* Shop */
.shop-head { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 8px; text-align: center; }
.shop-gold { font-size: 24px; font-weight: bold; }
.shop-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.shop-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 6px 12px; font-size: 18px; }
.shop-pack .shop-price { font-size: 15px; }
.shop-pack.best { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.shop-best { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--gold); color: #fff; font-size: 12px; font-weight: bold; border-radius: 999px; padding: 1px 10px; }
.shop-tabs { display: flex; width: 100%; margin: 0 0 6px; }
.shop-tabs button { flex: 1; padding: 9px 4px; font-size: 14px; }
.shop-pack small, .shop-euro { display: block; font-size: 11px; font-weight: normal; opacity: 0.8; }
.shop-speed .q-main { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.shop-speed-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

/* Auswahl mit mehreren Knöpfen (Menü: Blasen) */
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; flex: none; }
.seg button { border: 0; background: var(--paper); padding: 6px 10px; font-weight: bold; font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line-soft); }
.seg button.on { background: linear-gradient(#7ed957, #4caf50); color: #fff; }

/* Wunderwerke: Effekte als Kacheln, fertige Bauschritte eingeklappt (Emin, 07.11.) */
.effect-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 10px 0; }
.effect { display: flex; gap: 10px; align-items: center; background: var(--tint); border-radius: 12px; padding: 9px 12px; font-size: 14px; font-weight: bold; }
.effect .emoji { font-size: 22px; }
.done-badge { display: inline-block; background: #dff0cf; color: var(--green-dark); border-radius: 99px; padding: 3px 10px; font-weight: bold; font-size: 13px; margin-bottom: 4px; }
details.history { margin-top: 10px; border-top: 1px dashed var(--line-soft); padding-top: 8px; }
details.history summary { cursor: pointer; font-weight: bold; color: var(--ink-soft); padding: 6px 2px; }
.wonder-where { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--tint); border: 2px solid var(--accent); border-radius: 14px; padding: 10px 14px; margin: 8px 0; }
.wonder-where p { margin: 0; flex: 1; min-width: 200px; }

/* Kleines Gebäudefenster als schmale Leiste, tags und nachts gleich (Emin, 07.11.) */
#info-pop.chip { border-radius: 40px; padding: 5px 6px 5px 8px; max-width: min(440px, calc(100vw - 16px)); background: linear-gradient(#fff, #fffdf6); color: #3a3a22; border-color: #b9a878; }
.pop-chip { display: flex; align-items: center; gap: 8px; }
.pop-chip .pop-pic { width: 40px; height: 40px; font-size: 28px; line-height: 40px; flex: none; }
.pop-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.pop-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#info-pop .pop-text small { margin: 1px 0 0; font-size: 12px; font-weight: bold; color: #6e6a4a; }
.lvl-badge { background: #f2b632; color: #4a3200; border-radius: 99px; padding: 1px 7px; font-size: 12px; vertical-align: 1px; }
/* Runder Knopf: Schließen, Info, Pause, Ausbauen – überall gleich, mindestens fingergroß */
.rb { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid #b9a878; background: #eef4dc; color: #3a3a22;
  display: inline-grid; place-items: center; font-size: 18px; font-weight: bold; padding: 0; box-shadow: 0 2px 0 #b9a878; }
.rb:active { transform: translateY(2px); box-shadow: 0 0 0 #b9a878; }
.rb.main { background: linear-gradient(#7ed957, #4caf50); border-color: #2e7d32; color: #fff; box-shadow: 0 2px 0 #2e7d32; font-family: Georgia, serif; font-style: italic; font-size: 20px; }
.rb.up { background: linear-gradient(#ffe08a, #f2b632); border-color: #b07a10; color: #4a3200; box-shadow: 0 2px 0 #b07a10; }
.rb:disabled { opacity: 0.45; }
/* Beschleunigen mit Steinen: blauer Knopf, kleine Zahl = Steine übrig */
.rb.fast { position: relative; background: linear-gradient(#8fd3ff, #3a8fd8); border-color: #1f5f9a; color: #fff; box-shadow: 0 2px 0 #1f5f9a; font-size: 20px; }
.rb.fast i { position: absolute; right: -5px; bottom: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: #1f5f9a;
  border: 2px solid #1f5f9a; font: 700 11px/14px system-ui, sans-serif; font-style: normal; box-sizing: border-box; }

/* Ladefenster: Prozent und Ladeschritte (Emin, 07.11.) */
.load-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.load-row .load-track { margin-top: 0; }
#loading-pct { color: #fff; font-size: 20px; min-width: 3.2em; text-align: left; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums; }
#loading-step { color: #fff; font-weight: bold; font-size: 16px; margin: 10px 0 0; min-height: 1.3em; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
#loading-text { margin-top: 4px; font-size: 13px; opacity: 0.9; }

/* Das kleine Fenster liegt über dem Ältesten, der Älteste ist kleiner (verdeckte das Fenster, 07.11.) */
#info-pop { z-index: 30; }
#tutorial .elder { width: 72px; height: 72px; }
#tutorial { max-width: min(400px, 62vw); }
#info-pop .pop-text small { white-space: normal; }

/* Großes Gebäudefenster: Werte als Kacheln, ✕ oben rechts, Abreißen als roter Text (Design-Bewertung 07.11.) */
#dialog-box { position: relative; }
.dlg-x { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; font-size: 15px; z-index: 2; }
.dlg-head h2 { padding-right: 40px; text-align: left !important; }
.vtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin: 8px 0; }
.vtile { background: var(--tint); border-radius: 12px; padding: 6px 4px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.vtile b { font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.vtile b .ic.mini { width: 22px; height: 22px; }
.vtile small { font-size: 11px; color: var(--ink-soft); font-weight: bold; }
.vtile.bad { background: #fde3dc; }
.vtile.bad b { color: #b0392b; }
ul.lines.notes { margin: 4px 0; padding-left: 4px; list-style: none; font-size: 13px; }
.level-card h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.level-card .stars { color: #f2b632; letter-spacing: 2px; font-size: 17px; }
.level-card .stars i { font-style: normal; color: var(--line-soft); }
.why-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.why { color: #b06a00; font-weight: bold; font-size: 13px; }
.btn.text-danger { background: transparent; box-shadow: none; color: #c0392b; margin-left: auto; }
details.more summary { background: transparent; color: var(--green-dark); padding: 6px 2px; }
details.more summary::before { content: '▸ '; }
details.more[open] summary::before { content: '▾ '; }

/* Schmale Seitenleiste: nur Symbole mit Zahl-Punkt, die Forschung zeigt ihre Restzeit (Design-Bewertung 07.11.) */
.side-btn { width: 50px; height: 50px; }
.side-btn span { display: none; }
.side-btn.running { height: 58px; }
.side-btn.running span { display: block; font-size: 10px; }
.side-btn .ic { width: 32px; height: 32px; }
@media (max-height: 420px) { .side-btn { width: 44px; height: 44px; } .side-btn.running { height: 52px; } .side-btn .ic { width: 28px; height: 28px; } }
.find-card.finished { opacity: 0.75; }
.swap-help .q-main small { display: block; }

/* „Jetzt bauen“ aus der Forschung: das gesuchte Gebäude blinkt kurz in der Leiste */
.bar-item.pulse { animation: bar-pulse 0.6s ease-in-out 4; outline: 3px solid var(--gold); }
@keyframes bar-pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bar-item.pulse { animation: none; } }
.quest-card.ready { border-color: #f2c94c; }
.quest-card .why { color: #b06a00; font-weight: bold; }

/* Info vor dem Bauen (Emin, 07.11.): ⓘ an jeder Karte der Bauleiste, Kurzinfo beim Hinsetzen */
.bar-info { position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #2e7d32; padding: 0;
  background: linear-gradient(#7ed957, #4caf50); color: #fff; font: italic bold 14px Georgia, serif; line-height: 20px; z-index: 2; box-shadow: 0 1px 0 #2e7d32; opacity: 1; font-size: 13px; line-height: 18px; }
/* außen auf der linken oberen Ecke der Karte: verdeckt weder Bild noch Namen noch Kosten (Emin, 07.11.) */
#buildbar { padding-top: 10px; }
.bar-item .new + .bar-info, .bar-item .bar-info { touch-action: manipulation; }
.round.info { background: linear-gradient(#7ed957, #4caf50); font: italic bold 22px Georgia, serif; color: #fff; }
.action-text .ghost-info { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 1px; }
.bar-facts { background: var(--tint); border-radius: 12px; padding: 8px 10px; font-weight: bold; }

/* Design-Kontrolle 07.11. (iPhone, Android, Rechner) */
/* Shop: alles gleich breit wie die übrigen Listen, auch am großen Bildschirm */
.shop { width: 100%; max-width: 760px; margin: 0 auto; }
/* Beim Hinsetzen: Text bekommt Platz, auf schmalen Bildschirmen stehen die Knöpfe darunter */
.action-text { flex: 1 1 auto; min-width: min(230px, 55vw); max-width: 420px; }
@media (max-width: 560px) {
  #action-bar { flex-wrap: wrap; justify-content: flex-end; border-radius: 22px; width: calc(100vw - 20px); box-sizing: border-box; }
  #action-bar .action-text { flex-basis: 100%; max-width: none; }
}
/* Karten mit Text und Knopf: auf schmalen Bildschirmen rutscht der Knopf unter den Text (Schatzkiste hochkant) */
@media (max-width: 560px) {
  .quest-card.swap-help { flex-wrap: wrap; }
  .quest-card.swap-help .q-main { flex: 1 1 60%; min-width: 0; }
  .quest-card.swap-help > .btn { flex-basis: 100%; }
}
/* Seitenkopf hochkant: „← Zurück“ bleibt einzeilig, lange Titel werden etwas kleiner */
.page-head .back { white-space: nowrap; flex: none; }
@media (max-width: 460px) { .page-head h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } }
/* Lager: Einnahmen ▲ grün und Ausgaben ▼ rot nebeneinander (Emin, 07.11.) */
.lager-flow { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; margin-left: auto; }
.lager-flow em { white-space: nowrap; font-weight: bold; }
/* Handy hochkant (Emin, 07.11.): Bauleiste ohne leeren Streifen links, Kategorien enden vor dem ▾-Knopf */
@media (max-width: 699px) and (min-height: 501px) {
  #buildbar { padding-left: calc(10px + var(--safe-l)); }
  #bar-tabs { left: calc(8px + var(--safe-l)); right: calc(60px + var(--safe-r)); }
}

/* V210 (große Prüfung): Bedienung am Handy */
/* größere Tippflächen, ohne dass sich das Aussehen ändert */
.chip { position: relative; }
.chip::after { content: ''; position: absolute; inset: -7px -2px; }   /* Anzeigen oben waren nur 26 px hoch */
.bar-info::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; }   /* ⓘ war 22 px */
@media (max-height: 500px) { .bar-tab::after { inset: -5px -2px; } }
/* Kerbe und Kamera: auch Seitenkopf, Fenster und Forschungsdetail halten Abstand (vorher nur die obere Leiste) */
.page-head { padding-top: calc(4px + var(--safe-t)); }
#page-body { padding-bottom: calc(8px + var(--safe-b)); }
#dialog-box { max-height: calc(100vh - 24px - var(--safe-t) - var(--safe-b)); }
@media (max-width: 699px) and (min-height: 521px) { .rs.sheet .rs-detail { padding-top: calc(12px + var(--safe-t)); } }
/* Seitenknöpfe mit Namen, wo der Platz reicht (hohe Handys hochkant); kleine Bildschirme bleiben schlank wie seit 07.11. */
@media (min-height: 760px) and (orientation: portrait) {
  .side-btn { height: 60px; }
  .side-btn span { display: block; font-size: 9.5px; line-height: 1.1; margin-top: 1px; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-btn .ic { width: 30px; height: 30px; }
  .side-btn.running { height: 60px; }
}

/* V267: Entscheidungen, Gaben, Chronik, Heureka, Weisheit */
.side-btn.attention { animation: glow 1.6s ease-in-out infinite; }
.choice-buttons { flex-direction: column; align-items: stretch; }
.choice-buttons .btn, .buttons .btn small { display: flex; flex-direction: column; align-items: center; }
.btn small { font-size: 11px; font-weight: normal; opacity: 0.8; }
.boons { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
.boon { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--tint); color: inherit; font: inherit; cursor: pointer; }
.boon .emoji { font-size: 30px; }
.boon small { font-size: 12px; opacity: 0.85; text-align: center; }
.boon:active { transform: translateY(2px); }
.chronicle > div { opacity: 0.7; }
.chronicle > div.done { opacity: 1; }
.chronicle > div.done b { color: #4a9a32; }
.eureka { display: block; padding: 4px 8px; border-radius: 8px; background: var(--tint); }
.eureka.done { color: #4a9a32; }
.wisdom { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; padding: 8px 10px; border-radius: 12px; background: var(--tint); }

/* V268: Übersicht */
.round.on { background: linear-gradient(#ffd36e, #f0a030); }
.overview .seg.wide { display: flex; margin: 0 auto 10px; width: fit-content; max-width: 100%; }
.quest.issue { display: flex; align-items: center; gap: 10px; }
.quest.issue .emoji { font-size: 26px; }
.quest.issue .q-text { flex: 1; display: flex; flex-direction: column; }
.quest.issue.lv3 { border-left: 5px solid #d6332a; }
.quest.issue.lv2 { border-left: 5px solid #e8b83a; }
.quest.issue.lv1 { border-left: 5px solid #9a8a60; }
.tile.on { outline: 3px solid #4caf50; }

/* V269: Einstellungen, Tempo */
input.vol { width: 130px; accent-color: #4caf50; }
#btn-speed.on { background: linear-gradient(#ffd36e, #f0a030); }
body.big-text #page, body.big-text #dialog, body.big-text #toast, body.big-text #topbar, body.big-text #side,
body.big-text #action-bar, body.big-text #info-pop, body.big-text #bar-tabs, body.big-text #buildbar, body.big-text #guide { zoom: 1.15; }

/* V271 Fotomodus: nur die Karte, unten zwei Knöpfe */
body.photo #topbar, body.photo #side, body.photo #buildbar, body.photo #bar-tabs, body.photo #bar-toggle, body.photo #action-bar,
body.photo #research-pill, body.photo #info-pop, body.photo #tutorial, body.photo #guide, body.photo #turn-hint, body.photo #update-banner { display: none !important; }
#photo-bar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  display: flex; gap: 10px; padding: 8px; border-radius: 14px; background: rgba(30, 22, 12, 0.55); }
#photo-bar.hidden { display: none; }

/* V277: zwei Forschungsplätze */
.rs-slots { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.rs-slot { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--line-soft); background: var(--paper); font: inherit; text-align: left; color: inherit; }
.rs-slot.frei { border-style: dashed; opacity: 0.8; }
.rs-slot-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rs-slot-mid { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rs-slot-mid b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-slot small { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
/* V277: Verlauf (Diagramme) */
.verlauf { margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: var(--tint); }
.verlauf.leer { text-align: center; color: var(--ink-soft); }
.verlauf-kopf, .verlauf-fuss { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.verlauf-kopf { font-weight: 700; margin-bottom: 4px; }
.verlauf-kopf em, .verlauf-fuss { font-style: normal; color: var(--ink-soft); }
.verlauf-kopf em.good { color: #3d8a26; }
.verlauf-kopf em.bad { color: #b8432a; }
.verlauf svg { display: block; width: 100%; height: 70px; }
.verlauf-linie { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.verlauf-flaeche { fill: rgba(111, 158, 79, 0.18); stroke: none; }
.verlauf-fuss { margin-top: 2px; font-size: 11px; }
.stamm-verlauf { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
@media (max-width: 560px) { .stamm-verlauf { grid-template-columns: 1fr; } }
