:root {
  color-scheme: light;
  --bg: #ffd400;
  --v-home: #ffd400;
  --v-park: #29c5ff;
  --v-garden: #5fe04a;
  --v-rewards: #ff6fb5;
  --v-stats: #b08cff;
  --v-more: #ffa726;
  --v-kaufen: #ffb300;
  --v-essen: #ff5c9e;
  --v-medien: #6ea8ff;
  --card: #ffffff;
  --card-2: #f0ecff;
  --ink: #17122b;
  --ink-2: #4e4868;
  --line: #17122b;
  --accent: #e0117a;
  --accent-ink: #ffffff;
  --go: #22e06b;
  --warm: #d4005f;
  --warm-bg: #ffe66b;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --seq-1: #cfe1f7;
  --seq-2: #86b6ef;
  --seq-3: #5598e7;
  --seq-4: #256abf;
  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pop: cubic-bezier(.2, 1.6, .4, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --v-home: #2b1f6b;
    --v-park: #0b3f73;
    --v-garden: #0d5a2e;
    --v-rewards: #6b1248;
    --v-stats: #3c1d8a;
    --v-more: #6b3208;
    --v-kaufen: #6b4300;
    --v-essen: #7a0f47;
    --v-medien: #1a2f8a;
    --card: #231d45;
    --card-2: #352c63;
    --ink: #ffffff;
    --ink-2: #cfc9ea;
    --line: #000000;
    --accent: #ff3d9a;
    --accent-ink: #17122b;
    --warm: #ffb300;
    --warm-bg: #4a3a00;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --seq-1: #1b3a60;
    --seq-2: #256abf;
    --seq-3: #5598e7;
    --seq-4: #86b6ef;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 var(--sans);
  transition: background-color .35s;
}
body[data-v=home] { --bg: var(--v-home); }
body[data-v=park] { --bg: var(--v-park); }
body[data-v=garden] { --bg: var(--v-garden); }
body[data-v=rewards] { --bg: var(--v-rewards); }
body[data-v=stats] { --bg: var(--v-stats); }
body[data-v=more] { --bg: var(--v-more); }
body[data-v=kaufen] { --bg: var(--v-kaufen); }
body[data-v=essen] { --bg: var(--v-essen); }
body[data-v=medien] { --bg: var(--v-medien); }
#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 104px);
  overflow-x: clip;
}
#app.no-nav { padding-bottom: calc(env(safe-area-inset-bottom) + 28px); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 33px; letter-spacing: -.01em; }
h2 { font-size: 22px; margin-bottom: 10px; }
h3 { font-size: 16.5px; margin-bottom: 8px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-2); }
.small { font-size: 14.5px; }
.lede { margin: 8px 0 20px; font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 14px; }

