/* Strinzer Pferdehof – Gestaltung */
:root {
  --wood: #7a4b26;
  --wood-dark: #5a3418;
  --wood-light: #a8703e;
  --paper: #fff9ec;
  --paper-2: #f6ecd6;
  --ink: #3b2a1c;
  --muted: #8a7560;
  --green: #4c9b3c;
  --green-dark: #377a2b;
  --red: #d64040;
  --orange: #f0a020;
  --blue: #2f7fd1;
  --pink: #e05a8c;
  --gold: #e8b923;
  --shadow: 0 4px 0 rgba(0,0,0,.12), 0 8px 24px rgba(60,40,20,.12);
  --radius: 16px;
  --font-head: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #cde8b5;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
#app { height: 100%; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 1.35rem; }
h2 small { font-size: .8rem; color: var(--muted); font-weight: 500; }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; color: var(--wood); margin-top: 1em; }
p { line-height: 1.5; margin: .4em 0 .8em; }
kbd { background: #fff; border: 1px solid #ccb; border-bottom-width: 3px; border-radius: 5px; padding: 0 5px; font-size: .85em; font-family: var(--font); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.good { color: var(--green-dark); font-weight: 700; }
.warn { color: var(--red); font-weight: 700; }
.pos { color: var(--green-dark); }
.neg { color: var(--red); }
.row { display: flex; align-items: center; gap: 10px; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.row.wrap { flex-wrap: wrap; }
.small-gap { gap: 4px 14px; font-size: .9rem; margin: 6px 0; }
.center { display: flex; justify-content: center; }

/* Buttons */
.btn {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  border: 0; border-radius: 12px; padding: 9px 16px; cursor: pointer;
  background: #fff; color: var(--ink);
  box-shadow: 0 3px 0 #d6c6a6, 0 1px 2px rgba(0,0,0,.08);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #d6c6a6; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-dark); }
.btn.primary:active { box-shadow: 0 1px 0 var(--green-dark); }
.btn.danger { background: var(--red); color: #fff; box-shadow: 0 3px 0 #a62d2d; }
.btn.night { background: #2f3d6b; color: #fff; box-shadow: 0 3px 0 #1d2647; white-space: nowrap; }
.btn.big { font-size: 1.1rem; padding: 13px 24px; }
.btn.small { font-size: .82rem; padding: 6px 11px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.link { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 0 4px; }
.icon-btn { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { background: rgba(255,255,255,.28); }
.input, .field input {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 10px 12px; border-radius: 10px;
  border: 2px solid #e0d2b4; background: #fff; color: var(--ink); margin-top: 6px;
}
.input:focus, .field input:focus { outline: none; border-color: var(--green); }
.field { display: block; font-weight: 700; margin: 12px 0; }

/* Titelbild */
.title-screen {
  position: relative; height: 100%; overflow: auto;
  background: linear-gradient(#7cc6f2, #dff3ff 55%, #8cc965 55%);
  display: flex; align-items: center; justify-content: center; padding: 20px 16px;
}
.title-sky { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.title-hills { position: absolute; left: -10%; right: -10%; top: 40%; height: 30%;
  background: radial-gradient(ellipse at 20% 100%, #5f9e47 50%, transparent 51%), radial-gradient(ellipse at 70% 100%, #6aaa4f 45%, transparent 46%); }
.title-card, .wizard {
  position: relative; background: var(--paper); border-radius: 28px; padding: 28px 30px;
  box-shadow: 0 10px 0 rgba(90,52,24,.25), 0 30px 60px rgba(0,0,0,.18);
  border: 4px solid #fff; max-width: 640px; width: 100%; text-align: center;
}
.wizard { max-width: 920px; text-align: left; max-height: calc(100vh - 40px); overflow: auto; }
.title-logo { font-family: var(--font-head); line-height: .95; }
.title-logo .t1 { display: block; font-size: 1.6rem; color: var(--wood); letter-spacing: .12em; text-transform: uppercase; }
.title-logo .t2 { display: block; font-size: clamp(2.6rem, 9vw, 4.2rem); color: var(--green-dark); font-weight: 700; text-shadow: 0 3px 0 #cfe5b9; }
.title-sub { color: var(--muted); font-weight: 700; margin-top: 6px; }
.title-horses { display: flex; justify-content: center; align-items: flex-end; height: 170px; margin: 6px 0 10px; }
.title-horses .th { width: 220px; }
.title-horses .th.a { animation: bob .45s ease-in-out infinite alternate; }
.title-buttons { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.title-buttons .btn.big { min-width: 240px; }
.title-foot { font-size: .8rem; color: var(--muted); margin-top: 16px; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }

.start-horses { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.start-horse { background: #fff; border-radius: 16px; padding: 12px 14px; cursor: pointer; border: 3px solid transparent; box-shadow: var(--shadow); transition: transform .12s; }
.start-horse:hover { transform: translateY(-2px); }
.start-horse.sel { border-color: var(--green); background: #f3fbe9; }
.start-horse .portrait { height: 130px; display: flex; justify-content: center; }
.start-horse .portrait svg { height: 100%; }
.start-horse p { font-size: .9rem; }

/* Spiel-Gerüst */
.game-shell { display: grid; grid-template-rows: auto auto 1fr; height: 100%; }
.topbar {
  background: linear-gradient(var(--wood-light), var(--wood));
  color: #fff; display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  border-bottom: 4px solid var(--wood-dark); flex-wrap: wrap;
}
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; display: flex; gap: 8px; align-items: center; text-shadow: 0 2px 0 rgba(0,0,0,.25); white-space: nowrap; }
.logo-mini { font-size: 1.5rem; }
.tb-items { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tb { background: rgba(0,0,0,.18); border-radius: 10px; padding: 4px 10px; display: flex; flex-direction: column; justify-content: center; min-height: 40px; }
.tb b { font-family: var(--font-head); font-size: 1rem; white-space: nowrap; }
.tb small { font-size: .7rem; opacity: .85; white-space: nowrap; }
.tb.money.neg b { color: #ffb3b3; }
.big-ico { font-size: 1.2rem; line-height: 1; }
.daybar { height: 5px; background: rgba(255,255,255,.25); border-radius: 3px; margin-top: 3px; overflow: hidden; }
.daybar i { display: block; height: 100%; background: #ffd23f; }
.tb-actions { display: flex; gap: 6px; align-items: center; }

.tabs { display: flex; gap: 4px; padding: 6px 10px 0; background: #e9dcc0; border-bottom: 3px solid #d2bf98; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; display: flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  background: #d8c6a0; color: var(--wood-dark); font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: 9px 14px; border-radius: 12px 12px 0 0; white-space: nowrap;
}
.tab:hover { background: #e2d2b0; }
.tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 -2px 0 #fff inset; }
.tab .ti { font-size: 1.15rem; }
.tab .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; background: var(--red); border-radius: 50%; border: 2px solid #fff; }
.screen { overflow: auto; background: var(--paper); padding: 16px; }

.panel { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid #efe3c8; }
.note { background: #fff6d8; border-left: 4px solid var(--gold); padding: 10px 12px; border-radius: 8px; }

/* Balken */
.bar { display: grid; grid-template-columns: 82px 1fr 34px; align-items: center; gap: 8px; font-size: .85rem; margin: 4px 0; }
.bar .bl { font-weight: 700; color: #6b5844; }
.bar .bt { position: relative; height: 12px; background: #efe6d4; border-radius: 6px; overflow: hidden; }
.bar .bt i, .bar .bt b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; transition: width .4s; }
.bar .bt i.green { background: linear-gradient(#6cc35a, #4c9b3c); }
.bar .bt i.orange { background: linear-gradient(#ffc04d, #f0a020); }
.bar .bt i.red { background: linear-gradient(#f06b6b, #d64040); }
.bar.skill .bt b { background: #dcecf9; }
.bar.skill .bt i { background: linear-gradient(#5ea5ee, #2f7fd1); }
.bar .bv { text-align: right; font-weight: 800; font-size: .82rem; white-space: nowrap; }
.bar .bv small { color: var(--muted); font-weight: 600; }
.skills .bar { grid-template-columns: 70px 1fr 50px; }

.stars { color: var(--gold); font-size: 1.05rem; letter-spacing: 1px; }
.stars .off { color: #e3d8c3; }
.stars small { color: var(--muted); font-size: .75rem; letter-spacing: 0; }
.stars small .off { color: #e3d8c3; }
.badge { display: inline-block; font-size: .75rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: #eee; margin: 2px 2px 2px 0; }
.badge.red { background: #fde1e1; color: #b02a2a; }
.badge.pink { background: #fde4ef; color: #b02a64; }
.badge.green { background: #e2f5dc; color: #2c7a20; }
.badge.blue { background: #e1effd; color: #1e5ea8; }
.badge.orange { background: #fff0d6; color: #a86200; }

.inv { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fff; border-radius: 99px; padding: 4px 10px; font-weight: 800; font-size: .9rem; box-shadow: 0 2px 0 #e3d5b8; }
.chip.low { background: #ffe9e0; color: #b23b1a; }
.chip.muted { color: var(--muted); }

/* Hof */
.hof { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.farm-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 4px solid #fff; }
.farm-svg { display: block; width: 100%; height: auto; }
.plot { cursor: pointer; }
.plot .plot-bg { transition: fill .15s; stroke: transparent; stroke-width: 3; }
.plot:hover .plot-bg { fill: rgba(255,255,255,.3); }
.plot.sel .plot-bg { stroke: #ffd23f; stroke-dasharray: 8 6; fill: rgba(255,255,255,.3); animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -14; } }
.smoke { animation: smoke 3s ease-out infinite; }
@keyframes smoke { from { transform: translateY(0); opacity: .8; } to { transform: translateY(-20px); opacity: 0; } }
.graze-anim { animation: graze 6s ease-in-out infinite; }
@keyframes graze { 0%,100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
.rain { animation: rain .5s linear infinite; }
@keyframes rain { from { transform: translateY(-20px); } to { transform: translateY(20px); } }
.snow { animation: snow 4s linear infinite; }
@keyframes snow { from { transform: translateY(-30px); } to { transform: translateY(30px); } }
.flash { opacity: 0; animation: flash 7s infinite; pointer-events: none; }
@keyframes flash { 0%, 90%, 94%, 100% { opacity: 0; } 92% { opacity: .6; } }
.clouds { animation: drift 40s linear infinite alternate; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(120px); } }
.duck { animation: duck 5s ease-in-out infinite alternate; }
@keyframes duck { from { transform: translateX(-30px); } to { transform: translateX(10px); } }
.plot-panel { position: sticky; top: 0; }
.plot-panel .price { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--wood); }
.build-list { display: flex; flex-direction: column; gap: 10px; max-height: 64vh; overflow: auto; padding-right: 4px; }
.build-item { display: grid; grid-template-columns: 96px 1fr; gap: 10px; background: #fbf6ea; border-radius: 12px; padding: 8px; }
.build-item h4 { margin: 0 0 2px; color: var(--ink); }
.build-item p { font-size: .82rem; margin: 0 0 6px; }
.build-item .row { gap: 8px; flex-wrap: wrap; }
.build-item .row .btn { margin-left: auto; }
.bprev { width: 96px; height: auto; background: #a9d98a; border-radius: 10px; }
ul.info { padding-left: 18px; margin: 6px 0 12px; line-height: 1.6; }
.upgrade { display: flex; flex-direction: column; gap: 6px; background: #f3fbe9; padding: 10px; border-radius: 12px; margin-bottom: 10px; }
.mini-list .mini, .mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #eadfca; }

/* Stall */
.stall-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stall-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.hlist { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; max-height: calc(100vh - 170px); overflow: auto; padding: 2px 4px 6px 2px; }
.hcard { display: grid; grid-template-columns: 82px 1fr; gap: 8px; align-items: center; background: #fff; border-radius: 14px; padding: 6px 10px 6px 4px; cursor: pointer; box-shadow: 0 3px 0 #e6d8bb; border: 3px solid transparent; transition: transform .1s; }
.hcard:hover { transform: translateX(3px); }
.hcard.sel { border-color: var(--green); background: #f5fcef; }
.hcard.empty-box { opacity: .65; border: 3px dashed #d8c8a6; box-shadow: none; background: transparent; }
.hcard.empty-box .hthumb { display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.hthumb { height: 64px; }
.hthumb svg { height: 100%; width: 100%; }
.hinfo b { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.hinfo small { color: var(--muted); }
.hinfo .warn { color: var(--red); }
.minibars { display: flex; gap: 3px; height: 22px; align-items: flex-end; margin-top: 4px; }
.minibars i { width: 10px; border-radius: 3px 3px 0 0; }
.minibars i.green { background: #5bb54a; } .minibars i.orange { background: var(--orange); } .minibars i.red { background: var(--red); }
.hd-head { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 16px; align-items: center; }
.hd-portrait { position: relative; background: radial-gradient(ellipse at 50% 90%, #cfe8b5 0 40%, transparent 41%), linear-gradient(#eaf6ff, #fff9ec); border-radius: 16px; padding: 4px; }
.hd-portrait svg { width: 100%; height: auto; display: block; }
.hd-portrait .tail { transform-origin: 58px 68px; animation: tail 2.4s ease-in-out infinite; }
.hd-portrait.happy svg { animation: happy 3s ease-in-out infinite; }
@keyframes tail { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(9deg); } }
@keyframes happy { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.sick-ico { position: absolute; top: 8px; right: 12px; font-size: 1.8rem; animation: bob 1s infinite alternate; }
.fx { position: absolute; inset: 0; pointer-events: none; }
.spark { position: absolute; top: 40%; font-size: 1.6rem; animation: spark .9s ease-out forwards; }
@keyframes spark { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-60px) scale(1.3); opacity: 0; } }
.hd-info h2 { margin-bottom: 2px; font-size: 1.6rem; }
.badges { margin: 6px 0; }
.hd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.care-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cbtn {
  display: flex; align-items: center; gap: 8px; text-align: left; border: 0; cursor: pointer;
  background: #fbf6ea; border-radius: 12px; padding: 8px 10px; font: inherit; font-weight: 700; color: var(--ink);
  box-shadow: 0 3px 0 #e6d8bb; transition: transform .08s;
}
.cbtn:hover { background: #fff3d6; }
.cbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #e6d8bb; }
.cbtn .ci { font-size: 1.4rem; }
.cbtn small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; }
.cbtn.done { background: #e7f6df; box-shadow: 0 3px 0 #c5e3b6; }
.cbtn.done::after { content: '✓'; margin-left: auto; color: var(--green-dark); font-weight: 900; }
.cbtn.blocked { opacity: .55; }
.cbtn.urgent { background: #ffe3e3; box-shadow: 0 3px 0 #f2b8b8; animation: pulse 1.4s infinite; }
.cbtn.sell { background: #f1ecfb; box-shadow: 0 3px 0 #dcd2f0; }
@keyframes pulse { 50% { filter: brightness(1.06); transform: scale(1.02); } }
.ribbon { display: inline-block; width: 14px; height: 18px; margin-right: 2px; vertical-align: middle; border-radius: 50% 50% 2px 2px; }
.ribbon.r1 { background: var(--gold); } .ribbon.r2 { background: #c0c4cc; } .ribbon.r3 { background: #cd8a4a; }

/* Stadt */
.city { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.city section:last-child { grid-column: 1 / -1; }
.city-gate { max-width: 560px; margin: 20px auto; text-align: center; }
.city-pic svg { width: 100%; border-radius: 12px; }
.shop { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.shop-item { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 8px; align-items: center; background: #fbf6ea; border-radius: 12px; padding: 8px 10px; }
.shop-item .si { font-size: 1.6rem; }
.shop-item small { display: block; color: var(--muted); font-size: .78rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px; }
.tbl td { padding: 6px; border-top: 1px solid #f0e6d2; }
.tbl tr.me td { background: #fff4c6; font-weight: 800; }
.market { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mcard { background: #fbf6ea; border-radius: 14px; padding: 10px 12px; }
.mcard .portrait { height: 120px; display: flex; justify-content: center; }
.mcard .portrait svg { height: 100%; }
.mcard h3 { margin: 4px 0 0; }
.mcard .row { justify-content: space-between; margin-top: 8px; }
.price { font-family: var(--font-head); font-size: 1.2rem; color: var(--wood); }

/* Büro */
.office { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.kpi { background: #fbf6ea; border-radius: 12px; padding: 8px 12px; }
.kpi small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; }
.kpi b { font-family: var(--font-head); font-size: 1.25rem; }
.chart svg { width: 100%; height: 140px; display: block; background: #fbf6ea; border-radius: 10px; }
.chart-legend { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.staff { display: flex; flex-direction: column; gap: 8px; }
.staff-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: #fbf6ea; border-radius: 12px; padding: 10px; }
.staff-card.on { background: #e7f6df; }
.staff-card .sic { font-size: 2rem; }
.staff-card p { margin: 2px 0; font-size: .85rem; }
.staff-card small { color: var(--muted); font-weight: 700; }
.ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ad { background: #fbf6ea; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ad small { color: var(--muted); }
.trophies { display: flex; flex-wrap: wrap; gap: 10px; background: linear-gradient(#8a5a32, #6b4123); padding: 12px; border-radius: 12px; }
.trophy { font-size: 2rem; text-align: center; width: 76px; }
.trophy small { display: block; font-size: .68rem; color: #fff; }
.log { list-style: none; padding: 0; margin: 0; max-height: 280px; overflow: auto; }
.log li { padding: 5px 0; border-bottom: 1px dashed #eadfca; font-size: .9rem; }
.log small { color: var(--muted); font-weight: 800; margin-right: 6px; }

/* Turnier, Gelände, Zucht */
.horse-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hp { display: flex; flex-direction: column; align-items: center; background: #fbf6ea; border: 3px solid transparent; border-radius: 14px; padding: 6px 12px; cursor: pointer; font: inherit; color: var(--ink); min-width: 120px; }
.hp.sel { border-color: var(--green); background: #f3fbe9; }
.hp .hpi { width: 100px; height: 70px; }
.hp .hpi svg { width: 100%; height: 100%; }
.hp small { color: var(--muted); font-size: .72rem; }
.hp small .stars { font-size: .8rem; }
.classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 16px; }
.cls { position: relative; }
.cls.locked { opacity: .7; }
.cls-badge { position: absolute; top: -10px; right: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--wood); color: #fff; font-family: var(--font-head); font-size: 1.5rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 var(--wood-dark); }
.diff.leicht { color: var(--green-dark); } .diff.machbar { color: #b77800; } .diff.schwer { color: var(--red); }
.track-map { position: relative; margin-top: 16px; overflow: hidden; background: linear-gradient(#e9f6dc, #d6ecc2); }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
.tracks { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.track { position: relative; text-align: left; border: 0; cursor: pointer; font: inherit; color: #fff; padding: 12px 12px 10px; border-radius: 14px; min-height: 92px;
  background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 4px 0 rgba(0,0,0,.18); text-shadow: 0 1px 2px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 3px; }
.track b { font-family: var(--font-head); font-size: 1rem; }
.track small { font-size: .74rem; }
.track .tn { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.85); color: var(--ink); text-shadow: none; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.track i { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 1.3rem; background: var(--green); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-shadow: none; }
.track.locked { filter: grayscale(.8); opacity: .55; cursor: not-allowed; }
.track:not(.locked):hover { transform: translateY(-2px); }
.zucht section { margin-bottom: 14px; }
.pairing { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pairing > div { width: 200px; text-align: center; }
.pairing svg { width: 100%; }
.pairing .heart { width: auto; font-size: 2.5rem; color: var(--pink); animation: bob .6s infinite alternate; }

/* Ziele */
.progress { height: 12px; background: #efe6d4; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #f6d55c); }
.quests { list-style: none; padding: 0; margin: 0; }
.quests li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px dashed #eadfca; }
.quests li small { display: block; color: var(--muted); }
.quests li.done { opacity: .6; }
.quests .qr { font-family: var(--font-head); font-weight: 600; color: var(--wood); white-space: nowrap; }
.ziele { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }

.empty { text-align: center; max-width: 520px; margin: 40px auto; }
.empty .ei { font-size: 4rem; }

/* Modals */
.modal-bg { position: fixed; inset: 0; background: rgba(40,25,10,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { background: var(--paper); border-radius: 22px; padding: 22px 24px; max-width: 560px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 10px 0 rgba(90,52,24,.25), 0 30px 60px rgba(0,0,0,.25); border: 4px solid #fff; animation: pop .2s; }
.modal.wide { max-width: 760px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.tips li { margin: 6px 0; line-height: 1.45; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.report .events, .report .alerts { list-style: none; padding: 0; margin: 8px 0; }
.report .events li, .report .alerts li { background: #fbf6ea; border-radius: 10px; padding: 8px 10px; margin: 5px 0; }
.report .alerts li { background: #ffe8e8; }
.report .staffrep li { background: #eef6ff; }
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.ledger ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.ledger li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed #eadfca; }
.ledger .sum { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; text-align: right; margin: 4px 0; }
.net { font-family: var(--font-head); font-size: 1.15rem; text-align: center; background: #fbf6ea; padding: 8px; border-radius: 10px; }
.birth { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; background: #fde4ef; border-radius: 14px; padding: 10px; margin: 8px 0; }
.birth svg { width: 100%; }
.portrait.center svg { width: 220px; }
.result h2 { text-align: center; }
.result .tbl { margin-top: 10px; }
.big-ribbon { width: 90px; height: 90px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; font-family: var(--font-head); font-size: 2.4rem; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); box-shadow: 0 0 0 8px rgba(255,255,255,.9), 0 6px 18px rgba(0,0,0,.2); animation: pop .4s; }
.big-ribbon::after { content: ''; position: absolute; bottom: -34px; left: 26px; width: 38px; height: 44px; background: inherit; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%); z-index: -1; }
.big-ribbon.r1 { background: var(--gold); } .big-ribbon.r2 { background: #aab0ba; } .big-ribbon.r3 { background: #c97f3d; }
.help h3 { margin-top: 1em; color: var(--wood); }

/* Toasts */
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; width: min(92vw, 400px); pointer-events: none; }
@media (max-width: 600px) { .toasts { right: 4vw; bottom: 12px; } }
.toast { background: #fff; border-radius: 14px; padding: 10px 16px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.18); border-left: 6px solid var(--blue); animation: toastIn .25s; transition: opacity .4s, transform .4s; }
.toast.good { border-color: var(--green); }
.toast.bad { border-color: var(--red); }
.toast.quest { border-color: var(--gold); background: #fff8dc; }
.toast.out { opacity: 0; transform: translateY(10px); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } }

/* Nachtwechsel */
.night-fade { position: fixed; inset: 0; z-index: 90; background: #1d2647; color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 2rem; animation: fade .5s; transition: background .6s; }
.night-fade.morning { background: #ffd98a; color: var(--wood-dark); }

/* Reit-Minispiel */
.ride-overlay { position: fixed; inset: 0; z-index: 70; background: #000; user-select: none; touch-action: none; }
.ride-canvas { display: block; width: 100%; height: 100%; }
.ride-hud { position: absolute; top: 10px; left: 10px; right: 60px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.ride-hud > * { background: rgba(255,250,235,.92); border-radius: 12px; padding: 6px 12px; font-weight: 800; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.ride-title { font-family: var(--font-head); font-size: 1.05rem; }
.ride-stats { display: flex; gap: 14px; }
.ride-progress { flex: 1; min-width: 120px; height: 14px; padding: 3px !important; }
.ride-progress div { height: 100%; background: var(--green); border-radius: 6px; width: 0; }
.ride-energy { display: flex; align-items: center; gap: 8px; }
.ride-energy div { width: 110px; height: 10px; background: #e5dccb; border-radius: 5px; overflow: hidden; }
.ride-energy i { display: block; height: 100%; width: 100%; }
.ride-gait { display: flex; gap: 4px; }
.ride-gait span { padding: 2px 8px; border-radius: 8px; color: var(--muted); font-size: .85rem; }
.ride-gait span.on { background: var(--wood); color: #fff; }
.ride-msg { position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%) scale(.8); font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 0 20px rgba(0,0,0,.3); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; text-align: center; }
.ride-msg.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ride-msg.big { font-size: 3.6rem; }
.ride-msg.good { color: #d8ffb8; }
.ride-msg.bad { color: #ffd0d0; }
.ride-help { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.45); color: #fff; padding: 5px 14px; border-radius: 99px; font-size: .85rem; pointer-events: none; white-space: nowrap; }
.ride-touch { position: absolute; bottom: 16px; left: 12px; right: 12px; display: none; justify-content: space-between; gap: 10px; }
.ride-touch button { flex: 1; border: 0; border-radius: 16px; padding: 18px 8px; font-family: var(--font-head); font-size: 1rem; font-weight: 700; background: rgba(255,250,235,.9); color: var(--ink); box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.ride-touch button.big { flex: 1.6; background: rgba(76,155,60,.95); color: #fff; font-size: 1.2rem; }
.ride-quit { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,250,235,.92); font-size: 1.1rem; cursor: pointer; }
@media (pointer: coarse) {
  .ride-touch { display: flex; }
  .ride-help { display: none; }
}

/* Responsiv */
@media (max-width: 1100px) {
  .hof { grid-template-columns: 1fr; }
  .plot-panel { position: static; }
}
@media (max-width: 860px) {
  .stall-grid { grid-template-columns: 1fr; }
  .hlist { flex-direction: row; overflow-x: auto; padding-bottom: 6px; position: static; max-height: none; }
  .hcard { min-width: 220px; }
  .hd-head { grid-template-columns: 1fr; }
  .hd-portrait { max-width: 320px; margin: 0 auto; }
  .hd-cols { grid-template-columns: 1fr; gap: 0; }
  .city, .office, .ziele { grid-template-columns: 1fr; }
  .tab .tl { display: none; }
  .tab { padding: 9px 12px; }
  .tab .ti { font-size: 1.35rem; }
}
@media (max-width: 600px) {
  .screen { padding: 10px; }
  .brand span:last-child { display: none; }
  .topbar { gap: 6px; padding: 6px 8px; }
  .tb { padding: 3px 7px; }
  .tb small { display: none; }
  .tb-actions { width: 100%; justify-content: flex-end; }
  .tb-actions .btn.night { margin-left: auto; }
  .shop-item { grid-template-columns: 34px 1fr; }
  .shop-item .btn { grid-column: span 1; }
  .ledger { grid-template-columns: 1fr; }
  .title-card, .wizard { padding: 20px 16px; }
  .birth { grid-template-columns: 1fr; }
  .ride-hud { right: 56px; }
  .ride-title { display: none; }
}

/* Gemalte Grafiken (Gemini) */
.title-screen.painted { background-size: cover; background-position: center 60%; }
.title-screen.painted .title-card { background: rgba(255,249,236,.9); backdrop-filter: blur(3px); max-width: 560px; }
.title-logo-img { margin: 0; }
.title-logo-img img { width: min(440px, 88%); height: auto; filter: drop-shadow(0 4px 0 rgba(90,52,24,.18)); }
.icon-btn.off { opacity: .45; }
.bprev { object-fit: contain; padding: 4px; }
.chip img { width: 20px; height: 20px; object-fit: contain; vertical-align: -5px; }
.shop-item img.si { width: 40px; height: 40px; object-fit: contain; }
.staff-card img.sic { width: 56px; height: 56px; object-fit: cover; object-position: top; border-radius: 50%; background: #f2e7cf; border: 3px solid #fff; box-shadow: 0 2px 0 #e3d5b8; }
.staff-card { grid-template-columns: 60px 1fr auto; }
.city-pic img { width: 100%; border-radius: 12px; display: block; }
.city-banner { grid-column: 1 / -1; height: 150px; border-radius: var(--radius); background-size: cover; background-position: center 70%; box-shadow: var(--shadow); }
