/* Marja & Felix – Blumenkarte */

@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --cream: #fdf3e7;
  --paper: #fffaf3;
  --card: #ffffff;
  --ink: #3d2f27;
  --ink-soft: #7a6758;
  --ink-faint: #b3a596;
  --line: #f0e3d3;
  --rose: #e63946;
  --rose-deep: #b81d2c;
  --rose-soft: #ffe3e3;
  --leaf: #5fb35a;
  --leaf-deep: #3f8f3d;
  --leaf-soft: #e3f4da;
  --sky: #5aa9e6;
  --sky-soft: #e2f1fc;
  --sun: #ffc93c;
  --sun-soft: #fff3cf;
  --lav: #9b7fd1;
  --lav-soft: #eee7fb;
  --felix: #5aa9e6;
  --marja: #f06292;
  --shadow: 0 12px 30px -12px rgba(92, 56, 30, .45);
  --shadow-sm: 0 4px 14px -6px rgba(92, 56, 30, .4);
  --r: 22px;
  --font-fun: "Fredoka", "Nunito", system-ui, sans-serif;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; }
h1, h2, h3, h4 { font-family: var(--font-fun); font-weight: 600; margin: 0; line-height: 1.15; }
a { color: var(--rose-deep); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-soft); }
.hidden { display: none !important; }