/* Einstieg: jede neue Ansicht springt von unten herein */
.enter > *:not(nav):not(.confetti) { animation: rise-in .45s var(--pop) both; }
.enter > *:nth-child(2) { animation-delay: .05s; }
.enter > *:nth-child(3) { animation-delay: .1s; }
.enter > *:nth-child(4) { animation-delay: .15s; }
.enter > *:nth-child(5) { animation-delay: .2s; }
.enter .mode { animation: rise-in .5s var(--pop) both; }
.enter .mode:nth-child(2) { animation-delay: .08s; }
.enter .mode:nth-child(3) { animation-delay: .16s; }
.enter .stack > * { animation: rise-in .45s var(--pop) both; }
.enter .stack > *:nth-child(2) { animation-delay: .08s; }
.enter .stack > *:nth-child(3) { animation-delay: .16s; }
.enter .stack > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise-in { from { transform: translateY(26px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.card {
  background: var(--card);
  border: 2.5px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 5px 0 var(--line);
}
.card.warm { background: #ffc400; color: #17122b; }
.card.warm .muted { color: #3d3350; }
.card.warm h2, .card.warm h3 { color: #17122b; }

button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label.file:focus-within { outline: 3px solid #2a2bff; outline-offset: 2px; }
.btn {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 4px 0 var(--line);
  font-family: var(--display);
  font-weight: 800;
  text-align: center;
  transition: transform .08s, box-shadow .08s;
}
.btn:active:not([disabled]), .mode:active, .chip:active, .garden-link:active, .level-chip:active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.btn.primary { background: var(--go); color: #17122b; }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink); font-weight: 700; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn.danger { color: #c4001d; }
@media (prefers-color-scheme: dark) { .btn.danger { color: #ff9c9c; } }
.btn[disabled] { opacity: .45; cursor: default; box-shadow: none; }
.btn-col > * + * { margin-top: 12px; }
.btn small { display: block; font-weight: 600; font-size: 14px; }
.btn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 10px; }
.btn.nudge { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

.modes { display: grid; gap: 14px; margin-top: 18px; }
.mode {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border: 2.5px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--line);
  text-align: left;
  transition: transform .08s, box-shadow .08s;
}
.mode-kaufen { background: #ff8a00; color: #17122b; }
.mode-essen { background: #e0006e; color: #fff; }
.mode-medien { background: #4326e6; color: #fff; }
.mode svg { width: 46px; height: 46px; flex: none; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, .28); animation: wiggle 4.5s ease-in-out infinite; }
.mode:nth-child(2) svg { animation-delay: 1.1s; }
.mode:nth-child(3) svg { animation-delay: 2.2s; }
@keyframes wiggle { 0%, 84%, 100% { transform: none; } 88% { transform: rotate(-13deg) scale(1.1); } 92% { transform: rotate(11deg) scale(1.1); } 96% { transform: rotate(-5deg); } }
.mode b { display: block; font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1.15; }
.mode span span { font-size: 15px; font-weight: 500; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--card); border: 2.5px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 5px 0 var(--line); }
.tile b { display: block; font-family: var(--display); font-weight: 800; font-size: 29px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent); }
.tile span { font-size: 14px; color: var(--ink-2); }
.track { display: block; height: 14px; border: 2px solid var(--line); border-radius: 8px; background: var(--card-2); overflow: hidden; margin-top: 10px; }
.track i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(-45deg, #ff2e93 0 10px, #ff8a00 10px 20px);
  background-size: 200% 100%;
  animation: stripes 1.2s linear infinite;
}
.enter .track i { animation: stripes 1.2s linear infinite, fill-in .9s .2s var(--pop) backwards; }
@keyframes stripes { to { background-position: -28.28px 0; } }
@keyframes fill-in { from { width: 0; } }

.field { display: block; margin-bottom: 14px; }
.field > span, .label { display: block; font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=number], input[inputmode], textarea {
  width: 100%;
  min-height: 50px;
  padding: 11px 12px;
  border: 2.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 15px; }
.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.error { color: #c4001d; font-size: 15px; font-weight: 600; margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .error { color: #ff9c9c; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 2.5px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 3px 0 var(--line);
  font-size: 16px;
  font-weight: 600;
  transition: transform .08s, box-shadow .08s;
}
.chip[aria-pressed=true] { background: #4326e6; color: #fff; animation: chip-pop .28s var(--pop); }
@keyframes chip-pop { from { transform: scale(.82); } to { transform: none; } }
.chip.removable { background: var(--card-2); }
.chip.removable span { margin-left: 2px; font-weight: 800; color: #c4001d; }
@media (prefers-color-scheme: dark) { .chip.removable span { color: #ff9c9c; } }
.label-hint { display: block; font-weight: 500; font-size: 13.5px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.label-row .label { margin: 0; }
.label-row .linkbtn { padding: 6px 0 6px 12px; font-size: 15px; }
.inline-form.feeling-add { grid-template-columns: 1fr auto; margin: 12px 0 8px; }
.feeling-add .btn { min-height: 50px; width: auto; }
.park-custom { display: grid; grid-template-columns: minmax(58px, 1fr) minmax(104px, 1.4fr) auto; gap: 8px; }
.park-custom .btn { width: auto; min-height: 50px; padding: 10px 12px; }
select { width: 100%; min-height: 50px; padding: 10px 8px; border: 2.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale .chip { padding: 8px 0; font-family: var(--display); font-weight: 800; font-size: 18px; }
.block { margin-bottom: 18px; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; min-height: 40px; }
.topbar .eyebrow { font-family: var(--display); font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.linkbtn { background: none; border: 0; padding: 8px 0 8px 12px; font-size: 16px; font-weight: 600; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }

/* Atemkreis in der Pause: 4 Sekunden ein, 4 Sekunden aus */
.breath { position: relative; display: grid; place-items: center; width: min(68vw, 260px); aspect-ratio: 1; margin: 18px auto 22px; }
.breath::before, .breath::after { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: breathe 8s ease-in-out infinite; }
.breath::before { background: #ffffff; opacity: .42; }
.breath::after { inset: 13%; background: #fff; border: 3px solid var(--line); animation-delay: -.25s; }
@media (prefers-color-scheme: dark) { .breath::after { background: var(--card); } }
@keyframes breathe { 0%, 100% { transform: scale(.76); } 50% { transform: scale(1); } }
.timer { position: relative; z-index: 1; margin: 0; font-family: var(--display); font-weight: 800; font-size: 54px; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; }
.card .timer { margin: 14px 0; }
.note-card { white-space: pre-wrap; font-family: var(--display); font-weight: 700; font-size: 19px; }
.alts { list-style: none; margin: 0; padding: 0; }
.alts li { padding: 9px 0; border-top: 2px dashed var(--card-2); }
.alts li:first-child { border-top: 0; padding-top: 0; }
.alts li:last-child { padding-bottom: 0; }

.done { position: relative; text-align: center; padding-top: 6vh; }
.burst { position: absolute; z-index: -1; left: 50%; top: 6vh; width: 460px; height: 460px; margin: -130px 0 0 -230px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 255, 255, .5) 0 12deg, transparent 12deg 30deg); -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent); mask-image: radial-gradient(closest-side, #000 45%, transparent); animation: spin 16s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.pts { font-family: var(--display); font-weight: 800; font-size: 82px; line-height: 1; margin-bottom: 12px; animation: pop .6s var(--pop) both; font-variant-numeric: tabular-nums; -webkit-text-stroke: 2px var(--ink); color: #fff; paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
@media (prefers-color-scheme: dark) { .pts { color: #ffd400; -webkit-text-stroke-color: #000; text-shadow: 0 5px 0 #000; } }
.surprise { margin: 18px 0 6px; animation: rise-in .5s .35s var(--pop) both; text-align: left; }
@keyframes pop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.plant-pop { width: 132px; margin: 0 auto 4px; animation: grow-up .8s var(--pop) both; }
.plant-pop svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes grow-up { from { transform: translateY(40px) scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }

.item { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.item .grow { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.item .act { flex: none; }
.btn.tiny { width: auto; min-height: 44px; padding: 8px 12px; font-size: 15px; box-shadow: 0 3px 0 var(--line); }
.btn.tiny.quiet { box-shadow: none; }
.list > * + * { margin-top: 12px; }
.rows > * { padding: 11px 0; border-top: 2px dashed var(--card-2); }
.rows > *:first-child { border-top: 0; padding-top: 0; }
.rows > *:last-child { padding-bottom: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--card); border: 2.5px solid var(--line); padding: 4px; border-radius: 14px; margin-bottom: 14px; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 600; }
.seg button[aria-pressed=true] { background: #4326e6; color: #fff; font-weight: 700; }

.bar-row { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 15px; }
.stack-bar { display: flex; gap: 2px; height: 20px; }
.stack-bar button { padding: 0; border: 0; min-width: 4px; height: 100%; border-radius: 2px; position: relative; }
.stack-bar button::after { content: ""; position: absolute; inset: -12px 0; }
.stack-bar button:first-child { border-radius: 4px 2px 2px 4px; }
.stack-bar button:last-child { border-radius: 2px 4px 4px 2px; }
.stack-bar button:only-child { border-radius: 4px; }
.s1 { background: var(--series-1); }
.s2 { background: var(--series-2); }
.s3 { background: var(--series-3); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--ink-2); margin: 12px 0 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.hbar { display: grid; grid-template-columns: 118px 1fr 28px; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 8px; }
.hbar .bar-t { height: 12px; }
.hbar .bar-t i { display: block; height: 100%; min-width: 4px; border-radius: 2px 4px 4px 2px; background: var(--series-1); }
.hbar > span:first-child { overflow-wrap: anywhere; }
.hbar .num { text-align: right; color: var(--ink-2); }
.heat { display: grid; grid-template-columns: 26px repeat(5, 1fr); gap: 3px; font-size: 13px; color: var(--ink-2); align-items: center; }
.heat .hd { text-align: center; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.heat button { height: 30px; border: 0; padding: 0; border-radius: 4px; background: var(--card-2); }
.heat .l1 { background: var(--seq-1); } .heat .l2 { background: var(--seq-2); } .heat .l3 { background: var(--seq-3); } .heat .l4 { background: var(--seq-4); }
.tip { min-height: 22px; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 7px 4px; text-align: right; border-top: 2px dashed var(--card-2); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
thead th { border-top: 0; font-weight: 700; font-size: 13.5px; color: var(--ink-2); }
.inline-form { display: grid; grid-template-columns: 1fr 88px; gap: 8px; margin-bottom: 10px; }
label.file { display: flex; align-items: center; justify-content: center; }
label.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.url { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; overflow-wrap: anywhere; color: var(--ink-2); }

nav.tabs {
  position: fixed;
  z-index: 5;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px max(6px, calc((100% - 560px) / 2)) calc(env(safe-area-inset-bottom) + 6px);
  background: var(--card);
  border-top: 2.5px solid var(--line);
}
nav.tabs button {
  position: relative;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 0;
}
nav.tabs button[aria-current=page] { color: var(--ink); font-weight: 800; background: var(--bg); }
nav.tabs button[aria-current=page] svg { animation: tab-hop .5s var(--pop); }
@keyframes tab-hop { 0% { transform: translateY(6px) scale(.8); } 60% { transform: translateY(-5px) scale(1.15); } 100% { transform: none; } }
nav.tabs svg { display: block; width: 23px; height: 23px; margin: 0 auto 2px; }
.badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #e0006e; color: #fff; font-size: 12px; font-weight: 800; line-height: 19px; animation: nudge 1s ease-in-out infinite; }

.home-top { margin: -6px 0 10px; }
.level-chip { min-height: 42px; padding: 6px 14px; border: 2.5px solid var(--line); border-radius: 21px; background: var(--card); box-shadow: 0 3px 0 var(--line); font-family: var(--display); font-size: 15px; font-weight: 800; transition: transform .08s, box-shadow .08s; }
.icon-btn { width: 44px; height: 44px; padding: 10px; border: 0; background: none; }
.icon-btn svg { display: block; width: 24px; height: 24px; animation: spin 14s linear infinite; }
.garden-link { display: block; width: 100%; padding: 0 0 14px; overflow: hidden; text-align: left; transition: transform .08s, box-shadow .08s; }
.garden-link > span { display: block; margin: 8px 16px 0; }
.garden-link > .track { margin-top: 8px; }
.garden-link > .bed { margin: 0 0 12px; border: 0; border-bottom: 2.5px solid var(--line); border-radius: 0; }

/* Blumenwiese */
.bed { display: block; border: 2.5px solid var(--line); border-radius: 14px; overflow: hidden; line-height: 0; }
.bed svg { display: block; width: 100%; height: auto; }
.bed.mini { border-radius: 10px; }
.bed.mini *, .bed.still * { animation: none !important; }
.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 3.4s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.grass { transform-box: fill-box; transform-origin: 50% 100%; animation: grass 2.6s ease-in-out infinite alternate; }
@keyframes grass { from { transform: skewX(-9deg); } to { transform: skewX(9deg); } }
.grow-in { transform-box: fill-box; transform-origin: 50% 100%; animation: grow-in .9s .25s var(--pop) backwards; }
@keyframes grow-in { from { transform: scale(0); } to { transform: none; } }
.head-spin { transform-box: fill-box; transform-origin: 50% 50%; animation: head 9s ease-in-out infinite alternate; }
@keyframes head { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.sunrays { transform-box: fill-box; transform-origin: 50% 50%; animation: spin 18s linear infinite; }
.cloud { animation: drift 34s linear infinite; }
.cloud.slow { animation-duration: 52s; animation-delay: -20s; }
@keyframes drift { from { transform: translateX(-110px); } to { transform: translateX(400px); } }
.bird { animation: bird 26s linear infinite; }
@keyframes bird { from { transform: translate(-30px, 0); } 50% { transform: translate(210px, -12px); } to { transform: translate(450px, 4px); } }
.bwing { transform-box: fill-box; animation: bflap .42s ease-in-out infinite alternate; }
.bwing.l { transform-origin: 100% 100%; }
.bwing.r { transform-origin: 0 100%; }
@keyframes bflap { from { transform: rotate(0); } to { transform: rotate(var(--flap, 26deg)); } }
.bwing.l { --flap: 26deg; }
.bwing.r { --flap: -26deg; }
.pollen { animation: pollen 6s ease-in-out infinite; }
@keyframes pollen { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: .95; } 100% { transform: translate(34px, -58px); opacity: 0; } }
.fly0 { animation: fly0 11s ease-in-out infinite; }
.fly1 { animation: fly1 14s ease-in-out infinite; }
.fly2 { animation: fly2 9s ease-in-out infinite; }
@keyframes fly0 { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(90px, -34px); } 50% { transform: translate(170px, 16px); } 75% { transform: translate(70px, 36px); } }
@keyframes fly1 { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-80px, 30px); } 60% { transform: translate(-150px, -24px); } 80% { transform: translate(-50px, -46px); } }
@keyframes fly2 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(60px, 40px); } 66% { transform: translate(-50px, 22px); } }
.wing { transform-box: fill-box; animation: flap .22s ease-in-out infinite alternate; }
.wing.l { transform-origin: 100% 50%; }
.wing.r { transform-origin: 0 50%; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.3); } }
.legend-plants { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.legend-plants span { display: inline-flex; align-items: center; gap: 3px; }
.legend-plants svg { width: 28px; height: 32px; padding: 2px; border-radius: 8px; background: #5fe04a; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.album-item .small { display: block; margin-top: 4px; }

.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 14px; }
.dot { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; max-height: 44px; border: 2.5px solid var(--line); border-radius: 50%; background: var(--card-2); color: var(--ink-2); font-size: 13px; font-weight: 700; }
.dot.on { background: #ffc400; color: #17122b; animation: chip-pop .4s var(--pop); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.badge-item { position: relative; min-height: 92px; padding: 8px 4px; overflow: hidden; border: 2.5px solid var(--line); border-radius: 14px; background: var(--card-2); color: var(--ink-2); }
.badge-item.on { background: #ffc400; color: #17122b; box-shadow: 0 3px 0 var(--line); }
.badge-item.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .75) 50%, transparent 60%); transform: translateX(-100%); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 65% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.badge-e { display: block; font-size: 30px; line-height: 1.2; }
.badge-item.on .badge-e { animation: wiggle 5s ease-in-out infinite; }
.badge-item:not(.on) .badge-e { font-size: 18px; line-height: 36px; opacity: .6; }
.badge-n { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.alt-done { width: 100%; margin-top: 12px; }

#celebrate { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(40, 8, 90, .72); overflow: hidden; }
#celebrate.on { display: flex; }
.cele-rays { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 212, 0, .38) 0 14deg, transparent 14deg 30deg); animation: spin 22s linear infinite; pointer-events: none; }
.cele-card { position: relative; width: 100%; max-width: 360px; padding: 24px 20px 22px; border: 3px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: 0 8px 0 var(--line); color: var(--ink); text-align: center; animation: pop .55s var(--pop) both; }
.cele-card .eyebrow { margin: 0 0 4px; font-family: var(--display); font-size: 14px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--warm); }
.cele-card h2 { font-size: 29px; }
.cele-emoji { font-size: 78px; line-height: 1.15; margin-bottom: 6px; animation: bounce-e 1.1s ease-in-out infinite; }
@keyframes bounce-e { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(5deg); } }
.confetti { position: fixed; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall 2.1s cubic-bezier(.3, .4, .6, 1) both; }
.confetti .c0 { background: #ffd400; } .confetti .c1 { background: #00d26a; } .confetti .c2 { background: #ff2e93; } .confetti .c3 { background: #2962ff; } .confetti .c4 { background: #ff6d00; }
@keyframes fall { to { transform: translateY(108vh) rotate(720deg); } }

#toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  transform: translateX(-50%) translateY(14px) scale(.92);
  max-width: calc(100% - 32px);
  width: max-content;
  padding: 11px 16px;
  border: 2.5px solid #000;
  border-radius: 14px;
  background: #17122b;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .3s var(--pop);
}
#toast.on { opacity: 1; transform: translateX(-50%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti, .burst, .cele-rays { display: none; }
}
