/* Copyright (c) 2026 Gerhard Kleibrink, DA6GK, Brake. Alle Rechte vorbehalten. */
/* Helles Mittelalter-Aussehen (V0.07): Pergament, warmes Braun, Burgunderrot und Gold */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, #fdf8ec 0%, #f3e6c8 55%, #e6d1a4 100%) fixed; color: #3b2a1a;
  font: 17px/1.45 "Segoe UI", Arial, sans-serif;
  display: flex; flex-direction: column; min-height: 100%;
}
button { font: inherit; cursor: pointer; }
.kopf {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; background: linear-gradient(#8a3424, #5e2016); border-bottom: 3px solid #c9a227;
  box-shadow: 0 2px 8px rgba(70, 30, 10, .35);
}
.kopf .name { font: bold 28px "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #f6d77a; letter-spacing: 1px; text-shadow: 0 2px 3px rgba(0, 0, 0, .45); }
.kopf .name span { color: #fbe9c0; }
.kopf .jahr { font: bold 20px "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #fbe9c0; }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 14px; }
.fuss {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  padding: 8px 18px; background: linear-gradient(#6a2618, #4e1a10); color: #e8d3b0; font-size: 14px; border-top: 2px solid #c9a227;
}
.fussknoepfe { display: flex; gap: 14px; }
.link { background: none; border: none; color: #8a3424; text-decoration: underline; padding: 0; }
.fuss .link { color: #f6d77a; }

/* Kästen */
.kasten { background: #fffaf0; border: 1px solid #d8c39a; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 3px 10px rgba(90, 60, 20, .15); }
.kasten h2 { margin: 0 0 10px; font: bold 22px "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #8a3424; }
.kasten h3 { margin: 14px 0 6px; font-size: 17px; color: #5e3b1f; }
.wer { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wer .titel { font: bold 24px "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #3b2a1a; }
.wer .alter { color: #7a6a50; }

/* Werte-Kacheln */
.werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 14px; }
.wert { background: linear-gradient(#fbf3e1, #f1e2c2); border: 1px solid #dcc79c; border-radius: 8px; padding: 6px 10px; }
.wert small { display: block; color: #7a6a50; font-size: 13px; }
.wert b { font: bold 22px Consolas, "Courier New", monospace; color: #7a4a0c; }

/* Schritte */
.schritte { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.schritte span { padding: 3px 10px; border-radius: 12px; background: #f3e7cc; color: #9a8a6a; font-size: 14px; border: 1px solid #dcc79c; }
.schritte span.jetzt { background: #8a3424; color: #fff7e0; font-weight: bold; border-color: #6a2418; }
.schritte span.fertig { color: #5e4a2e; }

/* Tabellen und Zeilen */
table { border-collapse: collapse; width: 100%; }
td, th { padding: 5px 8px; text-align: left; border-bottom: 1px solid #e6d6b4; }
th { color: #7a6a50; font-weight: normal; font-size: 14px; }
td.z, th.z { text-align: right; font-family: Consolas, "Courier New", monospace; }
.zeile { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-bottom: 1px solid #e6d6b4; }
.zeile .was { flex: 1 1 220px; }
.zeile .was small { display: block; color: #7a6a50; }
input[type=number], input[type=text], select {
  font: bold 18px Consolas, "Courier New", monospace; background: #fffdf7; color: #3b2a1a;
  border: 1px solid #c9b080; border-radius: 5px; padding: 6px 8px; width: 130px;
}
input[type=text] { font-family: inherit; font-weight: normal; width: 180px; }
select { font-family: inherit; font-weight: normal; width: auto; }
input[type=range] { width: 220px; accent-color: #8a3424; }
.btn {
  background: linear-gradient(#f7ebcf, #e6d1a2); color: #3b2a1a; border: 1px solid #b8975e; border-radius: 6px;
  padding: 7px 14px; min-height: 40px; box-shadow: 0 1px 2px rgba(90, 60, 20, .2);
}
.btn:hover { background: linear-gradient(#fbf2dc, #ecdab0); }
.btn.haupt { background: linear-gradient(#b0452f, #7a2e1f); color: #fff7e0; border-color: #5e2016; font-weight: bold; }
.btn.haupt:hover { background: linear-gradient(#c05238, #8a3424); }
.btn.klein { padding: 4px 10px; min-height: 34px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: default; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.wahl .btn.an { background: linear-gradient(#b0452f, #7a2e1f); color: #fff7e0; border-color: #5e2016; font-weight: bold; }

/* Meldungen */
.bericht { margin: 0; padding: 0; list-style: none; }
.bericht li { padding: 5px 0 5px 26px; position: relative; border-bottom: 1px dotted #dcc79c; }
.hinweis { color: #7a6a50; font-size: 15px; }
.gut { color: #2e7d32; }
.schlecht { color: #b3261e; }
.meldung { margin-top: 10px; padding: 8px 12px; border-left: 4px solid #c9a227; background: #f7ecd6; border-radius: 0 6px 6px 0; }
.gross { font: bold 30px "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #8a3424; text-align: center; margin: 14px 0; }

/* Aufstieg */
.ziel { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.ziel div { padding: 5px 9px; background: #f7ecd6; border-radius: 6px; font-size: 15px; border: 1px solid #e6d6b4; }
.ziel div.ok { color: #2e7d32; }
.ziel div.nein { color: #7a6a50; }

/* Startbildschirm */
.spielerliste .zeile .was { flex: 0 0 auto; min-width: 90px; }
.startbild { text-align: center; padding: 10px 0 4px; }
.startbild svg { width: 120px; height: 120px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .kopf .name { font-size: 22px; }
  main { padding: 8px; }
  .wert b { font-size: 19px; }
  input[type=range] { width: 100%; }
}

/* Bilder */
svg.bild { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto 14px; border-radius: 8px; border: 2px solid #c9b080; box-shadow: 0 3px 10px rgba(90, 60, 20, .25); }
.bericht li { padding-left: 36px; min-height: 34px; }
.bericht li svg.ic { position: absolute; left: 2px; top: 4px; width: 26px; height: 26px; }
.wert { display: flex; align-items: center; gap: 8px; }
.wert svg.wsym { width: 32px; height: 32px; flex: none; }
/* Beschriftung oben, Zahl immer unten – so stehen alle Zahlen einer Reihe auf gleicher Höhe, auch wenn die Beschriftung zweizeilig ist */
.wert > div { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; }
svg.krone { width: 34px; height: 27px; vertical-align: -4px; margin-right: 6px; }
.wer .titel svg.ic { width: 24px; height: 24px; vertical-align: -3px; margin-right: 4px; }
td svg.ic, .spielerliste svg.ic { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
td svg.krone { width: 26px; height: 21px; }
.ziel div svg.ic { width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; }
.zeile svg.bsym { width: 40px; height: 40px; flex: none; }

/* Bewegte Bilder (V0.04) */
.an-dreh { animation: dreh 8s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dreh { to { transform: rotate(360deg); } }
.an-zieh { animation: zieh 40s ease-in-out infinite alternate; }
@keyframes zieh { from { transform: translateX(-70px); } to { transform: translateX(70px); } }
.an-rauch { animation: rauch 4.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rauch { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(8px, -18px) scale(1.5); opacity: 0; } }
.an-rauchG { animation: rauchG 4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rauchG { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(24px, -90px) scale(1.8); opacity: 0; } }
.an-flamme { animation: flamme .9s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flamme { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(.88, 1.1) skewX(3deg); } 50% { transform: scale(1.06, .93); } 75% { transform: scale(.94, 1.06) skewX(-3deg); } }
.an-glut { animation: glut 2.2s ease-in-out infinite alternate; }
@keyframes glut { from { opacity: .6; } to { opacity: 1; } }
.an-funkel { animation: funkel 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes funkel { 0%, 100% { transform: scale(.2) rotate(0deg); opacity: 0; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
.an-wippen { animation: wippen .7s ease-in-out infinite alternate; }
@keyframes wippen { from { transform: translateY(0); } to { transform: translateY(-1.6px); } }
.an-gehen { animation: gehen 26s linear infinite; }
@keyframes gehen { from { transform: translateX(-30px); } to { transform: translateX(830px); } }
.an-marsch { animation: marsch 3.2s ease-in-out infinite alternate; }
@keyframes marsch { from { transform: translateX(0); } to { transform: translateX(16px); } }
.an-marsch2 { animation: marsch2 3.6s ease-in-out infinite alternate; }
@keyframes marsch2 { from { transform: translateX(0); } to { transform: translateX(-16px); } }
.an-jubel { animation: jubel .5s ease-in-out infinite alternate; }
@keyframes jubel { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.an-schwert { animation: schwert .6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes schwert { from { transform: scale(.92) rotate(-5deg); } to { transform: scale(1.08) rotate(5deg); } }
.an-staub { animation: staub 1.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes staub { from { transform: scale(.85); opacity: .5; } to { transform: scale(1.2); opacity: 1; } }
.an-pfeil { animation: pfeil 2.2s linear infinite; }
@keyframes pfeil { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(150px, -24px); } 90% { opacity: 1; } 100% { transform: translate(300px, 30px); opacity: 0; } }
.an-pfeil2 { animation: pfeil2 2.4s linear infinite; }
@keyframes pfeil2 { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(-150px, -24px); } 90% { opacity: 1; } 100% { transform: translate(-300px, 34px); opacity: 0; } }
.an-pendel { animation: pendel 3.4s ease-in-out infinite alternate; transform-box: view-box; }
@keyframes pendel { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.an-regen { animation: regen .45s linear infinite; }
@keyframes regen { to { transform: translateY(44px); } }
.an-flug { animation: flug 30s linear infinite; }
@keyframes flug { from { transform: translateX(-220px); } to { transform: translateX(760px); } }
.an-flattern { animation: flattern .35s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes flattern { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
.an-wasser { animation: wasser 3.5s ease-in-out infinite alternate; }
@keyframes wasser { from { transform: translateX(-8px); opacity: .5; } to { transform: translateX(8px); opacity: 1; } }
.an-stern { animation: stern 2.5s ease-in-out infinite alternate; }
@keyframes stern { from { opacity: .15; } to { opacity: 1; } }
.an-rinnen { stroke-dasharray: 2 2; animation: rinnen .4s linear infinite; }
@keyframes rinnen { to { stroke-dashoffset: -4; } }
.an-schweben { animation: schweben 2.6s ease-in-out infinite alternate; }
@keyframes schweben { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.an-galopp { animation: galopp .3s ease-in-out infinite alternate; }
@keyframes galopp { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.an-fall { animation: fall 6s linear infinite; }
@keyframes fall { from { transform: translateY(-230px); } to { transform: translateY(30px); } }
.an-picken { animation: picken 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 30% 100%; }
@keyframes picken { 0%, 55%, 100% { transform: rotate(0deg); } 65% { transform: rotate(28deg); } 75% { transform: rotate(0deg); } 85% { transform: rotate(28deg); } }

/* Musik-Knopf (V0.05) */
.kopfrechts { display: flex; align-items: center; gap: 8px; }
.kopfrechts .jahr { margin-right: 6px; }
.musikknopf { display: inline-flex; align-items: center; gap: 5px; background: rgba(255, 240, 200, .14); color: #fbe9c0; border: 1px solid #e8c97a; border-radius: 16px; padding: 4px 11px; font-size: 14px; }
.musikknopf:hover { background: rgba(255, 240, 200, .28); }
/* mehr Bewegung (V0.07) */
.an-reiten { animation: reiten 11s linear infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes reiten { 0% { transform: translate(-470px, 40px) scale(1.15); } 50% { transform: translate(20px, -14px) scale(.95); } 100% { transform: translate(480px, -46px) scale(.72); } }
.an-glanz { animation: glanz 4s ease-in-out infinite; }
@keyframes glanz { 0%, 55% { transform: translateX(0); } 100% { transform: translateX(150px); } }
.an-hinher { animation: hinher 10s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes hinher { 0% { transform: translateX(0) scaleX(1); } 48% { transform: translateX(44px) scaleX(1); } 50% { transform: translateX(44px) scaleX(-1); } 98% { transform: translateX(0) scaleX(-1); } 100% { transform: translateX(0) scaleX(1); } }
.an-tragen { animation: tragen 8s linear infinite; transform-box: fill-box; transform-origin: center; }
/* Sack der Träger: nur auf dem Weg zum Speicher sichtbar (abgelegt am Speicher, neu aufgenommen am Wagen) */
.an-tragen.an-mitsack { animation: tragen 8s linear infinite, sackweg 8s linear infinite; }
@keyframes sackweg { 0%, 46% { opacity: 1; } 47%, 97% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes tragen { 0% { transform: translateX(0) scaleX(-1); } 46% { transform: translateX(-150px) scaleX(-1); } 50% { transform: translateX(-150px) scaleX(1); } 96% { transform: translateX(0) scaleX(1); } 100% { transform: translateX(0) scaleX(-1); } }
.an-gehen2 { animation: gehen2 30s linear infinite; }
@keyframes gehen2 { from { transform: translateX(830px); } to { transform: translateX(-30px); } }
.an-kreisen { animation: dreh 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.an-wehen { animation: wehen 9s linear infinite; }
@keyframes wehen { from { transform: translateX(-20px); } to { transform: translateX(830px); } }
.an-blitz { animation: blitz 7s linear infinite; opacity: 0; }
@keyframes blitz { 0%, 88%, 91%, 93%, 100% { opacity: 0; } 89% { opacity: .55; } 92% { opacity: .35; } }

/* Bebilderte Anleitung (V0.09) */
.regeln .buchtitel { text-align: center; font-size: 28px; letter-spacing: 1px; }
.initiale { font-size: 17px; line-height: 1.6; }
.initiale::first-letter { float: left; font: bold 58px/0.85 "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #fff7e0; background: linear-gradient(#b0452f, #7a2e1f); border: 3px double #c9a227; padding: 8px 10px 6px; margin: 4px 12px 0 0; border-radius: 4px; text-shadow: 0 2px 2px rgba(0, 0, 0, .4); }
.schmuck { margin: 18px auto 6px; max-width: 520px; }
.schmuck svg { display: block; width: 100%; height: auto; }
.kapitel { text-align: center; font: bold 22px "Palatino Linotype", "Book Antiqua", Palatino, serif !important; color: #8a3424 !important; margin: 4px 0 12px !important; }
.regelschritt { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px dotted #dcc79c; }
.regelschritt:nth-child(even) { grid-template-columns: 1fr minmax(180px, 300px); }
.regelschritt:nth-child(even) .regelbild { order: 2; }
.regelbild svg.bild { margin: 0; }
.regelschritt p { margin: 4px 0 0; }
.regelkopf { font: bold 19px "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #5e3b1f; display: flex; align-items: center; gap: 10px; }
.regelkopf .nr { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(#b0452f, #7a2e1f); color: #fff7e0; border: 2px solid #c9a227; font-size: 16px; flex: none; }
.leiter { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.stufe { text-align: center; background: linear-gradient(#fbf3e1, #f1e2c2); border: 1px solid #dcc79c; border-radius: 8px; padding: 8px 4px; }
.stufe svg.krone { width: 56px; height: 45px; display: block; margin: 0 auto 4px; }
.stufe b { display: block; font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #3b2a1a; }
.stufe small { display: block; color: #7a6a50; }
.stufe span { display: block; font-size: 13px; color: #8a5a14; margin-top: 4px; }
.bauwerke { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.bauwerk { display: flex; gap: 10px; align-items: center; background: #f7ecd6; border: 1px solid #e6d6b4; border-radius: 8px; padding: 8px 10px; }
.bauwerk svg.bsym { width: 48px; height: 48px; flex: none; }
.bauwerk small { color: #7a6a50; }
.ratschlaege { display: grid; gap: 8px; }
.rat { display: flex; gap: 10px; align-items: center; background: #fffdf5; border: 1px dashed #c9b080; border-radius: 8px; padding: 8px 12px; }
.rat svg.ic { width: 30px; height: 30px; flex: none; }
@media (max-width: 640px) {
  .regelschritt, .regelschritt:nth-child(even) { grid-template-columns: 1fr; }
  .regelschritt:nth-child(even) .regelbild { order: 0; }
}
/* schmale Bildschirme: Musik-/Töne-Knöpfe nur als Symbol */
@media (max-width: 600px) {
  .kopf { padding: 8px 10px; }
  .kopfrechts { gap: 6px; }
  .kopfrechts .jahr { font-size: 16px; margin-right: 2px; }
  .musikknopf { font-size: 0; padding: 6px 8px; gap: 0; }
  .regeln .buchtitel { font-size: 24px; }
}

/* Breite Bildschirme ausnutzen (V0.10) */
main { max-width: 1600px; }
.hauptKasten svg.bild { max-width: 940px; }
.werteKasten .werte { margin-bottom: 0; }
.seitentitel { margin: 0 0 10px !important; font: bold 19px "Palatino Linotype", "Book Antiqua", Palatino, serif !important; color: #8a3424 !important; }
@media (min-width: 1100px) {
  .spielraster { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 14px; align-items: start; }
  .spielraster .hauptKasten { grid-column: 1; grid-row: 1 / span 3; }
  .spielraster .werteKasten { grid-column: 2; grid-row: 1; position: sticky; top: 10px; }
  .spielraster .zielKasten { grid-column: 2; grid-row: 2; }
  .spielraster .werte { grid-template-columns: 1fr 1fr; }
  .spielraster .ziel { grid-template-columns: 1fr; }
}
@media (min-width: 1500px) { .spielraster { grid-template-columns: minmax(0, 1fr) 420px; } }

/* Startseite (V0.11) */
.startseite { max-width: 1200px; margin: 0 auto; }
.held { position: relative; margin-bottom: 14px; }
.held svg.bild { max-width: none; margin: 0; border-width: 3px; border-color: #c9a227; }
.titelbanner { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); text-align: center;
  background: linear-gradient(#fdf6e6, #ecd9ae); border: 3px double #c9a227; border-radius: 12px; padding: 4px 34px 8px;
  box-shadow: 0 6px 18px rgba(40, 20, 5, .45); }
.titelbanner h1 { margin: 0; font: bold clamp(30px, 3.6vw, 54px) "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #8a3424; letter-spacing: 2px; text-shadow: 0 2px 0 #fff3c8; }
.titelbanner h1 span { color: #c9a227; }
.titelbanner p { margin: 0; font: italic clamp(13px, 1.2vw, 18px) "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #5e3b1f; }
svg.titelkrone { width: clamp(44px, 4.5vw, 70px); height: auto; display: block; margin: -2px auto 0; }
.startspalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.startmenue { display: flex; flex-direction: column; gap: 10px; }
.startknopf { display: flex; align-items: center; gap: 14px; text-align: left; padding: 10px 18px; min-height: 64px; font-size: 20px; }
.startknopf span { display: flex; flex-direction: column; }
.startknopf b { font: bold 21px "Palatino Linotype", "Book Antiqua", Palatino, serif; }
.startknopf small { font-size: 14px; opacity: .85; font-weight: normal; }
.startknopf svg.ic.gross { width: 38px; height: 38px; flex: none; }
.starttext { margin: 4px 0 0; color: #5e4a2e; font-size: 15px; }
.ruhmeshalle h2 { display: flex; align-items: center; gap: 4px; }
.ruhmeshalle ol { list-style: none; margin: 0; padding: 0; }
.ruhmeshalle li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dotted #dcc79c; }
.ruhmeshalle li svg.ic { width: 26px; height: 26px; flex: none; }
.ruhmeshalle li span { display: flex; flex-direction: column; }
.ruhmeshalle li b { font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #7a4a0c; font-size: 18px; }
.ruhmeshalle li small { color: #7a6a50; }
@media (max-width: 800px) { .startspalten { grid-template-columns: 1fr; } }

/* Szene als Bildschirm-Hintergrund, Tafeln darüber (V0.14) */
#szene { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #3a5a8a; }
#szene > svg { display: block; width: 100%; height: 100%; }
.kasten { background: rgba(255, 250, 240, .9); backdrop-filter: blur(4px); border-color: rgba(201, 162, 39, .55); box-shadow: 0 6px 22px rgba(20, 10, 0, .35); }
.spielraster { margin-top: 24vh; }
.untenKasten { max-width: 1000px; margin: 26vh auto 14px; }
.startseite { padding-top: 2vh; }
.titelbanner { position: static; transform: none; display: table; margin: 0 auto; }
.startspalten { margin-top: 22vh; }
.regeln, main > .kasten:not(.untenKasten) { max-width: 1200px; margin-left: auto; margin-right: auto; }
.fuss { position: relative; z-index: 1; }
/* Szene oben, darunter Holztisch mit den Tafeln */
#szene { background:
  repeating-linear-gradient(90deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 120px),
  repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 7px),
  linear-gradient(#6b4423, #4a2c16); }
#szene > svg { position: absolute; top: 0; left: 0; width: 100%; height: calc(50px + 52vh);
  -webkit-mask-image: linear-gradient(#000 92%, transparent); mask-image: linear-gradient(#000 92%, transparent); }
.spielraster { margin-top: calc(52vh - 100px); }
.untenKasten { margin-top: calc(52vh - 100px); }
.startspalten { margin-top: max(12px, calc(52vh - 260px)); }
.spielraster, .untenKasten { margin-top: calc(52vh - 145px); }
@media (min-width: 1400px) {
  .spielraster .werte { grid-template-columns: repeat(3, 1fr); }
  .spielraster .ziel { grid-template-columns: 1fr 1fr; }
  .spielraster .wert { padding: 4px 8px; }
  .spielraster .wert svg.wsym { width: 26px; height: 26px; }
  .spielraster .wert b { font-size: 19px; }
}

/* Zählwerk (V0.23): Zahlen rollen zum neuen Wert, kurz grün (mehr) bzw. rot (weniger) */
.zaehler { display: inline-block; font-variant-numeric: tabular-nums; }
.zaehler.rollt { animation: zaehlerWackeln .09s linear infinite; }
.zaehler.rauf { animation: zaehlerWackeln .09s linear infinite, zaehlerGruen 1.8s ease-out; }
.zaehler.runter { animation: zaehlerWackeln .09s linear infinite, zaehlerRot 1.8s ease-out; }
.zaehler.rauf:not(.rollt) { animation: zaehlerGruen 1.8s ease-out; }
.zaehler.runter:not(.rollt) { animation: zaehlerRot 1.8s ease-out; }
@keyframes zaehlerWackeln { 0% { transform: translateY(-1px); } 50% { transform: translateY(1px); } 100% { transform: translateY(-1px); } }
@keyframes zaehlerGruen { 0%, 55% { color: #1f7a2c; text-shadow: 0 0 8px rgba(60, 170, 70, .55); } 100% { color: #7a4a0c; text-shadow: none; } }
@keyframes zaehlerRot { 0%, 55% { color: #b3261e; text-shadow: 0 0 8px rgba(200, 50, 40, .5); } 100% { color: #7a4a0c; text-shadow: none; } }

/* Kräftigere Schrift in den Spielfeldern (V0.23), passend zu „Ihr Reich“ */
.hauptKasten, .untenKasten, .zielKasten, .kasten.regeln { color: #2e1f10; }
.hauptKasten p, .hauptKasten li, .hauptKasten .zeile, .untenKasten p, .untenKasten li, .hinweis, .meldung, .ziel div { font-weight: 600; }
.zeile .was b { font-size: 19px; color: #3b2410; }
.zeile .was small, .wert small { color: #5e4a30; font-weight: 600; }
.zeile .was small { font-size: 14px; }
.hinweis { color: #5e4a30; }
.zahl, #zollW, #estW { font: bold 1.08em Consolas, "Courier New", monospace; color: #7a4a0c; }
.gut .zahl, .schlecht .zahl { color: inherit; }
td.z, th.z { font-weight: bold; color: #7a4a0c; }
input[type=number], input[type=text] { color: #7a4a0c; }
.schritte span { font-weight: 600; }
.hauptKasten h2, .untenKasten h2 { font-size: 24px; }

/* ---------- Neuer Aufbau (Probe V0.26): Vorratsleiste oben, Szene frei, Bedienbrett unten ---------- */
body.hud #szene > svg { top: var(--oben); height: calc(100% - var(--oben) - var(--unten)); -webkit-mask-image: none; mask-image: none; }
body.hud main { padding: 0; }
.hudleiste {
  position: fixed; left: 0; right: 0; top: var(--kopf, 50px); z-index: 2;
  display: flex; align-items: center; gap: 18px; padding: 6px 18px;
  background: linear-gradient(#fbf3df, #ecdcb4); border-bottom: 2px solid #c9a227; box-shadow: 0 3px 10px rgba(40, 20, 0, .35);
}
.hudwer { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hudwer svg.ic { width: 26px; height: 26px; }
.hudwer svg.krone { width: 30px; height: 24px; margin: 0; }
.hudwer > span { display: flex; flex-direction: column; line-height: 1.15; }
.hudwer b { font: bold 18px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #3b2410; }
.hudwer small, .hudwert small, .zieltitel small { font-size: 12px; color: #6a5434; font-weight: 600; }
.hudwerte { display: flex; gap: 6px; flex: 1; justify-content: center; }
.hudwert { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 8px;
  background: linear-gradient(#fffaf0, #f3e4c3); border: 1px solid #d8c39a; }
.hudwert svg.wsym { width: 28px; height: 28px; flex: none; }
.hudwert > span { display: flex; flex-direction: column; line-height: 1.1; }
.hudwert b { font: bold 19px Consolas, "Courier New", monospace; color: #7a4a0c; }
.hudziel { display: flex; align-items: center; gap: 6px; white-space: nowrap; padding-left: 14px; border-left: 2px solid rgba(201, 162, 39, .6); }
.hudziel svg.krone { width: 30px; height: 24px; margin: 0; }
.zieltitel { display: flex; flex-direction: column; line-height: 1.1; margin-right: 4px; }
.zieltitel b { font: bold 16px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #8a3424; }
.zz { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px 2px 3px; border-radius: 12px; border: 1px solid #dcc79c; background: #fbf3e1; cursor: help; }
.zz svg.ic { width: 20px; height: 20px; }
.zz i { font: bold 12px Consolas, monospace; font-style: normal; color: #7a6a50; }
.zz.ok { background: #e3f1dc; border-color: #9cc78f; }
.zz.ok i { color: #2e7d32; font-size: 15px; }

.hudbrett {
  position: fixed; left: 0; right: 0; bottom: var(--fuss, 34px); z-index: 2;
  padding: 8px 18px 10px; color: #2e1f10; display: flex; flex-direction: column;
  background: linear-gradient(#fbf3df, #efdfba); border-top: 3px solid #c9a227; box-shadow: 0 -4px 14px rgba(40, 20, 0, .4);
}
.hudbrett .schritte { margin-bottom: 6px; }
.hudbrett .schritte span { font-size: 13px; padding: 2px 9px; }
.brettmitte { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 18px; flex: 1; }
.brettmitte h2 { margin: 0; font: bold 26px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #8a3424; }
.brettinhalt { min-width: 0; }
.brettknoepfe { display: flex; flex-direction: column; gap: 6px; }
.brettknoepfe .btn { min-width: 190px; }
.brettzeilen { display: flex; gap: 14px; flex-wrap: wrap; }
.brettzeile { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .55); border: 1px solid #dcc79c; flex: 1 1 520px; }
.brettzeile svg.bsym { width: 36px; height: 36px; flex: none; }
.brettzeile .was { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 150px; }
.brettzeile .was b { font-size: 19px; color: #3b2410; }
.brettzeile .was small { font-size: 13px; color: #5e4a30; font-weight: 600; }
.brettzeile input[type=number] { width: 120px; }
.brettinfo { margin-top: 6px; font-size: 14px; font-weight: 600; color: #5e4a30; }
.brettinfo.meldung { margin-top: 6px; padding: 4px 10px; }

/* Neuer Aufbau für alle Schritte (V0.27) */
.brettliste { max-height: 172px; overflow-y: auto; padding-right: 6px; }
.brettliste .bericht { columns: 2; column-gap: 28px; }
.brettliste .bericht li { break-inside: avoid; font-size: 15px; }
.brettspalten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.brettspalten.feld { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.brettfeld { display: flex; flex-direction: column; gap: 5px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .55); border: 1px solid #dcc79c; }
.brettfeld > b { font-size: 17px; color: #3b2410; }
.brettfeld small { font-size: 13px; color: #5e4a30; font-weight: 600; }
.brettfeld input[type=range] { width: 100%; }
.brettfeld table td, .brettfeld table th { padding: 2px 8px; font-size: 14px; }
.angriffzeile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.angriffzeile input { width: 100px; }
.bauleiste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.5fr); gap: 8px; align-items: stretch; }
.baukarte { display: flex; flex-direction: column; gap: 4px; padding: 6px 9px 7px; border-radius: 8px; background: rgba(255, 255, 255, .6); border: 1px solid #dcc79c; cursor: help; min-width: 0; }
.baukopf { display: flex; align-items: center; gap: 7px; }
.baukarte svg.bsym { width: 32px; height: 32px; flex: none; }
.baukarte .was { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.baukarte .was b { font-size: 16px; color: #3b2410; }
.baukarte .was small { font-size: 12px; color: #5e4a30; font-weight: 600; }
.bautext { font-size: 12px; line-height: 1.25; color: #6e5a3a; font-weight: 600; flex: 1; }
.pips { display: flex; gap: 3px; }
.pips i { flex: 1; height: 8px; border-radius: 2px; background: rgba(120, 90, 40, .15); border: 1px solid rgba(120, 90, 40, .25); }
.pips i.an { background: linear-gradient(#e8c25a, #b8862e); border-color: #9a7410; }
.baukarte .btn { width: 100%; }
.truppe { display: flex; align-items: flex-end; flex-wrap: nowrap; gap: 0; min-height: 27px; overflow: hidden; }
.truppe svg.tsym { width: 17px; height: 24px; flex: none; margin-right: 1px; }
.truppe em { font: normal bold 14px Consolas, monospace; color: #3b2410; margin: 0 6px 0 4px; }
.truppe small { font-size: 11px; color: #8a7652; font-weight: 600; margin-left: 8px; white-space: nowrap; }
.heerzeile { display: flex; gap: 6px; align-items: center; }
.heerzeile input { width: 100px; min-width: 92px; flex: 1; padding-left: 8px; padding-right: 4px; }
.heerzeile .btn { flex: none; width: auto; padding-left: 10px; padding-right: 10px; }
.brettinfo.gross2 { font-size: 18px; color: #3b2410; }
.aufstieg { display: flex; align-items: center; gap: 8px; font: bold 24px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #8a3424; margin-bottom: 4px; }
.aufstieg svg.krone { width: 40px; height: 32px; }
.hudbrett .wahl .btn.klein { min-height: 32px; }
/* Jahresende: Bericht, Kasse und Verlauf nebeneinander */
.jahresbilanz { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; align-items: stretch; }
.jahresbilanz .brettliste { max-height: 172px; }
.jahresbilanz .brettliste .bericht { columns: 1; }
.jahresbilanz .brettliste .bericht li { font-size: 14px; min-height: 28px; padding-top: 3px; padding-bottom: 3px; }
.jahresbilanz .brettliste .bericht li svg.ic { width: 22px; height: 22px; top: 3px; }
.bilanzkarte, .verlaufkarte { background: rgba(255, 255, 255, .6); border: 1px solid #dcc79c; border-radius: 8px; }
.bilanzkarte { padding: 4px 12px 5px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.bkopf, .vkopf { display: flex; align-items: center; gap: 6px; }
.bkopf b { font: bold 16px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #8a3424; }
svg.ksym { width: 22px; height: 22px; flex: none; }
.balken { display: grid; grid-template-columns: 74px 1fr 74px; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; font-weight: 600; color: #5e4a30; }
.balken .bb { height: 12px; background: rgba(120, 90, 40, .12); border-radius: 6px; overflow: hidden; }
.balken .bb i { display: block; height: 100%; border-radius: 6px; }
.balken .bz { text-align: right; font: bold 14px Consolas, monospace; color: #3b2410; }
.balken .bz.minus { color: #a8402c; } .balken .bz.plus { color: #2e7d32; }
.balken.summe { border-top: 1px solid #cdb582; padding-top: 3px; margin-top: 1px; color: #3b2410; }
.balken.summe .bz { font-size: 15px; }
.verlauf { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vraster { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; flex: 1; }
.verlaufkarte { position: relative; padding: 3px 8px; display: flex; flex-direction: column; }
.verlaufkarte .vkopf span { display: flex; flex-direction: column; line-height: 1.05; flex: 1; min-width: 0; }
.verlaufkarte .vkopf small { font-size: 11px; font-weight: 600; color: #6e5a3a; }
.verlaufkarte .vkopf b { font: bold 14px Consolas, monospace; color: #3b2410; }
.verlaufkarte em { font: normal bold 12px Consolas, monospace; color: #6e5a3a; white-space: nowrap; }
.verlaufkarte em.plus { color: #2e7d32; } .verlaufkarte em.minus { color: #a8402c; }
.verlaufkarte svg:not(.ksym) { width: 100%; height: 20px; flex: 1 1 auto; display: block; margin-top: 2px; }
.vzeile { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #6e5a3a; line-height: 14px; }
.vzeile .bb { height: 9px; background: rgba(120, 90, 40, .12); border-radius: 5px; overflow: hidden; }
.vzeile .bb i { display: block; height: 100%; border-radius: 5px; }
@media (max-width: 1320px) { .jahresbilanz { gap: 8px; } .balken { grid-template-columns: 58px 1fr 58px; gap: 5px; } .bilanzkarte { padding: 6px 8px; } }
@media (min-height: 900px) { .jahresbilanz .brettliste { max-height: 260px; } }
.brettmitte:has(.jahresbilanz) { align-items: stretch; }
.brettmitte:has(.jahresbilanz) > h2, .brettmitte:has(.jahresbilanz) > .brettknoepfe { align-self: center; }
.brettinhalt:has(.jahresbilanz) { display: flex; flex-direction: column; }
.jahresbilanz { flex: 1; }
.jahresbilanz .brettliste { align-self: center; }


/* Stehende Leute schauen ab und zu in die andere Richtung (V0.30) */
.an-schauen { animation: schauen 9s step-end infinite; transform-box: fill-box; transform-origin: center; }
@keyframes schauen { 0% { transform: scaleX(1); } 45% { transform: scaleX(-1); } 72% { transform: scaleX(1); } }

/* Gemalte Figuren laufen über das breite gemalte Bild (V0.31) */
.an-wandern { animation: wandern 30s linear infinite; }
.an-wandern2 { animation: wandern2 30s linear infinite; }
@keyframes wandern { from { transform: translateX(-160px); } to { transform: translateX(1700px); } }
@keyframes wandern2 { from { transform: translateX(1700px); } to { transform: translateX(-160px); } }
.an-schritt { animation: schritt .55s ease-in-out infinite alternate; }
@keyframes schritt { from { transform: translateY(0); } to { transform: translateY(-5px); } }
/* Daumenkino: 8 Schrittstellungen nacheinander (V0.32) */
.an-lauf8 { animation: lauf8 1s steps(8) infinite; transform-box: fill-box; }
@keyframes lauf8 { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Ratten huschen quer durch das Bild (V0.38) */
.an-rennen { animation: rennen 6s linear infinite; }
.an-rennen2 { animation: rennen2 6s linear infinite; }
@keyframes rennen { from { transform: translateX(-80px); } to { transform: translateX(880px); } }
@keyframes rennen2 { from { transform: translateX(880px); } to { transform: translateX(-80px); } }

/* Ratten im großen gemalten Bild, Träger an der Scheune (V0.40) */
.an-rennenG { animation: rennenG 6s linear infinite; }
.an-rennen2G { animation: rennen2G 6s linear infinite; }
@keyframes rennenG { from { transform: translateX(-150px); } to { transform: translateX(1700px); } }
@keyframes rennen2G { from { transform: translateX(1700px); } to { transform: translateX(-150px); } }
/* Magd mit Sack: Karren (x 1240) → Scheunentor (x 830), dann unsichtbar; Bauer: Scheune → Karren zurück */
.an-scheunehin { animation: scheunehin 14s linear infinite; }
.an-scheunezurueck { animation: scheunezurueck 14s linear infinite; }
@keyframes scheunehin { 0% { transform: translateX(0); opacity: 1; } 47% { transform: translateX(-410px); opacity: 1; } 48%, 100% { transform: translateX(-410px); opacity: 0; } }
@keyframes scheunezurueck { 0%, 49% { transform: translateX(-410px); opacity: 0; } 50% { transform: translateX(-410px); opacity: 1; } 97% { transform: translateX(0); opacity: 1; } 98%, 100% { transform: translateX(0); opacity: 0; } }

/* Spielende: Kasten tiefer, damit der Thronsaal frei zu sehen ist (V0.45) */
.untenKasten.endeKasten { margin-top: max(20px, calc(100vh - 440px)); padding-top: 8px; padding-bottom: 8px; }
.endeKasten .gross { margin: 4px 0; }

/* Zahlen in farbigen Kreisen/Knöpfen behalten ihre Schriftfarbe */
.nr .zahl, .btn .zahl, .schritte .zahl { color: inherit; font-family: inherit; font-size: inherit; }

/* Marktverkäufer (V0.50): meist ruhig, zwischendurch kurz winken/rufen; dazu leichtes Wiegen auf der Stelle */
.an-winken { animation: winken 7s infinite; transform-box: fill-box; }
@keyframes winken { 0%, 64% { transform: translateX(0); } 64.01%, 86% { transform: translateX(-50%); } 86.01%, 100% { transform: translateX(0); } }
.an-wiegen { animation: wiegen 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes wiegen { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }

/* Schatzmeister (V0.58): 4 Tätigkeiten nacheinander, je gut 2 Sekunden */
.an-pose4 { animation: pose4 9s steps(4) infinite; transform-box: fill-box; }
@keyframes pose4 { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Schreiber (V0.59): Feder bewegt sich – 5 Bilder, je knapp 1 Sekunde */
.an-pose5 { animation: pose5 4.5s steps(5) infinite; transform-box: fill-box; }
@keyframes pose5 { from { transform: translateX(0); } to { transform: translateX(-100%); } }
/* Schatzmeister (V0.66): 6 Bilder – Münze prüfen 3 s, zählen 0,7 s, wiegen 0,7 s, schreiben 3 s (Feder wandert: schreiben, weiter, absetzen – zweimal) */
.an-schatz { animation: schatz 7.4s step-end infinite; transform-box: fill-box; }
@keyframes schatz { 0.00% { transform: translateX(-0.0000%); } 40.54% { transform: translateX(-16.6667%); } 50.00% { transform: translateX(-33.3333%); } 59.46% { transform: translateX(-50.0000%); } 67.57% { transform: translateX(-66.6667%); } 75.68% { transform: translateX(-83.3333%); } 81.08% { transform: translateX(-50.0000%); } 87.84% { transform: translateX(-66.6667%); } 94.59% { transform: translateX(-83.3333%); } 100% { transform: translateX(-83.3333%); } }
/* Feldzug (V0.73): kniende Schützen feuern zufällig – spiel.js setzt kurz die Klasse „feuert“: Mündungsfeuer, Rückstoß (Mündung kurz hoch), Pulverdampf */
.schuetze .schussband { transform-box: fill-box; }
.schuetze.feuert .schussband { animation: schuss1 .8s step-end 1; }
@keyframes schuss1 { 0% { transform: translateX(-50%); } 25%, 100% { transform: translateX(0); } }
.schuetze .rueckL, .schuetze .rueckR { transform-box: view-box; }
.schuetze.feuert .rueckL { animation: rueckL1 .7s ease-out 1; }
@keyframes rueckL1 { 0% { transform: rotate(0) translateX(0); } 8% { transform: rotate(-5deg) translateX(-4px); } 100% { transform: rotate(0) translateX(0); } }
.schuetze.feuert .rueckR { animation: rueckR1 .7s ease-out 1; }
@keyframes rueckR1 { 0% { transform: rotate(0) translateX(0); } 8% { transform: rotate(5deg) translateX(4px); } 100% { transform: rotate(0) translateX(0); } }
.schuetze .qualm { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.schuetze.feuert .qualm { animation: qualm1 1.1s ease-out 1; }
@keyframes qualm1 { 0% { opacity: .85; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--qx), -14px) scale(2.4); } }
/* Feldzeichen mit Wappen schwankt leicht im Wind (V0.74) */
.an-wehen { animation: wehen 3s ease-in-out infinite; }
@keyframes wehen { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
/* Pulverdampf zieht langsam übers Feld (Niederlage, V0.75) */
.an-dampf { animation: dampf 16s ease-in-out infinite alternate; }
@keyframes dampf { 0% { transform: translateX(-60px); opacity: .5; } 50% { opacity: 1; } 100% { transform: translateX(80px); opacity: .6; } }
/* Jubelnde Soldaten (V0.80): Hut hoch / Hut geschwenkt im Wechsel, dazu kleine Hüpfer */
.an-jubel { animation: jubel .9s step-end infinite; transform-box: fill-box; }
@keyframes jubel { 0% { transform: translateX(0); } 50% { transform: translateX(-50%); } }
.an-huepf { animation: huepf .9s ease-in-out infinite; }
@keyframes huepf { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-5px); } 55% { transform: translateY(-5px); } }
/* Weihrauch steigt auf und verweht (Krönung, V0.89) */
.an-rauchauf { animation: rauchauf 4s ease-out infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes rauchauf { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: .9; } 100% { opacity: 0; transform: translate(-14px, -70px) scale(2.6); } }
/* Ratten huschen in einem kleinen Bereich: kurze schnelle Sprints mit plötzlichem Richtungswechsel und kurzen Pausen (V0.90) */
.an-huschen, .an-huschen2 { animation: huschen 3s linear infinite; }
.an-huschen2 { animation-name: huschen2; }
@keyframes huschen {
  0% { transform: translateX(0) scaleX(1); } 12% { transform: translateX(var(--weg)) scaleX(1); } 22% { transform: translateX(var(--weg)) scaleX(1); }
  22.01% { transform: translateX(var(--weg)) scaleX(-1); } 30% { transform: translateX(calc(var(--weg) * .4)) scaleX(-1); }
  30.01% { transform: translateX(calc(var(--weg) * .4)) scaleX(1); } 38% { transform: translateX(calc(var(--weg) * .9)) scaleX(1); } 50% { transform: translateX(calc(var(--weg) * .9)) scaleX(1); }
  50.01% { transform: translateX(calc(var(--weg) * .9)) scaleX(-1); } 66% { transform: translateX(calc(var(--weg) * -.5)) scaleX(-1); } 80% { transform: translateX(calc(var(--weg) * -.5)) scaleX(-1); }
  80.01% { transform: translateX(calc(var(--weg) * -.5)) scaleX(1); } 92% { transform: translateX(0) scaleX(1); } 100% { transform: translateX(0) scaleX(1); } }
@keyframes huschen2 {
  0% { transform: translateX(0) scaleX(-1); } 10% { transform: translateX(calc(var(--weg) * -.8)) scaleX(-1); } 18% { transform: translateX(calc(var(--weg) * -.8)) scaleX(-1); }
  18.01% { transform: translateX(calc(var(--weg) * -.8)) scaleX(1); } 34% { transform: translateX(calc(var(--weg) * .5)) scaleX(1); }
  34.01% { transform: translateX(calc(var(--weg) * .5)) scaleX(-1); } 42% { transform: translateX(calc(var(--weg) * .1)) scaleX(-1); } 58% { transform: translateX(calc(var(--weg) * .1)) scaleX(-1); }
  58.01% { transform: translateX(calc(var(--weg) * .1)) scaleX(1); } 70% { transform: translateX(calc(var(--weg) * .7)) scaleX(1); } 82% { transform: translateX(calc(var(--weg) * .7)) scaleX(1); }
  82.01% { transform: translateX(calc(var(--weg) * .7)) scaleX(-1); } 95% { transform: translateX(0) scaleX(-1); } 100% { transform: translateX(0) scaleX(-1); } }
/* Krönung (V0.95): Bischof hebt die Krone, senkt sie langsam (4 s) auf den Kopf, hält, hebt sie wieder – 10 s */
.an-bischofhoch { animation: bischofhoch 10s ease-in-out infinite; }
@keyframes bischofhoch { 0%, 20% { opacity: 1; } 60%, 88% { opacity: 0; } 100% { opacity: 1; } }
.an-kroneab { animation: kroneab 10s ease-in-out infinite; }
@keyframes kroneab { 0%, 20% { transform: translate(var(--kx), var(--ky)); } 60%, 88% { transform: translate(0, 0); } 100% { transform: translate(var(--kx), var(--ky)); } }
/* Schweine wühlen (V0.97): meist Schnauze am Boden, ab und zu Kopf hoch */
.an-wuehlen { animation: wuehlen 7s step-end infinite; transform-box: fill-box; }
@keyframes wuehlen { 0% { transform: translateX(0); } 18% { transform: translateX(-50%); } 72% { transform: translateX(0); } 84% { transform: translateX(-50%); } }
/* Schwein geht (V0.98): stehen/wühlen – ein paar Schritte nach links – wühlen – umdrehen, zurück – wühlen */
.an-schweinweg { animation: schweinweg 16s linear infinite; }
@keyframes schweinweg { 0%, 14% { transform: translateX(0); } 32%, 58% { transform: translateX(var(--weg)); } 76%, 100% { transform: translateX(0); } }
.an-schweinblick { animation: schweinblick 16s step-end infinite; }
@keyframes schweinblick { 0% { transform: scaleX(1); } 57% { transform: scaleX(-1); } 98% { transform: scaleX(1); } }
.an-schweinlauf { animation: schweinlauf 16s step-end infinite; }
@keyframes schweinlauf { 0% { opacity: 0; } 14% { opacity: 1; } 32% { opacity: 0; } 58% { opacity: 1; } 76% { opacity: 0; } }
.an-schweinsteh { animation: schweinsteh 16s step-end infinite; }
@keyframes schweinsteh { 0% { opacity: 1; } 14% { opacity: 0; } 32% { opacity: 1; } 58% { opacity: 0; } 76% { opacity: 1; } }
/* Weihrauchfass schwingt sanft (V1.02) */
.an-schwingen { animation: schwingen 2.6s ease-in-out infinite; transform-box: view-box; }
@keyframes schwingen { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
/* Vorratsleiste auf kleineren Bildschirmen (V1.09): enger und kleiner, damit rechts nichts abgeschnitten wird */
@media (max-width: 1500px) {
  .hudleiste { gap: 10px; padding: 5px 10px; }
  .hudwerte { gap: 4px; }
  .hudwert { padding: 2px 7px 2px 4px; gap: 4px; }
  .hudwert svg.wsym { width: 22px; height: 22px; }
  .hudwert b { font-size: 16px; }
  .hudwer b { font-size: 16px; }
  .hudziel { padding-left: 8px; gap: 4px; }
  .zz { padding: 1px 4px 1px 2px; }
  .zz svg.ic { width: 17px; height: 17px; }
}
@media (max-width: 1320px) {
  .hudwert small, .hudwer small, .zieltitel small { font-size: 10px; }
  .hudwert b { font-size: 14px; }
  .hudwert svg.wsym { width: 18px; height: 18px; }
  .zieltitel b { font-size: 14px; }
  .hudwer svg.ic, .hudwer svg.krone { display: none; }
}
/* Startseite bei wenig Höhe (V1.09): alles ohne Rollen auf einen Bildschirm, Fußleiste sichtbar */
@media (max-height: 900px) {
  .startspalten { margin-top: 14vh; }
  .titelbanner { padding: 2px 26px 5px; }
  .titelbanner h1 { font-size: clamp(26px, 3vw, 42px); }
  svg.titelkrone { width: 40px; }
  .startmenue { gap: 6px; }
  .startknopf { min-height: 48px; padding: 6px 14px; }
  .startknopf b { font-size: 18px; }
  .startknopf small { font-size: 13px; }
  .startknopf svg.ic.gross { width: 30px; height: 30px; }
  .starttext { font-size: 13px; }
  .startseite .kasten { padding: 10px 14px; }
}
@media (max-height: 680px) {
  .startspalten { margin-top: 10vh; }
  .starttext { display: none; }
}
/* aufsteigende Funken im Kamin */
.an-funke { animation: funke 2s linear infinite; }
@keyframes funke { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(6px, -70px); opacity: 0; } }
/* Herrscher im Arbeitszimmer: 0–5 s am Tisch, 5–9,5 s zum Fenster, 9,5–14,5 s am Fenster, 14,5–19 s zurück */
.hg-weg { animation: hgWeg 19.72s linear infinite; }
@keyframes hgWeg { 0%, 25.36% { transform: translateX(0); } 50%, 75.36% { transform: translateX(var(--weg)); } 100% { transform: translateX(0); } }
.hg-tisch, .hg-hin, .hg-fenster, .hg-zurueck { opacity: 0; animation: 19.72s step-end infinite; }
.hg-tisch { animation-name: hgTisch; } .hg-hin { animation-name: hgHin; } .hg-fenster { animation-name: hgFenster; } .hg-zurueck { animation-name: hgZurueck; }
@keyframes hgTisch { 0% { opacity: 1; } 25.36% { opacity: 0; } }
@keyframes hgHin { 0% { opacity: 0; } 25.36% { opacity: 1; } 50% { opacity: 0; } }
@keyframes hgFenster { 0% { opacity: 0; } 50% { opacity: 1; } 75.36% { opacity: 0; } }
@keyframes hgZurueck { 0% { opacity: 0; } 75.36% { opacity: 1; } }
.gerichtinfo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#angriffRegler { width: 100%; }
.vtitel { display: flex; align-items: center; gap: 6px; font: bold 15px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #8a3424; line-height: 20px; }
.vtitel svg.ksym { width: 18px; height: 18px; }
.verlauf > .bilanzkarte { flex: 1; }
.vtitel svg.krone { width: 22px; height: 18px; }
@media (max-width: 1320px) { .bauleiste { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.9fr); } .heerzeile .btn { padding-left: 7px; padding-right: 7px; font-size: 14px; } .truppe small { display: none; } }
#soldRegler { width: 100%; margin: 0; }
.brettzeile.markt { flex-direction: column; align-items: stretch; gap: 4px; }
.mzeile { display: flex; align-items: center; gap: 8px; }
.brettzeile.markt input.marktregler { width: 100%; align-self: stretch; margin: 0; }
/* Krönung: Einzug von links, Stehenbleiben, Hinknien in drei Bildern (einmal, dann bleibt es stehen) */
.kr-weg { animation: krWeg 8s linear forwards; }
@keyframes krWeg { from { transform: translateX(var(--von)); } to { transform: translateX(0); } }
.kr-lauf { animation: krAus .01s linear forwards; }
@keyframes krAus { to { opacity: 0; } }
.kr-knie { opacity: 0; animation: krAn .01s linear forwards; }
@keyframes krAn { to { opacity: 1; } }
.kr-kniebild { animation: krKnie 1.9s forwards; animation-timing-function: step-end; }
@keyframes krKnie { 0% { transform: translateX(0); } 42% { transform: translateX(calc(var(--fw) * -1)); } 63% { transform: translateX(calc(var(--fw) * -2)); } 82%, 100% { transform: translateX(calc(var(--fw) * -3)); } }
/* Trauer: Kopf heben und senken als Daumenkino (harte Wechsel, kein Überblenden) */
.an-kopfhalb, .an-kopfhoch { opacity: 0; animation: 15s infinite; animation-timing-function: step-end; }
.an-kopfhalb { animation-name: kopfhalb; } .an-kopfhoch { animation-name: kopfhoch; }
@keyframes kopfhalb { 0% { opacity: 0; } 60% { opacity: 1; } 62.5% { opacity: 0; } 82% { opacity: 1; } 84.5%, 100% { opacity: 0; } }
@keyframes kopfhoch { 0% { opacity: 0; } 62.5% { opacity: 1; } 82%, 100% { opacity: 0; } }
.vorschauhinweis { position: fixed; top: calc(var(--oben, 60px) + 10px); left: 50%; transform: translateX(-50%); z-index: 50; padding: 4px 14px; border-radius: 14px; background: rgba(40, 20, 10, .75); color: #f4e3b5; font-size: 13px; font-weight: 600; pointer-events: none; }
/* Spielende: Sieger jubelt/winkt, Bläser setzen die Fanfare an und ab (Daumenkino, harte Wechsel) */
.an-sieger { animation: zweiBilder 1.4s step-end infinite; transform-box: fill-box; }
.an-fanfare { animation: fanfare 4.6s step-end infinite; transform-box: fill-box; }
@keyframes zweiBilder { 0% { transform: translateX(0); } 50% { transform: translateX(-50%); } }
@keyframes fanfare { 0% { transform: translateX(0); } 62% { transform: translateX(-50%); } }
/* Spielende als flaches Brett unten */
.endebrett .brettmitte { grid-template-columns: minmax(220px, 300px) 1fr auto; }
.endetitel h2 { font-size: 24px; line-height: 1.15; }
.endetitel p { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: #5e4a30; }
.endetabelle { max-height: 190px; overflow: auto; }
.endetabelle table { width: 100%; }
.endetabelle td, .endetabelle th { padding: 3px 8px; font-size: 14px; }
.loeschzeile { margin: 10px 0 0; text-align: right; }
.loeschlink { font-size: 14px; font-weight: 600; color: #8a3424; }
.loeschlink:hover { color: #a8402c; opacity: 1; }
.geschichte p { font-size: 17px; line-height: 1.65; margin: 0 0 14px; }
.geschichteschluss { text-align: center; font: italic bold 20px 'Palatino Linotype', 'Book Antiqua', Palatino, serif !important; color: #8a3424; margin: 18px 0 6px !important; }
@media (max-height: 800px) { .startspalten .kasten { margin-bottom: 0; } .starttext { display: none; } .startknopf { padding: 4px 14px; min-height: 0; } .startknopf b { line-height: 1.15; } .startknopf small { line-height: 1.2; } }
.geschichte p + p { clear: both; }
.geschichte .initiale { min-height: 3.3em; }
.kasten.geschichte { max-width: 920px; margin-left: auto; margin-right: auto; }
/* Fenster „Gespeicherte Spiele“ */
.fensterhintergrund { position: fixed; inset: 0; z-index: 40; background: rgba(30, 15, 5, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.spielfenster { width: min(760px, 100%); max-height: calc(100vh - 60px); display: flex; flex-direction: column; margin: 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.spielfenster h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.standliste { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.stand { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 255, 255, .6); border: 1px solid #dcc79c; }
.standtext { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.standtext b { font-size: 17px; color: #3b2410; }
.standtext small { font-size: 13px; color: #5e4a30; font-weight: 600; }
.stand .btn.haupt { min-width: 110px; }
.stand svg.ic { width: 36px; height: 36px; flex: none; }
.spielfenster h2 svg.krone { width: 34px; height: 27px; }
.titelzier { position: absolute; left: 0; right: 0; top: -38px; display: flex; align-items: center; justify-content: center; gap: 10px; pointer-events: none; }
.titelzier i { flex: 0 1 90px; height: 2px; background: linear-gradient(90deg, transparent, #c9a227); margin-top: 14px; }
.titelzier i:last-child { background: linear-gradient(90deg, #c9a227, transparent); }
svg.titelkrone, .titelzier svg.titelkrone { width: 78px !important; height: 62px !important; margin: 0 !important; filter: drop-shadow(0 3px 3px rgba(40, 20, 5, .45)); }
@media (max-height: 900px) { .titelbanner { margin-top: 28px; padding-top: 20px !important; } .titelzier { top: -32px; } svg.titelkrone, .titelzier svg.titelkrone { width: 64px !important; height: 51px !important; } }
/* Startseite: goldener Titel ohne Schild, frei über dem Bild */
.titelgold { width: min(860px, 62vw); margin: 0 auto; pointer-events: none; }
.titelgold svg.titelgrafik { display: block; width: 100%; height: auto; overflow: visible; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.an-titelglanz { animation: titelglanz 6s ease-in-out infinite; }
@keyframes titelglanz { 0% { transform: skewX(-20deg) translateX(0); } 45%, 100% { transform: skewX(-20deg) translateX(1500px); } }
@media (max-height: 900px) { .titelgold { width: min(700px, 52vw); } }
@media (max-height: 760px) { .titelgold { width: min(720px, 50vw); } }
/* Feldzug: Spione */
.spionzeile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.spionzeile select { max-width: 200px; }
.unbekannt { color: #a08a62; font-weight: bold; }
tr.erspaeht td { background: rgba(201, 162, 39, .18); }
tr.erspaeht td.z { color: #2e5a1e; font-weight: bold; }
/* Spion: schaut durchs Fernrohr (5 s), notiert (3 s) */
.an-spion { animation: spion 8s step-end infinite; transform-box: fill-box; }
@keyframes spion { 0% { transform: translateX(0); } 62% { transform: translateX(-50%); } }
.knopfsym { width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; }
.spionzeile .btn { display: inline-flex; align-items: center; }
/* Jahresbericht: Ernte und Lage */
.erntekarte { gap: 4px; }
.ernteoben { display: flex; align-items: center; gap: 10px; }
svg.wettersym { width: 48px; height: 48px; flex: none; }
.ernteoben > span { display: flex; flex-direction: column; line-height: 1.15; }
.ernteoben b { font: bold 17px 'Palatino Linotype', 'Book Antiqua', Palatino, serif; color: #3b2410; }
.sterne { color: #d9a520; font-size: 16px; letter-spacing: 2px; }
.sterne i { font-style: normal; color: #d8c8a4; }
.erntezahl { font: bold 24px Consolas, monospace; color: #3b2410; line-height: 1.1; }
.erntezahl small { font: 600 13px system-ui, sans-serif; color: #5e4a30; }
.erntefuss { font-size: 12px; color: #6e5a3a; font-weight: 600; }
.balken.lage { grid-template-columns: 52px 1fr 128px; }
.balken .bt { font-size: 12px; color: #3b2410; white-space: nowrap; }
.preiszeile { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #cdb582; padding-top: 4px; margin-top: 2px; font-size: 13px; font-weight: 600; color: #5e4a30; }
.preiszeile b { font-family: Consolas, monospace; color: #3b2410; }
.preiszeile em { font-style: normal; font-size: 12px; color: #6e5a3a; }
.preiszeile em.plus { color: #2e7d32; } .preiszeile em.minus { color: #a8402c; }

/* eigenes Abfragefenster (Löschen usw.) */
.fensterhintergrund.abfrage { z-index: 60; }
.abfragefenster { width: min(520px, 100%); }
.abfragefenster p { margin: 4px 0 16px; font-size: 18px; line-height: 1.45; }
.abfragefenster .knopfreihe { justify-content: flex-end; gap: 12px; }
.abfragefenster .knopfreihe .btn { min-width: 130px; }

/* Seite „Neues Spiel“ */
.neuspiel { max-width: 1240px; margin-left: auto; margin-right: auto; }
.neukopf { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 2px 0 10px; border-bottom: 2px solid #d9bd7e; margin-bottom: 10px; }
.neukopf svg.krone { width: 58px; height: 46px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.neukopf svg.krone:last-child { transform: scaleX(-1); }
.neukopf h2 { margin: 0; font-size: 34px; color: #7a2e1f; letter-spacing: .5px; text-shadow: 0 1px 0 #fff6dc; }
.neukopf span { display: block; font-family: "Palatino Linotype", Palatino, serif; font-style: italic; color: #6b4e24; font-size: 17px; }
.anzahlzeile { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 14px; font-family: "Palatino Linotype", Palatino, serif; font-size: 19px; font-weight: bold; color: #3b2410; }
.anzahlwahl { display: flex; gap: 8px; }
.anzahlwahl button { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #b8955a; background: radial-gradient(circle at 35% 30%, #fffaf0, #ead6a8); font: bold 20px "Palatino Linotype", Palatino, serif; color: #5a3a14; cursor: pointer; box-shadow: 0 2px 3px rgba(0,0,0,.2); }
.anzahlwahl button:hover { border-color: #8a5a20; }
.anzahlwahl button.an { background: radial-gradient(circle at 35% 30%, #d0603f, #7a2e1f); color: #fff3d0; border-color: #e0b04a; box-shadow: 0 0 0 3px rgba(224,176,74,.35), 0 2px 4px rgba(0,0,0,.3); }
.spielerkarten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.spielerkarte { display: flex; gap: 10px; align-items: stretch; padding: 8px 12px 10px 6px; border-radius: 10px; background: linear-gradient(#fffdf6, #f3e6c6); border: 1px solid #d8bf8a; border-top: 5px solid var(--f); box-shadow: 0 3px 8px rgba(60,30,10,.18); }
.skbild { flex: 0 0 64px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.18), transparent 55%); }
.skbild img { height: 140px; width: auto; display: block; filter: drop-shadow(1px 2px 2px rgba(0,0,0,.25)); }
.skrechts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.skkopf { display: flex; align-items: center; gap: 8px; }
.skkopf svg.skwappen { width: 30px; height: 40px; flex: none; }
.skkopf b { font-family: "Palatino Linotype", Palatino, serif; font-size: 20px; color: #3b2410; }
.skkopf small { margin-left: auto; font-size: 12px; font-weight: bold; color: #fff; background: #7a6a50; border-radius: 9px; padding: 1px 8px; }
.spielerkarte input[type=text] { width: 100%; box-sizing: border-box; font-size: 18px; padding: 6px 9px; }
.umschalter { display: flex; border: 1px solid #b8955a; border-radius: 8px; overflow: hidden; }
.umschalter button { flex: 1; padding: 6px 4px; border: 0; background: #fbf3df; font: 600 15px inherit; font-family: inherit; color: #5a3a14; cursor: pointer; }
.umschalter button + button { border-left: 1px solid #b8955a; }
.umschalter button:hover { background: #f3e2b8; }
.umschalter button.an { background: linear-gradient(#b0452f, #7a2e1f); color: #fff7e0; font-weight: bold; }
.sterbzeile { flex: 1; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.55); border: 1px solid #dcc79c; cursor: pointer; }
.sterbzeile input { width: 22px; height: 22px; accent-color: #7a2e1f; flex: none; }
.sterbzeile b { display: block; font-size: 17px; color: #3b2410; }
.sterbzeile small { color: #5e4a30; font-weight: 600; font-size: 14px; }
.neufuss { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.neuhinweis { text-align: center; margin: -8px 0 10px; font-size: 14px; font-weight: 600; color: #6b5636; font-style: italic; }
.btn.gross { font-size: 20px; padding: 10px 28px; }
@media (max-width: 1100px) { .spielerkarten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.viele .neukopf { padding-bottom: 4px; margin-bottom: 6px; }
.viele .neukopf h2 { font-size: 28px; }
.viele .neukopf svg.krone { width: 44px; height: 35px; }
.viele .anzahlzeile { margin-bottom: 10px; }
.viele .anzahlwahl button { width: 40px; height: 40px; font-size: 18px; }
.viele .spielerkarten { gap: 10px; }
.viele .spielerkarte { padding-top: 6px; padding-bottom: 7px; }
.viele .skbild img { height: 112px; }
.viele .skrechts { gap: 5px; }
.viele .spielerkarte input[type=text] { font-size: 16px; padding: 4px 8px; }
.viele .umschalter button { padding: 4px; }
.viele .sterbzeile { padding: 6px 12px; }
.viele .neufuss { margin-top: 10px; }
.skwahl { display: flex; flex-direction: column; gap: 7px; }
.viele .skwahl { flex-direction: row; gap: 6px; }
.viele .skwahl .umschalter { flex: 1; }
.viele .umschalter button { font-size: 14px; padding: 5px 2px; }
.viele .skkopf svg.skwappen { width: 24px; height: 32px; }
.viele .skbild img { height: 104px; }

/* Neues Jahr: Karte „Kunde aus dem Reich“ */
.nachrichtenkarte { justify-content: center; padding: 8px 10px; overflow-y: auto; max-height: 190px; }
.nachrichten { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nachrichten li { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 7px; background: linear-gradient(90deg, #fbf1d8, #fffaf0); border: 1px solid #e3cf9f; border-left: 4px solid #b8955a; font-size: 15px; font-weight: 600; line-height: 1.3; color: #3b2410; }
.nachrichten li.gut { border-left-color: #4f7a34; background: linear-gradient(90deg, #e9f1dc, #fbfdf6); }
.nachrichten li.schlecht { border-left-color: #a8402c; background: linear-gradient(90deg, #f6e0d8, #fffaf7); }
.nachrichten .nsym { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffaf0, #ead6a8); border: 1px solid #c9a96a; display: flex; align-items: center; justify-content: center; }
.nachrichten .nsym svg { width: 24px; height: 24px; position: static; }
.ruhigesjahr { display: flex; align-items: center; gap: 12px; justify-content: center; }
.ruhigesjahr svg { width: 44px; height: 44px; }
.ruhigesjahr b { display: block; font: bold 19px 'Palatino Linotype', Palatino, serif; color: #3b2410; }
.ruhigesjahr small { color: #5e4a30; font-weight: 600; font-size: 14px; }

/* Neues Jahr: Herrscherliste links, Kanzler rechts */
.brettlinks { display: flex; flex-direction: column; gap: 8px; align-self: center; min-width: 0; }
.herrscherliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.herrscherliste li { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #4a3418; padding: 1px 4px; border-radius: 5px; white-space: nowrap; }
.herrscherliste li.ich { background: rgba(176, 69, 47, .13); color: #7a2e1f; }
.herrscherliste li.tot { opacity: .5; }
.herrscherliste li span { overflow: hidden; text-overflow: ellipsis; }
.herrscherliste svg.ic { width: 18px; height: 18px; flex: none; }
.herrscherliste svg.hkrone { width: 22px; height: 18px; flex: none; }
.kanzler { width: 230px; padding: 7px 10px 8px; border-radius: 8px; background: linear-gradient(#fffaf0, #f4e6c4); border: 1px solid #d8bf8a; box-shadow: 0 2px 5px rgba(60,30,10,.15); margin-bottom: 6px; }
.kkopf { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.kkopf svg.krolle { width: 26px; height: 26px; flex: none; }
.kkopf b { font: bold 16px 'Palatino Linotype', Palatino, serif; color: #8a3424; }
.kanzler p { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #3b2410; }
.kanzler p + p { border-top: 1px dotted #c9a96a; padding-top: 3px; }
.brettinfo.rattenalarm { display: flex; align-items: center; gap: 8px; color: #8a2a1a; }
.brettinfo.rattenalarm svg { width: 26px; height: 26px; flex: none; }
.brettinfo.rattenalarm b { color: #a8402c; }

/* Jahresende: Diagramme mit Gitter, Achse, Punkten und Beschriftung */
.vdia { position: relative; flex: 1 1 auto; min-height: 26px; margin: 3px 4px 0; background: linear-gradient(#fffdf7, #f7eed8); border-radius: 3px; }
.verlaufkarte .vdia svg { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.vpunkt { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.vpunkt.jetzt { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.vachse { display: flex; justify-content: space-between; gap: 4px; padding: 1px 2px 0; font-size: 10px; font-weight: 600; color: #7a6a50; line-height: 1.2; }
.vachse span:nth-child(2) { font-family: Consolas, monospace; color: #5e4a30; }
.nachrichtenkarte { max-height: 166px; padding: 6px 8px; }
.nachrichten { gap: 4px; }
.nachrichten li { padding: 3px 8px 3px 4px; font-size: 14px; }
.nachrichten .nsym { width: 28px; height: 28px; }
.nachrichten .nsym svg { width: 20px; height: 20px; }
@media (min-height: 900px) { .nachrichtenkarte { max-height: 250px; } }
.nachrichtenkarte { max-height: 152px; padding: 5px 8px; }
.nachrichten li { padding: 2px 8px 2px 4px; line-height: 1.25; }
.nachrichten .nsym { width: 26px; height: 26px; }
.nachrichten .nsym svg { width: 19px; height: 19px; }
.nachrichtenkarte { max-height: 160px; }

/* Jahresende: „Dein Volk in diesem Jahr“ als Kacheln + Stimmungsskala */
.volkkarte { justify-content: space-between; gap: 6px; padding: 7px 9px; }
.vkacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.vkachel { display: flex; align-items: center; gap: 5px; padding: 3px 5px; border-radius: 7px; background: #fbf3df; border: 1px solid #e3cf9f; border-bottom: 3px solid #c9a96a; min-width: 0; }
.vkachel.plus { background: #eef4e3; border-bottom-color: #4f7a34; }
.vkachel.minus { background: #f8e7e0; border-bottom-color: #a8402c; }
.vkachel.null { opacity: .75; }
.vkachel svg.vksym { width: 24px; height: 24px; flex: none; }
.vkachel span { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.vkachel b { font: bold 15px Consolas, monospace; color: #3b2410; }
.vkachel.plus b { color: #2e6b22; } .vkachel.minus b { color: #a8402c; }
.vkachel small { font-size: 11px; font-weight: 600; color: #6e5a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stimmung { display: flex; align-items: center; gap: 8px; }
.sgesicht svg { width: 28px; height: 28px; display: block; }
.sskala { flex: 1; min-width: 0; }
.sbalken { position: relative; height: 9px; border-radius: 5px; background: linear-gradient(90deg, #a8402c, #d08a3a 35%, #d9c46a 56%, #8cb35a 75%, #3f7a2e); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.sbalken i { position: absolute; top: -4px; width: 5px; height: 17px; margin-left: -2.5px; border-radius: 3px; background: #3b2410; border: 1.5px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.sworte { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; color: #7a6a50; margin-top: 2px; }
.swort { font: bold 15px 'Palatino Linotype', Palatino, serif; color: #6b5636; min-width: 82px; text-align: right; }
.swort.gut { color: #2e6b22; } .swort.schlecht { color: #a8402c; }
.vwarn { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: bold; color: #a8402c; }
.vwarn svg { width: 18px; height: 18px; }
.volkkarte { justify-content: stretch; }
.vkacheln { flex: 1; grid-auto-rows: 1fr; }
.vkachel { padding: 4px 6px; }
.vkachel svg.vksym { width: 28px; height: 28px; }
.vkachel b { font-size: 17px; }
.stimmung { padding: 5px 8px; border-radius: 7px; background: #fbf3df; border: 1px solid #e3cf9f; }
.jahresbilanz .bilanzkarte { justify-content: space-around; }
.vkachel { gap: 4px; padding: 4px 4px; } .vkachel svg.vksym { width: 24px; height: 24px; }
.nachrichtenkarte { max-height: none; overflow: hidden; justify-content: center; } .verlauf > .nachrichtenkarte { flex: 1; }
/* Unterlängen (g, p, y) nicht abschneiden */
.vkachel span { line-height: 1.2; }
.vkachel small { line-height: 1.3; padding-bottom: 1px; }

/* Die Nachbarn waren am Zug: je Nachbar eine Karte */
.nachbarkarten { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.nachbarkarte { display: flex; flex-direction: column; gap: 5px; padding: 7px 10px 8px; border-radius: 9px; background: linear-gradient(#fffdf6, #f3e6c6); border: 1px solid #d8bf8a; border-top: 5px solid var(--f); box-shadow: 0 2px 6px rgba(60,30,10,.15); min-width: 0; }
.nachbarkarte.tot { filter: grayscale(.8); opacity: .8; }
.nkopf { display: flex; align-items: center; gap: 5px; min-width: 0; }
.nkopf svg.ic { width: 22px; height: 22px; flex: none; }
.nkopf svg.nkrone, .nschild svg.nkrone { width: 26px; height: 21px; flex: none; }
.nkopf b { font: bold 17px 'Palatino Linotype', Palatino, serif; color: #3b2410; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nwerte { display: flex; flex-direction: column; gap: 3px; }
.nwert { display: flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.65); border: 1px solid #e6d3a6; }
.nwert svg.nsym2 { width: 22px; height: 22px; flex: none; }
.nwert span { flex: 1; display: flex; align-items: baseline; gap: 5px; min-width: 0; line-height: 1.3; }
.nwert b { font: bold 15px Consolas, monospace; color: #3b2410; }
.nwert small { font-size: 12px; font-weight: 600; color: #6e5a3a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nwert em { font: normal bold 12px Consolas, monospace; color: #6e5a3a; white-space: nowrap; }
.nwert em.plus { color: #2e7d32; } .nwert em.minus { color: #a8402c; }
.nschild { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; font-size: 13px; font-weight: bold; line-height: 1.3; color: #5e4a30; background: #f1e4c2; border-left: 4px solid #b8955a; }
.nschild svg { width: 20px; height: 20px; flex: none; }
.nschild.gut { background: #e6efd8; border-left-color: #4f7a34; color: #2e6b22; }
.nschild.schlecht { background: #f6e0d8; border-left-color: #a8402c; color: #a8402c; }
.nschild.gold { background: linear-gradient(90deg, #fbe9b0, #fff6d8); border-left-color: #d4a017; color: #7a5806; }
.nschild.ruhig { color: #7a6a50; }
/* Bote zu Fuß: 24,17 s einmal (Doppelschritt 1,5 s, 8 Schrittbilder) – Gehen bis zur Mitte (9,73 s), Lesen (2,7 s), Aufschauen (1,8 s), Weitergehen (9,94 s) */
.bg-weg { animation: bgWeg 24.17s linear 1 both; }
@keyframes bgWeg { 0% { transform: translateX(-160px); } 40.25% { transform: translateX(760px); } 58.87% { transform: translateX(760px); } 100% { transform: translateX(1700px); } }
.bg-lauf { animation: bgLauf 24.17s step-end 1 both; }
@keyframes bgLauf { 0% { opacity: 1; } 40.25% { opacity: 0; } 58.87% { opacity: 1; } }
.bg-lies { opacity: 0; animation: bgLies 24.17s step-end 1 both; }
@keyframes bgLies { 0% { opacity: 0; } 40.25% { opacity: 1; } 58.87% { opacity: 0; } }
.bg-blick { animation: bgBlick 24.17s step-end 1 both; }
@keyframes bgBlick { 0% { transform: translateX(0); } 51.42% { transform: translateX(-171px); } }
/* Postauto (V1.89): Musik aus, 15 s Grillen, dann Motor und Hupe von fern (musik.js), ab 21,5 s fährt es einmal in 14 s durchs Bild, Felgen drehen passend zur Geschwindigkeit */
.pa-fahrt { animation: paFahrt 14s linear 21.5s 1 both; }
@keyframes paFahrt { 0% { transform: translateX(-20px); } 100% { transform: translateX(2050px); } }
.pa-rad { animation: paRad 1.15s linear infinite; }
@keyframes paRad { to { transform: rotate(360deg); } }
/* Feldweg: unregelmäßiges Holpern (Bildeinheiten des Postautos 1230×570, 1 Einheit ≈ 0,3 Bildpunkte) */
.pa-wippen { animation: paWippen 1.9s ease-in-out infinite; }
@keyframes paWippen { 0% { transform: translateY(0); } 11% { transform: translateY(-7px); } 19% { transform: translateY(-1px); } 34% { transform: translateY(-3px); } 47% { transform: translateY(0); } 58% { transform: translateY(-9px); } 66% { transform: translateY(-2px); } 80% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
.pa-nicken { transform-origin: 615px 450px; animation: paNicken 2.7s ease-in-out infinite; }
@keyframes paNicken { 0% { transform: rotate(0); } 15% { transform: rotate(-0.6deg); } 30% { transform: rotate(0.3deg); } 52% { transform: rotate(-0.2deg); } 70% { transform: rotate(0.7deg); } 85% { transform: rotate(-0.3deg); } 100% { transform: rotate(0); } }
.pa-hupf1 { animation: paHupf 1.3s ease-in-out infinite; }
.pa-hupf2 { animation: paHupf 1.3s ease-in-out -0.55s infinite; }
@keyframes paHupf { 0% { transform: translateY(0); } 12% { transform: translateY(-6px); } 24% { transform: translateY(0); } 55% { transform: translateY(-2px); } 70% { transform: translateY(0); } 100% { transform: translateY(0); } }
/* Pfarrer (V1.71): 18,4 s – 6,2 s nach rechts, 3 s stehen, 6,2 s zurück, 3 s stehen */
.pf-weg { animation: pfWeg 18.4s linear infinite; }
@keyframes pfWeg { 0% { transform: translateX(0); } 33.7% { transform: translateX(var(--pfweg)); } 50% { transform: translateX(var(--pfweg)); } 83.7% { transform: translateX(0); } 100% { transform: translateX(0); } }
.pf-p { opacity: 0; animation: 18.4s step-end infinite; }
.pf-p1 { animation-name: pfP1; } .pf-p2 { animation-name: pfP2; } .pf-p3 { animation-name: pfP3; } .pf-p4 { animation-name: pfP4; }
@keyframes pfP1 { 0% { opacity: 1; } 33.7% { opacity: 0; } }
@keyframes pfP2 { 0% { opacity: 0; } 33.7% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pfP3 { 0% { opacity: 0; } 50% { opacity: 1; } 83.7% { opacity: 0; } }
@keyframes pfP4 { 0% { opacity: 0; } 83.7% { opacity: 1; } }
/* zwei Bilder im Wechsel (sitzende Figuren bei der Arbeit) */
.an-lauf2 { animation: lauf8 1s steps(2) infinite; transform-box: fill-box; }
/* Laufband mit 6 Schrittbildern */
.an-lauf6 { animation: lauf8 1s steps(6) infinite; transform-box: fill-box; }
.an-lauf4 { animation: lauf8 1s steps(4) infinite; transform-box: fill-box; }
