:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fbf1dc;
  background: #0f160e;
  --gold: #f8ca73;
  --gold-hi: #ffe29c;
  --muted: #cec9ad;
  --edge: #d6aa644a;
  --panel: linear-gradient(160deg, #1f3122f2, #152218f0);
  --bevel: inset 0 1px #ffebbc1f, 0 14px 34px #050905b0;
  --display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: radial-gradient(ellipse at 50% 35%, transparent 30%, #060a06d9 100%), linear-gradient(180deg, #0d160cb0, #10190c30 38%, #0d150bd0 100%), url(assets/waldlicht.webp) center / cover, #182517;
}
a { color: var(--gold); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
:where(a,button,summary):focus-visible { outline: 3px solid #ffe398; outline-offset: 3px; }

/* Fallende Blätter im Hintergrund */
.leaves { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.leaves i { position: absolute; top: -40px; width: 18px; height: 12px; border-radius: 0 80% 0 80%; background: linear-gradient(135deg, #e7873a, #a8401c); opacity: .55; animation: leaf-fall 16s linear infinite; }
.leaves i:nth-child(1) { left: 6%; animation-delay: -2s; }
.leaves i:nth-child(2) { left: 18%; animation-delay: -9s; animation-duration: 21s; background: linear-gradient(135deg, #f0b34a, #b46a1f); }
.leaves i:nth-child(3) { left: 33%; animation-delay: -5s; animation-duration: 18s; }
.leaves i:nth-child(4) { left: 61%; animation-delay: -12s; animation-duration: 23s; background: linear-gradient(135deg, #d9622e, #7f2a12); }
.leaves i:nth-child(5) { left: 77%; animation-delay: -1s; }
.leaves i:nth-child(6) { left: 88%; animation-delay: -15s; animation-duration: 19s; background: linear-gradient(135deg, #f0b34a, #b46a1f); }
.leaves i:nth-child(7) { left: 95%; animation-delay: -7s; animation-duration: 25s; }
@keyframes leaf-fall {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(40px, 25vh) rotate(140deg); }
  50% { transform: translate(-20px, 50vh) rotate(260deg); }
  75% { transform: translate(50px, 75vh) rotate(390deg); }
  100% { transform: translate(0, 108vh) rotate(520deg); }
}

.game { width: min(100% - 40px, 1200px); margin: auto; padding: 26px 0 24px; }
.heading { display: flex; justify-content: space-between; align-items: center; padding: 0 0 15px; margin-bottom: 20px; border-bottom: 1px solid #d5a96152; }
.brand { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.brand-icon {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 17px 17px 20px 20px;
  background: radial-gradient(at 42% 9%,#8a6237,#37271b 65%); border: 1px solid #e4b868a0; box-shadow: var(--bevel);
  animation: brand-wobble 6s ease-in-out infinite;
}
@keyframes brand-wobble { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-9deg); } 95% { transform: rotate(7deg); } }
.brand-icon .nut { width: 28px; height: 32px; transform: rotate(-16deg); }
.brand h1 { margin: 0; font: 700 clamp(2.15rem, 4.4vw, 3.15rem)/.95 var(--display); letter-spacing: -.035em; text-shadow: 0 3px 13px #130e08, 0 0 30px #f8ca7322; background: linear-gradient(180deg, #fff6df, #f8ca73); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { color: var(--gold); letter-spacing: .18em; font-size: .69rem; font-weight: 800; margin: 6px 0 0; }
.utilities { display: flex; gap: 8px; }
.small-button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--edge); border-radius: 12px; background: #203122dc; box-shadow: var(--bevel); font-weight: 750; font-size: 1.06rem; color: #a59f88; transition: color .2s, border-color .2s, background .2s; }
.small-button svg { width: 22px; height: 22px; }
.small-button[aria-pressed="true"] { color: var(--gold); border-color: #f8ca73a8; background: #2c3f2a; }
.small-button[aria-pressed="false"] svg { opacity: .65; }
#pause { color: #fbf1dc; }
.small-button:disabled, .controls button:disabled { color: #aaa48f8e; }
.layout { display: grid; grid-template-columns: minmax(200px,1fr) minmax(400px,560px) minmax(200px,1fr); gap: clamp(14px, 2.3vw, 28px); align-items: start; }
.map-side, .right-side { min-width: 0; }
.map-panel, .rules, .mission, .record, .joker, .book, .best, .community-stats { border: 1px solid var(--edge); background: var(--panel); border-radius: 17px; box-shadow: var(--bevel); }

/* Waldkarte */
.map-panel { padding: 13px 12px 12px; }
.map-panel summary, .rules summary, .book summary { cursor: pointer; padding: 4px; color: #fbe7c0; }
.map-panel summary { font: 700 1.34rem/1.2 var(--display); }
.map-panel summary span { color: var(--gold); font-size: .92em; }
.star-total { float: right; margin: 4px 0 0 10px; font: 800 .74rem/1.2 system-ui, sans-serif; color: var(--gold); letter-spacing: .05em; }
.stage-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 8px; }
.chapter-head { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; gap: 7px; align-items: center; margin: 8px 2px 0; padding-bottom: 4px; border-bottom: 1px dashed #dcb36b44; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: #efc477; }
.chapter-head span { font-size: .95rem; }
.chapter-head small { font-weight: 800; color: #d8c79c; letter-spacing: 0; }
.stage { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px 5px; border: 1px solid #dcb36b30; border-radius: 12px; background: #0f1b13a8; line-height: 1; transition: background .15s, transform .15s; }
.stage[aria-current="step"], .endless[aria-current="step"] { border-color: #f1c472; background: #dcb16a26; color: #ffe3a5; box-shadow: 0 0 14px #f4c66f30; }
.stage:not(:disabled):hover { background: #dcb16a2f; transform: translateY(-1px); }
.endless:hover { background: #dcb16a2f; }
.stage:disabled { color: #b7b39e8c; background: #0b130e70; }
.stage-index { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #b9995d6b; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #3a5239, #223324); color: var(--gold); font: 700 .98rem/1 var(--display); }
.stage:disabled .stage-index { color: #8f8f7f; background: #1f281f; border-style: dashed; }
.stage[aria-current="step"] .stage-index { color: #392414; background: radial-gradient(circle at 40% 30%, #ffe3a0, #eab35a); border-color: #ffdb98; }
.stage-info { display: block; }
.stage-stars { font-size: .66rem; white-space: nowrap; letter-spacing: .05em; color: var(--gold); }
.stage:disabled .stage-stars { font-size: .62rem; opacity: .7; }
.stage-name { margin: 0 2px 8px; padding: 6px 9px; border-radius: 9px; background: #0d160fb0; color: #ffe3a5; font: 700 .95rem/1.2 var(--display); text-align: center; }
.endless { display: block; text-align: left; width: 100%; border: 1px solid #dbad5b45; border-radius: 10px; padding: 8px 9px; background: #101c13b9; font-size: .86rem; font-weight: 700; }
.endless span { color: var(--gold); font-size: 1.2rem; padding-right: 5px; }
#daily { margin-bottom: 6px; }
#daily small { display: inline-block; color: var(--gold); margin-left: 3px; font-size: .72rem; }
.rules { color: var(--muted); font-size: .86rem; line-height: 1.5; padding: 8px 12px; margin-top: 13px; }
.rules p { margin: 8px 1px; }
.rules b { color: #fbe7c0; }

/* Spielfeld */
.playfield { position: relative; min-width: 0; overflow: hidden; border-radius: 24px; border: 1px solid #c49356ad; background: #17261b; box-shadow: 0 0 0 4px #241d12a1, 0 0 0 5px #c59a5a3d, 0 22px 55px #040905d9; }
.canopy {
  position: relative; overflow: hidden; height: 186px; isolation: isolate;
  background: radial-gradient(ellipse at 63% 8%,#ffc46a5c,transparent 60%), linear-gradient(0deg,#1a2713dd,transparent 72%), url(assets/waldlicht.webp) center 36% / cover, #344327;
  border-bottom: 1px solid #ffdc9266;
}
.canopy::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(105deg, transparent 40%, #ffd98a1c 52%, transparent 64%); animation: sunbeam 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes sunbeam { from { transform: translateX(-12%); opacity: .5; } to { transform: translateX(12%); opacity: 1; } }
.canopy::after {
  content: ""; position: absolute; z-index: 0; inset: auto -12% -18px -6%; height: 42px;
  transform: rotate(-4deg); border-radius: 55% 43% 0 0;
  background: repeating-linear-gradient(174deg,#a57e4a25 1px 3px,transparent 5px 8px),linear-gradient(166deg,#728149,#3e4e2c 25%,#493526 39%,#36261b 75%);
  box-shadow: 0 -3px 13px #b6a35c21, inset 0 3px #cfb26249;
}
.squirrel {
  position: absolute; z-index: 1; bottom: 7px; left: min(30%, 168px); height: calc(100% - 14px); width: auto;
  aspect-ratio: 480 / 388; transform-origin: 48% 91%; pointer-events: none; filter: drop-shadow(1px 6px 6px #24130dcc);
}
.squirrel .rig { position: absolute; inset: 0; transform-origin: 50% 100%; animation: breathe 3.2s ease-in-out infinite; }
.squirrel img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.squirrel-body { clip-path: polygon(0 0,100% 0,100% 70%,79% 69%,74% 83%,74% 100%,0 100%); }
.squirrel-paw { clip-path: polygon(77% 67%,100% 67%,100% 100%,72% 100%,72% 83%); transform-origin: 77% 77%; transform: rotate(var(--paw-angle, 0deg)); }
@keyframes breathe { 50% { transform: scale(1.012, .985); } }
.squirrel.talking .rig { animation: chatter .19s ease-in-out infinite alternate; }
@keyframes chatter { from { transform: translateY(0) rotate(-.6deg) scale(1,1); } to { transform: translateY(-2.5px) rotate(.8deg) scale(1.01,.98); } }
.squirrel.happy .rig { animation: hop .45s cubic-bezier(.3,.7,.4,1) 2; }
@keyframes hop { 0%,100% { transform: translateY(0) scale(1); } 15% { transform: translateY(2px) scale(1.06,.9); } 50% { transform: translateY(-18px) scale(.96,1.05) rotate(-3deg); } }
.squirrel.shock .rig, .squirrel.scared .rig { animation: shiver .08s linear infinite alternate; }
@keyframes shiver { from { transform: translateX(-1.5px) rotate(-.8deg); } to { transform: translateX(1.5px) rotate(.8deg); } }
.canopy-motes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.canopy-motes i { position: absolute; left: 22%; top: 72%; width: 4px; height: 4px; border-radius: 50%; background: #ffd682; box-shadow: 0 0 10px 3px #ffd472cd; opacity: .35; animation: firefly 5s ease-in-out infinite; }
.canopy-motes i:nth-child(2) { left: 72%; top: 24%; animation-delay: -2s; }
.canopy-motes i:nth-child(3) { left: 88%; top: 64%; animation-delay: -3s; }
.canopy-motes i:nth-child(4) { left: 12%; top: 34%; animation-delay: -1s; animation-duration: 7s; }
.canopy-motes i:nth-child(5) { left: 55%; top: 80%; animation-delay: -4s; animation-duration: 6s; }
@keyframes firefly { 50% { opacity: .95; transform: translate(9px,-13px); } }
.chapter { position: absolute; z-index: 2; top: 12px; left: 12px; display: grid; gap: 3px; max-width: 40%; padding: 7px 10px; border: 1px solid #e9bd6c78; border-radius: 10px; background: #1a2419ed; box-shadow: 0 5px 20px #0005; }
.chapter em { font-style: normal; }
.chapter span { font-size: .58rem; font-weight: 850; letter-spacing: .12em; color: var(--gold); }
.chapter strong { font: 700 clamp(.96rem,2.4vw,1.16rem)/1.12 var(--display); }
.bubble {
  position: absolute; z-index: 3; top: 12px; right: 12px; width: min(44%, 230px); padding: 8px 11px 9px; display: grid; gap: 2px;
  background: #fff6e2; color: #3a2614; border-radius: 16px 16px 16px 6px; box-shadow: 0 6px 18px #0008, inset 0 -2px #e8c99055; line-height: 1.25;
}
.bubble::before { content: ""; position: absolute; left: -10px; bottom: 12px; border: 7px solid transparent; border-right: 11px solid #fff6e2; border-left: 0; }
.bubble.pop { animation: bubble-pop .36s cubic-bezier(.3,1.6,.5,1); }
@keyframes bubble-pop { from { transform: scale(.82) translateY(4px); opacity: .4; } }
.squirrel-name { color: #a0612a; font-size: .58rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.remark { font-size: .84rem; font-weight: 600; overflow-wrap: anywhere; }
.launch-token { position: absolute; z-index: 6; top: 0; left: 0; display: grid; place-items: center; pointer-events: none; }
.launch-token .nut { width: 100%; height: 100%; filter: drop-shadow(0 0 8px #ffc46ad0); }

.game-hud { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; background: linear-gradient(#354932,#243526); border-bottom: 1px solid #00000055; }
.stat { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 7px 13px; min-height: 54px; }
.stat + .stat { border-left: 1px solid #ffebbd21; }
.stat span { display: block; font-size: .7rem; color: #e0d8bb; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat strong { display: block; font: 700 1.3rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stat:first-child strong { color: var(--gold); }
.stat .low { color: #ff9f7a; animation: low-pulse 1s ease-in-out infinite; }
@keyframes low-pulse { 50% { text-shadow: 0 0 10px #ff7a52; } }
.tempo strong { font-size: .98rem; font-family: system-ui, sans-serif; }
.tempo i { height: 3px; margin-top: 3px; border-radius: 3px; background: linear-gradient(90deg,var(--pace-light,#9cc9a2) var(--pace-meter,33%),#56664f var(--pace-meter,33%)); }
.tempo[data-pace="1"] { --pace-meter: 66%; --pace-light: #edce8a; }
.tempo[data-pace="2"] { --pace-meter: 100%; --pace-light: #f6a66c; }
.next-stat { flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; }
#next { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--edge); border-radius: 10px; background: radial-gradient(#2b3e2c, #19281d); }
#next .nut { width: 74%; height: 82%; }
.mobile-mission { display: none; }

/* Brett */
.board-wrap {
  padding: 9px 9px 0;
  background: repeating-linear-gradient(172deg,#2a1b0d33 0 2px,transparent 3px 11px), repeating-linear-gradient(8deg,#ffd9a011 0 1px,transparent 2px 23px), linear-gradient(120deg,#4a331d,#7d552f 42%,#3b2b1c 100%);
  border-block: 1px solid #fbd18647; box-shadow: inset 0 2px 6px #0007;
}
.arena {
  position: relative; height: clamp(280px, 46svh, 410px); overflow: hidden; isolation: isolate; touch-action: none; border-radius: 12px 12px 3px 3px;
  background: radial-gradient(ellipse at 50% 110%, #3a3a1c55, transparent 60%), linear-gradient(#0f1a12, #16261a);
  box-shadow: 0 0 0 1px #1a130b, 0 0 0 3px #d8a3634a, inset 0 0 34px #030805, inset 0 6px 16px #000a;
  transition: box-shadow .3s;
}
.arena.crowded { box-shadow: 0 0 0 1px #1a130b, 0 0 0 3px #ff7a52a0, inset 0 0 40px #5a1508, inset 0 6px 16px #000a; animation: danger-glow 1.1s ease-in-out infinite; }
@keyframes danger-glow { 50% { box-shadow: 0 0 0 1px #1a130b, 0 0 0 3px #ff7a52, inset 0 0 52px #7a2010, inset 0 6px 16px #000a; } }
.board { position: absolute; display: grid; inset: 3px; grid-template: repeat(9,1fr) / repeat(9,1fr); gap: 2px; }
.cell { position: relative; isolation: isolate; display: grid; place-items: center; border-radius: 8px; background: radial-gradient(circle at 50% 38%, #253a29, #1a2b1f 72%); box-shadow: inset 0 2px 4px #0009, inset 0 -1px #c7e0a812; transition: background .12s; }
.cell.target { background: radial-gradient(circle at 50% 38%, #4a6545, #344c33 75%); }
.cell.danger { background: radial-gradient(circle at 50% 38%, #8a4636, #5c2a20 75%); }
.cell.eligible { background: radial-gradient(circle at 50% 38%, #7a6a3b, #574a27 75%); }
.cell::before { position: absolute; z-index: -1; inset: 2px; display: grid; place-items: center; border-radius: 7px; font-size: clamp(.6rem, 2.2vw, .95rem); }
.cell.leaf::before { content: "🍂"; opacity: .95; border: 1px solid #e3a45e8a; background: radial-gradient(circle at 30% 30%, #c06a2f, #8f3d1b 70%), #8f3d1b; box-shadow: inset 0 0 8px #3a12058a; }
.cell.frost::before { content: "❄"; color: #f2fbff; border: 1px solid #c9eeffb0; background: linear-gradient(125deg,#3f7d99,#a5d3e2 42%,#4a8a99); box-shadow: inset 0 0 10px #ffffff55, 0 0 6px #9fdcff55; }
.cell.frost.cracked::before { content: "❅"; background: repeating-linear-gradient(139deg,#4b889c 0 7px,#9ccbdb 7px 9px); opacity: .8; }
.cell.ghost::after { content: ""; position: absolute; z-index: 1; width: 66%; height: 74%; border: 2px dashed #ffe3a0c0; border-radius: 44%; background: #f7cc8024; animation: ghost-pulse 1s ease-in-out infinite; }
@keyframes ghost-pulse { 50% { opacity: .5; transform: scale(.92); } }

/* Nüsse */
.nut {
  position: relative; display: grid; place-items: center; isolation: isolate; width: 80%; height: 88%; max-width: 48px; max-height: 52px;
  font-style: normal;
  background: radial-gradient(circle at 30% 34%, #ffffffb0 0 7%, transparent 13%), radial-gradient(ellipse at 34% 38%, var(--light), var(--color) 46%, var(--dark) 92%);
  border: 1px solid var(--dark); border-radius: 46% 46% 50% 50% / 35% 35% 64% 64%;
  box-shadow: inset -3px -5px 6px #0007, inset 2px 1px 2px #fff8, 0 4px 4px #0009;
}
.nut::before { content: ""; position: absolute; inset: -5% -6% auto; height: 38%; border-radius: 45% 45% 27% 27% / 70% 70% 42% 42%; background: repeating-linear-gradient(103deg,#ffedb626 0 2px,#0003 3px 4px), repeating-linear-gradient(13deg,#0000 0 3px,#00000022 4px 5px), linear-gradient(#d9a362,#6a4126); box-shadow: inset 0 2px 3px #ffe6a6ad, 0 2px 3px #0008; }
.nut::after { content: var(--symbol); color: #fffbe7f2; font-size: clamp(.62rem, 2.4vw, .98rem); line-height: 1; margin-top: 26%; text-shadow: 0 1px 2px var(--dark); }
.c0 { --color: #f0a034; --dark: #974811; --light: #ffe1a0; --symbol: "●"; }
.c1 { --color: #8cbe5b; --dark: #365e28; --light: #ecf9b4; --symbol: "✚"; }
.c2 { --color: #ed5d78; --dark: #7f2544; --light: #ffb3b0; --symbol: "◆"; }
.c3 { --color: #59b1cc; --dark: #285a86; --light: #c0f4f8; --symbol: "≈"; }
.c4 { --color: #ab78db; --dark: #653a91; --light: #efc2ff; --symbol: "✦"; }
.gold { --color: #f5bc18; --dark: #a16108; --light: #fff6b5; --symbol: "★"; box-shadow: 0 0 14px #ffda65, inset -3px -5px 6px #0005; animation: gold-shine 1.2s ease-in-out infinite; }
@keyframes gold-shine { 50% { filter: brightness(1.25); box-shadow: 0 0 22px #ffe485, inset -3px -5px 6px #0005; } }
.bomb { --symbol: "✷"; animation: bomb-glow .9s ease-in-out infinite alternate; }
@keyframes bomb-glow { from { box-shadow: 0 0 8px #ffce75aa, inset -3px -5px 6px #0007; } to { box-shadow: 0 0 18px #ff9a3c, inset -3px -5px 6px #0007; filter: brightness(1.15); } }
.nut.stone { --symbol: ""; border-radius: 38% 44% 40% 46%; width: 78%; height: 74%; border-color: #3d4240; background: radial-gradient(circle at 32% 30%, #ffffff55 0 6%, transparent 12%), radial-gradient(ellipse at 36% 34%, #b9bfb8, #7c837d 50%, #474d49 95%); box-shadow: inset -3px -4px 6px #0008, inset 2px 2px 2px #ffffff66, 0 4px 4px #0009; }
.nut.stone::before { inset: 26% 18% auto 40%; height: 2px; border-radius: 2px; background: #2f3431; box-shadow: -6px 7px 0 -0px #2f3431aa; transform: rotate(28deg); }
.floating { position: absolute; z-index: 2; width: calc((100% - 6px) / 9); height: calc((100% - 6px) / 9); top: 3px; left: 3px; display: grid; place-items: center; pointer-events: none; }
.floating .nut { filter: drop-shadow(0 0 7px #ffde85c0); }
.popping .nut { animation: burst .34s ease both; }
@keyframes burst { 35% { transform: scale(1.38) rotate(-14deg); filter: brightness(2.2); } to { transform: scale(.1) rotate(30deg); opacity: 0; } }
.fx-layer { position: absolute; inset: 3px; z-index: 4; pointer-events: none; }
.spark { position: absolute; pointer-events: none; width: 7px; height: 7px; border-radius: 1px 65% 12% 65%; box-shadow: 0 0 8px currentColor; background: currentColor; }
.spark.shell { width: 10px; height: 6px; border-radius: 50% 50% 20% 20%; background: #8b5a2b; box-shadow: none; }
.float-score { position: absolute; font: 900 clamp(1rem, 3.4vw, 1.35rem)/1 var(--display); color: #fff3c4; text-shadow: 0 2px 0 #5a3512, 0 0 10px #f3a54a; white-space: nowrap; }
.float-score.chain { color: #ffe066; font-size: clamp(1.2rem, 4vw, 1.6rem); }
.confetti { position: absolute; font-style: normal; pointer-events: none; }
.fx-nut { position: absolute; display: grid; place-items: center; pointer-events: none; z-index: 4; }
.columns { display: grid; grid-template-columns: repeat(9,1fr); padding: 0 3px; }
.columns button { color: #fff0ce; font-size: .82rem; font-weight: 750; border: 0; min-height: 34px; background: transparent; border-radius: 0 0 8px 8px; }
.columns button:disabled { opacity: .55; }
.columns button.selected, .columns button.available { background: #f7c87552; color: #fff7d3; }
.status { min-height: 1.4em; margin: 8px 10px 6px; text-align: center; color: #e4dab9; font-size: .82rem; }
.controls { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 7px; padding: 0 9px 10px; }
.controls button { min-height: 44px; padding: 5px 3px; border-radius: 11px; border: 1px solid var(--edge); background: linear-gradient(#3a5038,#253528); box-shadow: inset 0 1px #ffffff1a, 0 3px 0 #101a12; font-size: clamp(.79rem,3.1vw,.91rem); font-weight: 760; }
.controls button:not(:disabled):active { transform: translateY(2px); box-shadow: inset 0 1px #ffffff1a, 0 1px 0 #101a12; }
.controls button span { color: var(--gold); padding-inline: 1px; }
.controls button:disabled span { opacity: .48; }
.controls button:not(:disabled):hover, .small-button:not(:disabled):hover { background: #4a5d3b; }

/* Einblendungen */
.curtain { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; background: radial-gradient(#101a1388, #070d09dd); backdrop-filter: blur(2px); text-align: center; padding: 11px; }
.intro { position: relative; padding: 18px 18px 18px; width: min(100%, 352px); background: radial-gradient(ellipse at 50% 1%,#55593a,#263a29 58%,#1b2d20); border: 2px solid #e8be77a6; outline: 1px solid #150e08; border-radius: 23px 23px 19px 19px; box-shadow: inset 0 0 0 4px #f7cb7b16, 0 0 40px #ffcf6a22, 0 15px 38px #080b06ab; animation: intro-in .4s cubic-bezier(.3,1.4,.5,1); }
@keyframes intro-in { from { transform: scale(.88) translateY(10px); opacity: 0; } }
.intro h2 { margin: 0; font: 700 clamp(1.55rem,5.5vw,2.2rem)/1.05 var(--display); color: #fff0cb; text-shadow: 0 2px 4px #1a190d; }
.panel-goal { margin: 8px auto 0 !important; display: inline-block; padding: 4px 10px; border-radius: 99px; background: #0d160fcc; border: 1px solid #e8be7755; color: var(--gold) !important; font-size: .78rem !important; font-weight: 800; }
.intro p { margin: 10px auto 15px; max-width: 270px; font-size: .93rem; color: #f0e6cb; line-height: 1.4; }
.big-nut { display: grid; place-items: center; width: 52px; height: 50px; margin: 0 auto 8px; animation: float-nut 2.4s ease-in-out infinite; }
@keyframes float-nut { 50% { transform: translateY(-5px) rotate(6deg); } }
.big-nut .nut { transform: rotate(-12deg); }
.play { min-height: 46px; min-width: 170px; border-radius: 12px; border: 1px solid #ffe5a5; padding: 7px 18px; color: #302015; font-weight: 850; font-size: 1rem; background: linear-gradient(#ffe29c,#eaae54); box-shadow: inset 0 -3px #b66f2b60, 0 4px 0 #6b4317, 0 8px 14px #0c100a8f; }
.play:hover { filter: brightness(1.08); }
.play:active { transform: translateY(2px); box-shadow: inset 0 -3px #b66f2b60, 0 2px 0 #6b4317; }
.panel-link { display: block; margin: 10px auto 0; background: none; border: 0; color: #e8d5a8; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.panel-stars { font-size: clamp(2rem, 7vw, 2.8rem); color: #ffc96b; letter-spacing: .1em; margin: 0 0 6px; text-shadow: 0 0 15px #e2a941ad; }
.panel-stars span { display: inline-block; animation: star-pop .5s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes star-pop { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.combo { position: absolute; z-index: 6; top: 18px; left: 50%; transform: translateX(-50%); pointer-events: none; color: #fff0ae; font: 800 clamp(1.3rem,4.6vw,2.05rem) var(--display); text-shadow: 0 2px 1px #482c13, 0 0 12px #e38d49; white-space: nowrap; }
.combo.big { font-size: clamp(1.8rem,7vw,2.9rem); color: #ffe066; }
.combo.flash { animation: flash 1s ease both; }
@keyframes flash { from { opacity: 0; transform: translate(-50%,18px) scale(.6); } 22% { opacity: 1; transform: translate(-50%,0) scale(1.12); } 34% { transform: translate(-50%,0) scale(1); } 72% { opacity: 1; } to { opacity: 0; transform: translate(-50%,-10px); } }
.cameo, .peek { position: absolute; z-index: 6; left: 0; top: 20%; transform: translateX(-100%); opacity: 0; pointer-events: none; }
.cameo { display: grid; justify-items: start; color: #ffe6b2; font-weight: 800; }
.cameo img, .peek img { display: block; width: clamp(84px,26vw,142px); filter: drop-shadow(1px 4px 8px #000b); }
.cameo span { padding: 5px 9px; margin-left: 5px; background: #402b17f5; border: 1px solid #cf9e58; border-radius: 5px 12px 12px 12px; font-size: .84rem; }
.cameo.active { animation: cameo 2.15s cubic-bezier(.25,.75,.4,1) both; }
.peek { top: 5%; }
.peek img { width: 66px; }
.peek.active { animation: peek 1.3s ease both; }
@keyframes cameo { 15%,77% { transform: translateX(0) rotate(2deg); opacity: 1; } 45% { transform: translateX(5px) rotate(-3deg); opacity: 1; } }
@keyframes peek { 25%,70% { transform: translateX(-18%) rotate(9deg); opacity: 1; } }

/* Rechte Seite */
.right-side { display: grid; gap: 12px; }
.mission { padding: 15px; }
.mission-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 9px; border-radius: 11px; border: 1px solid #e9bc6770; color: #ffe099; background: #ac794135; font: 700 1.4rem/1 var(--display); }
.mission h2 { margin: 0; color: #ffebc2; font: 700 1.25rem/1.1 var(--display); }
.mission p { margin: 7px 0 11px; font-size: .91rem; line-height: 1.35; color: var(--muted); }
.progress-track { height: 10px; border-radius: 8px; background: #0e1911; border: 1px solid #f9d38c39; overflow: hidden; }
.progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#ba7b34,#ffd47e); box-shadow: 0 0 10px #ffd47e88; transition: width .3s ease; }
.mission .mission-count { margin: 6px 0 0; text-align: right; color: #ffe4aa; font-weight: 800; font-size: .81rem; }
.joker { isolation: isolate; position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px; min-height: 88px; width: 100%; padding: 10px; text-align: left; background: linear-gradient(116deg,#4c331f,#263325); }
.joker:disabled { color: #e6dbb3c9; }
.joker:disabled .joker-mark { filter: saturate(.6) brightness(.85); }
.joker.ready { animation: joker-ready 2s ease-in-out infinite; }
@keyframes joker-ready { 50% { box-shadow: var(--bevel), 0 0 18px #f8ca7355; border-color: #f8ca73a0; } }
.joker[aria-pressed="true"], .joker:not(:disabled):hover { border-color: #ffe387; background: linear-gradient(120deg,#654a29,#374932); }
.joker-mark { grid-row: span 2; display: block; width: 52px; height: 52px; border-radius: 50%; border: 2px solid #e5b66ca0; overflow: hidden; background: #624d31; }
.joker-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.joker-label { display: grid; gap: 1px; line-height: 1.22; }
.joker-label strong { font: 700 1.04rem/1.09 var(--display); }
.joker-label small { font-size: .77rem; color: #ebdfc2; }
.joker-charge { color: var(--gold); font-size: .7rem; letter-spacing: .04em; font-weight: 850; }
.joker-meter { position: absolute; bottom: 0; left: 0; display: block; width: var(--charge,100%); height: 3px; background: #efb85b; transition: width .25s; }
.book { padding: 9px 12px; }
.book summary { font: 700 1.08rem/1.2 var(--display); }
.book summary small { float: right; margin-top: 3px; font: 800 .74rem system-ui, sans-serif; color: var(--gold); }
.book-list { list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 5px; max-height: 290px; overflow: auto; }
.book-list li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 9px; background: #0c150f88; opacity: .62; }
.book-list li.got { opacity: 1; background: #3b3a2266; }
.b-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1b291e; border: 1px solid #e9bc6755; color: var(--gold); font-weight: 900; }
.book-list b { display: block; font-size: .82rem; color: #fbe7c0; }
.book-list small { font-size: .7rem; color: var(--muted); }
.best { padding: 11px 13px; }
.best h2, .community-stats h2 { color: #ffebc2; font: 700 1.08rem/1.1 var(--display); margin: 0 0 7px; }
.best h2 span { color: var(--gold); }
.best ol { margin: 0; padding-left: 22px; font-size: .84rem; color: var(--muted); display: grid; gap: 2px; }
.best li.top { color: var(--gold); font-weight: 800; }
.best li.empty { list-style: none; margin-left: -22px; font-style: italic; }
.community-stats { padding: 11px 13px; }
.community-stats dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin: 0; }
.community-stats dl div { display: flex; flex-direction: column-reverse; gap: 3px; }
.community-stats dt { font-size: .68rem; line-height: 1.15; color: var(--muted); }
.community-stats dd { margin: 0; color: var(--gold); font: 700 1.17rem/1.1 var(--display); overflow-wrap: anywhere; }
.community-stats p { margin: 8px 0 0; font-size: .69rem; color: var(--muted); }
.record { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 10px 12px; font-size: .81rem; color: #e4ddc4; }
.record span, .record strong { color: var(--gold); }
.record strong { margin-left: auto; font-size: .95rem; }
.footer { margin-top: 22px; text-align: center; font-size: .74rem; color: #c9c2a8aa; }
.toasts { position: fixed; z-index: 50; right: 16px; bottom: 16px; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; min-width: 230px; max-width: 320px; padding: 10px 13px; border-radius: 14px; background: linear-gradient(120deg,#5a3f20f5,#2a3a29f5); border: 1px solid #f8ca73a8; box-shadow: 0 10px 30px #000b; animation: toast-in .45s cubic-bezier(.3,1.5,.5,1); transition: opacity .5s, transform .5s; }
.toast > span { font-size: 1.6rem; }
.toast b { display: block; color: var(--gold-hi); font-size: .9rem; }
.toast small { color: #efe3c6; font-size: .76rem; }
.toast.out { opacity: 0; transform: translateY(10px); }
@keyframes toast-in { from { transform: translateX(40px) scale(.9); opacity: 0; } }

@media (max-width: 950px) {
  .layout { grid-template-columns: minmax(170px,1fr) minmax(360px, 530px); }
  .map-side { grid-row: span 2; }
  .right-side { grid-column: 2; grid-template-columns: 1fr 1fr; }
  .mission { display: none; }
  .mobile-mission { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 6px 12px 8px; background: #45351f; color: #fff0ce; min-height: 34px; font-size: .81rem; }
  .mobile-mission strong { flex: none; color: var(--gold); }
  .mobile-mission i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg,#ba7b34,#ffd47e); transition: width .3s; }
}
@media (max-width: 640px) {
  .game { width: min(100% - 16px, 480px); padding: 10px 0 18px; }
  .heading { margin-bottom: 8px; padding-bottom: 8px; }
  .brand { gap: 9px; }
  .brand p { font-size: .55rem; letter-spacing: .12em; }
  .brand-icon { width: 40px; height: 40px; border-radius: 12px; }
  .brand-icon .nut { width: 22px; height: 26px; }
  .brand h1 { font-size: 1.85rem; }
  .small-button { width: 36px; height: 36px; border-radius: 9px; }
  .small-button svg { width: 18px; height: 18px; }
  .utilities { gap: 5px; }
  .layout { display: flex; flex-direction: column; gap: 8px; }
  .layout > * { width: 100%; }
  .map-side { display: contents; }
  .map-panel { order: 0; width: 100%; padding: 6px 9px; border-radius: 11px; }
  .rules { width: 100%; }
  .game-hud { grid-template-columns: 1fr .8fr 1.1fr 1fr; }
  .next-stat { padding-inline: 6px; gap: 4px; }
  .map-panel summary { font-size: 1rem; }
  .stage-list { grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 4px 0 6px; }
  .stage { padding: 5px 1px 4px; border-radius: 9px; }
  .stage-index { width: 26px; height: 26px; font-size: .82rem; }
  .stage-stars { font-size: .5rem; letter-spacing: 0; }
  .stage-name { font-size: .84rem; margin-bottom: 6px; }
  .rules { order: 3; margin: 0; }
  .playfield { order: 1; border-radius: 14px; }
  .canopy { height: clamp(118px, 34vw, 150px); }
  .squirrel { left: 24%; }
  .chapter { top: 6px; left: 6px; padding: 5px 7px; max-width: 46%; }
  .chapter span { font-size: .56rem; }
  .chapter em { display: none; }
  .bubble { top: 6px; right: 6px; width: 47%; padding: 6px 8px; }
  .remark { font-size: .72rem; }
  .stat { min-height: 44px; padding: 5px 7px; }
  .stat span { font-size: .58rem; }
  .stat strong { font-size: 1.08rem; }
  .tempo strong { font-size: .82rem; }
  #next { width: 32px; height: 32px; }
  .board-wrap { padding: 5px 5px 0; }
  .arena { height: clamp(250px, min(84vw, 46svh), 360px); }
  .columns button { min-height: 30px; }
  .status { margin-block: 5px; font-size: .76rem; }
  .right-side { order: 2; display: flex; flex-wrap: wrap; gap: 6px; }
  .right-side > * { width: 100%; }
  .joker { grid-template-columns: auto 1fr auto; min-height: 56px; padding: 7px 9px; }
  .joker-mark { grid-row: auto; width: 40px; height: 40px; }
  .record { padding-block: 7px; }
  .toasts { left: 10px; right: 10px; bottom: 10px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .leaves { display: none; }
}
