/* =========================================================================
   GOODFARM — Mobile App Design System
   Warm, lebendig, taktil. Editorial-DNA der Website (Fraunces + Inter),
   aber app-tauglich: weiche Federn, große Tap-Targets, Joy-of-use.
   ========================================================================= */

:root {
  --ink: #232c25;
  --ink-soft: #3c463d;
  --muted: #717a6e;
  --meadow: #3f6b48;
  --meadow-deep: #2c4d33;
  --meadow-bright: #5a8c63;
  --hay: #e0a73f;
  --hay-deep: #bd861f;
  --clay: #b4623f;
  --sky: #6fa8c9;
  --coral: #e8795a;
  --berry: #c8536b;
  --cream: #f6f1e6;
  --paper: #fdfaf2;
  --paper-2: #fbf4e7;
  --white: #ffffff;
  --line: #e7e0d0;
  --line-strong: #d7ccb6;
  --soft: rgba(63, 107, 72, 0.1);

  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-pill: 999px;
  --shadow-card: 0 10px 26px rgba(35, 44, 37, 0.08);
  --shadow-pop: 0 18px 44px rgba(35, 44, 37, 0.16);
  --shadow-frame: 0 40px 90px rgba(20, 26, 22, 0.4);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #3a4a3e, transparent 60%), #20261f;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  overflow: hidden;
  overflow-wrap: break-word;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid rgba(63,107,72,0.45); outline-offset: 2px; border-radius: 8px; }

/* ---------- Device Frame ---------- */
.app-frame {
  position: relative;
  width: min(430px, 100vw);
  max-width: 100vw;
  min-width: 0;
  height: min(932px, 100dvh);
  background: var(--cream);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
@media (min-width: 480px) and (min-height: 760px) {
  .app-frame {
    width: 390px;
    border-radius: 46px;
    box-shadow: var(--shadow-frame);
    height: min(844px, calc(100dvh - 36px));
    border: 12px solid #0d100c;
  }
}

/* faux statusbar */
.statusbar {
  padding: max(8px, var(--safe-top)) 28px 2px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--paper); flex-shrink: 0;
}
.statusbar .dots { display: flex; gap: 5px; align-items: center; }
.statusbar .dots i { width: 17px; height: 11px; border: 1.5px solid var(--ink); border-radius: 3px; display: inline-block; position: relative; }
.statusbar .dots i::after { content: ""; position: absolute; inset: 2px; right: 4px; background: var(--ink); border-radius: 1px; }

/* ---------- App bar ---------- */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 18px 12px; background: var(--paper); flex-shrink: 0; z-index: 5;
}
.appbar .brand { display: flex; align-items: center; gap: 10px; }
.appbar .mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--meadow); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.15);
}
.appbar .mark svg { width: 22px; height: 22px; }
.appbar .brand b { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1; display: block; }
.appbar .brand small { font-size: 10px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.appbar .bar-actions { display: flex; align-items: center; gap: 8px; }
.demo-chip {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--hay-deep); background: rgba(224,167,63,0.16); padding: 5px 9px; border-radius: var(--r-pill);
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 1px solid var(--line); color: var(--ink-soft);
  transition: transform 0.15s var(--spring), background 0.15s;
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Scroll area / screens ---------- */
.scroll {
  flex: 1; min-height: 0; min-width: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scroll-behavior: smooth; background: var(--cream);
}
.scroll::-webkit-scrollbar { width: 0; }
.screen { padding: 14px 18px calc(124px + var(--safe-bottom)); overflow-x: clip; }
.screen > .stack > * { min-width: 0; }
.screen-enter { animation: screenIn 0.42s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.stack-sm { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }

/* ---------- Typo helpers ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 560; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--meadow); margin: 0 0 7px; display: flex; align-items: center; gap: 7px; }
.eyebrow.gold { color: var(--hay-deep); }
.eyebrow.coral { color: var(--coral); }
p { margin: 0; }
.muted { color: var(--muted); }
.section-title h2 { font-size: 24px; margin-bottom: 4px; }
.section-title p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* ---------- Greeting / Streak / Ticker ---------- */
.greeting { padding-top: 4px; }
.greeting h1 { font-size: 27px; }
.greeting .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.streak-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: var(--r-pill);
  background: linear-gradient(120deg, rgba(224,167,63,0.18), rgba(232,121,90,0.16));
  border: 1px solid rgba(224,167,63,0.3); font-size: 13px; font-weight: 700; color: var(--clay);
  animation: pop 0.5s var(--spring) both;
}
.streak-pill .flame { font-size: 15px; }

.ticker {
  position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--meadow), var(--meadow-deep)); color: #fff; box-shadow: var(--shadow-card);
}
.ticker::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(224,167,63,0.4), transparent 70%); }
.ticker .label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.85; text-transform: uppercase; }
.ticker .count { font-family: var(--font-display); font-size: 42px; font-weight: 560; line-height: 1; margin: 6px 0 2px; }
.ticker .count small { font-size: 22px; opacity: 0.8; }
.ticker .csub { font-size: 13px; opacity: 0.85; }
.ticker .feed { margin-top: 14px; height: 22px; overflow: hidden; position: relative; border-top: 1px solid rgba(255,255,255,0.18); padding-top: 11px; }
.ticker .feed-item { display: flex; align-items: center; gap: 8px; font-size: 13px; position: absolute; width: 100%; }
.ticker .feed-item .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #8be0a0; animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(139,224,160,0.6); } 70% { box-shadow: 0 0 0 7px rgba(139,224,160,0); } 100% { box-shadow: 0 0 0 0 rgba(139,224,160,0); } }
.feed-anim-in { animation: feedIn 0.5s var(--ease) both; }
.feed-anim-out { animation: feedOut 0.5s var(--ease) both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes feedOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-16px); } }

