:root {
  --akzent: #9a4f14; --akzent2: #6b46c1; --akzent3: #f3e6ff; --tief: #f4ecdf; --panel: rgba(255, 249, 238, .9); --panel2: rgba(255, 250, 241, .97);
  --text: #2f2117; --mute: #6e5640; --rand: rgba(154, 79, 20, .45); --knopf1: #f6e3c4; --knopf2: #e5c08c; --knopfText: #2f2117;
  --gruen: #15803d; --rot: #b91c1c; --kopf: Georgia, 'Times New Roman', serif;
  --platte: url(img/platte-morgen.webp?v=1); --kul: url(img/kulisse-morgen.webp?v=1); --kulH: url(img/kulisse-morgen-hoch.webp?v=1); --schleier: rgba(255, 246, 232, .12);
  --kante1: #d9cbb6; --kante2: #a8957a; --zettel: #fbf3e2; --zettelText: #3b2a1c; --messing: #b98b3c;
}
html[data-ansicht="abend"] {
  --akzent: #f2b53c; --akzent2: #d8b4fe; --akzent3: #3b2312; --tief: #1f140c; --panel: rgba(38, 24, 14, .86); --panel2: rgba(44, 28, 16, .96);
  --text: #fbecd6; --mute: #e2c39a; --rand: rgba(242, 181, 60, .45); --knopf1: #7a4a26; --knopf2: #4a2a14; --knopfText: #fbecd6;
  --gruen: #4ade80; --rot: #fca5a5;
  --platte: url(img/platte-abend.webp?v=1); --kul: url(img/kulisse-abend.webp?v=1); --kulH: url(img/kulisse-abend-hoch.webp?v=1); --schleier: rgba(20, 10, 4, .28);
  --kante1: #5a3a22; --kante2: #2c1a0e; --zettel: #3a2616; --zettelText: #fbecd6; --messing: #e0b057;
}
html[data-ansicht="garten"] {
  --akzent: #f0abfc; --akzent2: #fbcfe8; --akzent3: #3b1d3a; --tief: #241628; --panel: rgba(40, 24, 46, .84); --panel2: rgba(46, 28, 52, .96);
  --text: #fdf2ff; --mute: #e9c7ef; --rand: rgba(240, 171, 252, .45); --knopf1: #6b3a6e; --knopf2: #3e1f42; --knopfText: #fdf2ff;
  --gruen: #86efac; --rot: #fda4af;
  --platte: url(img/platte-garten.webp?v=1); --kul: url(img/kulisse-garten.webp?v=1); --kulH: url(img/kulisse-garten-hoch.webp?v=1); --schleier: rgba(30, 10, 34, .2);
  --kante1: #b7a58c; --kante2: #6f6150; --zettel: #3d2440; --zettelText: #fdf2ff; --messing: #f0abfc;
}
body { background: var(--tief); }
#kulisse { position: fixed; inset: 0; background: var(--kul) center / cover no-repeat; z-index: 0; }
#kulisse::after { content: ''; position: absolute; inset: 0; background: var(--schleier); }
body.hoch #kulisse { background-image: var(--kulH); }
#buehne { z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  #kulisse::before { content: ''; position: absolute; left: -20%; top: -10%; width: 70%; height: 90%; pointer-events: none; mix-blend-mode: screen;
    background: radial-gradient(ellipse at 30% 30%, rgba(255, 236, 190, .22), rgba(255, 236, 190, 0) 60%); animation: sonne 14s ease-in-out infinite alternate; }
  @keyframes sonne { from { transform: translateX(0) rotate(-4deg); opacity: .7; } to { transform: translateX(8%) rotate(3deg); opacity: 1; } }
}
html[data-ansicht="abend"] #kulisse::before { background: radial-gradient(ellipse at 20% 40%, rgba(255, 170, 70, .2), rgba(255, 170, 70, 0) 55%); }