/* ---------- Buttons & Felder ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font-family: var(--font-fun); font-weight: 600; font-size: 1rem;
  padding: .72em 1.25em; border-radius: 999px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 3px 0 var(--line), var(--shadow-sm);
  transition: transform .12s, box-shadow .12s, filter .12s;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line), var(--shadow-sm); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--rose); color: #fff; box-shadow: 0 4px 0 var(--rose-deep), var(--shadow-sm); }
.btn.primary:active { box-shadow: 0 1px 0 var(--rose-deep), var(--shadow-sm); }
.btn.green { background: var(--leaf); color: #fff; box-shadow: 0 4px 0 var(--leaf-deep), var(--shadow-sm); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-soft); }
.btn.small { font-size: .88rem; padding: .5em .95em; }
.btn.danger { color: #c0392b; }
.btn.wide { width: 100%; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .12s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 22px; height: 22px; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.field { display: block; margin: 0 0 .85rem; }
.field > span { display: block; font-weight: 700; font-size: .85rem; color: var(--ink-soft); margin: 0 0 .3rem .3rem; }
.input, textarea.input, select.input {
  width: 100%; border: 2px solid var(--line); background: var(--paper);
  border-radius: 16px; padding: .7rem .9rem; font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
textarea.input { resize: none; min-height: 70px; }
.row { display: flex; gap: .6rem; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .35em;
  font-family: var(--font-fun); font-weight: 600; font-size: .78rem;
  padding: .25em .7em; border-radius: 999px; background: var(--lav-soft); color: var(--ink);
  white-space: nowrap;
}

/* ---------- Avatare ---------- */
.ava {
  --s: 40px; width: var(--s); height: var(--s); border-radius: 50%;
  flex: none; overflow: hidden; display: grid; place-items: center;
  font-family: var(--font-fun); font-weight: 600; color: #fff; font-size: calc(var(--s) * .44);
  background: var(--ava-c, var(--lav)); border: 3px solid #fff; box-shadow: var(--shadow-sm);
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.felix { --ava-c: var(--felix); }
.ava.marja { --ava-c: var(--marja); }

/* ---------- Login & Profilwahl ---------- */
.screen {
  position: fixed; inset: 0; overflow: auto;
  display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 18px calc(24px + var(--safe-b));
  background:
    radial-gradient(circle at 15% 20%, #ffe1ec 0, transparent 40%),
    radial-gradient(circle at 85% 15%, #e2f1fc 0, transparent 38%),
    radial-gradient(circle at 70% 85%, #e3f4da 0, transparent 42%),
    radial-gradient(circle at 10% 90%, #fff3cf 0, transparent 40%),
    var(--cream);
}
.floaters { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.floaters span { position: absolute; font-size: 28px; opacity: .55; animation: drift 14s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-22px) rotate(10deg); } }
.login-card {
  position: relative; width: min(380px, 100%); text-align: center;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px);
  border-radius: 32px; padding: 30px 26px 26px; box-shadow: var(--shadow);
}
.login-card .logo { width: 132px; height: 132px; margin: -84px auto 6px; filter: drop-shadow(0 10px 18px rgba(230, 57, 70, .3)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(4deg); } }
.login-card h1 { font-size: 2rem; color: var(--rose-deep); }
.login-card p { margin: .3rem 0 1.3rem; color: var(--ink-soft); }
.login-card .input { text-align: center; font-size: 1.15rem; letter-spacing: .08em; }
.login-card .err { color: #c0392b; font-weight: 700; min-height: 1.4em; margin: .5rem 0 .2rem; font-size: .92rem; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }

.who { width: min(560px, 100%); text-align: center; }
.who h1 { font-size: 2.1rem; color: var(--ink); }
.who > p { color: var(--ink-soft); margin: .3rem 0 1.6rem; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.who-card {
  position: relative; background: #fff; border-radius: 28px; padding: 22px 12px 18px;
  box-shadow: var(--shadow); display: grid; justify-items: center; gap: 10px;
  transition: transform .15s; border: 3px solid transparent;
}
.who-card:hover { transform: translateY(-3px); }
.who-card.felix { border-color: #cfe6f8; }
.who-card.marja { border-color: #ffd3e2; }
.who-card .ava { --s: 108px; border-width: 5px; }
.who-card h2 { font-size: 1.45rem; }
.who-card .cam {
  position: absolute; top: 102px; left: calc(50% + 26px);
  width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--ink);
  display: grid; place-items: center; box-shadow: 0 3px 0 #e0a800, var(--shadow-sm); border: 3px solid #fff;
}
.who-card .cam svg { width: 18px; height: 18px; }
.who .hint { margin-top: 1.3rem; font-size: .9rem; color: var(--ink-faint); }

/* ---------- Karte ---------- */
#map { position: fixed; inset: 0; background: #f6eedf; }
#map::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(rgba(120, 80, 40, .05) 1px, transparent 1.2px) 0 0 / 7px 7px,
    radial-gradient(ellipse at center, transparent 62%, rgba(150, 100, 60, .14) 100%);
}
.maplibregl-ctrl-attrib { font-size: 10px; }
.maplibregl-ctrl-bottom-right { bottom: calc(74px + var(--safe-b)); }

.topbar {
  position: fixed; z-index: 20; top: calc(10px + var(--safe-t)); left: 10px; right: 10px;
  display: flex; gap: 8px; align-items: center; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar .me-btn { border-radius: 50%; }
.topbar .me-btn .ava { --s: 48px; }
.search {
  flex: 1; min-width: 0; position: relative; height: 48px;
  background: #fff; border-radius: 999px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; padding: 0 6px 0 16px; gap: 8px;
}
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; height: 100%; }
.search .ico { color: var(--ink-faint); }
.search .clear { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-faint); }
.search-results {
  position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 55vh; overflow-y: auto;
}
.search-results button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.search-results button:last-child { border-bottom: 0; }
.search-results button:hover, .search-results button:focus { background: var(--paper); outline: none; }
.search-results b { display: block; font-weight: 700; }
.search-results small { color: var(--ink-soft); }
.search-results .em { font-size: 20px; width: 28px; text-align: center; flex: none; }
.search-results img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }

.chat-btn { position: relative; width: 48px; height: 48px; background: var(--rose); color: #fff; box-shadow: 0 4px 0 var(--rose-deep), var(--shadow-sm); }
.chat-btn svg { width: 24px; height: 24px; }
.badge {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--sun); color: var(--ink); border: 2px solid #fff;
  font: 700 .75rem/18px var(--font-fun); text-align: center;
  animation: pop .35s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop { from { transform: scale(0); } }

.countdown {
  position: fixed; z-index: 19; top: calc(66px + var(--safe-t)); left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 20px); background: rgba(255, 255, 255, .94); border-radius: 999px;
  padding: 6px 14px 6px 8px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 8px;
  font-size: .88rem; white-space: nowrap;
}
.countdown b { font-family: var(--font-fun); font-weight: 600; color: var(--rose-deep); }
.countdown span:last-child { overflow: hidden; text-overflow: ellipsis; }
.countdown .heart { font-size: 18px; animation: beat 1.6s infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.22); } }

.mapctl {
  position: fixed; z-index: 15; right: 10px; bottom: calc(120px + var(--safe-b));
  display: grid; gap: 8px;
}
.mapctl .icon-btn { width: 44px; height: 44px; }
.mapctl .zoom { display: grid; background: #fff; border-radius: 22px; box-shadow: var(--shadow-sm); overflow: hidden; }
.mapctl .zoom button { width: 44px; height: 42px; display: grid; place-items: center; }
.mapctl .zoom button + button { border-top: 1px solid var(--line); }
.mapctl .compass svg { transition: transform .2s; }
.mapctl .locate.on { color: var(--sky); }

.bottombar {
  position: fixed; z-index: 16; left: 0; right: 0; bottom: calc(28px + var(--safe-b));
  display: flex; justify-content: center; align-items: flex-end; pointer-events: none;
}
.bottombar > * { pointer-events: auto; }
.fab {
  position: relative; width: 78px; height: 78px; border-radius: 50%; background: var(--rose); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 0 var(--rose-deep), 0 18px 30px -10px rgba(184, 29, 44, .55);
  border: 4px solid #fff; transition: transform .15s;
}
.fab:active { transform: translateY(3px) scale(.97); box-shadow: 0 2px 0 var(--rose-deep), var(--shadow); }
.fab svg { width: 34px; height: 34px; }
.fab-label { position: absolute; bottom: -27px; left: 50%; transform: translateX(-50%); font: 600 .78rem var(--font-fun); color: var(--rose-deep); white-space: nowrap; text-shadow: 0 0 6px #fff, 0 0 6px #fff; }
.dex-btn {
  position: fixed; left: 10px; bottom: calc(20px + var(--safe-b)); z-index: 16;
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-sm); font-family: var(--font-fun); font-weight: 600;
}
.dex-btn .book { width: 38px; height: 38px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; box-shadow: 0 3px 0 var(--leaf-deep); }
.dex-btn .book svg { width: 21px; height: 21px; }
.dex-btn small { display: block; font-size: .72rem; color: var(--ink-soft); font-weight: 500; line-height: 1; }
.dex-btn b { display: block; line-height: 1.1; }
.lvl-btn {
  position: fixed; right: 10px; bottom: calc(20px + var(--safe-b)); z-index: 16;
  display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-sm); font: 600 .82rem var(--font-fun);
}
.lvl-btn .lv { width: 36px; height: 36px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; font-size: .95rem; box-shadow: 0 3px 0 #e0a800; }
.lvl-btn small { display: block; color: var(--ink-soft); font-weight: 500; font-size: .7rem; line-height: 1; }

/* Blumen-Marker */
.fmark { position: relative; display: block; width: var(--fs, 74px); padding-bottom: 10px; cursor: pointer; }
.fmark::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 16px; height: 6px; margin-left: -8px;
  border-radius: 50%; background: rgba(60, 40, 20, .28); filter: blur(1.5px);
}
.fm { position: relative; width: var(--fs, 74px); height: var(--fs, 74px); transition: transform .18s cubic-bezier(.3, 1.5, .5, 1); }
.fm::before { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: #fff; box-shadow: 0 6px 14px -4px rgba(60, 40, 20, .45); }
.fm-l { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fm-ph { position: absolute; left: 22.5%; top: 22.5%; width: 55%; height: 55%; border-radius: 50%; object-fit: cover; background: #e9e2d6; }
.fmark:hover .fm, .fmark.active .fm { transform: scale(1.12) translateY(-3px); }
.fmark .who-dot { position: absolute; right: 8%; bottom: 14px; z-index: 2; }
.fmark .who-dot .ava { --s: 20px; border-width: 2px; font-size: 9px; }
.fmark.bounce .fm { animation: land .9s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes land { 0% { transform: translateY(-120px) scale(.4); opacity: 0; } 60% { transform: translateY(4px) scale(1.08); opacity: 1; } 100% { transform: none; } }
.fm.r-selten::before { box-shadow: 0 0 0 3px rgba(79, 141, 245, .35), 0 0 18px 4px rgba(79, 141, 245, .45); }
.fm.r-sehr_selten::before { box-shadow: 0 0 0 3px rgba(163, 92, 240, .4), 0 0 22px 6px rgba(163, 92, 240, .5); }
.fm.r-legendaer::before { box-shadow: 0 0 0 3px rgba(242, 178, 27, .55), 0 0 26px 8px rgba(255, 200, 40, .65); animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px rgba(242, 178, 27, .35), 0 0 36px 12px rgba(255, 200, 40, .75); } }
.fm .spark { position: absolute; width: 16px; height: 16px; z-index: 3; animation: twinkle 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .2; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }

.cluster {
  position: relative; width: 66px; height: 66px; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff 0, #fff4f8 55%, #ffd6e6 100%);
  border: 4px solid #fff; box-shadow: 0 8px 18px -6px rgba(210, 71, 122, .55);
  display: grid; place-items: center;
}
.cluster .thumbs { position: absolute; inset: 0; }
.cluster .thumbs img { position: absolute; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.cluster .thumbs img:nth-child(1) { left: -8px; top: -6px; transform: rotate(-10deg); }
.cluster .thumbs img:nth-child(2) { right: -8px; top: -4px; transform: rotate(8deg); }
.cluster .thumbs img:nth-child(3) { left: 18px; bottom: -12px; }
.cluster b { position: relative; z-index: 1; font: 700 1.2rem var(--font-fun); color: var(--rose-deep); background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 0 8px; }

.me-marker { position: relative; width: 46px; height: 46px; }
.me-marker .ava { --s: 46px; position: relative; z-index: 2; }
.me-marker::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; background: rgba(90, 169, 230, .35);
  animation: ping 2s ease-out infinite;
}
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.acc-ring { border-radius: 50%; background: rgba(90, 169, 230, .12); border: 2px solid rgba(90, 169, 230, .4); pointer-events: none; }

.drop-pin { width: 44px; height: 58px; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); cursor: grab; animation: land .7s; }
.drop-pin:active { cursor: grabbing; }

.move-banner {
  position: fixed; z-index: 40; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%);
  width: min(440px, calc(100% - 20px)); background: #fff; border-radius: 22px; padding: 12px 14px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px;
}
.move-banner p { margin: 0; flex: 1; font-size: .92rem; }

/* ---------- Sheets (unten auf dem Handy, links am Desktop) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-wrap.modal { pointer-events: auto; background: rgba(61, 47, 39, .28); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto;
  max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px -10px rgba(92, 56, 30, .35);
  padding: 8px 18px calc(22px + var(--safe-b));
  animation: up .32s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet.closing { animation: down .22s ease-in forwards; }
@keyframes down { to { transform: translateY(105%); } }
.sheet .grab { display: block; width: 100%; height: 22px; position: sticky; top: -8px; z-index: 3; touch-action: none; }
.sheet .grab::before { content: ""; display: block; width: 46px; height: 5px; border-radius: 9px; background: #e3d5c4; margin: 6px auto 0; }
.sheet .x { position: absolute; top: 10px; right: 12px; z-index: 4; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.sheet h2 { font-size: 1.5rem; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sheet-actions .btn { flex: 1 1 auto; }

@media (min-width: 900px) {
  .search { flex: 0 1 480px; }
  .topbar .chat-btn { margin-left: auto; }
  .sheet {
    left: 14px; right: auto; top: 76px; bottom: 14px; width: 410px; max-height: none;
    border-radius: 28px; animation: slide .3s cubic-bezier(.2, 1.2, .4, 1);
  }
  .sheet.closing { animation: slideout .2s ease-in forwards; }
  @keyframes slide { from { transform: translateX(-110%); } }
  @keyframes slideout { to { transform: translateX(-110%); } }
  .sheet .grab { display: none; }
  .sheet-wrap.modal .sheet, .sheet.center { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(460px, 92vw); max-height: 88vh; animation: popin .25s cubic-bezier(.2, 1.3, .4, 1); }
  @keyframes popin { from { transform: translate(-50%, -46%) scale(.94); opacity: 0; } }
}

/* Upload */
.up-photo { position: relative; width: fit-content; margin: 2px auto 8px; }
.loc-box { background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-sm); margin: 10px 0 12px; }
.loc-box .row { gap: 10px; }
.loc-box .pin { font-size: 22px; }
.loc-box b { display: block; font-family: var(--font-fun); font-weight: 600; }
.loc-box small { color: var(--ink-soft); }
.seg { display: flex; background: var(--line); border-radius: 999px; padding: 3px; margin-top: 10px; gap: 3px; }
.seg button { flex: 1; padding: 7px 8px; border-radius: 999px; font: 600 .82rem var(--font-fun); color: var(--ink-soft); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.busy { text-align: center; padding: 28px 10px 18px; }
.busy .spin { width: 120px; height: 120px; margin: 0 auto 14px; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy h3 { font-size: 1.3rem; }
.busy p { color: var(--ink-soft); margin: .3rem 0 0; }

/* Detail */
.fd-head { text-align: center; margin: -8px -18px 0; padding: 18px 18px 10px; border-radius: 28px 28px 0 0; background: linear-gradient(180deg, var(--tint, #fdeef4) 0, transparent 100%); }
.fd-photo { width: fit-content; margin: 0 auto; cursor: zoom-in; }
.fd-head h2 { font-size: 1.75rem; margin-top: 4px; }
.fd-head .sci { font-style: italic; color: var(--ink-soft); font-size: .95rem; }
.fd-chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 8px 0 4px; }
.rar { color: #fff; background: var(--rc, #b3a99c); box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.rar.legendaer { background: linear-gradient(90deg, #f2b21b, #ffdd6b, #f2b21b); background-size: 200% 100%; color: #5a3d00; animation: shine 2.5s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.fact { background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-sm); margin: 12px 0; }
.fact h4 { font-size: 1rem; color: var(--leaf-deep); margin-bottom: 4px; }
.fact p { margin: 0; }
.fact a { font-size: .88rem; font-weight: 700; text-decoration: none; display: inline-block; margin-top: 6px; }
.meta-list { display: grid; gap: 8px; margin: 12px 0; }
.meta-list > div { display: flex; gap: 10px; align-items: center; font-size: .93rem; }
.meta-list .ava { --s: 30px; border-width: 2px; font-size: 13px; }
.meta-list .em { width: 30px; text-align: center; font-size: 18px; flex: none; }
.note-box { background: var(--sun-soft); border-radius: 16px; padding: 10px 14px; font-size: .95rem; white-space: pre-wrap; }
.cands { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cands button { font-size: .82rem; padding: 5px 11px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); }
.cands button i { color: var(--ink-faint); font-style: normal; }
.warn { background: #fff3e0; color: #8a5300; border-radius: 16px; padding: 10px 14px; font-size: .92rem; margin: 10px 0; }

/* Auswahl einer Blume */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 10px; }
.pick-grid button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); font-size: .8rem; font-weight: 700; }
.pick-grid .fm-ph { background: #efe7da; }

/* ---------- Vollbild-Panels (Herbarium, Chat) ---------- */
.panel {
  position: fixed; inset: 0; z-index: 45; background: var(--paper);
  display: flex; flex-direction: column; animation: up .32s cubic-bezier(.2, 1.1, .4, 1);
}
.panel.closing { animation: down .22s ease-in forwards; }
.panel-head {
  display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 14px 10px;
  background: var(--paper); border-bottom: 1px solid var(--line); flex: none;
}
.panel-head h2 { font-size: 1.35rem; flex: 1; min-width: 0; }
.panel-head .icon-btn { width: 40px; height: 40px; box-shadow: none; background: var(--cream); }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(24px + var(--safe-b)); }
@media (min-width: 900px) {
  .panel.side { left: auto; width: 440px; border-left: 1px solid var(--line); box-shadow: -20px 0 50px -20px rgba(92, 56, 30, .35); animation: slideR .3s cubic-bezier(.2, 1.1, .4, 1); }
  .panel.side.closing { animation: slideRout .2s ease-in forwards; }
  @keyframes slideR { from { transform: translateX(100%); } }
  @keyframes slideRout { to { transform: translateX(100%); } }
  .panel.wide { inset: 24px; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); }
  .panel.wide .panel-body { padding: 20px 26px 30px; }
}

/* Herbarium */
.dex-progress { background: #fff; border-radius: 22px; padding: 14px 16px; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.dex-progress b { font-family: var(--font-fun); font-size: 1.15rem; }
.bar { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--leaf), #9be07a); transition: width .6s; }
.trainers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.trainer { background: #fff; border-radius: 22px; padding: 12px; box-shadow: var(--shadow-sm); display: grid; gap: 6px; }
.trainer .row { gap: 8px; }
.trainer .ava { --s: 44px; }
.trainer h3 { font-size: 1.05rem; }
.trainer .lvl { font-size: .78rem; color: var(--ink-soft); font-weight: 700; }
.trainer .pts { font: 600 1.4rem var(--font-fun); color: var(--rose-deep); line-height: 1; }
.trainer .pts small { font-size: .75rem; color: var(--ink-soft); font-weight: 500; }
.trainer .bar { height: 8px; margin-top: 2px; }
.trainer .bar i { background: linear-gradient(90deg, var(--sun), #ffe28a); }
.trainer .stats { font-size: .78rem; color: var(--ink-soft); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.filters button { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); font: 600 .85rem var(--font-fun); color: var(--ink-soft); }
.filters button.on { background: var(--ink); color: #fff; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dex-card {
  position: relative; background: #fff; border-radius: 22px; padding: 10px 8px 12px; box-shadow: var(--shadow-sm);
  display: grid; justify-items: center; gap: 4px; text-align: center; transition: transform .15s;
}
.dex-card:hover { transform: translateY(-2px); }
.dex-card h4 { font-size: .98rem; }
.dex-card .cnt { position: absolute; top: 8px; right: 8px; font: 700 .8rem var(--font-fun); background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 8px; }
.dex-card .num { position: absolute; top: 9px; left: 11px; font: 600 .72rem var(--font-fun); color: var(--ink-faint); }
.dex-card.missing .fm { filter: grayscale(1) opacity(.45); }
.dex-card.missing .fm-ph { background: #ddd5c8; }
.dex-card.missing h4 { color: var(--ink-faint); }
.dex-card .bloom { font-size: .72rem; color: var(--leaf-deep); font-weight: 700; }
.dex-card .rar { font-size: .68rem; }
.dex-section { font-size: 1.15rem; margin: 22px 4px 10px; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin: 8px 0; }
.months span { text-align: center; font-size: .66rem; font-weight: 700; padding: 5px 0; border-radius: 8px; background: var(--line); color: var(--ink-faint); }
.months span.on { background: var(--leaf); color: #fff; }
.months span.now { outline: 2px solid var(--rose); outline-offset: 1px; }
.finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 8px; }
.finds button { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-sm); }
.finds img { width: 100%; height: 100%; object-fit: cover; }
.finds .ava { position: absolute; right: 4px; bottom: 4px; --s: 22px; border-width: 2px; font-size: 10px; }

/* Chat-Panel */
.tabs { display: flex; gap: 4px; background: var(--line); border-radius: 999px; padding: 4px; margin: 0 14px 0; flex: none; }
.tabs button { flex: 1; padding: 8px 6px; border-radius: 999px; font: 600 .92rem var(--font-fun); color: var(--ink-soft); position: relative; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tabs .dot { position: absolute; top: 5px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); }
.partner { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.partner .ava { --s: 42px; }
.partner b { display: block; font-family: var(--font-fun); font-size: 1.15rem; font-weight: 600; line-height: 1.1; }
.partner small { color: var(--ink-soft); font-size: .8rem; }
.partner small.on { color: var(--leaf-deep); font-weight: 700; }
.tab-host { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 10px; }
.msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 20px; background: #fff; box-shadow: 0 2px 6px -3px rgba(92, 56, 30, .3); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--rose); color: #fff; border-bottom-right-radius: 8px; }
.msg.mine a { color: #fff; }
.msg.theirs { border-bottom-left-radius: 8px; }
.msg.big { background: transparent !important; box-shadow: none; font-size: 2.6rem; line-height: 1.1; padding: 2px 4px; color: var(--ink); }
.msg time { display: block; font-size: .68rem; opacity: .65; margin-top: 2px; text-align: right; }
.msg-day { align-self: center; font: 600 .75rem var(--font-fun); color: var(--ink-soft); background: var(--line); border-radius: 999px; padding: 3px 12px; margin: 10px 0 6px; }
.seen { align-self: flex-end; font-size: .72rem; color: var(--ink-soft); margin: -1px 4px 4px; }
.chat-empty { margin: auto; text-align: center; color: var(--ink-soft); padding: 30px; }
.chat-empty div { font-size: 48px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--paper); flex: none; }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; border-radius: 23px; padding: 11px 16px; }
.composer .send { width: 46px; height: 46px; flex: none; background: var(--rose); color: #fff; box-shadow: 0 3px 0 var(--rose-deep); }
.scroll-pad { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px calc(24px + var(--safe-b)); }

.next-date {
  background: linear-gradient(135deg, #ffe1ec, #fff3cf); border-radius: 24px; padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.next-date::after { content: "😊"; position: absolute; right: 12px; top: 6px; font-size: 54px; opacity: .25; transform: rotate(12deg); }
.next-date small { font-weight: 800; color: var(--rose-deep); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.next-date h3 { font-size: 1.5rem; margin: 2px 0; }
.next-date p { margin: 0; color: var(--ink-soft); }
.cal { background: #fff; border-radius: 24px; padding: 12px; box-shadow: var(--shadow-sm); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head h4 { font-size: 1.1rem; }
.cal-head button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-grid .dow { font-size: .72rem; font-weight: 800; color: var(--ink-faint); padding: 4px 0; }
.cal-grid button { position: relative; aspect-ratio: 1; border-radius: 14px; font: 600 .95rem var(--font-fun); display: grid; place-items: center; }
.cal-grid button.other { color: var(--ink-faint); }
.cal-grid button.today { background: var(--sun-soft); color: var(--ink); }
.cal-grid button.sel { background: var(--ink); color: #fff; }
.cal-grid button.has::after { content: "☺"; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--rose); line-height: 1; }
.cal-grid button.sel.has::after { color: #ffd3e2; }
.day-list { margin-top: 12px; display: grid; gap: 8px; }
.ev { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: var(--shadow-sm); text-align: left; width: 100%; }
.ev .when { flex: none; width: 54px; text-align: center; background: var(--rose-soft); border-radius: 14px; padding: 5px 0; }
.ev .when b { display: block; font: 600 1.35rem/1 var(--font-fun); color: var(--rose-deep); }
.ev .when small { font-size: .68rem; font-weight: 800; text-transform: uppercase; color: var(--rose-deep); }
.ev .what { flex: 1; min-width: 0; }
.ev .what b { display: block; font-family: var(--font-fun); font-weight: 600; font-size: 1.02rem; }
.ev .what small { color: var(--ink-soft); display: block; }
.ev.past { opacity: .6; }
.sub-h { font-size: 1rem; margin: 18px 4px 8px; color: var(--ink-soft); }

.plan-add { display: grid; gap: 8px; background: #fff; border-radius: 22px; padding: 12px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.emojis { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.emojis button { flex: none; width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.emojis button.on { background: var(--sun-soft); box-shadow: inset 0 0 0 2px var(--sun); }
.plans { display: grid; gap: 8px; }
.plan { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 20px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.plan .em { font-size: 26px; width: 36px; text-align: center; flex: none; }
.plan .txt { flex: 1; min-width: 0; text-align: left; }
.plan .txt b { display: block; font-weight: 800; }
.plan .txt small { color: var(--ink-soft); display: block; white-space: pre-wrap; }
.plan .ava { --s: 26px; border-width: 2px; font-size: 11px; }
.check { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); flex: none; display: grid; place-items: center; color: transparent; transition: all .2s; }
.check.on { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.plan.done { opacity: .6; }
.plan.done .txt b { text-decoration: line-through; text-decoration-color: var(--leaf); }
.plan .mini { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); flex: none; }
.empty { text-align: center; color: var(--ink-soft); padding: 22px 10px; }
.empty div { font-size: 40px; }

/* Menü */
.menu-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }
.menu-head .ava { --s: 64px; }
.menu-list { display: grid; gap: 8px; }
.menu-list button { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm); text-align: left; font-weight: 700; }
.menu-list button .em { font-size: 20px; width: 26px; text-align: center; }
.menu-list button small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .82rem; }
.steps { padding-left: 1.2rem; margin: .6rem 0 1rem; }
.steps li { margin-bottom: .35rem; }
.ok { color: var(--leaf-deep); font-weight: 800; }

/* Feier bei neuer Art */
.celebrate { text-align: center; padding: 10px 6px 4px; }
.celebrate .burst { position: relative; width: fit-content; margin: 0 auto; }
.celebrate .burst .fm { animation: land .9s cubic-bezier(.3, 1.5, .5, 1); }
.celebrate small { display: block; font: 700 .8rem var(--font-fun); letter-spacing: .1em; text-transform: uppercase; color: var(--rose-deep); }
.celebrate h2 { font-size: 2rem; margin: 4px 0; }
.celebrate .pts { font: 600 1.6rem var(--font-fun); color: var(--leaf-deep); margin: 6px 0 2px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -30px; font-style: normal; font-size: 22px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* Lightbox, Toasts, Rückfrage */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(30, 22, 18, .92); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: var(--shadow); }
#toasts { position: fixed; z-index: 100; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 18px; padding: 11px 16px; box-shadow: var(--shadow); font-weight: 600; animation: toastin .3s cubic-bezier(.2, 1.3, .4, 1); pointer-events: none; display: flex; gap: 10px; align-items: center; }
.toast.ok { background: var(--leaf-deep); }
.toast.err { background: #b03a2e; }
.toast.out { animation: toastout .25s forwards; }
@keyframes toastin { from { transform: translateY(-20px); opacity: 0; } }
@keyframes toastout { to { transform: translateY(-20px); opacity: 0; } }
.ask p { font-size: 1.05rem; margin: 6px 0 4px; }

@media (max-width: 420px) {
  .dex-grid { grid-template-columns: repeat(2, 1fr); }
  .lvl-btn small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