/* ---------- Care meter ---------- */
.care { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.care-ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; background: conic-gradient(var(--meadow) calc(var(--p) * 1%), #ece2cf 0); display: grid; place-items: center; transition: background 0.6s var(--ease); }
.care-ring i { width: 42px; height: 42px; border-radius: 50%; background: var(--white); display: grid; place-items: center; font-size: 18px; font-style: normal; }
.care h3 { font-size: 17px; margin-bottom: 2px; }
.care p { font-size: 13px; color: var(--muted); }
.care.done .care-ring i { animation: pop 0.5s var(--spring); }

/* ---------- Tagesgabe-Streifen ---------- */
.give-strip-wrap { margin: 0 -18px; min-width: 0; }
.give-strip { display: flex; gap: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 4px 18px 8px; }
.give-strip::-webkit-scrollbar { height: 0; }
.give-chip {
  scroll-snap-align: start; flex: 0 0 142px; display: flex; flex-direction: column; gap: 9px;
  padding: 16px 14px 14px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line);
  box-shadow: var(--shadow-card); text-align: left; position: relative; overflow: hidden;
  transition: transform 0.18s var(--spring), box-shadow 0.18s, border-color 0.18s;
}
.give-chip:active { transform: scale(0.95); }
.give-chip.just-gave { animation: chipPulse 0.6s var(--spring); border-color: var(--meadow-bright); }
@keyframes chipPulse { 0% { transform: scale(1);} 40% { transform: scale(1.06);} 100% { transform: scale(1);} }
.give-chip .emoji { font-size: 30px; line-height: 1; }
.give-chip .who { font-size: 12.5px; font-weight: 650; line-height: 1.25; min-height: 46px; color: var(--ink-soft); }
.give-chip .price { align-self: flex-start; font-weight: 800; font-size: 14px; color: var(--meadow-deep); background: var(--soft); padding: 6px 12px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 5px; transition: background 0.2s, color 0.2s; }
.give-chip:active .price { background: var(--meadow); color: #fff; }
.give-chip .count-badge { position: absolute; top: 10px; right: 10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--hay); color: #2b1f08; font-size: 11px; font-weight: 800; display: grid; place-items: center; transform: scale(0); transition: transform 0.3s var(--spring); }
.give-chip .count-badge.show { transform: scale(1); }

/* ---------- Discover card ---------- */
.discover { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); color: #fff; box-shadow: var(--shadow-card); min-height: 192px; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.discover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.discover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,22,0.1), rgba(20,26,22,0.92)); }
.discover > * { position: relative; z-index: 1; }
.discover .badge { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: var(--hay); color: #2b1f08; padding: 5px 11px; border-radius: var(--r-pill); margin-bottom: 10px; }
.discover h3 { font-size: 23px; color: #fff; margin-bottom: 6px; }
.discover p { font-size: 14px; opacity: 0.9; line-height: 1.45; }
.discover .disc-cta { margin-top: 14px; align-self: flex-start; }

/* ---------- Cards / Buttons ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: var(--r-pill); font-weight: 700; font-size: 16px; width: 100%; transition: transform 0.16s var(--spring), box-shadow 0.16s, background 0.16s; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--meadow); color: #fff; box-shadow: 0 10px 22px rgba(44,77,51,0.3); }
.btn-primary:active { background: var(--meadow-deep); }
.btn-gold { background: var(--hay); color: #2b1f08; box-shadow: 0 10px 22px rgba(189,134,31,0.32); }
.btn-ghost { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 10px 22px rgba(232,121,90,0.3); }
.btn-sm { min-height: 44px; font-size: 14.5px; width: auto; padding: 0 18px; }

/* ---------- Goal / fund mini ---------- */
.goal-card { padding: 18px; }
.goal-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.goal-card h3 { font-size: 19px; }
.goal-card .gc-purpose { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; padding: 5px 10px; border-radius: var(--r-pill); background: var(--soft); color: var(--meadow-deep); white-space: nowrap; }
.pill.gold { background: rgba(224,167,63,0.18); color: var(--hay-deep); }
.pill.sky { background: rgba(111,168,201,0.2); color: #2f6488; }
.pill.clay { background: rgba(180,98,63,0.16); color: var(--clay); }

.bar { height: 11px; border-radius: var(--r-pill); background: #ece2cf; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--meadow), var(--hay)); transition: width 1s var(--ease); }
.bar-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 9px; gap: 10px; }
.bar-row .now { font-family: var(--font-display); font-weight: 560; font-size: 18px; }
.bar-row .goal { font-size: 12.5px; color: var(--muted); }

/* ---------- Outcome mapper ---------- */
.mapper { padding: 20px 18px; }
.mapper .amount-display { text-align: center; margin-bottom: 6px; }
.mapper .amount-display .big { font-family: var(--font-display); font-size: 52px; font-weight: 560; line-height: 1; color: var(--meadow-deep); display: inline-block; }
.mapper .amount-display.bump .big { animation: pop 0.4s var(--spring); }
.mapper .outcome { display: flex; align-items: center; gap: 14px; min-height: 76px; margin: 14px 0 18px; padding: 14px 16px; border-radius: var(--r); background: var(--paper-2); border: 1px dashed var(--line-strong); }
.mapper .outcome .o-emoji { font-size: 36px; }
.mapper .outcome.change .o-emoji { animation: pop 0.5s var(--spring); }
.mapper .outcome .o-text b { display: block; font-family: var(--font-display); font-weight: 560; font-size: 17px; margin-bottom: 2px; }
.mapper .outcome .o-text span { font-size: 13px; color: var(--muted); }
.slider-wrap { padding: 6px 4px 0; }
.amount-slider { width: 100%; -webkit-appearance: none; appearance: none; height: 8px; border-radius: 999px; background: #ece2cf; outline: none; }
.amount-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--meadow); border: 4px solid #fff; box-shadow: 0 4px 12px rgba(44,77,51,0.4); cursor: pointer; transition: transform 0.15s var(--spring); }
.amount-slider::-webkit-slider-thumb:active { transform: scale(1.2); }
.amount-slider::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: var(--meadow); border: 4px solid #fff; box-shadow: 0 4px 12px rgba(44,77,51,0.4); cursor: pointer; border: 4px solid #fff; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.amount-chips button { flex: 1 0 auto; min-width: 64px; min-height: 46px; padding: 0 14px; border-radius: var(--r-pill); background: var(--paper-2); border: 1.5px solid var(--line); font-weight: 700; transition: all 0.15s var(--spring); }
.amount-chips button.active { background: var(--meadow); color: #fff; border-color: var(--meadow); transform: scale(1.04); }
.segment { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--line); }
.segment button { flex: 1; min-height: 42px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: var(--muted); transition: all 0.18s var(--ease); }
.segment button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-card); }

/* ---------- Animals / Paten ---------- */
.animal-card { overflow: hidden; }
.animal-card .top { display: flex; gap: 14px; padding: 16px 16px 0; align-items: center; }
.animal-card .ava { width: 64px; height: 64px; border-radius: 20px; flex-shrink: 0; display: grid; place-items: center; font-size: 34px; background: var(--paper-2); }
.animal-card .ava.sky { background: rgba(111,168,201,0.2); }
.animal-card .ava.hay { background: rgba(224,167,63,0.18); }
.animal-card .ava.clay { background: rgba(180,98,63,0.16); }
.animal-card .ava.meadow { background: rgba(63,107,72,0.12); }
.animal-card .nm { flex: 1; }
.animal-card .nm h3 { font-size: 20px; }
.animal-card .nm .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.animal-card .body { padding: 12px 16px 16px; }
.animal-card .body > p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 14px; }
.animal-card .adopt-row { display: flex; align-items: center; gap: 10px; }
.animal-card .adopt-row .price { font-family: var(--font-display); font-weight: 560; font-size: 19px; }
.animal-card .adopt-row .price small { font-size: 12px; color: var(--muted); font-family: var(--font-sans); }
.animal-card.adopted { border-color: var(--meadow-bright); box-shadow: 0 0 0 2px rgba(90,140,99,0.25), var(--shadow-card); }
.adopted-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--meadow-deep); background: var(--soft); padding: 6px 11px; border-radius: var(--r-pill); }
.adopted-banner { background: linear-gradient(120deg, var(--meadow), var(--meadow-deep)); color: #fff; padding: 10px 16px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* ---------- Impact ledger ---------- */
.impact-hero { padding: 22px 18px; border-radius: var(--r-lg); color: #fff; background: linear-gradient(150deg, var(--clay), #8f4a30); box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.impact-hero .label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.impact-hero .big { font-family: var(--font-display); font-size: 46px; font-weight: 560; line-height: 1; margin: 6px 0; }
.impact-hero .line { font-size: 14px; opacity: 0.92; line-height: 1.45; }
.impact-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.impact-stats .s { padding: 14px 8px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); text-align: center; }
.impact-stats .s b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 560; color: var(--meadow-deep); }
.impact-stats .s span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.community { padding: 18px; }
.community .chead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.community .chead .n { font-family: var(--font-display); font-size: 20px; font-weight: 560; }