#hud { background: var(--panel); border: 2px solid var(--messing); box-shadow: 0 10px 28px rgba(40, 20, 0, .3), inset 0 0 0 4px rgba(255, 255, 255, .06); }
#logo span, #logo b { font-family: var(--kopf); text-shadow: 0 2px 0 rgba(255, 255, 255, .5); }
#logo b { color: var(--akzent2); }
html[data-ansicht="abend"] #logo span, html[data-ansicht="abend"] #logo b, html[data-ansicht="garten"] #logo span, html[data-ansicht="garten"] #logo b { text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.wert { background: rgba(255, 252, 244, .55); }
.wert b { color: var(--text); font-family: var(--kopf); }
html[data-ansicht="abend"] .wert, html[data-ansicht="garten"] .wert { background: rgba(0, 0, 0, .25); }
.endwert { color: var(--akzent); text-shadow: 0 2px 0 rgba(255, 250, 238, .8); }
html[data-ansicht="abend"] .endwert, html[data-ansicht="garten"] .endwert { color: var(--akzent); text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.hinweis { background: rgba(255, 250, 238, .65); color: var(--text); }
html[data-ansicht="abend"] .hinweis, html[data-ansicht="garten"] .hinweis { background: rgba(0, 0, 0, .3); color: var(--mute); }
#banner { color: var(--akzent); font-family: var(--kopf); text-shadow: 0 2px 0 rgba(255, 250, 238, .9), 0 0 14px rgba(255, 250, 238, .9); }
#banner small { color: var(--text); text-shadow: 0 1px 0 rgba(255, 250, 238, .9); }
html[data-ansicht="abend"] #banner, html[data-ansicht="garten"] #banner { text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
html[data-ansicht="abend"] #banner small, html[data-ansicht="garten"] #banner small { text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
#knoepfe { grid-template-columns: repeat(4, 1fr); }
#knoepfe button.an { box-shadow: 0 0 0 3px var(--akzent2); }
@media (max-height: 720px) and (min-aspect-ratio: 1/1) {
  #hud { gap: 7px; padding: 10px 14px; } #logo { font-size: 24px; padding: 2px 0 0; } .wert { padding: 4px 8px 5px; } .wert b { font-size: 24px; } .wert.klein b { font-size: 19px; }
  #knoepfe button { height: 40px; }
}

#brettbox { overflow: hidden; border-radius: 16px; touch-action: none; background: transparent; }
#brett { position: absolute; inset: 0; touch-action: none; z-index: 1; pointer-events: none; }
#theke { position: absolute; z-index: 0; border-radius: 14px 14px 8px 8px; transform: perspective(1200px) rotateX(16deg); transform-origin: 50% 100%; background: var(--platte) center / cover;
  box-shadow: 0 26px 40px rgba(30, 14, 2, .45), 0 6px 0 var(--kante2), inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -18px 30px rgba(0, 0, 0, .12); }
#theke[hidden] { display: none; }
#theke .kante { position: absolute; left: 0; right: 0; bottom: -14px; height: 14px; border-radius: 0 0 8px 8px; background: linear-gradient(var(--kante1), var(--kante2)); }

#kopf { position: absolute; left: 12px; top: 8px; z-index: 2; height: 50px; max-width: calc(100% - 24px); padding: 4px 14px; border-radius: 6px; overflow: hidden;
  background: var(--zettel); color: var(--zettelText); border: 1px solid var(--messing); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transform: rotate(-.6deg);
  display: flex; flex-direction: column; justify-content: center; font-family: var(--kopf); }
#kopf[hidden] { display: none; }
#kopf b { font-size: 16px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#kopf span { font-size: 14px; line-height: 19px; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

#meld { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 3; width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#meld .m { background: var(--panel2); color: var(--text); border: 1px solid var(--rand); border-left: 5px solid var(--akzent); border-radius: 10px; padding: 8px 12px;
  font-size: 15px; line-height: 1.35; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: opacity .35s; }
#meld .m.gut { border-left-color: var(--gruen); } #meld .m.schlecht { border-left-color: var(--rot); }
#meld .m.weg { opacity: 0; }

#karte { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-.8deg); z-index: 4; width: min(420px, calc(100% - 32px)); padding: 18px 20px; border-radius: 10px;
  background: var(--zettel); border: 2px solid var(--messing); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); text-align: center; color: var(--zettelText); font-family: var(--kopf); }
#karte[hidden] { display: none; }
#karte h2 { margin: 0 0 6px; font: 800 28px/1.1 var(--kopf); color: var(--akzent2); }
#karte table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 15px; }
#karte td { padding: 4px 6px; border-bottom: 1px solid var(--rand); text-align: left; } #karte td + td { text-align: right; font-variant-numeric: tabular-nums; }
#karte tr.summe td { font-weight: 800; color: var(--akzent); }
#karte .knopf { min-height: 46px; padding: 0 18px; }
.sterne { display: inline-flex; gap: 6px; vertical-align: middle; }
.sterne i { width: 26px; height: 26px; background: rgba(0, 0, 0, .18); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.sterne i.an { background: #f59e0b; }

#wahl { position: absolute; inset: 0; z-index: 3; overflow: auto; padding: 16px; background: var(--panel2); border-radius: 16px; scrollbar-width: thin; scrollbar-color: var(--akzent) rgba(0, 0, 0, .12); }
#wahl[hidden] { display: none; }
#wahl::-webkit-scrollbar { width: 8px; } #wahl::-webkit-scrollbar-thumb { background: var(--akzent); border-radius: 4px; } #wahl::-webkit-scrollbar-track { background: rgba(0, 0, 0, .12); }
#wahl h2 { margin: 0 0 12px; text-align: center; font: 800 24px/1.2 var(--kopf); color: var(--akzent); }
#wahl h3 { margin: 14px 0 8px; font: 700 17px/1.2 var(--kopf); color: var(--akzent2); }
.wahlgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.wahlgitter button { min-height: 64px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--rand); background: rgba(255, 255, 255, .55);
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; color: var(--text); cursor: pointer; }
html[data-ansicht="abend"] .wahlgitter button, html[data-ansicht="garten"] .wahlgitter button { background: rgba(0, 0, 0, .25); }
.wahlgitter button:hover { border-color: var(--akzent); }
.wahlgitter b { grid-row: span 2; font: 800 22px/1 var(--kopf); color: var(--akzent); align-self: center; text-align: center; }
.wahlgitter span { font-weight: 700; font-size: 15px; }
.wahlgitter em { font-style: normal; font-size: 13px; color: var(--mute); }

.kasten { border: 2px solid var(--rand); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; background: rgba(255, 255, 255, .35); }

body.hoch #knoepfe { gap: 6px; flex-wrap: wrap; }
body.hoch #knoepfe button { width: auto; flex: 1 1 0; min-width: 40px; max-width: 54px; }
body.hoch #brettbox { border-radius: 12px; }
body.hoch #kopf { height: 46px; } body.hoch #kopf b { font-size: 15px; line-height: 20px; } body.hoch #kopf span { font-size: 13px; line-height: 18px; }
@media (pointer: coarse) { #knoepfe button { min-height: 44px; } }

#hilfen { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; width: min(600px, calc(100% - 16px)); justify-content: center; }
#hilfen[hidden] { display: none; }
#hilfen button { flex: 1 1 auto; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px; cursor: pointer;
  border-radius: 10px; border: 2px solid var(--messing); color: var(--knopfText); font: 700 15px/1.1 var(--kopf);
  background: linear-gradient(var(--knopf1), var(--knopf2)); box-shadow: 0 4px 0 var(--kante2), 0 8px 16px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .45); }
