:root {
  --akzent: #1f5f99; --akzent2: #b4362a; --tief: #e6eef5; --panel: rgba(248, 251, 254, .9); --panel2: rgba(250, 252, 255, .97);
  --text: #1d2a36; --mute: #4f6274; --rand: rgba(31, 95, 153, .4); --knopf1: #e3eef8; --knopf2: #b9d0e6; --knopfText: #1d2a36;
  --gruen: #15803d; --rot: #b91c1c; --kopf: Georgia, 'Times New Roman', serif;
  --eisbild: url(img/eis-morgen.webp?v=1); --kul: url(img/kulisse-morgen.webp?v=1); --kulH: url(img/kulisse-morgen-hoch.webp?v=1);
  --eis1: #e9f4fb; --eis2: #b8d4e8; --schleier: rgba(240, 246, 252, .1);
  --kai1: #a39587; --kai2: #6e6156; --holz1: #8a5a34; --holz2: #5a3820; --kreide: #fbf6ea; --zettel: #fbf7ee; --zettelText: #23303c; --messing: #b98b3c;
}
html[data-ansicht="abend"] {
  --akzent: #f2b53c; --akzent2: #ff9f6b; --tief: #141a2b; --panel: rgba(22, 28, 46, .86); --panel2: rgba(26, 32, 52, .96);
  --text: #f4ecdc; --mute: #c9c1b0; --rand: rgba(242, 181, 60, .45); --knopf1: #3a4466; --knopf2: #232a44; --knopfText: #f4ecdc;
  --gruen: #6ee7a0; --rot: #fca5a5;
  --eisbild: url(img/eis-abend.webp?v=1); --kul: url(img/kulisse-abend.webp?v=1); --kulH: url(img/kulisse-abend-hoch.webp?v=1);
  --eis1: #5d6f98; --eis2: #2c3a5e; --schleier: rgba(10, 12, 30, .22);
  --kai1: #4d4757; --kai2: #2a2632; --holz1: #6e4527; --holz2: #3b2414; --kreide: #fbf2dd; --zettel: #262c42; --zettelText: #f4ecdc; --messing: #e0b057;
}
html[data-ansicht="schnee"] {
  --akzent: #2b6c8f; --akzent2: #b03a2e; --tief: #d7dee6; --panel: rgba(240, 244, 248, .9); --panel2: rgba(244, 247, 250, .97);
  --text: #1f2a33; --mute: #4d5b66; --rand: rgba(43, 108, 143, .4); --knopf1: #e2e9ef; --knopf2: #b8c6d2; --knopfText: #1f2a33;
  --gruen: #15803d; --rot: #b91c1c;
  --eisbild: url(img/eis-schnee.webp?v=1); --kul: url(img/kulisse-schnee.webp?v=1); --kulH: url(img/kulisse-schnee-hoch.webp?v=1);
  --eis1: #eef3f7; --eis2: #c3d1dc; --schleier: rgba(235, 240, 245, .14);
  --kai1: #9a9590; --kai2: #66605a; --holz1: #7d5232; --holz2: #4f321d; --kreide: #fbf6ea; --zettel: #f8f5ef; --zettelText: #23303c; --messing: #a8823f;
}
body { background: var(--tief); }
#kulisse { position: fixed; inset: 0; background: var(--kul) center / cover no-repeat, linear-gradient(#f3dcc0, #c9dbea); z-index: 0; overflow: hidden; }
#kulisse::after { content: ''; position: absolute; inset: 0; background: var(--schleier); }
body.hoch #kulisse { background-image: var(--kulH), linear-gradient(#f3dcc0, #c9dbea); }
html[data-ansicht="abend"] #kulisse { background-image: var(--kul), linear-gradient(#0f1630, #2b2f4f); }
html[data-ansicht="abend"] body.hoch #kulisse { background-image: var(--kulH), linear-gradient(#0f1630, #2b2f4f); }
#buehne { z-index: 1; }
#kulisse .flocken { position: absolute; inset: -20% 0 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent), radial-gradient(2.5px 2.5px at 120px 80px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 200px 150px, #fff, transparent), radial-gradient(2px 2px at 60px 190px, #fff, transparent);
  background-size: 240px 240px; }
