:root {
    --espresso: #2b1d14;
    --bohne: #46301f;
    --bohne-hell: #5a3e2a;
    --crema: #e8c999;
    --milchschaum: #faf3e6;
    --gruen: #9bc48a;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at 50% 20%, #3d2a1d 0%, var(--espresso) 70%);
    color: var(--milchschaum);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Ladebildschirm, bis Blazor gestartet ist */
.laden {
    min-height: 100vh;
    display: grid;
    place-content: center;
    text-align: center;
    font-size: 4rem;
    animation: dampf 1.4s ease-in-out infinite;
}
.laden p { font-size: 1rem; color: var(--crema); margin: .5rem 0 0; }

@keyframes dampf {
    0%, 100% { opacity: .6; transform: translateY(0); }
    50%      { opacity: 1;  transform: translateY(-6px); }
}

/* Spielbereich */
.spiel {
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 16px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.stand { text-align: center; }
.stand h1 {
    margin: 0;
    font-size: 2.4rem;
    font-variant-numeric: tabular-nums;
}
.stand h1 span { font-weight: 400; color: var(--crema); font-size: 1.4rem; }
.stand p { margin: 4px 0 0; color: var(--crema); font-size: .95rem; }

/* Die Tasse */
.tassen-bereich {
    position: relative;
    z-index: 2;
    width: 200px;
    height: 200px;
    margin: 28px auto 0;
}

.tasse {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--bohne-hell), var(--bohne));
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 -6px 12px rgba(0, 0, 0, .3);
    font-size: 5.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .2s ease;
}
.tasse:hover  { box-shadow: 0 10px 40px rgba(232, 201, 153, .25), inset 0 -6px 12px rgba(0, 0, 0, .3); }
.tasse:active { transform: scale(.9); }

/* Schwebende "+1"-Zahlen */
.schwebe {
    position: absolute;
    pointer-events: none;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--crema);
    text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
    transform: translate(-50%, -50%);
    animation: aufsteigen .9s ease-out forwards;
}
@keyframes aufsteigen {
    from { opacity: 1; transform: translate(-50%, -50%); }
    to   { opacity: 0; transform: translate(-50%, -150%); }
}

/* Shop */
.shop { width: 100%; }
.shop h2 {
    margin: 0 0 10px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--crema);
}

.upgrade {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid rgba(232, 201, 153, .2);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, transform .08s ease;
}
.upgrade:hover:not(:disabled) { background: rgba(255, 255, 255, .09); }
.upgrade:active:not(:disabled) { transform: scale(.98); }
.upgrade:disabled { opacity: .45; cursor: not-allowed; }

.upgrade .icon { font-size: 1.8rem; }
.upgrade .info { flex: 1; display: flex; flex-direction: column; }
.upgrade .info small { color: var(--crema); }
.upgrade .rechts { display: flex; flex-direction: column; align-items: flex-end; }
.upgrade .preis { font-weight: 700; color: var(--gruen); font-variant-numeric: tabular-nums; }
.upgrade:disabled .preis { color: #d98c7a; }
.upgrade .anzahl { font-size: .85rem; color: var(--crema); }

/* Kopfzeile im Spiel */
.kopf {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .95rem;
}
.kopf .status { flex: 1; text-align: right; color: var(--crema); font-size: .8rem; opacity: .8; }
.abmelden {
    border: 1px solid rgba(232, 201, 153, .3);
    background: transparent;
    color: var(--crema);
    border-radius: 8px;
    padding: 4px 10px;
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}
.abmelden:hover { background: rgba(255, 255, 255, .06); }

/* Login */
.login { padding-top: 48px; gap: 16px; }
.login .logo { font-size: 4.5rem; animation: dampf 2.4s ease-in-out infinite; }
.login .titel { margin: 0; font-size: 2rem; }

.tabs {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, .05);
    border-radius: 12px;
    padding: 4px;
}
.tabs button {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--crema);
    font: inherit;
    padding: 8px;
    border-radius: 9px;
    cursor: pointer;
}
.tabs button.aktiv { background: var(--bohne-hell); color: var(--milchschaum); font-weight: 600; }

.formular { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.formular label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--crema); }
.formular input {
    font: inherit;
    font-size: 1rem;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(232, 201, 153, .25);
    background: rgba(0, 0, 0, .25);
    color: var(--milchschaum);
    user-select: text;
}
.formular input:focus { outline: 2px solid var(--crema); outline-offset: 1px; }
.fehler { margin: 0; color: #f0a593; font-size: .9rem; }
.los {
    margin-top: 4px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--crema);
    color: var(--espresso);
    font: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
}
.los:disabled { opacity: .6; cursor: wait; }