#hilfen button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 var(--kante2), 0 4px 10px rgba(0, 0, 0, .25); }
#hilfen button:disabled { opacity: .5; cursor: default; }
#hilfen button svg { width: 20px; height: 20px; flex: none; }
#hilfen button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hilfen small { font: 600 12px/1 'Segoe UI', system-ui, sans-serif; opacity: .85; }
body.hoch #hilfen button { flex-direction: column; gap: 2px; font-size: 13px; padding: 4px 4px; }
body.hoch #hilfen button span { display: flex; flex-direction: column; align-items: center; gap: 1px; }

#mehr { position: fixed; z-index: 50; min-width: 250px; padding: 6px; border-radius: 12px; background: var(--panel2); border: 2px solid var(--messing); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 4px; }
#mehr[hidden] { display: none; }
#mehr button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 600 15px/1.2 'Segoe UI', system-ui, sans-serif; text-align: left; cursor: pointer; }
#mehr button:hover, #mehr button:focus-visible { background: rgba(0, 0, 0, .08); }
#mehr button svg { width: 20px; height: 20px; flex: none; }

#stufe { position: absolute; left: 50%; top: 6px; transform: translateX(-50%) rotate(-.4deg); z-index: 3; width: min(520px, calc(100% - 16px)); padding: 5px 14px; border-radius: 8px; pointer-events: none;
  background: var(--zettel); color: var(--zettelText); border: 2px solid var(--messing); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); text-align: center; font-family: var(--kopf);
  animation: stufeEin .45s ease-out; transition: opacity .4s; }
#stufe[hidden] { display: none; } #stufe.weg { opacity: 0; }
#stufe b { display: block; font-size: 19px; line-height: 1.2; color: var(--akzent2); }
#stufe span { display: block; font: 13px/1.3 'Segoe UI', system-ui, sans-serif; color: var(--zettelText); }
@keyframes stufeEin { from { transform: translateX(-50%) translateY(-30px); opacity: 0; } }

.wahlweiter { display: block; margin: 0 auto 6px; min-height: 46px; padding: 0 22px; }
.wahlgitter.regal button { grid-template-rows: auto auto auto; row-gap: 3px; }
.wahlgitter.regal b { grid-row: span 3; }
.wahlgitter .mini { color: var(--text); max-width: 100%; height: auto; }
.wahlgitter em .sterne i { width: 14px; height: 14px; }
.wahlgitter em .sterne { gap: 2px; }
body.hoch .wahlgitter { grid-template-columns: 1fr 1fr; gap: 8px; }
body.hoch .wahlgitter button { grid-template-columns: 1fr; padding: 6px 8px; }
body.hoch .wahlgitter.regal b { grid-row: auto; text-align: left; font-size: 18px; }
#karte .reihe { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.goldsiegel { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font: 800 12px/1.3 'Segoe UI', system-ui, sans-serif; letter-spacing: .04em;
  color: #3b2506; background: radial-gradient(circle at 35% 30%, #fff2c2, #e7b94a 55%, #a87418); border: 1px solid #8a5d10; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.wahlgitter em .goldsiegel { font-size: 10px; padding: 1px 6px; }
@media (prefers-reduced-motion: no-preference) {
  .sterne i.flieg, .goldsiegel.flieg { animation: sternFlieg .5s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes sternFlieg { from { transform: translateY(-60px) scale(2.2) rotate(-40deg); opacity: 0; } }
  #hilfen button.rechnet svg { animation: birne .6s ease-in-out infinite alternate; }
  @keyframes birne { from { filter: drop-shadow(0 0 0 #fde68a); } to { filter: drop-shadow(0 0 6px #fde68a); } }
}