html[data-ansicht="schnee"] #kulisse .flocken { opacity: .9; background-size: 160px 160px; }
html[data-ansicht="morgen"] #kulisse .flocken { opacity: .25; }
@media (prefers-reduced-motion: no-preference) {
  #kulisse .flocken { animation: flocken 22s linear infinite; }
  html[data-ansicht="schnee"] #kulisse .flocken { animation-duration: 11s; }
  @keyframes flocken { from { transform: translate(0, 0); } to { transform: translate(-60px, 240px); } }
}

#hud { background: var(--panel); border: 2px solid var(--messing); box-shadow: 0 10px 28px rgba(10, 20, 40, .28), 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 { text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.wert { background: rgba(255, 255, 255, .5); }
.wert b { color: var(--text); font-family: var(--kopf); }
html[data-ansicht="abend"] .wert { background: rgba(0, 0, 0, .25); }
.endwert { color: var(--akzent); text-shadow: 0 2px 0 rgba(255, 255, 255, .8); }
html[data-ansicht="abend"] .endwert { text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.hinweis { background: rgba(255, 255, 255, .6); color: var(--text); }
html[data-ansicht="abend"] .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, 255, 255, .9), 0 0 14px rgba(255, 255, 255, .9); }
#banner small { color: var(--text); text-shadow: 0 1px 0 rgba(255, 255, 255, .9); }
html[data-ansicht="abend"] #banner { text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
html[data-ansicht="abend"] #banner small { text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
#knoepfe { grid-template-columns: repeat(3, 1fr); }
#knoepfe button.an { box-shadow: 0 0 0 3px var(--akzent); }
#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; }
#eis { position: absolute; z-index: 0; border-radius: 10px; background: var(--eisbild) center / cover, linear-gradient(135deg, var(--eis1), var(--eis2));
  outline: 7px solid var(--kai1); box-shadow: 0 0 0 9px var(--kai2), 0 24px 40px rgba(10, 20, 40, .45), inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -14px 26px rgba(20, 40, 70, .18); }
#eis[hidden] { display: none; }
#eis .kante { position: absolute; left: -9px; right: -9px; bottom: -20px; height: 11px; border-radius: 0 0 6px 6px; background: linear-gradient(var(--kai2), #3a332d); }

#vorlage { position: absolute; z-index: 2; border-radius: 8px; background-color: var(--holz1); padding: 8px 10px 6px; display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .07), rgba(0, 0, 0, .08)), repeating-linear-gradient(92deg, var(--holz1) 0 9px, var(--holz2) 9px 11px, var(--holz1) 11px 23px);
  border: 3px solid var(--holz2); box-shadow: 0 14px 26px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .12); transform: rotate(.8deg); }
#vorlage { background-color: var(--holz1); }
#vorlage[hidden] { display: none; }
#vorlage .vt { font: 700 16px/20px var(--kopf); color: var(--kreide); text-align: center; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
#vorlage .vu { font: 13px/16px var(--kopf); color: var(--kreide); text-align: center; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vCan { flex: 1 1 auto; width: 100%; min-height: 0; border-radius: 4px; background: rgba(0, 0, 0, .18); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }

#blitz { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: #fff; opacity: 0; }
#blitz.an { animation: blitz .7s ease-out; }
@keyframes blitz { 0% { opacity: .85; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #blitz.an { animation-duration: .2s; } }

#kopf { position: absolute; left: 12px; top: 6px; z-index: 2; height: 48px; 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(-.5deg);
  display: flex; flex-direction: column; justify-content: center; font-family: var(--kopf); }
#kopf[hidden] { display: none; }
#kopf b { font-size: 16px; line-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#kopf span { font-size: 14px; line-height: 18px; color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

#meld { position: absolute; left: 50%; bottom: 14px; 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; }
body.hoch #meld .m { font-size: 14px; padding: 6px 10px; line-height: 1.3; }

#karte { position: absolute; left: var(--kMitte, 50%); top: 50%; transform: translate(-50%, -50%) rotate(-.8deg); z-index: 4; width: var(--kBreite, min(430px, 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[data-ort="unten"] { top: auto; bottom: 14px; transform: translateX(-50%) rotate(-.8deg); }
#karte[data-ort="oben"] { top: var(--kOben, 14px); transform: translateX(-50%) rotate(-.8deg); max-height: calc(100% - var(--kOben, 14px) - 8px); overflow: auto; }
#kopf.ueber span { color: var(--rot); }
#karte h2 { margin: 0 0 6px; font: 800 22px/1.15 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(180px, 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 auto; column-gap: 8px; color: var(--text); cursor: pointer; }
.wahlgitter canvas.mini { grid-column: 1 / -1; width: 96px; height: 72px; margin: 0 auto 6px; border-radius: 6px; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .25); }
html[data-ansicht="abend"] .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); }
.wahlgitter span, .wahlgitter em { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

.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: auto; min-height: 62px; white-space: normal; } body.hoch #kopf span { white-space: normal; } 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; } }
#kopf b, #kopf span { flex-shrink: 0; }
body.hoch #banner { font-size: 30px; padding: 0 12px; }
body.hoch #banner small { font-size: 16px; }
body.hoch #vorlage .vt { font-size: 14px; line-height: 17px; }
body.hoch #vorlage .vu { display: none; }