/* Bestenliste */
.bestenliste { width: 100%; }
.bestenliste h2 {
    margin: 0 0 10px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--crema);
}
.bestenliste ol {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(232, 201, 153, .2);
    border-radius: 12px;
    overflow: hidden;
}
.bestenliste li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(232, 201, 153, .1);
}
.bestenliste li:last-child { border-bottom: none; }
.bestenliste li.ich { background: rgba(232, 201, 153, .12); font-weight: 600; }
.bestenliste .platz { width: 28px; text-align: center; }
.bestenliste .spielername { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bestenliste .punkte { font-variant-numeric: tabular-nums; color: var(--gruen); }
.bestenliste .leer, .bestenliste .hinweis { color: var(--crema); font-size: .85rem; opacity: .8; }
.bestenliste .hinweis { margin: 8px 0 0; text-align: center; }


/* ===================== v2 ===================== */
.klein { font-size: .8rem; color: var(--crema); opacity: .85; margin: 4px 0 0; }
.stern { color: #f5d06f; font-weight: 700; margin-left: 4px; font-size: .9em; }
h2 small, h3 small { font-weight: 400; opacity: .7; text-transform: none; letter-spacing: 0; margin-left: 6px; }

.event {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(90deg, #8a4fff, #ff7a59, #ffc94d);
    background-size: 200% 100%;
    animation: eventglanz 3s linear infinite;
    color: #fff;
    font-size: .95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
@keyframes eventglanz { from { background-position: 0% 0; } to { background-position: 200% 0; } }

.boosts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.boost {
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(245, 208, 111, .15);
    border: 1px solid rgba(245, 208, 111, .5);
    color: #f5d06f;
    font-variant-numeric: tabular-nums;
}

/* Szene mit Stadt */
.szene {
    position: relative;
    width: 100%;
    height: 290px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(232, 201, 153, .15);
}
.himmel {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #1d1530 0%, #3a2433 55%, #4a2f22 100%);
}
.himmel::after {
    content: "✦ · ✧ · ✦";
    position: absolute; top: 14px; left: 0; right: 0;
    text-align: center; letter-spacing: 3rem; color: rgba(255, 255, 255, .25); font-size: .7rem;
}
.stadt {
    position: absolute;
    left: 0; right: 0; bottom: 22px;
    z-index: 1;
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: center;
    align-content: flex-start;
    gap: 0 2px;
    padding: 0 8px;
    max-height: 130px;
    overflow: hidden;
    font-size: 1.7rem;
    line-height: 1.1;
    opacity: .9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}
.stadt span { animation: bauen .5s ease-out both; }
@keyframes bauen { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.boden { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: #2a1a10; border-top: 2px solid #5a3e2a; }

/* Gold- und Gammelbohnen: absichtlich zum Verwechseln ähnlich */
.bohne {
    position: absolute;
    z-index: 3;
    border: none;
    background: none;
    padding: 0;
    font-size: 2.6rem;
    cursor: pointer;
    animation: wackeln 1.1s ease-in-out infinite, auftauchen .3s ease-out;
}
.bohne.gold   { filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(1.25) drop-shadow(0 0 10px #ffd34d); }
.bohne.gammel { filter: sepia(1) saturate(2.6) hue-rotate(28deg) brightness(.95) drop-shadow(0 0 9px #c9b54a); }
@keyframes wackeln { 0%, 100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(12deg) scale(1.12); } }
@keyframes auftauchen { from { transform: scale(0); } }

/* Meldungen */
.meldungen { width: 100%; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.meldung {
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    border-left: 3px solid var(--crema);
    font-size: .9rem;
    animation: reinrutschen .25s ease-out;
}
@keyframes reinrutschen { from { transform: translateY(-6px); opacity: 0; } }

/* Reiter */
.reiter { width: 100%; display: flex; gap: 4px; background: rgba(255, 255, 255, .05); padding: 4px; border-radius: 12px; }
.reiter button {
    position: relative;
    flex: 1;
    border: none;
    background: transparent;
    color: var(--crema);
    font: inherit;
    font-size: .85rem;
    padding: 8px 2px;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
}
.reiter button.aktiv { background: var(--bohne-hell); color: var(--milchschaum); font-weight: 600; }
.punkt { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ff7a59; }

.upgrade.gesperrt { opacity: .4; cursor: default; }
.shop h2 { margin-top: 14px; }
.leer { color: var(--crema); text-align: center; padding: 20px 0; }

/* Extras */
.extras { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.karte {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(232, 201, 153, .18);
}
.karte h3 { margin: 0 0 6px; font-size: 1.05rem; }
.karte p { margin: 4px 0 10px; font-size: .92rem; }
.karte.prestige { border-color: rgba(245, 208, 111, .45); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; }
.klein-knopf {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(232, 201, 153, .3);
    background: rgba(255, 255, 255, .06);
    color: var(--milchschaum);
    font: inherit;
    font-size: .9rem;
    cursor: pointer;
}
.klein-knopf:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.klein-knopf:disabled { opacity: .5; cursor: default; }
.klein-knopf small { color: var(--crema); }
.rad { font-size: 3.5rem; text-align: center; }
.rad.dreht { animation: drehen .4s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* Erfolge */
.erfolge { width: 100%; }
.erfolge h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--crema); }
.erfolg-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.erfolg {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(232, 201, 153, .12);
    opacity: .5;
}
.erfolg.frei { opacity: 1; border-color: rgba(245, 208, 111, .5); background: rgba(245, 208, 111, .08); }
.erfolg .icon { font-size: 1.6rem; }
.erfolg strong { font-size: .9rem; }
.erfolg small { font-size: .78rem; color: var(--crema); }

/* Admin-Konsole */
.konsole { width: 100%; margin-top: 8px; }
.konsole h2 { font-size: .95rem; color: #9bc48a; margin: 0 0 6px; }
.konsole-log {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .8rem;
    background: #0d0906;
    color: #9bc48a;
    padding: 10px 12px;
    border-radius: 10px 10px 0 0;
    min-height: 60px;
    white-space: pre-wrap;
    user-select: text;
}
.konsole input {
    width: 100%;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .95rem;
    padding: 10px 12px;
    border: 1px solid #2c3a26;
    border-radius: 0 0 10px 10px;
    background: #050403;
    color: #c8f0b4;
    user-select: text;
}
.konsole input:focus { outline: 1px solid #9bc48a; }

/* Minispiel-Overlay */
.overlay {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center;
    padding: 16px;
    background: rgba(10, 6, 3, .8);
    backdrop-filter: blur(3px);
}
.overlay-box {
    width: 100%; max-width: 520px;
    padding: 20px 16px;
    border-radius: 18px;
    background: var(--espresso);
    border: 1px solid rgba(232, 201, 153, .3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.minispiel { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.minispiel h2 { margin: 0; }
.anleitung { margin: 0; color: var(--crema); font-size: .9rem; }
.ergebnis { margin: 0; font-size: 1.05rem; font-weight: 600; }
.los.gross { font-size: 1.6rem; padding: 14px 48px; }

.lukas { height: 260px; display: flex; justify-content: center; }
.lukas-skala {
    position: relative;
    width: 70px; height: 100%;
    border-radius: 35px;
    background: linear-gradient(0deg, #3d6b35 0%, #c9b54a 60%, #e0603f 90%, #ff3b30 100%);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, .5);
}
.lukas-glocke { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 1.8rem; }
.lukas-glocke.klingelt { animation: wackeln .2s ease-in-out infinite; }
.lukas-bohne { position: absolute; left: 50%; transform: translate(-50%, 50%); font-size: 2rem; }

.schiessfeld {
    position: relative;
    width: 100%; height: 300px;
    border-radius: 14px;
    background: radial-gradient(circle, #4a2f22, #241810);
    overflow: hidden;
    cursor: crosshair;
}
.ziel {
    position: absolute;
    border: none; background: none; padding: 0;
    font-size: 2.2rem;
    cursor: crosshair;
    animation: auftauchen .15s ease-out;
}
.ziel.gammel { filter: sepia(1) saturate(2.6) hue-rotate(28deg) brightness(.9); }

.wimmel { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; width: 100%; }
.wimmel-feld {
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .04);
    font-size: clamp(1rem, 5vw, 1.6rem);
    padding: 0;
    cursor: pointer;
}
.wimmel-feld.gefunden { background: rgba(155, 196, 138, .45); }
.wimmel-feld.falsch { background: rgba(224, 96, 63, .35); }

@media (max-width: 420px) {
    .reiter button { font-size: .75rem; }
    .szene { height: 260px; }
}

/* ===================== v3 ===================== */

/* Stadt als Baufeld (überschreibt die alte Skyline) */
.stadt {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(var(--reihen, 1), 32px);
    gap: 1px;
    flex-wrap: initial;
    max-height: none;
    padding: 0 6px;
    font-size: 1.45rem;
}
.feld {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    font-size: inherit;
    line-height: 1;
    color: inherit;
}
.szene.baumodus .tasse { opacity: .18; pointer-events: none; }
.szene.baumodus .tassen-bereich { pointer-events: none; }
.szene.baumodus .stadt { z-index: 3; opacity: 1; }
.szene.baumodus .feld {
    cursor: pointer;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    outline: 1px dashed rgba(232, 201, 153, .35);
}
.szene.baumodus .feld:hover { background: rgba(232, 201, 153, .25); }
.szene.baumodus .feld.leer::after { content: "+"; font-size: .9rem; color: rgba(232, 201, 153, .5); }

.karte.bauen { margin-bottom: 10px; }
.lager { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lager-teil {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(232, 201, 153, .3);
    background: rgba(255, 255, 255, .05);
    color: var(--milchschaum);
    font-size: 1.3rem;
    cursor: pointer;
}
.lager-teil small { font-size: .75rem; color: var(--crema); }
.lager-teil.gewaehlt { background: var(--crema); color: var(--espresso); }
.lager-teil.gewaehlt small { color: var(--espresso); }

/* Startseite */
.willkommen { padding-top: 40px; gap: 18px; text-align: center; }
.willkommen .logo { font-size: 5rem; animation: dampf 2.4s ease-in-out infinite; }
.willkommen .titel { margin: 0; font-size: 2.4rem; }
.untertitel { margin: -8px 0 0; color: var(--crema); }
.start-knoepfe { width: 100%; }
.start-knoepfe .los { flex: 1; }
.los.zweit { background: transparent; color: var(--crema); border: 2px solid var(--crema); }
.merkmale { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; text-align: left; }
.merkmale div {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    font-size: .9rem;
}
.merkmale span { font-size: 1.5rem; }
.fuss { margin-top: 8px; }
.hinweis-box {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: rgba(224, 96, 63, .2);
    border: 1px solid rgba(224, 96, 63, .6);
    font-weight: 600;
}
.zurueck {
    align-self: flex-start;
    border: none;
    background: none;
    color: var(--crema);
    font: inherit;
    cursor: pointer;
    padding: 4px 0;
}
.overlay-box.schummel { border-color: rgba(224, 96, 63, .8); }

/* ===================== v4: Mühle, Tageszeiten, Stadtkarte ===================== */

/* --- Himmel je nach Tageszeit --- */
.szene { height: 270px; }
.szene .himmel { transition: background 2s; }
.szene.morgen .himmel { background: linear-gradient(180deg, #f6b8c8 0%, #f9d9a8 55%, #c99a6b 100%); }
.szene.tag    .himmel { background: linear-gradient(180deg, #7ec8f2 0%, #bfe6f7 60%, #d6b98c 100%); }
.szene.abend  .himmel { background: linear-gradient(180deg, #5b3c88 0%, #f08a5d 55%, #b56a3b 100%); }
.szene.nacht  .himmel { background: linear-gradient(180deg, #0b1030 0%, #1d1a45 60%, #3a2433 100%); }
.szene .himmel::after { display: none; }
.szene.nacht .himmel::after {
    display: block;
    content: "✦  ·  ✧    ·   ✦  ·    ✧  ·  ✦   ·  ✧";
    position: absolute; top: 12px; left: 0; right: 0;
    text-align: center; white-space: pre; letter-spacing: .4rem;
    color: rgba(255, 255, 255, .55); font-size: .7rem;
    animation: funkeln 3s ease-in-out infinite;
}
@keyframes funkeln { 50% { opacity: .4; } }
.gestirn { position: absolute; top: 14px; right: 22px; font-size: 2rem; z-index: 1; filter: drop-shadow(0 0 12px rgba(255, 230, 150, .7)); }
.huegel {
    position: absolute; left: -10%; right: -10%; bottom: -60px; height: 120px;
    border-radius: 50% 50% 0 0;
    background: radial-gradient(ellipse at 50% 0%, #7fb069, #4f7d3a);
}
.szene.nacht .huegel { background: radial-gradient(ellipse at 50% 0%, #2f4a2a, #1c2d19); }

/* --- Die Kaffeemühle --- */
.tassen-bereich { margin-top: 20px; }
.muehle {
    position: absolute; inset: 0;
    border: none; background: none; padding: 0;
    cursor: pointer;
    transition: transform .08s ease;
}
.muehle:active { transform: scale(.95); }
.trichter {
    position: absolute; left: 55px; top: 34px; width: 90px; height: 34px;
    background: linear-gradient(180deg, #e6e9ee, #a9b0ba);
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
    display: grid; place-items: start center;
}
.trichter span { font-size: .8rem; margin-top: -2px; letter-spacing: -2px; }
.achse {
    position: absolute; left: 96px; top: 22px; width: 8px; height: 16px;
    border-radius: 3px; background: #8d939c;
}
.kurbel {
    position: absolute; left: 100px; top: 24px; width: 0; height: 0;
    z-index: 2;
    transition: transform .15s ease-out;
}
.kurbel .arm {
    position: absolute; left: 0; top: -3px; width: 52px; height: 6px;
    border-radius: 3px; background: linear-gradient(180deg, #d5dae1, #8d939c);
}
.kurbel .griff {
    position: absolute; left: 44px; top: -9px; width: 18px; height: 18px;
    border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c98b5a, #7a4a26);
    box-shadow: 0 2px 3px rgba(0, 0, 0, .4);
}
.gehaeuse {
    position: absolute; left: 42px; top: 66px; width: 116px; height: 86px;
    border-radius: 16px;
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 6px, transparent 6px 14px),
        linear-gradient(180deg, #b77a48, #8a5530);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 8px 18px rgba(0, 0, 0, .35);
    display: grid; place-items: center;
}
.gesicht { font-size: 1.35rem; color: #2b1d14; font-weight: 700; margin-top: -10px; }
.baeckchen {
    position: absolute; left: 22px; right: 22px; top: 44px; height: 10px;
    background: radial-gradient(circle at 10% 50%, rgba(255, 120, 120, .55) 0 6px, transparent 7px),
                radial-gradient(circle at 90% 50%, rgba(255, 120, 120, .55) 0 6px, transparent 7px);
}
.schublade {
    position: absolute; left: 70px; top: 128px; width: 60px; height: 18px;
    border-radius: 5px; background: #6e4224; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12);
    display: grid; place-items: center;
}
.schublade .knauf { width: 8px; height: 8px; border-radius: 50%; background: #e8c999; }
.muehle.turbo .gehaeuse { box-shadow: 0 0 22px #ffd34d, inset 0 -6px 0 rgba(0, 0, 0, .18); }
.muehle.turbo .gesicht { color: #7a3d00; }

.pulver { position: absolute; inset: 0; pointer-events: none; }
.korn {
    position: absolute; top: 148px; width: 4px; height: 4px; border-radius: 50%;
    background: #4a2c17;
    animation: rieseln .8s ease-in forwards;
}
@keyframes rieseln {
    from { transform: translate(0, 0); opacity: 1; }
    to   { transform: translate(var(--dx), 26px); opacity: 0; }
}
.tasse-unten { position: absolute; left: 50%; top: 160px; transform: translateX(-50%); font-size: 2rem; pointer-events: none; }

/* --- Stadtkarte in Draufsicht --- */
.stadtkarte {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #6e4224;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .06) 0 2px, transparent 3px) 0 0 / 18px 18px,
        linear-gradient(180deg, #8cc56a, #6fae4f);
}
.kacheln {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(var(--reihen), minmax(34px, 1fr));
    gap: 2px;
    padding: 6px;
}
.kachel {
    position: relative;
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .05);
    padding: 0;
    cursor: pointer;
    display: grid; place-items: center;
    font-size: clamp(1rem, 4.2vw, 1.6rem);
}
.kachel:hover { background: rgba(255, 255, 255, .18); }
.kachel-icon { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.kachel.weg { background: repeating-linear-gradient(45deg, #d9c39a 0 6px, #cfb688 6px 12px); }
.kachel.wasser { background: radial-gradient(circle at 40% 40%, #8fd3f4, #4aa3d8); }
.kachel.acker {
    background: repeating-linear-gradient(0deg, #6b4423 0 5px, #7d5230 5px 10px);
    box-shadow: inset 0 0 0 2px rgba(60, 35, 15, .4);
}
.kachel.acker.reif .kachel-icon { animation: wackeln 1s ease-in-out infinite; }
.kachel.gebaeude { background: rgba(0, 0, 0, .08); }
.wachstum {
    position: absolute; left: 4px; right: 4px; bottom: 3px; height: 4px;
    border-radius: 2px; background: rgba(0, 0, 0, .35); overflow: hidden;
}
.wachstum span { display: block; height: 100%; background: #9be15d; }

.stadtkarte.baumodus .kachel { outline: 1px dashed rgba(255, 255, 255, .45); }
.stadtkarte.baumodus .kachel.frei::after { content: "+"; font-size: .9rem; color: rgba(255, 255, 255, .7); }

/* Spaziergänger */
.leute { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mensch {
    position: absolute; left: 0;
    font-size: 1.1rem;
    animation: spazieren var(--dauer) linear var(--start) infinite, huepfen .5s ease-in-out infinite;
}
.mensch.rueck { animation-direction: reverse, normal; }
@keyframes spazieren { from { left: -6%; } to { left: 104%; } }
@keyframes huepfen { 50% { margin-top: -2px; } }

/* Tageszeit auf der Karte */
.nachtlicht { position: absolute; inset: 0; pointer-events: none; transition: background 2s; }
.stadtkarte.morgen .nachtlicht { background: rgba(255, 170, 190, .15); }
.stadtkarte.abend  .nachtlicht { background: rgba(240, 120, 60, .22); }
.stadtkarte.nacht  .nachtlicht { background: rgba(10, 15, 50, .55); }
.stadtkarte.nacht .kachel.gebaeude .kachel-icon,
.stadtkarte.nacht .kachel.deko .kachel-icon { filter: drop-shadow(0 0 6px #ffd34d) drop-shadow(0 0 2px #ffd34d); position: relative; z-index: 1; }
.stadtkarte.nacht .kachel.gebaeude { z-index: 1; }

/* Saat-Leiste unter der Karte */
.saat-leiste { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -8px; }
.saat {
    padding: 6px 10px;
    border-radius: 99px;
    border: 1px solid rgba(232, 201, 153, .3);
    background: rgba(255, 255, 255, .05);
    color: var(--milchschaum);
    font: inherit; font-size: .85rem;
    cursor: pointer;
}
.saat small { color: var(--crema); }
.saat.gewaehlt { background: var(--crema); color: var(--espresso); }
.saat.gewaehlt small { color: var(--espresso); }
.saat.ernte { margin-left: auto; border-color: #9be15d; }
.deko-vorschau.weg { color: #d9c39a; }
.lager-teil:disabled { opacity: .4; cursor: default; }

/* ===================== v5: Markt ===================== */
.reiter button { font-size: .8rem; padding: 8px 0; }
.markt-kopf h3 { font-size: 1.4rem; color: #f5d06f; }
.markt-form { display: flex; gap: 10px; margin: 8px 0 12px; }
.markt-form label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--crema); }
.markt-form input {
    font: inherit; font-size: 1rem;
    padding: 8px 10px; border-radius: 10px;
    border: 1px solid rgba(232, 201, 153, .25);
    background: rgba(0, 0, 0, .25); color: var(--milchschaum);
    user-select: text;
}
.angebot { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(232, 201, 153, .1); font-size: .9rem; }
.angebot:last-child { border-bottom: none; }
.angebot .klein-knopf { flex: 0; min-width: 0; padding: 6px 10px; font-size: .8rem; }
.fortschritt { flex: 1; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: #f5d06f; }
@media (max-width: 420px) { .reiter button { font-size: .68rem; } }

/* ===================== v6: Mühlen-Werkstatt & Saison-Looks ===================== */
.werkstatt-platz { margin: 10px 0 2px; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--crema); }
.werkstatt-teil { display: flex; flex-direction: column; align-items: center; min-width: 64px; }

/* Outfit sitzt oben auf dem Trichter */
.outfit { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); font-size: 1.8rem; z-index: 3; pointer-events: none; }

/* Gestelle */
.muehle.gestell_eiche .gehaeuse   { background: repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 5px, transparent 5px 12px), linear-gradient(180deg, #9c6b3c, #6b4423); }
.muehle.gestell_messing .gehaeuse { background: linear-gradient(160deg, #f1d38a, #b8892f 60%, #8a6421); }
.muehle.gestell_gold .gehaeuse    { background: linear-gradient(160deg, #fff3b0, #f5c518 50%, #b8860b); box-shadow: 0 0 18px rgba(245, 197, 24, .6), inset 0 -6px 0 rgba(0,0,0,.18); }
.muehle.gestell_diamant .gehaeuse { background: linear-gradient(135deg, #e0f7ff, #8fd3f4 40%, #c3b1ff 70%, #e0f7ff); box-shadow: 0 0 24px rgba(143, 211, 244, .8), inset 0 -6px 0 rgba(0,0,0,.12); animation: glitzern 2.5s linear infinite; }
@keyframes glitzern { 50% { filter: brightness(1.15) saturate(1.2); } }

/* Kurbeln */
.muehle.kurbel_lang .kurbel .arm   { width: 64px; }
.muehle.kurbel_lang .kurbel .griff { left: 56px; }
.muehle.kurbel_turbo .kurbel .arm  { background: linear-gradient(180deg, #ff9a3c, #c2410c); }
.muehle.kurbel_turbo .kurbel .griff { background: radial-gradient(circle at 35% 35%, #ffd34d, #c2410c); }
.muehle.kurbel_rakete .kurbel .arm { width: 64px; background: linear-gradient(180deg, #e5e7eb, #6b7280); }
.muehle.kurbel_rakete .kurbel .griff { left: 54px; top: -12px; width: 24px; height: 24px; background: none; box-shadow: none; }
.muehle.kurbel_rakete .kurbel .griff::after { content: "🚀"; font-size: 1.1rem; }

/* Saison-Looks */
.theme-deko { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-size: 1.1rem; z-index: 1; letter-spacing: .4rem; animation: dampf 3s ease-in-out infinite; }
.szene.theme_halloween .himmel { background: linear-gradient(180deg, #1a0f2e 0%, #4a1f5c 55%, #e66b1f 100%); }
.szene.theme_halloween .gehaeuse { background: radial-gradient(ellipse at 50% 40%, #ff9a3c, #d9590d); }
.szene.theme_halloween .gesicht { color: #2b0f00; }
.szene.theme_weihnachten .himmel { background: linear-gradient(180deg, #0f2a4a 0%, #2c5d8a 60%, #e8f1f8 100%); }
.szene.theme_weihnachten .gehaeuse { background: repeating-linear-gradient(45deg, #d62828 0 10px, #f8f8f8 10px 20px); }
.szene.theme_weihnachten .huegel { background: radial-gradient(ellipse at 50% 0%, #ffffff, #d6e6f2); }
.szene.theme_ostern .himmel { background: linear-gradient(180deg, #ffd6e8 0%, #d6f5e3 60%, #fff4c2 100%); }
.szene.theme_ostern .gehaeuse { background: radial-gradient(circle at 30% 30%, #fff 0 6px, transparent 7px), radial-gradient(circle at 70% 60%, #fff 0 6px, transparent 7px), linear-gradient(180deg, #b8e0d2, #95c8b4); }
.szene.theme_sommer .himmel { background: linear-gradient(180deg, #4fc3f7 0%, #b3e5fc 55%, #ffe082 100%); }
.szene.theme_sommer .huegel { background: radial-gradient(ellipse at 50% 0%, #ffe082, #e0b84f); }
.szene.theme_sommer .gehaeuse { background: repeating-linear-gradient(90deg, #ff8a65 0 12px, #ffd54f 12px 24px); }

/* ===================== v7: Wetter, Album, Käfer, Kürbis ===================== */
.wetter-text { margin-top: 2px; }
.wetter-ebene { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.wetter-ebene.regen, .wetter-ebene.gewitter {
    background-image: repeating-linear-gradient(105deg, rgba(180, 210, 255, .35) 0 1px, transparent 1px 14px);
    background-size: 100% 60px;
    animation: regnen .4s linear infinite;
}
@keyframes regnen { to { background-position: -8px 60px; } }
.wetter-ebene.gewitter::after {
    content: ""; position: absolute; inset: 0; background: #fff; opacity: 0;
    animation: blitzen 7s infinite;
}
@keyframes blitzen { 0%, 93%, 100% { opacity: 0; } 94% { opacity: .7; } 95% { opacity: 0; } 96% { opacity: .5; } }
.wetter-ebene.schnee {
    background-image:
        radial-gradient(circle, rgba(255,255,255,.9) 0 1.5px, transparent 2px),
        radial-gradient(circle, rgba(255,255,255,.7) 0 1px, transparent 1.5px);
    background-size: 40px 40px, 25px 25px;
    animation: schneien 6s linear infinite;
}
@keyframes schneien { to { background-position: 10px 240px, -15px 240px; } }
.wetter-ebene.wolken { background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 40%); }

.bohne.kuerbis { filter: drop-shadow(0 0 10px #ff9a3c); }
.kachel.kaefer .kachel-icon { animation: wackeln .3s ease-in-out infinite; }
.kachel.kaefer { box-shadow: inset 0 0 0 2px #e0603f; }

.album-reihe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.album-karte {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 10px 4px; border-radius: 12px; text-align: center;
    background: rgba(255,255,255,.03); border: 1px solid rgba(232,201,153,.12); opacity: .55;
}
.album-karte.frei { opacity: 1; border-color: rgba(245,208,111,.5); background: rgba(245,208,111,.08); }
.album-karte .icon { font-size: 1.6rem; }
.album-karte small { font-size: .72rem; color: var(--crema); }
.album-karte .doppelt { position: absolute; top: 4px; right: 6px; font-size: .7rem; color: #f5d06f; }
.listen-tabs { margin-bottom: 10px; }

/* ===================== v8: Haustier, Kunden, Advent, Röstereien, Nachbarn ===================== */
.haustier {
    position: absolute; left: 14%; bottom: 26px; z-index: 3;
    border: none; background: none; padding: 0; cursor: pointer;
    font-size: 2.2rem;
    animation: huepfen 1.6s ease-in-out infinite;
}
.haustier .laune { position: absolute; top: -8px; right: -10px; font-size: .9rem; }
.haustier.hungrig { filter: grayscale(.5); animation: none; }

.karte.kunde { border-color: rgba(155, 196, 138, .6); background: rgba(155, 196, 138, .08); }
.karte .fortschritt { display: block; margin: 6px 0; }

.advent-raster { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tuer {
    aspect-ratio: 1; border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(232, 201, 153, .3);
    background: linear-gradient(135deg, #7a1f1f, #4a1414);
    color: #ffe8b0; font: inherit; font-weight: 700;
}
.tuer.heute { box-shadow: 0 0 12px #ffd34d; animation: wackeln 1.2s ease-in-out infinite; }
.tuer.offen { background: rgba(255, 255, 255, .06); font-size: 1.3rem; }
.tuer:disabled { cursor: default; }
.tuer:disabled:not(.offen) { opacity: .45; }

.besuch-knopf { border: none; background: none; cursor: pointer; font-size: 1rem; padding: 0 0 0 6px; }
.suche { display: flex; gap: 8px; }
.suche input {
    flex: 1; font: inherit; padding: 8px 10px; border-radius: 10px;
    border: 1px solid rgba(232, 201, 153, .25); background: rgba(0, 0, 0, .25); color: var(--milchschaum);
    user-select: text;
}
.suche .klein-knopf { flex: 0; min-width: 100px; }
.karte.nachbarn, .karte.roesterei { margin-top: 12px; }
.gilden-stufen { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; font-size: .82rem; color: var(--crema); }
.gilden-stufen .erreicht { color: #f5d06f; font-weight: 700; }
.gilden-stufen .erreicht::after { content: " ✓"; }
.mitglieder { list-style: none; padding: 0; margin: 6px 0 10px; }
.mitglieder li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(232, 201, 153, .1); font-size: .9rem; }
.mitglieder .punkte { color: var(--gruen); font-variant-numeric: tabular-nums; margin-left: auto; }
.besuchskarte .kachel { cursor: default; }

/* ===================== v9: Orte mit eigener Kulisse, Inventar, Jahreszeiten ===================== */
.reiter { display: grid; grid-template-columns: repeat(4, 1fr); }
.reiter button { font-size: .82rem; padding: 8px 2px; }
.punkt.gruen { background: #9be15d; }

.szene:not(.ort-shop) { height: 170px; }
.kulisse { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: space-around; align-items: flex-end; z-index: 2; pointer-events: none; }
.farm-kulisse span { font-size: 2.6rem; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.farm-kulisse .scheune { font-size: 3.4rem; }
.farm-kulisse .haus { font-size: 3rem; }
.weide { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; gap: 40px; z-index: 3; font-size: 1.4rem; pointer-events: none; }
.weide span:nth-child(2) { animation: huepfen .8s ease-in-out infinite; }
.traktor {
    position: absolute; bottom: 8px; left: -15%; z-index: 4; font-size: 2.4rem; pointer-events: none;
    transform: scaleX(-1);
    animation: tuckern 16s linear infinite, huepfen .35s ease-in-out infinite;
}
@keyframes tuckern { from { left: -15%; } to { left: 110%; } }
.farm-schild, .stadt-schild, .preisschild {
    position: absolute; top: 12px; left: 14px; z-index: 5;
    padding: 4px 10px; border-radius: 8px;
    background: #6e4224; color: #ffe8b0; font-size: .8rem; font-weight: 700;
    box-shadow: 0 3px 0 #4a2c17;
}
.szene.ort-farm .huegel { background: radial-gradient(ellipse at 50% 0%, #a8d672, #6aa043); }

.stadt-kulisse { bottom: 18px; gap: 2px; justify-content: center; }
.stadt-kulisse span { font-size: 2.4rem; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.stadt-kulisse span:nth-child(2n) { font-size: 3.1rem; }
.szene.ort-stadt.nacht .stadt-kulisse span { filter: drop-shadow(0 0 8px #ffd34d); }
.szene.ort-stadt .huegel { background: linear-gradient(180deg, #9a9a9a, #6b6b6b); border-radius: 0; height: 40px; bottom: 0; }

.markise {
    position: absolute; left: 10%; right: 10%; top: 40px; height: 34px; z-index: 3;
    background: repeating-linear-gradient(90deg, #e0603f 0 22px, #faf3e6 22px 44px);
    border-radius: 6px 6px 0 0;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 96% 100%, 92% 70%, 88% 100%, 84% 70%, 80% 100%, 76% 70%, 72% 100%, 68% 70%, 64% 100%, 60% 70%, 56% 100%, 52% 70%, 48% 100%, 44% 70%, 40% 100%, 36% 70%, 32% 100%, 28% 70%, 24% 100%, 20% 70%, 16% 100%, 12% 70%, 8% 100%, 4% 70%, 0 100%);
}
.markt-stand {
    position: absolute; left: 12%; right: 12%; bottom: 24px; height: 46px; z-index: 3;
    background: linear-gradient(180deg, #b77a48, #8a5530); border-radius: 6px;
    display: flex; justify-content: space-around; align-items: flex-start; font-size: 1.6rem;
}
.markt-stand span { margin-top: -18px; }
.haendler { position: absolute; bottom: 18px; z-index: 4; font-size: 2rem; pointer-events: none; animation: huepfen 1.2s ease-in-out infinite; }
.haendler.h1 { left: 4%; }
.haendler.h2 { right: 4%; animation-delay: .4s; }
.preisschild { left: auto; right: 14px; }

.acker-flaeche {
    display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px;
    padding: 8px; margin: 8px 0;
    border-radius: 14px; border: 3px solid #6e4224;
    background: linear-gradient(180deg, #8cc56a, #6fae4f);
}

.bohnen-ebene { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.bohnen-ebene .bohne { pointer-events: auto; }

.inv-zeile { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(232,201,153,.1); font-size: .92rem; }
.inv-zeile:last-child { border-bottom: none; }

/* Jahreszeiten: fallende Blätter, Schnee, Blüten, Schmetterlinge */
.jahreszeit { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.jahreszeit span {
    position: absolute; top: -8%;
    font-size: calc(var(--groesse) * .1rem);
    opacity: .85;
    animation: fallen var(--dauer) linear var(--start) infinite;
}
.jahreszeit.winter span { color: #fff; text-shadow: 0 0 6px rgba(255,255,255,.8); }
.jahreszeit.sommer span { animation-name: flattern; }
@keyframes fallen {
    0%   { transform: translate(0, 0) rotate(0deg); }
    50%  { transform: translate(calc(var(--wind) * .5), 55vh) rotate(180deg); }
    100% { transform: translate(var(--wind), 115vh) rotate(360deg); }
}
@keyframes flattern {
    0%   { transform: translate(0, 110vh); }
    25%  { transform: translate(var(--wind), 80vh); }
    50%  { transform: translate(0, 50vh); }
    75%  { transform: translate(calc(var(--wind) * -1), 20vh); }
    100% { transform: translate(0, -15vh); }
}
@media (prefers-reduced-motion: reduce) { .jahreszeit { display: none; } }

/* ===================== v10: Farm-Werkzeuge, Maschinen, Willkommensgeschenk ===================== */
.kachel.geduengt { box-shadow: inset 0 0 0 2px #b388ff, 0 0 8px rgba(179, 136, 255, .6); }
.geschenke { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.geschenke span {
    padding: 8px 12px; border-radius: 12px;
    background: rgba(245, 208, 111, .15); border: 1px solid rgba(245, 208, 111, .5);
    font-weight: 700;
}
.gross-icon { font-size: 2.4rem; }
.willkommen-geschenk { border-color: rgba(245, 208, 111, .8); }
