/* Bestispace – zuckersüßes Design, ganz ohne externe Fonts oder Bilder */

:root {
  --pink: #ff93b8;
  --pink-deep: #f2608f;
  --lilac: #b9a2ff;
  --mint: #86e3c4;
  --butter: #ffdf8e;
  --sky: #a9d9ff;
  --ink: #4a3b48;
  --ink-soft: #8a7a88;
  --paper: #ffffff;
  --paper-2: #fff7fa;
  --line: #f3e2ec;
  --shadow: 0 6px 20px rgba(214, 140, 175, .18);
  --shadow-soft: 0 2px 10px rgba(214, 140, 175, .12);
  --radius: 22px;
  /* Höhe der unteren Leiste. Wird beim Start per JS exakt gemessen
     (Emoji-Größe + Safe-Area unterscheiden sich je Gerät). */
  --nav-h: calc(64px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Kein height:100% auf html/body – sonst kann iOS den letzten Rest nicht freiscrollen */
html { scroll-padding-bottom: calc(var(--nav-h) + 14px); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(120px 120px at 8% 4%, rgba(255, 223, 142, .55), transparent 70%),
    radial-gradient(160px 160px at 96% 12%, rgba(185, 162, 255, .38), transparent 70%),
    radial-gradient(200px 200px at 50% 100%, rgba(134, 227, 196, .35), transparent 70%),
    linear-gradient(170deg, #fff4f8 0%, #fdf3ff 45%, #f1f8ff 100%);
  background-attachment: fixed;
  font: 16px/1.5 ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* Platz für die feste Leiste: gemessene Höhe + Luft, damit der letzte
     Kartenrand nicht dahinter verschwindet. */
  padding-bottom: calc(var(--nav-h) + 18px);
}

.app {
  max-width: 30rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Kopfzeile ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 2px 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #fff5f9 65%, rgba(255, 245, 249, 0));
  backdrop-filter: blur(6px);
}
.brand {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -.02em;
  color: var(--pink-deep);
  white-space: nowrap;
}
.spark { color: var(--lilac); }

.duo {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  font: inherit;
  color: var(--ink);
  max-width: 58%;
}
.duo:active { transform: scale(.98); }
.mini-av {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1rem;
  background: var(--paper-2);
  border: 2px solid var(--line);
  flex: 0 0 auto;
}
.duo-names {
  display: flex; align-items: baseline; gap: 4px;
  font-size: .8rem;
  overflow: hidden;
  white-space: nowrap;
}
.duo-names b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 5.6em; }
.duo-names i { color: var(--pink); font-style: normal; }

/* ---------- Ansichten ---------- */
.view { display: grid; gap: 12px; padding: 4px 0 10px; }
.view.hidden, .hidden { display: none !important; }

.card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card.soft {
  background: linear-gradient(135deg, #fff9fc, #f7f2ff);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px;
}
.card-head h3, .card-head h2 { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.page-head { padding: 6px 2px 0; }
.page-head h2 { font-size: 1.3rem; }

h2 { letter-spacing: -.02em; }
p { margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .84rem; }
.center { text-align: center; }
.pill {
  font-size: .7rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: #fff0f6; color: var(--pink-deep);
  border: 1px solid #ffdce9;
  white-space: nowrap;
}

.hello { display: flex; align-items: center; gap: 12px; }
.hello h2 { margin: 0 0 2px; font-size: 1.15rem; }
.hello p { color: var(--ink-soft); font-size: .85rem; }
.hello-art {
  font-size: 2rem;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: #fff0f6;
  border: 2px solid #ffe1ec;
  flex: 0 0 auto;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  font: inherit;
  font-weight: 700;
  font-size: .92rem;
  border-radius: 16px;
  padding: 12px 16px;
  border: 2px solid transparent;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper-2);
  transition: transform .1s ease, filter .15s ease;
}
.btn:active { transform: scale(.975); }
.btn.block { display: block; width: 100%; margin-top: 10px; }
.btn.small { font-size: .8rem; padding: 8px 12px; border-radius: 12px; }
.btn.candy {
  background: linear-gradient(135deg, #ffa5c3, #ff7ea8);
  color: #fff;
  box-shadow: 0 6px 16px rgba(242, 96, 143, .32);
}
.btn.lilac {
  background: linear-gradient(135deg, #c9b6ff, #a98cff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(169, 140, 255, .3);
}
.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-soft);
}
.btn.ghost:hover { color: var(--ink); }
.btn.danger { color: #e0476f; border-color: #ffd3e0; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Challenge ---------- */
.challenge-text { font-size: 1rem; line-height: 1.5; margin-bottom: 12px; }
.ch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-actions .btn { flex: 1 1 auto; }
.streak {
  margin-top: 12px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--pink-deep);
  background: #fff3f8;
  border: 2px dashed #ffd9e6;
  border-radius: 12px;
  padding: 6px 10px;
  text-align: center;
}

/* ---------- Pflanze (Heute) ---------- */
.plant-mini { display: flex; align-items: center; gap: 12px; }
.plant-emoji {
  font-size: 1.9rem;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: #f2fbf7;
  border: 2px solid #d9f4e9;
  flex: 0 0 auto;
}
.plant-emoji svg { width: 38px; height: auto; display: block; }
.plant-mini-info b { display: block; font-size: .95rem; }
.plant-mini-info p { font-size: .8rem; color: var(--ink-soft); }

/* ---------- Chat ---------- */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.seg.mini { margin: 0 auto 12px; max-width: 20rem; }
.seg-btn {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.seg-btn.active { background: linear-gradient(135deg, #ffe3ef, #f6ecff); color: var(--pink-deep); }

.chat-note {
  font-size: .74rem;
  color: var(--ink-soft);
  text-align: center;
  padding: 0 8px;
}

.chat-scroll {
  height: min(52vh, 24rem);
  overflow-y: auto;
  padding: 4px 2px 10px;
  scroll-behavior: smooth;
}
.msg-list { display: grid; gap: 8px; align-content: start; }

.msg { display: flex; gap: 6px; align-items: flex-end; max-width: 88%; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .85rem;
  background: #fff;
  border: 2px solid var(--line);
  flex: 0 0 auto;
}
.bubble {
  padding: 9px 13px;
  border-radius: 18px;
  font-size: .9rem;
  line-height: 1.45;
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: var(--shadow-soft);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.msg.me .bubble {
  background: linear-gradient(135deg, #ffb3cc, #ff92b7);
  border-color: #ffa8c4;
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg:not(.me) .bubble { border-bottom-left-radius: 6px; }
.msg.bot .bubble {
  background: linear-gradient(135deg, #f2ecff, #e9f6ff);
  border-color: #e4d9ff;
}
.msg .time { font-size: .62rem; color: #b9aab6; margin: 0 6px 2px; }

.composer {
  position: sticky;
  bottom: calc(var(--nav-h) + 8px);
  display: flex;
  gap: 8px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}
.composer input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  font-size: .92rem;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.send {
  appearance: none;
  border: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffa5c3, #ff7ea8);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(242, 96, 143, .35);
}

/* ---------- Wall ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.polaroid {
  appearance: none;
  border: none;
  background: #fff;
  border-radius: 6px;
  padding: 8px 8px 26px;
  box-shadow: 0 6px 18px rgba(160, 120, 145, .22);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  position: relative;
  transition: transform .15s ease;
}
.polaroid:nth-child(odd) { transform: rotate(-1.6deg); }
.polaroid:nth-child(even) { transform: rotate(1.4deg); }
.polaroid:hover { transform: rotate(0) translateY(-2px); }
.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  background: #f4eef2;
  display: block;
}
.polaroid .cap {
  position: absolute;
  left: 8px; right: 8px; bottom: 6px;
  font-size: .72rem;
  color: var(--ink-soft);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.polaroid .pin {
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%);
  font-size: .9rem;
}
.empty {
  text-align: center;
  font-size: .86rem;
  color: var(--ink-soft);
  padding: 26px 10px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
}

/* ---------- Kalender ---------- */
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px;
}
.cal-head h2 { margin: 0; font-size: 1.15rem; }
.nav-btn {
  appearance: none;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 12px;
  width: 34px; height: 34px;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.cal-weekdays span {
  text-align: center;
  font-size: .68rem;
  color: var(--ink-soft);
  font-weight: 700;
}
.cal-grid { margin-top: 2px; }
.day {
  appearance: none;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, .75);
  border-radius: 12px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font: inherit;
  font-size: .82rem;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.day.out { color: #d9cbd4; background: transparent; }
.day.today { border-color: var(--pink); background: #fff0f6; font-weight: 800; }
.day.sel { border-color: var(--lilac); background: #f4efff; }
.day .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--pink-deep); }
.day .dot.friend { background: var(--lilac); }
.ev-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: .86rem;
}
.ev-row:last-child { border-bottom: none; }
.ev-row .when {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink-soft);
  min-width: 3.1rem;
}
.ev-row .tag {
  font-size: .62rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff0f6;
  color: var(--pink-deep);
  border: 1px solid #ffdbe8;
  margin-left: auto;
  white-space: nowrap;
}
.ev-row .tag.friend { background: #f4efff; color: #7a5cd6; border-color: #e6dbff; }
.ev-del {
  appearance: none; border: none; background: transparent;
  color: #c9b6c1; font-size: .9rem; cursor: pointer; padding: 2px 4px;
}

/* ---------- Garten ---------- */
.garden-sky {
  display: flex; justify-content: space-around;
  font-size: 1.2rem; opacity: .8;
  padding: 0 10px;
  animation: drift 12s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translateX(-6px); }
  to { transform: translateX(6px); }
}

.plant-card { background: linear-gradient(180deg, #ffffff, #fbfffc); }
.plant-stage {
  min-height: 11.5rem;
  display: grid;
  place-items: center;
  gap: 6px;
  align-content: center;
  border-radius: 18px;
  background:
    radial-gradient(60% 40% at 50% 92%, rgba(134, 227, 196, .45), transparent 70%),
    #f4fbf7;
  border: 2px solid #e2f5ec;
  margin-bottom: 6px;
  padding: 12px 8px 10px;
  position: relative;
}

/* ---------- Töpfe ---------- */
.pot {
  display: grid;
  justify-items: center;
  position: relative;
  width: 100%;
  max-width: 58px;
}
.pot.big { max-width: 92px; }
.pot-plant {
  width: 100%;
  display: grid;
  place-items: center;
  margin-bottom: -3px;
  animation: sway 5s ease-in-out infinite;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 2px 3px rgba(90, 70, 60, .16));
}
.pot-plant svg { display: block; width: 100%; max-width: 46px; height: auto; }
.pot.big .pot-plant svg { max-width: 104px; }

.pot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.pot-body {
  width: 100%;
  height: var(--pot-h, 32px);
  background-color: var(--pot, #ff93b8);
  background-image: var(--pot-pattern, none);
  background-size: var(--pot-size, auto);
  clip-path: var(--pot-clip, polygon(8% 0, 92% 0, 80% 100%, 20% 100%));
  border-radius: var(--pot-radius, 2px);
  box-shadow: inset -8px 0 10px rgba(0, 0, 0, .14), inset 8px 0 10px rgba(255, 255, 255, .22);
}
.pot-rim {
  width: 104%;
  height: 10px;
  border-radius: 5px 5px 3px 3px;
  background-color: var(--pot, #ff93b8);
  background-image: var(--pot-pattern, none);
  background-size: var(--pot-size, auto);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 1px 0 rgba(0, 0, 0, .16);
  margin-bottom: 1px;
}
.pot.big .pot-body { height: calc(var(--pot-h, 32px) * 1.5); }
.pot.big .pot-rim { height: 13px; }

/* Topfformen */
.shape-classic { --pot-h: 32px; }
.shape-tall {
  --pot-h: 44px;
  --pot-clip: polygon(17% 0, 83% 0, 76% 100%, 24% 100%);
}
.shape-round {
  --pot-h: 30px;
  --pot-clip: none;
  --pot-radius: 6px 6px 46% 46% / 5px 5px 60% 60%;
}
.shape-square {
  --pot-h: 30px;
  --pot-clip: none;
  --pot-radius: 4px 4px 9px 9px;
}

.pot-badge {
  position: absolute;
  right: -4px;
  bottom: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .56rem;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  line-height: 1;
}

/* Muster */
.pat-plain { --pot-pattern: none; }
.pat-stripes {
  --pot-pattern: repeating-linear-gradient(90deg, rgba(255, 255, 255, .62) 0 4px, rgba(255, 255, 255, 0) 4px 10px);
}
.pat-dots {
  --pot-pattern: radial-gradient(circle at 3px 3px, rgba(255, 255, 255, .8) 2.1px, rgba(255, 255, 255, 0) 2.5px);
  --pot-size: 9px 9px;
}
.pat-checks {
  --pot-pattern:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .5) 0 4px, rgba(255, 255, 255, 0) 4px 8px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .1) 0 4px, rgba(0, 0, 0, 0) 4px 8px);
}
.pat-hearts {
  --pot-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13'%3E%3Cpath d='M6.5 11.4 L2.2 7.1 A2.6 2.6 0 0 1 6.5 4 A2.6 2.6 0 0 1 10.8 7.1 Z' fill='rgba(255,255,255,0.8)'/%3E%3C/svg%3E");
}
.pat-waves {
  --pot-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M0 5.5 Q3 1.5 6 5.5 T12 5.5' fill='none' stroke='rgba(255,255,255,0.85)' stroke-width='1.7'/%3E%3C/svg%3E");
}
.pat-stars {
  --pot-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Cpath d='M7.5 1.6 L9.2 5.4 L13.3 5.9 L10.3 8.7 L11.1 12.8 L7.5 10.7 L3.9 12.8 L4.7 8.7 L1.7 5.9 L5.8 5.4 Z' fill='rgba(255,255,255,0.85)'/%3E%3C/svg%3E");
}
.pat-leaves {
  --pot-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 12 C2 6 6 2 12 2 C12 8 8 12 2 12 Z' fill='rgba(255,255,255,0.78)'/%3E%3Cpath d='M2.5 11.5 L9 5' stroke='rgba(0,0,0,0.12)' stroke-width='1'/%3E%3C/svg%3E");
}
.pat-gingham {
  --pot-pattern:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .55) 0 5px, rgba(255, 255, 255, 0) 5px 11px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 5px, rgba(255, 255, 255, 0) 5px 11px);
}

/* ---------- Holzregal ---------- */
.shelf {
  border-radius: 14px;
  padding: 10px 10px 4px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 2px, rgba(0, 0, 0, 0) 2px 9px),
    linear-gradient(180deg, #c58f59 0%, #ab7745 55%, #96633a 100%);
  border: 3px solid #7d5330;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .2), 0 8px 18px rgba(120, 80, 45, .26);
}
.shelf-level { display: block; }
.pot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 3px;
  padding: 6px 2px 0;
  min-height: 88px;
}
.slot {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 2px;
  width: 100%;
  position: relative;
}
.slot-btn, .slot-holder {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 100%;
  display: grid;
  justify-items: center;
}
.slot-holder { cursor: default; }
.slot-btn:active { transform: scale(.96); }
/* Namensschild sitzt auf der Brettkante, damit der Topf direkt auf dem Holz steht */
.slot .nm {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  z-index: 2;
  font-size: .56rem;
  font-weight: 700;
  color: #5b3a1e;
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  padding: 1px 6px;
  max-width: 97%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(60, 35, 12, .3);
}
.slot.empty .pot-body {
  background-color: rgba(255, 255, 255, .16);
  background-image: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45);
}
.slot.empty .pot-rim {
  background-color: rgba(255, 255, 255, .2);
  background-image: none;
  box-shadow: none;
}
.slot.empty .pot-plant {
  opacity: .38;
  animation: none;
}
.slot.empty .pot-plant svg { max-width: 26px; }

.plank {
  height: 13px;
  margin-top: 0;
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 3px, rgba(0, 0, 0, 0) 3px 11px),
    linear-gradient(180deg, #d7a068, #9a6738);
  box-shadow:
    0 2px 0 rgba(70, 44, 22, .55),
    0 8px 14px rgba(70, 44, 22, .3),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  margin-bottom: 14px;
}
.shelf-level:last-child .plank { margin-bottom: 2px; }
.shelf-note { margin-bottom: 10px; }

/* ---------- Topf-Auswahl ---------- */
.pot-stage {
  display: grid;
  place-items: center;
  min-height: 8.5rem;
  border-radius: 16px;
  background:
    radial-gradient(60% 40% at 50% 92%, rgba(134, 227, 196, .4), transparent 70%),
    #f7fbf9;
  border: 2px solid #e6f4ee;
  margin-bottom: 12px;
}
.pot-colors, .pot-patterns, .pot-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.pot-color {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--line);
  cursor: pointer;
  padding: 0;
}
.pot-color.active { box-shadow: 0 0 0 3px var(--pink-deep); }
.pot-pattern-tile {
  appearance: none;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 56px;
  height: 52px;
  padding: 4px 2px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .52rem;
  color: var(--ink-soft);
}
.pot-pattern-tile.active { border-color: var(--pink); background: #fff0f6; color: var(--pink-deep); }
.mini-pot {
  width: 26px;
  height: calc(var(--pot-h, 32px) * .62);
  background-color: var(--pot, #ff93b8);
  background-image: var(--pot-pattern, none);
  background-size: var(--pot-size, auto);
  clip-path: var(--pot-clip, polygon(9% 0, 91% 0, 79% 100%, 21% 100%));
  border-radius: var(--pot-radius, 2px);
}
@keyframes sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
.plant-tag {
  font-size: .72rem;
  font-weight: 700;
  color: #2e9c78;
  background: #e8fbf3;
  border: 1px solid #c9f0e2;
  border-radius: 999px;
  padding: 2px 10px;
}
.name-input {
  width: 100%;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  color: var(--ink);
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fffafc;
  outline: none;
}
.name-input:focus { border-color: var(--pink); background: #fff; }

.dots { display: flex; justify-content: center; gap: 7px; margin: 12px 0 6px; }
.dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #eee2e9;
  display: block;
}
.dots i.full { background: linear-gradient(135deg, #9be7cb, #6ed7b3); }

.secret-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #f7f2ff, #eef8ff);
  border-color: #e6dcff;
}
.secret-art {
  font-size: 1.8rem;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: #fff;
  border: 2px dashed #ddd0ff;
  flex: 0 0 auto;
}
.secret-card p { font-size: .84rem; color: #6b5b7a; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--line);
}
.tab {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 1.15rem;
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 5px 2px;
  border-radius: 14px;
  color: var(--ink-soft);
  cursor: pointer;
}
.tab span { font-size: .6rem; font-weight: 700; letter-spacing: .01em; }
.tab.active { background: linear-gradient(135deg, #ffeaf2, #f3ecff); color: var(--pink-deep); }

/* ---------- Sheets ---------- */
.backdrop {
  position: fixed; inset: 0;
  background: rgba(74, 59, 72, .32);
  backdrop-filter: blur(2px);
  z-index: 40;
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  max-width: 30rem;
  margin: 0 auto;
  background: #fff;
  border-radius: 26px 26px 0 0;
  border: 2px solid var(--line);
  border-bottom: none;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(160, 120, 145, .28);
  max-height: 88vh;
  overflow-y: auto;
}
.sheet-grip {
  width: 46px; height: 5px;
  border-radius: 999px;
  background: #f0dfe8;
  margin: 2px auto 12px;
}
.sheet h2 { margin: 0 0 4px; font-size: 1.1rem; }
.sheet > p { margin-bottom: 12px; }

.profile-block {
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fffafc;
}
.profile-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .9rem; }
.avatar {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: var(--shadow-soft);
  background: #ffe3ef;
}

.field { position: relative; display: block; margin-bottom: 10px; }
.field input {
  width: 100%;
  font: inherit;
  font-size: .92rem;
  padding: 16px 12px 8px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.field input:focus { border-color: var(--pink); }
.field span {
  position: absolute;
  left: 12px; top: 5px;
  font-size: .64rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .02em;
}

.picker, .colors, .who-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.pick {
  appearance: none;
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 12px;
  width: 38px; height: 38px;
  font-size: 1.1rem;
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
}
.pick.active { border-color: var(--pink); background: #fff0f6; }
.swatch {
  appearance: none;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--line);
  border-radius: 50%;
  width: 28px; height: 28px;
  cursor: pointer;
  padding: 0;
}
.swatch.active { box-shadow: 0 0 0 3px var(--pink-deep); }

.who-row { margin: 10px 0; }
.chip {
  appearance: none;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
}
.chip.active { background: #fff0f6; border-color: var(--pink); color: var(--pink-deep); }

.photo-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: #f8f2f6 center/cover no-repeat;
  border: 2px dashed var(--line);
  margin-bottom: 12px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(40, 30, 40, .9);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 20px;
}
.lightbox img {
  max-width: 100%;
  max-height: 68vh;
  border-radius: 8px;
  border: 6px solid #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.lightbox p { color: #fff; font-size: .88rem; text-align: center; }
.lb-actions { display: flex; gap: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 34px);
  transform: translateX(-50%);
  z-index: 70;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow);
  max-width: 88vw;
  text-align: center;
  animation: popin .18s ease;
}
@keyframes popin {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (min-width: 30rem) {
  .wall { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
