/* Familie Semmler – warmes, ruhiges Familien-Zuhause */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.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; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f7f0e6;
  --bg-2: #efe5d6;
  --card: #fffcf7;
  --card-2: #fbf5ec;
  --ink: #3a2e27;
  --ink-2: #6e5e53;
  --ink-3: #a29285;
  --line: #eadfce;
  --line-2: #dfd0bb;
  --accent: #d6694a;
  --accent-2: #f0a37f;
  --accent-soft: #fbe3d6;
  --accent-ink: #fff;
  --sage: #7aa37c;
  --sage-soft: #e3efdf;
  --honey: #eeb14a;
  --honey-soft: #fcefd2;
  --sky: #6c98c8;
  --sky-soft: #e0ebf6;
  --rose: #cf7f9d;
  --rose-soft: #f7e1ea;
  --danger: #c4533c;
  --polaroid: #fffdf9;
  --overlay: rgba(46, 32, 22, .38);
  --shadow-s: 0 1px 2px rgba(84, 56, 32, .07);
  --shadow: 0 1px 2px rgba(84, 56, 32, .06), 0 8px 24px -8px rgba(84, 56, 32, .16);
  --shadow-l: 0 2px 6px rgba(84, 56, 32, .08), 0 22px 50px -14px rgba(84, 56, 32, .32);
  --r: 22px;
  --r-s: 14px;
  --top: 60px;
  --navh: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1915; --bg-2: #2a221d; --card: #2b231e; --card-2: #322923;
    --ink: #f3e9df; --ink-2: #cdbcae; --ink-3: #9a897c; --line: #3d322b; --line-2: #4a3d34;
    --accent: #ea8462; --accent-2: #c9694b; --accent-soft: #4a2d22; --accent-ink: #1f1410;
    --sage: #93bb92; --sage-soft: #2b3628; --honey: #f0bd5e; --honey-soft: #3d3020;
    --sky: #8fb4dd; --sky-soft: #24303d; --rose: #e29bb5; --rose-soft: #3e2a32;
    --danger: #ef8a72; --polaroid: #f4ede4; --overlay: rgba(0, 0, 0, .55);
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 26px -10px rgba(0, 0, 0, .55);
    --shadow-l: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 54px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1f1915; --bg-2: #2a221d; --card: #2b231e; --card-2: #322923;
  --ink: #f3e9df; --ink-2: #cdbcae; --ink-3: #9a897c; --line: #3d322b; --line-2: #4a3d34;
  --accent: #ea8462; --accent-2: #c9694b; --accent-soft: #4a2d22; --accent-ink: #1f1410;
  --sage: #93bb92; --sage-soft: #2b3628; --honey: #f0bd5e; --honey-soft: #3d3020;
  --sky: #8fb4dd; --sky-soft: #24303d; --rose: #e29bb5; --rose-soft: #3e2a32;
  --danger: #ef8a72; --polaroid: #f4ede4; --overlay: rgba(0, 0, 0, .55);
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 26px -10px rgba(0, 0, 0, .55);
  --shadow-l: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 54px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.hand { font-family: var(--hand); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.s { width: 18px; height: 18px; }
svg.i.xs { width: 15px; height: 15px; }

/* ================= Login ================= */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px calc(24px + var(--safe-b));
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--honey) 28%, transparent), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  text-align: center;
  background: var(--card);
  border-radius: 30px;
  padding: 34px 26px 28px;
  box-shadow: var(--shadow-l);
  position: relative;
}
.login-house { width: 92px; height: 92px; margin: -78px auto 10px; filter: drop-shadow(0 10px 18px rgba(150, 70, 40, .3)); }
.login h1 { font-size: 2rem; }
.login .hand { font-size: 1.45rem; color: var(--accent); margin: 2px 0 16px; }
.login p.muted { margin: 0 0 22px; }
.login-faces { display: flex; justify-content: center; gap: 6px; margin: 0 0 22px; }
.login-faces .ava { box-shadow: 0 0 0 3px var(--card); }
.login form { display: grid; gap: 12px; }
.login input {
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: .04em;
}
.login .err { color: var(--danger); min-height: 1.4em; font-weight: 700; font-size: .92rem; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ================= Grundgerüst ================= */
.shell { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: calc(var(--top) + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand b { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .me-btn { border-radius: 50%; }
.topbar .me-btn .ava { box-shadow: 0 0 0 2.5px var(--bg), 0 0 0 4.5px var(--line-2); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--navh) + var(--safe-b));
  padding: 0 6px var(--safe-b);
  display: flex; justify-content: space-around; align-items: stretch;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.nav .nav-brand { display: none; }
.nav button {
  flex: 1; max-width: 110px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: .72rem; font-weight: 800; letter-spacing: .01em;
  position: relative;
}
.nav button .pill { display: grid; place-items: center; width: 54px; height: 30px; border-radius: 999px; transition: background .2s, color .2s; }
.nav button.on { color: var(--ink); }
.nav button.on .pill { background: var(--accent-soft); color: var(--accent); }
.nav .badge {
  position: absolute; top: 5px; left: calc(50% + 8px);
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: .7rem; font-weight: 900; line-height: 19px; text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}

.view { padding: 6px 16px calc(var(--navh) + var(--safe-b) + 28px); max-width: 1120px; margin: 0 auto; }
.view-head { display: flex; align-items: flex-end; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.view-head h1 { font-size: clamp(1.7rem, 5.4vw, 2.3rem); }
.view-head .sub { color: var(--ink-2); margin-top: 4px; }
.view-head .grow { flex: 1; min-width: 200px; }

@media (min-width: 900px) {
  :root { --top: 72px; }
  .shell { display: grid; grid-template-columns: 236px 1fr; }
  .nav {
    position: sticky; top: 0; height: 100dvh;
    flex-direction: column; justify-content: flex-start; gap: 4px;
    padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line);
    background: var(--card-2);
  }
  .nav .nav-brand { display: flex; padding: 4px 10px 22px; }
  .nav .nav-brand img { width: 40px; height: 40px; border-radius: 12px; }
  .nav .nav-brand b { font-size: 1.35rem; }
  .nav button { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; font-size: .98rem; font-weight: 700; padding: 10px 12px; border-radius: 14px; color: var(--ink-2); }
  .nav button .pill { width: auto; height: auto; background: none !important; }
  .nav button:hover { background: var(--bg-2); }
  .nav button.on { background: var(--accent-soft); color: var(--accent); }
  .nav .badge { position: static; margin-left: auto; box-shadow: none; }
  .topbar .brand { display: none; }
  .topbar { padding: 0 32px; }
  .view { padding: 4px 32px 48px; }
  .main { min-width: 0; }
}

/* ================= Bausteine ================= */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.sec { margin: 30px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.sec h2 { font-size: 1.3rem; }
.sec .hand { color: var(--accent); font-size: 1.25rem; }
.sec .more { margin-left: auto; font-weight: 800; font-size: .9rem; color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .12s, filter .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.04); }
.btn.soft { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn.plain { background: var(--bg-2); color: var(--ink); box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.busy { pointer-events: none; opacity: .75; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--ink-2); background: var(--card); box-shadow: var(--shadow-s);
}
.icon-btn:hover { color: var(--ink); }
.icon-btn.flat { background: transparent; box-shadow: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--card); color: var(--ink-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700; font-size: .92rem; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.chip.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.chip .ava { margin-left: -8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
.chips.scroll::-webkit-scrollbar { display: none; }

.ava {
  --s: 36px; --c: var(--accent);
  width: var(--s); height: var(--s); flex: none;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--c); color: #fff;
  font-family: var(--serif); font-weight: 600; font-size: calc(var(--s) * .44);
  overflow: hidden; position: relative;
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.avas { display: inline-flex; }
.avas .ava { box-shadow: 0 0 0 2px var(--card); }
.avas .ava + .ava { margin-left: -8px; }
.online::after {
  content: ""; position: absolute; right: 1px; bottom: 1px;
  width: 26%; height: 26%; border-radius: 50%; background: #61c26a; box-shadow: 0 0 0 2px var(--card);
}

.field { display: grid; gap: 6px; }
.field > span { font-weight: 800; font-size: .88rem; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: .82rem; }
input[type=text], input[type=password], input[type=date], input[type=search], input:not([type]), textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card-2);
  outline: none;
  transition: border-color .15s, background .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: var(--card); }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input[type=date] { min-width: 0; appearance: none; -webkit-appearance: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: flex; background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { flex: 1; min-height: 38px; padding: 0 12px; border-radius: 999px; font-weight: 800; font-size: .9rem; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-s); }
.seg .n { color: var(--ink-3); font-weight: 700; margin-left: 4px; }

.empty { text-align: center; padding: 34px 18px; color: var(--ink-2); }
.empty .big { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.empty h3 { font-size: 1.25rem; color: var(--ink); margin-bottom: 6px; }
.empty p { margin: 0 auto 16px; max-width: 360px; }

/* Polaroid */
.polaroid {
  --rot: 0deg;
  background: var(--polaroid);
  padding: 6px 6px 22px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(40, 25, 15, .18), 0 8px 18px -6px rgba(40, 25, 15, .3);
  transform: rotate(var(--rot));
}
.polaroid img, .polaroid .ph { width: 100%; aspect-ratio: 1; object-fit: cover; background: #e9dfd2; border-radius: 1px; }
.polaroid .cap { font-family: var(--hand); font-weight: 600; color: #4a3a30; text-align: center; font-size: 1.05rem; line-height: 1; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stimmungs-Symbole */
.mood { display: inline-block; flex: none; width: var(--ms, 34px); height: var(--ms, 34px); }
.mood svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ================= Zuhause ================= */
.hello { margin: 14px 0 22px; }
.hello h1 { font-size: clamp(2rem, 7vw, 2.8rem); font-weight: 500; }
.hello h1 em { font-style: normal; color: var(--accent); }
.hello .date { color: var(--ink-2); font-weight: 700; margin-top: 6px; }
.hello .weather { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-s); font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.hello .weather .mood { --ms: 26px; }

.banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--honey-soft); margin-bottom: 12px;
  animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.banner .em { font-size: 2rem; line-height: 1; }
.banner { flex-wrap: wrap; }
.banner .txt { flex: 1 1 170px; min-width: 0; }
.banner .acts { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.banner b { font-weight: 800; }
.banner.rose { background: var(--rose-soft); }
.banner.sky { background: var(--sky-soft); }
.banner.sage { background: var(--sage-soft); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

.checkin-card { position: relative; overflow: hidden; }
.checkin-card h2 { font-size: 1.35rem; }
.checkin-card p { margin: 4px 0 14px; color: var(--ink-2); }
.mood-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood-pick button {
  display: grid; justify-items: center; gap: 4px;
  padding: 10px 2px 8px; border-radius: 18px;
  font-size: .76rem; font-weight: 800; color: var(--ink-2);
  transition: background .15s, transform .15s;
}
.mood-pick button .mood { --ms: 46px; transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
.mood-pick button:hover { background: var(--bg-2); }
.mood-pick button:hover .mood { transform: scale(1.1) rotate(-4deg); }
.mood-pick button.on { background: var(--accent-soft); color: var(--accent); }
.mood-pick button.on .mood { transform: scale(1.12); }
.today-mood { display: flex; align-items: center; gap: 14px; }
.today-mood .mood { --ms: 52px; }
.today-mood .txt { flex: 1; min-width: 0; }
.today-mood b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }

.family { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.person {
  text-align: left; display: grid; gap: 12px;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 16px; position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .2s;
}
.person::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c); opacity: .85; }
.person:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); }
.person .p-head { display: flex; align-items: center; gap: 12px; }
.person .p-head .ava { --s: 52px; }
.person .p-name { flex: 1; min-width: 0; }
.person .p-name b { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; display: block; }
.person .p-name small { color: var(--ink-3); font-weight: 700; font-size: .82rem; }
.person .p-mood { display: grid; justify-items: center; gap: 0; text-align: center; font-size: .72rem; font-weight: 800; color: var(--ink-2); }
.person .p-mood .mood { --ms: 44px; }
.person .p-mood.stale { opacity: .45; filter: grayscale(.7); }
.person .p-note { font-size: .93rem; color: var(--ink-2); background: var(--card-2); border-radius: 12px; padding: 8px 12px; position: relative; }
.person .p-note::before { content: "„"; font-family: var(--serif); color: var(--ink-3); }
.person .p-note::after { content: "“"; font-family: var(--serif); color: var(--ink-3); }
.wish { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .82rem; font-weight: 800; background: var(--sage-soft); color: color-mix(in srgb, var(--sage) 75%, var(--ink)); }
.wish.quiet { background: var(--sky-soft); color: color-mix(in srgb, var(--sky) 70%, var(--ink)); }
.doing { display: grid; gap: 6px; }
.doing-item { display: flex; align-items: flex-start; gap: 8px; font-size: .93rem; line-height: 1.35; }
.doing-item .e { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--bg-2); font-size: .95rem; }
.doing-item .t { flex: 1; min-width: 0; padding-top: 3px; }
.doing-item .due { display: inline-block; font-size: .78rem; font-weight: 800; color: var(--accent); margin-left: 4px; }
.doing-item.done .t { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 50%, transparent); }
.person .p-empty { color: var(--ink-3); font-size: .9rem; font-style: italic; }
.person .p-foot { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: .82rem; font-weight: 700; }
.person .p-foot .rx { margin-left: auto; display: flex; gap: 4px; }

.agenda { display: grid; gap: 8px; }
.agenda-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-s); text-align: left; width: 100%; }
.date-tile { width: 50px; flex: none; text-align: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); padding: 5px 0 4px; line-height: 1.05; }
.date-tile b { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.date-tile small { font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.date-tile.today { background: var(--accent); color: var(--accent-ink); }
.agenda-item .txt { flex: 1; min-width: 0; }
.agenda-item .txt b { display: block; font-weight: 800; }
.agenda-item .txt small { color: var(--ink-2); font-size: .85rem; }

.flash { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; text-align: left; width: 100%; background: linear-gradient(135deg, var(--honey-soft), var(--accent-soft)); }
.flash .polaroid { --rot: -4deg; }
.flash .hand { color: var(--accent); font-size: 1.35rem; line-height: 1.1; }
.flash h3 { font-size: 1.25rem; margin: 4px 0; }
.flash small { color: var(--ink-2); font-weight: 700; }

.feed { display: grid; gap: 2px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 14px; text-align: left; width: 100%; position: relative; }
.feed-item:hover { background: var(--card); }
.feed-item .ava { --s: 34px; }
.feed-item .txt { flex: 1; min-width: 0; font-size: .95rem; line-height: 1.4; }
.feed-item .txt q { color: var(--ink-2); quotes: "„" "“"; }
.feed-item time { display: block; color: var(--ink-3); font-size: .8rem; font-weight: 700; margin-top: 2px; }
.feed-item .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.feed-item.new::before { content: ""; position: absolute; left: -4px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.home-grid { display: grid; gap: 0 28px; }
@media (min-width: 1080px) {
  .home-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); }
  .home-grid .col-side .sec:first-child { margin-top: 30px; }
}

/* ================= Erinnerungen / Zeitleiste ================= */
.stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stats span { padding: 5px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-s); font-weight: 800; font-size: .85rem; color: var(--ink-2); }
.stats b { color: var(--ink); }
.timeline { position: relative; margin-top: 10px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 0; border-left: 2.5px dashed var(--line-2); }
.tl-year { position: relative; font-family: var(--serif); font-size: 2rem; font-weight: 600; margin: 26px 0 8px -26px; padding-left: 26px; color: var(--ink); }
.tl-year::before { content: ""; position: absolute; left: 0; top: 50%; width: 17px; height: 17px; margin-top: -8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--bg); }
.tl-month { font-family: var(--hand); font-size: 1.35rem; color: var(--accent); margin: 14px 0 8px; }
.tl-list { display: grid; gap: 14px; }
.mem {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center;
  text-align: left; width: 100%; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 14px; transition: transform .15s, box-shadow .2s;
}
.mem:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); }
.mem::before { content: ""; position: absolute; left: -24px; top: 34px; width: 11px; height: 11px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--accent-2); }
.mem .stack-ph { position: relative; height: 134px; }
.mem .stack-ph .polaroid { position: absolute; width: 114px; padding: 5px 5px 16px; }
.mem .stack-ph .polaroid:nth-child(1) { left: 2px; top: 6px; z-index: 3; }
.mem .stack-ph .polaroid:nth-child(2) { left: 96px; top: 2px; z-index: 2; }
.mem .stack-ph .polaroid:nth-child(3) { left: 190px; top: 8px; z-index: 1; }
.mem .noph { display: none; }
.mem h3 { font-size: 1.2rem; margin: 2px 0 4px; }
.mem .when { font-family: var(--hand); font-size: 1.2rem; color: var(--accent); line-height: 1; }
.mem .where { color: var(--ink-2); font-size: .9rem; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.mem .meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--ink-3); font-weight: 800; font-size: .85rem; }
.mem .meta { flex-wrap: wrap; row-gap: 6px; }
.mem .meta .cnt { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mem .meta .cnt.on { color: var(--accent); }
.mem .meta .avas .ava { --s: 26px; }
.mem .story { color: var(--ink-2); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
@media (min-width: 700px) {
  .mem { grid-template-columns: 170px 1fr; gap: 16px; padding: 16px 20px 16px 16px; }
  .mem .stack-ph { height: 150px; }
  .mem .stack-ph .polaroid { width: 124px; padding: 5px 5px 18px; }
  .mem .stack-ph .polaroid:nth-child(1) { left: 2px; top: 10px; }
  .mem .stack-ph .polaroid:nth-child(2) { left: 32px; top: 2px; }
  .mem .stack-ph .polaroid:nth-child(3) { left: 44px; top: 14px; }
  .mem .noph { display: grid; height: 120px; border-radius: 16px; place-items: center; font-size: 40px; background: var(--bg-2); }
}

/* Erinnerung im Detail */
.md-hero { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -20px 16px; padding: 4px 20px 12px; scrollbar-width: none; }
.md-hero::-webkit-scrollbar { display: none; }
.md-hero button { scroll-snap-align: center; flex: none; }
.md-hero img { height: min(46vh, 340px); width: auto; max-width: 82vw; border-radius: 14px; object-fit: cover; background: var(--bg-2); box-shadow: var(--shadow); }
.md-hero.single img { max-width: 100%; }
.md-hero.single { justify-content: center; }
.md-title { font-size: 1.7rem; }
.md-when { font-family: var(--hand); font-size: 1.4rem; color: var(--accent); }
.md-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 16px; color: var(--ink-2); font-weight: 700; font-size: .92rem; }
.md-meta button { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 700; }
.md-story { white-space: pre-wrap; font-size: 1.02rem; line-height: 1.65; margin: 0 0 18px; }
.md-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.heart-btn.on { background: var(--rose-soft); color: var(--rose); }
.heart-btn.on svg { fill: currentColor; }
.grid-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.grid-ph button { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.grid-ph img { width: 100%; height: 100%; object-fit: cover; }
.grid-ph .ava { position: absolute; right: 4px; bottom: 4px; --s: 20px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.grid-ph .cover-mark { position: absolute; left: 4px; top: 4px; background: rgba(0, 0, 0, .5); color: #fff; font-size: .68rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.grid-ph .new { display: grid; place-items: center; color: var(--ink-3); border: 2px dashed var(--line-2); background: transparent; }
.grid-ph .new.busy::after { content: attr(data-p); position: absolute; inset: 0; display: grid; place-items: center; background: var(--overlay); color: #fff; font-weight: 900; }

/* Kommentare */
.thread { display: grid; gap: 10px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt .bub { flex: 1; min-width: 0; background: var(--card-2); border-radius: 4px 16px 16px 16px; padding: 8px 12px; }
.cmt .bub b { font-size: .86rem; font-weight: 900; }
.cmt .bub time { color: var(--ink-3); font-size: .78rem; font-weight: 700; margin-left: 6px; }
.cmt .bub p { margin: 2px 0 0; white-space: pre-wrap; word-wrap: break-word; }
.cmt .c-act { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.cmt .c-act button { color: var(--ink-3); font-size: .78rem; font-weight: 800; display: inline-flex; align-items: center; gap: 2px; padding: 4px; }
.cmt .c-act button.on { color: var(--rose); }
.cmt .c-act button.on svg { fill: currentColor; }
.composer-mini { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.composer-mini textarea { min-height: 46px; height: 46px; max-height: 140px; resize: none; padding-top: 11px; }

/* ================= Karte ================= */
.mapwrap { position: fixed; z-index: 1; left: 0; right: 0; top: calc(var(--top) + var(--safe-t)); bottom: calc(var(--navh) + var(--safe-b)); display: none; }
.mapwrap.show { display: block; }
#map { position: absolute; inset: 0; background: #f3eadc; }
@media (min-width: 900px) { .mapwrap { left: 236px; bottom: 0; } }
.map-tools { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 5; display: flex; gap: 8px; align-items: flex-start; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-tools .chips { flex: 1; }
.map-tools .chip { box-shadow: var(--shadow); }
.map-fab { position: absolute; right: 14px; bottom: 18px; z-index: 5; display: grid; gap: 10px; justify-items: end; }
.map-fab .icon-btn { box-shadow: var(--shadow); }
.mapwrap.has-card .map-fab { bottom: 178px; }
.map-tools .chips.scroll { margin: 0; padding: 2px 2px 8px; }
.map-card { position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 6; max-width: 460px; margin: 0 auto; display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px; animation: up .25s ease-out; }
.map-card img, .map-card .noph { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; background: var(--bg-2); display: grid; place-items: center; font-size: 34px; }
.map-card .txt { flex: 1; min-width: 0; }
.map-card .when { font-family: var(--hand); color: var(--accent); font-size: 1.15rem; line-height: 1; }
.map-card h3 { font-size: 1.12rem; margin: 2px 0; }
.map-card small { color: var(--ink-2); font-weight: 700; }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
html.map-dim #map canvas { filter: brightness(.82) saturate(.9); }

.mk { cursor: pointer; }
.mk .polaroid { width: 64px; padding: 3px 3px 10px; transition: transform .2s cubic-bezier(.2, 1.4, .4, 1); }
.mk .polaroid img { aspect-ratio: 1; }
.mk:hover .polaroid { transform: rotate(0) scale(1.08); }
.mk .pin { width: 40px; height: 40px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--accent); display: grid; place-items: center; box-shadow: var(--shadow); border: 3px solid var(--polaroid); }
.mk .pin span { transform: rotate(45deg); font-size: 18px; }
.mk-cluster { position: relative; width: 78px; height: 80px; }
.mk-cluster .polaroid { position: absolute; width: 58px; padding: 3px 3px 9px; }
.mk-cluster .polaroid:nth-child(1) { left: 0; top: 10px; --rot: -8deg; z-index: 3; }
.mk-cluster .polaroid:nth-child(2) { left: 14px; top: 4px; --rot: 5deg; z-index: 2; }
.mk-cluster .polaroid:nth-child(3) { left: 20px; top: 14px; --rot: 12deg; z-index: 1; }
.mk-cluster b { position: absolute; right: -2px; top: -4px; z-index: 4; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .85rem; box-shadow: 0 0 0 3px var(--polaroid); }
.mk-home { display: grid; justify-items: center; }
.mk-home .ava { --s: 44px; box-shadow: 0 0 0 3px var(--polaroid), var(--shadow); }
.mk-home small { margin-top: 3px; padding: 1px 8px; border-radius: 999px; background: var(--polaroid); color: #4a3a30; font-weight: 900; font-size: .72rem; box-shadow: var(--shadow-s); }
.mk-home .house { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--polaroid); display: grid; place-items: center; font-size: 12px; box-shadow: var(--shadow-s); }
.mk-plan, .mk-home { z-index: 3; }
.mk-plan { width: 36px; height: 36px; border-radius: 50%; background: var(--honey-soft); border: 2.5px dashed var(--honey); display: grid; place-items: center; font-size: 17px; box-shadow: var(--shadow); }
.maplibregl-ctrl-attrib { font-size: 11px; }

/* Ortswahl */
.picker-map { position: relative; height: min(52vh, 420px); border-radius: 18px; overflow: hidden; margin: 6px 0 12px; background: #f3eadc; }
.picker-map .cross { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -42px 0 0 -22px; pointer-events: none; z-index: 3; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.place-box { position: relative; }
.place-results { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border-radius: 16px; box-shadow: var(--shadow-l); overflow: hidden; }
.place-results button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.place-results button:last-child { border-bottom: 0; }
.place-results button:hover, .place-results button.act { background: var(--bg-2); }
.place-results small { color: var(--ink-3); font-size: .82rem; }
.loc-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); font-weight: 700; }
.loc-line .ok { color: var(--sage); }

/* ================= Planung ================= */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.plan {
  text-align: left; width: 100%; display: grid; gap: 10px;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px;
  transition: transform .15s, box-shadow .2s; position: relative;
}
.plan:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); }
.plan .pl-head { display: flex; gap: 12px; align-items: flex-start; }
.cat-ico { width: 46px; height: 46px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 1.4rem; background: var(--cc, var(--bg-2)); }
.plan h3 { font-size: 1.15rem; }
.plan .pl-when { color: var(--ink-2); font-size: .88rem; font-weight: 700; margin-top: 3px; }
.plan .pl-note { color: var(--ink-2); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan .pl-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan .pl-foot .avas .ava { --s: 26px; }
.plan .pl-foot .meta { color: var(--ink-3); font-weight: 800; font-size: .84rem; display: inline-flex; gap: 4px; align-items: center; }
.vote { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 34px; border-radius: 999px; background: var(--bg-2); font-weight: 900; font-size: .88rem; color: var(--ink-2); margin-left: auto; transition: transform .15s; }
.vote.on { background: var(--honey-soft); color: color-mix(in srgb, var(--honey) 70%, var(--ink)); }
.vote:active { transform: scale(.92); }
.progress { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps button { flex: 1; padding: 10px 6px; border-radius: 14px; background: var(--bg-2); font-weight: 800; font-size: .85rem; color: var(--ink-2); display: grid; gap: 2px; justify-items: center; }
.steps button .e { font-size: 1.2rem; }
.steps button.on { background: var(--accent); color: var(--accent-ink); }
.steps button.past { background: var(--accent-soft); color: var(--accent); }
.join { display: flex; gap: 6px; }
.join button { flex: 1; }
.tasks { display: grid; gap: 4px; }
.task { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; }
.task .box { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.task.done .box { background: var(--sage); border-color: var(--sage); color: #fff; }
.task .t { flex: 1; min-width: 0; }
.task.done .t { color: var(--ink-3); text-decoration: line-through; }
.task .take { font-size: .78rem; font-weight: 800; color: var(--ink-3); padding: 4px 8px; border-radius: 999px; background: var(--bg-2); display: inline-flex; align-items: center; gap: 4px; }
.task .take .ava { --s: 20px; }
.task .del { color: var(--ink-3); padding: 4px; }
.people-states { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 10px; }
.people-states > span { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.people-states .ava { --s: 28px; }
.people-states .maybe .ava { opacity: .55; }

/* ================= Küchentisch ================= */
.view-chat { display: flex; flex-direction: column; height: calc(100dvh - var(--top) - var(--safe-t) - var(--navh) - var(--safe-b)); padding-bottom: 0; max-width: 820px; }
@media (min-width: 900px) { .view-chat { height: calc(100dvh - var(--top)); } }
.chat-scroll { flex: 1; overflow-y: auto; padding: 8px 2px 12px; overscroll-behavior: contain; }
.msgs { display: flex; flex-direction: column; gap: 3px; }
.day-sep { align-self: center; margin: 16px 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: .78rem; font-weight: 800; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 84%; }
.msg .ava { --s: 30px; visibility: hidden; }
.msg.last .ava { visibility: visible; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .ava { display: none; }
.bubble {
  background: var(--card); border-radius: 18px; padding: 8px 13px 7px; box-shadow: var(--shadow-s);
  position: relative; min-width: 0; text-align: left; word-wrap: break-word; overflow-wrap: anywhere;
}
.msg.mine .bubble { background: var(--accent-soft); background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
.msg.first .bubble { margin-top: 8px; }
.bubble .who { display: block; font-size: .8rem; font-weight: 900; color: var(--c); margin-bottom: 1px; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble time { float: right; margin: 6px 0 -3px 10px; font-size: .7rem; color: var(--ink-3); font-weight: 700; }
.bubble .img { margin: 2px -7px 4px; border-radius: 13px; overflow: hidden; background: var(--bg-2); max-width: 280px; }
.bubble .img img { width: 100%; height: auto; max-height: 360px; object-fit: cover; }
.bubble.deleted { font-style: italic; color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.rx-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: -4px; position: relative; z-index: 1; padding: 0 8px; }
.msg.mine .rx-row { justify-content: flex-end; }
.rx { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; min-height: 26px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-s), inset 0 0 0 1.5px var(--line); font-size: .85rem; font-weight: 800; color: var(--ink-2); }
.rx.on { box-shadow: var(--shadow-s), inset 0 0 0 1.5px var(--accent-2); background: var(--accent-soft); }
.msg-wrap { display: flex; flex-direction: column; }
.msg-wrap.mine { align-items: flex-end; }
.rx-pick { display: flex; gap: 2px; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: var(--shadow-l); margin: 4px 0; animation: pop .2s; }
.rx-pick button { width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; transition: transform .15s; }
.rx-pick button:hover { transform: scale(1.2); background: var(--bg-2); }
.rx-pick .del { font-size: .8rem; width: auto; padding: 0 10px; color: var(--danger); font-weight: 800; border-radius: 999px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 12px; border-top: 1px solid var(--line); background: var(--bg); }
.composer textarea { min-height: 46px; height: 46px; max-height: 160px; resize: none; padding-top: 11px; border-radius: 23px; }
.composer .icon-btn { width: 46px; height: 46px; flex: none; }
.composer .send { background: var(--accent); color: var(--accent-ink); }
.older { align-self: center; margin: 6px 0 10px; }
.chat-empty { margin: auto; text-align: center; color: var(--ink-2); padding: 30px; }
.chat-empty .big { font-size: 50px; }

/* ================= Sheets ================= */
.sheet-back {
  position: fixed; inset: 0; z-index: 100;
  background: var(--overlay);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease-out;
}
.sheet-back.closing { animation: fade .18s ease-in reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 640px;
  max-height: calc(100dvh - var(--safe-t) - 18px);
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-l);
  display: flex; flex-direction: column;
  animation: slide .32s cubic-bezier(.2, .9, .3, 1);
  position: relative;
}
.sheet-back.closing .sheet { animation: slide .2s ease-in reverse forwards; }
@keyframes slide { from { transform: translateY(100%); } }
.sheet .grab { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet .grab::before { content: ""; width: 42px; height: 5px; border-radius: 9px; background: var(--line-2); }
.sheet .x { position: absolute; right: 14px; top: 12px; z-index: 3; }
.sheet-body { overflow-y: auto; padding: 4px 20px calc(24px + var(--safe-b)); overscroll-behavior: contain; }
.sheet h2.title { font-size: 1.55rem; margin: 2px 50px 4px 0; }
.sheet .lead { color: var(--ink-2); margin: 0 0 16px; }
.sheet .sub-h { font-size: 1.05rem; font-family: var(--serif); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.sheet .sub-h .n { font-family: var(--sans); color: var(--ink-3); font-size: .85rem; font-weight: 800; }
.sheet-foot { flex: none; padding: 12px 20px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; background: var(--bg); border-radius: 0 0 28px 28px; }
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn.ghost { flex: 0 1 auto; }
@media (min-width: 700px) {
  .sheet-back { align-items: center; padding: 24px; }
  .sheet { border-radius: 28px; max-height: min(88dvh, 900px); }
  .sheet .grab { visibility: hidden; height: 18px; }
  @keyframes slide { from { transform: translateY(30px) scale(.98); opacity: 0; } }
}

/* Person */
.pp-head { display: flex; gap: 16px; align-items: center; margin: 4px 0 16px; }
.pp-head .ava { --s: 76px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6.5px var(--c); }
.pp-head h2 { font-size: 1.7rem; }
.pp-head .muted { font-size: .9rem; font-weight: 700; }
.pp-mood { display: flex; gap: 14px; align-items: center; }
.pp-mood .mood { --ms: 64px; }
.pp-mood b { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { padding: 3px 10px; border-radius: 999px; background: var(--bg-2); font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.battery { display: inline-flex; gap: 2px; align-items: center; vertical-align: middle; }
.battery i { width: 7px; height: 14px; border-radius: 2px; background: var(--line-2); }
.battery i.f { background: var(--sage); }
.battery.bat-low i.f { background: var(--honey); }
.battery.bat-empty i.f { background: var(--danger); }
.mood-chart { display: flex; gap: 3px; align-items: flex-end; height: 92px; padding: 8px 0 0; }
.mood-chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.mood-chart .col i { width: 100%; max-width: 14px; border-radius: 6px 6px 3px 3px; display: block; }
.mood-chart .col.none i { background: var(--line) !important; height: 4px !important; }
.mood-chart .col.today::after { content: ""; position: absolute; bottom: -8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.chart-legend { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .74rem; font-weight: 800; margin-top: 10px; }
.gestures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gestures button { display: grid; justify-items: center; gap: 4px; padding: 12px 4px 10px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-s); font-size: .76rem; font-weight: 800; color: var(--ink-2); line-height: 1.15; transition: transform .15s; }
.gestures button .e { font-size: 1.7rem; line-height: 1; }
.gestures button:active { transform: scale(.94); }
.gestures button.sent { background: var(--sage-soft); color: var(--sage); }
.mem-strip { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 16px; scrollbar-width: none; }
.mem-strip::-webkit-scrollbar { display: none; }
.mem-strip button { flex: none; width: 112px; }
.mem-strip .polaroid:nth-child(odd) { --rot: -2deg; }
.mem-strip button:nth-child(odd) .polaroid { --rot: 2deg; }
.status-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-s); }
.status-row .e { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--bg-2); font-size: 1.3rem; }
.status-row .t { flex: 1; min-width: 0; }
.status-row .t b { font-weight: 700; display: block; }
.status-row .t small { color: var(--ink-3); font-weight: 700; }
.status-row .rxs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.status-row .rxs .rx { min-height: 30px; }
.status-row.done { opacity: .75; }
.status-list { display: grid; gap: 8px; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick button { min-height: 40px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; font-size: .88rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.emoji-pick button .e { font-size: 1.15rem; }
.emoji-pick button.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.energy { display: flex; gap: 6px; }
.energy button { flex: 1; display: grid; gap: 4px; justify-items: center; padding: 8px 2px; border-radius: 14px; font-size: .74rem; font-weight: 800; color: var(--ink-2); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.energy button.on { background: var(--sage-soft); color: color-mix(in srgb, var(--sage) 70%, var(--ink)); box-shadow: inset 0 0 0 1.5px var(--sage); }
.color-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.color-pick button { width: 38px; height: 38px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5); }
.color-pick button.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--c); }
.ava-edit { display: flex; align-items: center; gap: 16px; }
.ava-edit .ava { --s: 84px; }

/* Neue Fotos im Editor */
.new-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.new-photos .np { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.new-photos .np img { width: 100%; height: 100%; object-fit: cover; }
.new-photos .np .rm { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.new-photos .np .gps { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .5); color: #fff; border-radius: 999px; font-size: .68rem; padding: 1px 6px; font-weight: 800; }
.new-photos .np.up::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .55); }
.new-photos .np.ok::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; font-weight: 900; background: rgba(90, 160, 100, .45); }
.new-photos .add { display: grid; place-items: center; gap: 2px; aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--line-2); color: var(--ink-2); font-weight: 800; font-size: .78rem; text-align: center; padding: 6px; }
.upbar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-top: 10px; }
.upbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* ================= Fotobetrachter ================= */
.viewer { position: fixed; inset: 0; z-index: 200; background: #0d0a08; color: #fff; display: flex; flex-direction: column; animation: fade .2s; }
.viewer .v-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 12px 10px; z-index: 2; }
.viewer .v-top .txt { flex: 1; min-width: 0; font-size: .9rem; font-weight: 700; color: rgba(255, 255, 255, .8); }
.viewer .v-top .txt b { color: #fff; display: block; font-size: 1rem; }
.viewer .icon-btn { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.viewer .v-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer .v-track::-webkit-scrollbar { display: none; }
.viewer .v-slide { flex: none; width: 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 0 0 calc(12px + var(--safe-b)); }
.viewer .v-slide img { max-width: 100%; max-height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.viewer .v-bot { display: flex; justify-content: center; gap: 10px; padding: 8px 12px calc(14px + var(--safe-b)); }
.viewer .v-bot .btn { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }
.viewer .v-nav { position: absolute; top: 50%; z-index: 2; margin-top: -21px; }
.viewer .v-nav.l { left: 12px; }
.viewer .v-nav.r { right: 12px; }
@media (hover: none) { .viewer .v-nav { display: none; } }

/* ================= Toasts & Konfetti ================= */
#toasts { position: fixed; z-index: 300; left: 0; right: 0; top: calc(12px + var(--safe-t)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 460px; padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--shadow-l); animation: tin .3s cubic-bezier(.2, 1.4, .4, 1); pointer-events: auto; }
.toast.err { background: var(--danger); color: #fff; }
.toast.out { animation: tout .25s forwards; }
@keyframes tin { from { transform: translateY(-16px) scale(.95); opacity: 0; } }
@keyframes tout { to { transform: translateY(-12px); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti span { position: absolute; top: -40px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
.float-heart { position: fixed; pointer-events: none; z-index: 400; font-size: 26px; animation: floatup 1s ease-out forwards; }
@keyframes floatup { to { transform: translateY(-80px) scale(1.4); opacity: 0; } }

.loading { display: grid; place-items: center; min-height: 60dvh; color: var(--ink-3); }
.loading .dot { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