#kamera { position: absolute; z-index: 1; pointer-events: none; }
#kamera[hidden] { display: none; }
#kamera svg { display: block; width: 100%; height: 100%; }
#kamera .glanz { opacity: 0; }
#kamera.blitz .glanz { animation: kGlanz 1.2s ease-out; }
@keyframes kGlanz { 0% { opacity: 0; } 8% { opacity: 1; } 100% { opacity: 0; } }
html[data-ansicht="abend"] #kamera { filter: brightness(.82); }
#karte .kk { display: flex; flex-wrap: wrap; gap: 10px; }

.abz { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 46%), 1fr)); gap: 8px; margin: 0 0 14px; }
.abzeichen { display: grid; grid-template-columns: 40px 1fr; column-gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--rand);
  background: rgba(255, 255, 255, .45); --ab1: #c9cdd3; --ab2: #9aa1aa; --ab3: #6d747d; }
html[data-ansicht="abend"] .abzeichen { background: rgba(0, 0, 0, .25); }
.abzeichen.an { --ab1: #f3cd55; --ab2: #c8364f; --ab3: #8a5f12; border-color: var(--akzent); }
.abzeichen svg { grid-row: span 2; width: 40px; height: 48px; }
.abzeichen b { font-size: 15px; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.abzeichen em { font-style: normal; font-size: 13px; color: var(--mute); min-width: 0; }
.abzeichen:not(.an) b { color: var(--mute); }
.gracht { width: 100%; }
.gracht svg { display: block; margin: 0 auto; overflow: visible; }
.gracht .stl { font: 700 15px var(--kopf); fill: var(--akzent2); paint-order: stroke; stroke: var(--panel2); stroke-width: 4px; }
.gracht .st { cursor: pointer; outline: none; }
.gracht .st .nr { font: 800 16px var(--kopf); fill: #fff; pointer-events: none; }
.gracht .st .sa { fill: #f59e0b; stroke: #7a4b06; stroke-width: 1; }
.gracht .st .sl { fill: rgba(0, 0, 0, .2); }
.gracht .st:hover .kr, .gracht .st:focus-visible .kr { stroke: var(--akzent); stroke-width: 5; }
.gracht .st.akt .kr { stroke: var(--akzent); stroke-width: 5; }
.wkarte { position: sticky; bottom: 0; z-index: 2; margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 2px solid var(--akzent); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.wkarte[hidden] { display: none; }
.wkarte canvas { grid-row: span 3; width: 120px; height: 90px; border-radius: 6px; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .25); }
.wkarte b { font: 700 18px/1.2 var(--kopf); min-width: 0; overflow-wrap: anywhere; }
.wkarte span { font-size: 14px; color: var(--mute); min-width: 0; }
.wkarte .knopf { justify-self: start; min-height: 46px; padding: 0 18px; }
body.hoch .wkarte canvas { width: 96px; height: 72px; }
body.hoch .abzeichen { grid-template-columns: 30px 1fr; padding: 5px 7px; column-gap: 6px; }
body.hoch .abzeichen svg { width: 30px; height: 36px; }
body.hoch .abzeichen b { font-size: 14px; }

#bVor.leer { opacity: .45; }
body:not(.hoch) #knoepfe #bMehr { display: none; }
body.hoch #bAnsicht, body.hoch #bRahmen, body.hoch #bVor, body.hoch #bVorn, body.hoch #bAlbum, body.hoch #bAuf { display: none; }
#mehrmenue { position: fixed; z-index: 30; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; background: var(--panel);
  border: 2px solid var(--akzent); box-shadow: 0 10px 26px rgba(0, 0, 0, .35); min-width: 220px; }
#mehrmenue[hidden] { display: none; }
#mehrmenue button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text); font: 600 16px var(--kopf); text-align: left; cursor: pointer; }
#mehrmenue button:hover, #mehrmenue button:focus-visible { background: rgba(0, 0, 0, .08); outline: none; }
#mehrmenue button svg { width: 22px; height: 22px; flex: none; }
#bAlbum.neu, #bMehr.neu { animation: albumNeu .6s ease-out; }
@keyframes albumNeu { 0% { transform: scale(1); } 40% { transform: scale(1.22); box-shadow: 0 0 0 6px rgba(245, 158, 11, .45); } 100% { transform: scale(1); } }

.flugfoto { position: fixed; z-index: 40; pointer-events: none; padding: 5px 5px 14px; background: #faf6ec; border-radius: 3px; box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }
.flugfoto canvas, #album canvas { display: block; width: 100%; height: 100%; filter: sepia(.85) contrast(1.05) brightness(.97); }
#album { position: fixed; inset: 0; z-index: 35; overflow: auto; padding: 18px 18px 28px; background-color: var(--tief); background-image: linear-gradient(var(--panel2), var(--panel2)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#album[hidden] { display: none; }
#album .akopf { position: sticky; top: -18px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; background: var(--panel2); }
#album h2 { margin: 0; font: 800 26px/1.2 var(--kopf); color: var(--akzent); }
#album .kx { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--rand); background: var(--panel); color: var(--text); font: 700 26px/1 system-ui, sans-serif; cursor: pointer; }
#album .aunter { margin: 0 0 14px; color: var(--mute); font-size: 15px; }
#album .agitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44%), 1fr)); gap: 16px; }
#album figure { margin: 0; padding: 8px 8px 10px; background: #faf6ec; border-radius: 3px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transform: rotate(-.8deg); color: #3b2a1a; }
#album figure:nth-child(2n) { transform: rotate(.9deg); }
#album figure canvas { aspect-ratio: 4 / 3; height: auto; }
#album figcaption { display: grid; gap: 2px; margin-top: 8px; }
#album figcaption b { font: 700 16px/1.2 var(--kopf); overflow-wrap: anywhere; }
#album figcaption span { font-size: 13px; color: #6b5642; }
#album figcaption .sterne i { width: 18px; height: 18px; }
#album .afotoknopf { justify-self: start; min-height: 44px; margin-top: 6px; padding: 0 14px; border-radius: 8px; border: 2px solid #8a6a48; background: #f1e6cf; color: #3b2a1a; font: 700 15px var(--kopf); cursor: pointer; }
#album .afotoknopf:hover { background: #e8d8b6; }
#album .afotoknopf:focus-visible { outline: 3px solid #b5651d; outline-offset: 2px; }
#album .leer { color: var(--mute); font-size: 16px; }

#zugleiste { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 23px;
  background: var(--panel); border: 1px solid var(--rand); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); font: 600 14px var(--kopf); color: var(--text); }
#zugleiste[hidden] { display: none; }
#zugleiste label { flex: none; }
#zugleiste output { flex: none; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
#zlR { flex: 1; min-width: 0; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#zlR:disabled { opacity: .45; cursor: default; }
#zlR::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--kai1); }
#zlR::-moz-range-track { height: 6px; border-radius: 3px; background: var(--kai1); }
#zlR::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--akzent); border: 3px solid var(--kreide); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
#zlR::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--akzent); border: 3px solid var(--kreide); }
#zlR:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

#eis[data-stufe="2"] { filter: saturate(1.05) brightness(1.02); }
#eis[data-stufe="3"] { filter: sepia(.18) saturate(1.1); }
#eis[data-stufe="4"] { filter: sepia(.28) hue-rotate(-10deg) brightness(.97); }
#eis[data-stufe="5"] { filter: grayscale(.25) brightness(1.06) contrast(.92); }
#eis[data-stufe="6"] { filter: hue-rotate(12deg) brightness(.86) saturate(1.15); }
#eis[data-stufe="7"] { filter: saturate(.85) brightness(1.06) hue-rotate(-10deg); }
#eis[data-stufe="8"] { filter: saturate(1.1) brightness(1.03) hue-rotate(8deg); }

#kamera.klein .staffelei { display: none; }

#werkbank { position: fixed; inset: 0; z-index: 36; overflow: auto; padding: 18px 18px 28px; background-color: var(--tief); background-image: linear-gradient(var(--panel2), var(--panel2));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--text); }
#werkbank[hidden] { display: none; }
#werkbank .akopf { position: sticky; top: -18px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; background: var(--panel2); }
#werkbank h2 { margin: 0; font: 800 26px/1.2 var(--kopf); color: var(--akzent); }
#werkbank .kx { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--rand); background: var(--panel); color: var(--text); font: 700 26px/1 system-ui, sans-serif; cursor: pointer; }
#werkbank .aunter { margin: 0 0 12px; color: var(--mute); font-size: 15px; }
.wbleiste { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wbw { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--rand); background: var(--panel);
  color: var(--text); font: 600 15px var(--kopf); cursor: pointer; }
.wbw[aria-pressed="true"] { border-color: var(--akzent); box-shadow: inset 0 0 0 2px var(--akzent); }
.wbm { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.wbm.eis { background: #cfe3f1; border: 1px solid #8fb0c8; } .wbm.wehe { background: radial-gradient(circle at 35% 30%, #fff, #a9c3db); border-radius: 50%; }
.wbm.pfahl { background: linear-gradient(90deg, #5b3a1e, #8a5a34, #5b3a1e); width: 12px; } .wbm.stroh { background: #dfb45a; border-radius: 50%; }
.wbm.figur { background: #d93636; border-radius: 50%; box-shadow: 0 0 0 3px #d4a017; }
.wbreihe { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; font: 600 15px var(--kopf); }
.wbreihe label { display: inline-flex; align-items: center; gap: 8px; }
#werkbank select, #werkbank input[type="text"] { min-height: 44px; padding: 0 10px; border-radius: 8px; border: 2px solid var(--rand); background: var(--panel); color: var(--text); font: 600 15px var(--kopf); }
#werkbank select:focus-visible, #werkbank input[type="text"]:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.wbname input { width: 190px; max-width: 46vw; }
.wbflaeche { position: relative; width: 100%; touch-action: none; }
.wbflaeche canvas { display: block; margin: 0 auto; cursor: crosshair; touch-action: none; }
.wbinfo { min-height: 24px; margin: 12px 0 6px; font-size: 15px; } .wbinfo.gut { color: var(--gruen); font-weight: 700; } .wbinfo.schlecht { color: var(--rot); font-weight: 700; }
#werkbank .reihe { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 14px; }
#werkbank .knopf { min-height: 46px; padding: 0 18px; }
#werkbank .knopf:disabled { opacity: .5; cursor: default; }
.wbcode { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 12px; border-top: 1px solid var(--rand); font: 600 15px var(--kopf); }
.wbcode input { flex: 1; min-width: 180px; }

.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: visible; clip-path: inset(50%); white-space: nowrap; border: 0; pointer-events: none; }

.urkunde { position: relative; display: grid; gap: 2px; margin: 0 0 12px; padding: 10px 14px 10px 64px; border-radius: 6px; background: linear-gradient(#fbf3dc, #f1e2b8);
  border: 2px double #b98b3c; color: #4a3418; box-shadow: inset 0 0 18px rgba(150, 110, 40, .25); }
.urkunde b { font: 800 20px/1.1 var(--kopf); letter-spacing: .06em; color: #7a2a1e; }
.urkunde span { font: 600 15px/1.25 var(--kopf); }
.urkunde .siegel { position: absolute; left: 12px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e05a4a, #9c2418 70%); box-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.urkunde .siegel::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; border: 2px solid rgba(255, 230, 200, .65); }

#werkbank .wbmeine { margin: 18px 0 8px; font: 700 18px/1.2 var(--kopf); color: var(--akzent2); }
.wbliste { display: grid; gap: 8px; }
.wbeintrag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--rand); background: var(--panel); }
.wbeintrag span { flex: 1; min-width: 160px; font-size: 15px; overflow-wrap: anywhere; }
#werkbank .wbeintrag .knopf { min-height: 44px; padding: 0 14px; }
.wbleer { color: var(--mute); font-size: 15px; margin: 0; }

body.hoch #kopf b { white-space: normal; overflow-wrap: anywhere; }
.gracht .uhr circle { fill: #faf6ec; stroke: #3b2a1a; stroke-width: 1.6; }
.gracht .uhr path { fill: none; stroke: #3b2a1a; stroke-width: 1.6; stroke-linecap: round; }
#knoepfe button.neu-pkt, #mehrmenue button.neu-pkt { position: relative; }
#knoepfe button.neu-pkt::after, #mehrmenue button.neu-pkt::after { content: ""; position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #e0602f; box-shadow: 0 0 0 2px var(--panel); }
#knoepfe button.rg-ziel { box-shadow: 0 0 0 4px #f3cd55, 0 0 18px 4px rgba(243, 205, 85, .7); animation: rgPuls 1.2s ease-in-out infinite; }
@keyframes rgPuls { 50% { box-shadow: 0 0 0 6px #f3cd55, 0 0 26px 8px rgba(243, 205, 85, .5); } }
#rundgang { position: fixed; z-index: 40; padding: 14px 16px; border-radius: 12px; background: var(--panel); color: var(--text); border: 2px solid var(--akzent); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
#rundgang b { display: block; font: 800 19px/1.2 var(--kopf); color: var(--akzent); }
#rundgang p { margin: 6px 0 10px; font-size: 15px; line-height: 1.4; }
#rundgang .rgk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#rundgang .rgk span { margin-right: auto; color: var(--mute); font-size: 14px; }
#rundgang .knopf { min-height: 44px; padding: 0 14px; }
@media (prefers-reduced-motion: reduce) { #knoepfe button.rg-ziel { animation: none; } }
body.kufe-wahl #wZeit #zeit { display: none; }
body.kufe-wahl #wZeit::after { content: "wählen"; display: block; font: 700 18px/1.2 var(--kopf); color: var(--text); }
html[data-ansicht="morgen"] .rekord, html[data-ansicht="schnee"] .rekord { color: #fff; }
#kamera .arm { transform-box: view-box; transform-origin: 138px 118px; transition: transform .35s ease; }
#kamera.bereit .arm { animation: kArm 1s ease-in-out infinite alternate; }
@keyframes kArm { from { transform: rotate(-6deg); } to { transform: rotate(-16deg) translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { #kamera.bereit .arm { animation: none; transform: rotate(-12deg); } }

.kgr { display: none; }
body:not(.hoch) #knoepfe { grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
body:not(.hoch) .kgr { display: block; grid-column: 1 / -1; margin-top: 6px; font: 700 12px/1.2 var(--kopf); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
body:not(.hoch) .kgr[style*="order:0"] { margin-top: 0; }
body:not(.hoch) #knoepfe button[data-kl] { flex-direction: column; height: 52px; gap: 1px; }
body:not(.hoch) #knoepfe button[data-kl]::before { content: attr(data-kl); order: 2; font: 600 12px/1.1 var(--kopf); color: var(--knopfText); white-space: nowrap; }
body:not(.hoch) #knoepfe button[data-kl] svg { width: 20px; height: 20px; }
@media (max-height: 760px) and (min-aspect-ratio: 1/1) {
  body:not(.hoch) .kgr { display: none; }
  body:not(.hoch) #knoepfe button[data-kl] { height: 46px; }
}
.gracht .med circle { stroke: #3b2a1a; stroke-width: 1.4; }
.gracht .med.m1 circle { fill: #c98a4b; } .gracht .med.m2 circle { fill: #d6dbe0; } .gracht .med.m3 circle { fill: #f3cd55; }
body.hoch #karte { padding: 12px 14px; }
body.hoch #karte h2 { font-size: 19px; }
body.hoch #karte table { font-size: 14px; margin: 6px 0 10px; }
body.hoch #karte .kk .knopf { flex: 1 1 auto; min-height: 44px; padding: 0 12px; }