/* ---------- Update / learn cards ---------- */
.update-card { padding: 16px 18px; }
.update-card time { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--hay-deep); }
.update-card h3 { font-size: 17px; margin: 5px 0 6px; }
.update-card p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.learn-card { padding: 18px; }
.learn-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.learn-card .tags span { font-size: 11px; font-weight: 700; color: var(--meadow-deep); background: var(--soft); padding: 4px 9px; border-radius: var(--r-pill); }
.learn-card .lc-emoji { font-size: 28px; margin-bottom: 8px; }
.learn-card h3 { font-size: 18px; margin-bottom: 5px; }
.learn-card p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.notice { padding: 18px; border-radius: var(--r-lg); background: var(--paper-2); border: 1px solid var(--line); }
.notice h3 { font-size: 17px; margin: 6px 0 6px; }
.notice p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Tab bar ---------- */
.tabbar { position: relative; flex-shrink: 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 8px calc(8px + var(--safe-bottom)); background: rgba(253,250,242,0.92); backdrop-filter: blur(16px) saturate(120%); border-top: 1px solid var(--line); z-index: 10; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 4px; font-size: 10.5px; font-weight: 700; color: var(--muted); transition: color 0.18s; }
.tab svg { width: 23px; height: 23px; transition: transform 0.2s var(--spring); }
.tab.active { color: var(--meadow-deep); }
.tab.active svg { transform: translateY(-1px) scale(1.06); }
.tab--center { position: relative; }
.tab--center .fab { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: linear-gradient(145deg, var(--hay), var(--hay-deep)); color: #2b1f08; display: grid; place-items: center; box-shadow: 0 12px 26px rgba(189,134,31,0.45), inset 0 0 0 2px rgba(255,255,255,0.25); transition: transform 0.2s var(--spring); }
.tab--center .fab svg { width: 28px; height: 28px; }
.tab--center:active .fab { transform: scale(0.92); }
.tab--center .lbl { margin-top: 3px; color: var(--hay-deep); }
.tab--center.active .fab { box-shadow: 0 12px 30px rgba(189,134,31,0.6), inset 0 0 0 2px rgba(255,255,255,0.35); }

/* ---------- Toast ---------- */
.toast-layer { position: absolute; left: 0; right: 0; bottom: calc(96px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 60; padding: 0 18px; }
.toast { pointer-events: auto; max-width: 100%; display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-radius: var(--r-pill); background: var(--ink); color: #fff; box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 600; animation: toastIn 0.45s var(--spring) both; }
.toast.out { animation: toastOut 0.35s var(--ease) forwards; }
.toast .t-emoji { font-size: 20px; }
.toast.success { background: linear-gradient(120deg, var(--meadow), var(--meadow-deep)); }
.toast.love { background: linear-gradient(120deg, var(--coral), var(--berry)); }
@keyframes toastIn { from { opacity: 0; transform: translateY(24px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* ---------- Confetti / fly number ---------- */
.confetti-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 55; }
.confetti { position: absolute; width: 10px; height: 14px; border-radius: 2px; will-change: transform, opacity; }
.fly-num { position: absolute; z-index: 58; font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--meadow-deep); pointer-events: none; animation: flyUp 1s var(--ease) forwards; }
@keyframes flyUp { 0% { opacity: 0; transform: translateY(0) scale(0.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-66px) scale(1.1); } }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20,26,22,0.5); opacity: 0; transition: opacity 0.3s var(--ease); z-index: 70; pointer-events: none; backdrop-filter: blur(2px); }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--paper); border-radius: 28px 28px 0 0; padding: 10px 20px calc(24px + var(--safe-bottom)); transform: translateY(110%); transition: transform 0.42s var(--spring); max-height: 90%; overflow-y: auto; box-shadow: 0 -20px 50px rgba(20,26,22,0.25); }
.sheet.open { transform: translateY(0); }
.sheet .handle { width: 42px; height: 5px; border-radius: 999px; background: var(--line-strong); margin: 4px auto 16px; }
.sheet .sheet-title { margin-bottom: 16px; }
.sheet .sheet-title h2 { font-size: 24px; margin: 4px 0 8px; }
.sheet .sheet-title p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.sheet .sheet-actions { display: grid; gap: 10px; margin-top: 18px; }
.sheet .big-emoji { font-size: 56px; text-align: center; margin: 4px 0 10px; animation: pop 0.6s var(--spring) both; }
.success-box { padding: 14px 16px; border-radius: var(--r); background: var(--soft); color: var(--meadow-deep); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.inline-list { display: grid; gap: 10px; }
.inline-list article { padding: 13px 15px; border-radius: var(--r); background: var(--white); border: 1px solid var(--line); }
.inline-list strong { display: block; font-size: 14.5px; margin-bottom: 2px; }
.inline-list p { font-size: 13px; color: var(--muted); }

/* ---------- Onboarding ---------- */
.onboard { position: absolute; inset: 0; z-index: 90; background: linear-gradient(170deg, var(--meadow), var(--meadow-deep)); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px 26px calc(30px + var(--safe-bottom)); transition: opacity 0.4s, transform 0.4s var(--ease); }
.onboard.hide { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.onboard .ob-emoji { font-size: 64px; margin-bottom: 14px; animation: float 3s ease-in-out infinite; }
.onboard h1 { color: #fff; font-size: 34px; margin-bottom: 14px; }
.onboard p { font-size: 16px; opacity: 0.92; line-height: 1.55; margin-bottom: 24px; max-width: 30ch; }
.onboard .ob-points { display: grid; gap: 12px; margin-bottom: 26px; }
.onboard .ob-points div { display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.onboard .ob-points .e { font-size: 24px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Pixel-Brand (gemeinsam mit dem Farm-Game) ---------- */
.ava .pixav { width: 46px; height: 46px; display: block; }
.big-emoji .pixav-lg { width: 80px; height: 80px; display: block; margin: 0 auto; }
.game-tease { display: flex; align-items: center; gap: 13px; padding: 13px 15px; text-decoration: none; transition: transform 0.18s var(--spring), box-shadow 0.18s; }
.game-tease:active { transform: scale(0.98); }
.game-tease .gt { width: 104px; height: auto; border-radius: 10px; flex-shrink: 0; }
.game-tease .gt-txt { flex: 1; min-width: 0; }
.game-tease .gt-txt b { display: block; font-family: var(--font-display); font-weight: 560; font-size: 16px; }
.game-tease .gt-txt small { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: block; margin-top: 2px; }
.game-tease .gt-go { font-size: 20px; color: var(--meadow-deep); font-weight: 700; }

/* ---------- micro ---------- */
@keyframes pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.05ms !important; scroll-behavior: auto !important; }
}
