/* Spielplatz-Treff — one palette for the whole app.
   Teal = actions and "you", sunny yellow = favourites and the feedback button,
   warm coral = "Kein Kindergarten", on a soft sand background. */
:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #efebe2;
  --text: #1c2b2d;
  --muted: #5b6a6b;
  --line: #e3ddd0;

  --primary: #1e6e68;
  --primary-strong: #155550;
  --primary-soft: #dcefea;
  --on-primary: #ffffff;

  --sun: #f2b33d;
  --sun-soft: #fdf0d3;
  --on-sun: #3b2a05;

  --coral: #c4513a;
  --coral-soft: #fbe6df;
  --on-coral: #ffffff;

  --danger: #b3261e;
  --danger-soft: #fbe3e1;

  --header-from: #1e6e68;
  --header-to: #2a8a74;

  --shadow: 0 1px 2px rgba(28, 43, 45, .06), 0 4px 14px rgba(28, 43, 45, .06);
  --shadow-strong: 0 6px 20px rgba(28, 43, 45, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 66px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10191a;
    --surface: #182325;
    --surface-2: #1f2d2f;
    --text: #e9efee;
    --muted: #9fb0ae;
    --line: #2b3a3c;

    --primary: #5ec2b5;
    --primary-strong: #7ad3c7;
    --primary-soft: #1d3b38;
    --on-primary: #0b1e1c;

    --sun: #f4c25b;
    --sun-soft: #3a3020;
    --on-sun: #2a1e04;

    --coral: #f08c73;
    --coral-soft: #3d2621;
    --on-coral: #2a0f08;

    --danger: #ff8a80;
    --danger-soft: #3d2020;

    --header-from: #14403c;
    --header-to: #1b5249;

    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-strong: 0 6px 20px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
.icon { flex: none; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, var(--header-from), var(--header-to));
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.top .logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.top h1 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.01em; }

main { padding: 14px 16px; max-width: 560px; margin: 0 auto; }

h2 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; letter-spacing: -.01em; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 6px 2px; }
.hint {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--sun-soft); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px;
}
.hint .icon { color: var(--sun); margin-top: 1px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
.card.mine { background: var(--primary-soft); box-shadow: inset 0 0 0 1.5px var(--primary); }
.card.kita { background: var(--coral-soft); box-shadow: inset 4px 0 0 var(--coral), var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.row > .grow { flex: 1; min-width: 0; }
.name { font-weight: 650; }
.name, .muted, .feedback-text { overflow-wrap: anywhere; }

/* Playground card: star | name and description, button underneath */
.card.pg { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; align-items: start; padding-left: 8px; }
.card.pg > .grow { min-width: 0; padding-top: 10px; }
.card.pg > button:not(.star) { grid-column: 2; justify-self: start; margin-top: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: var(--coral); color: var(--on-coral);
  margin-left: 8px; vertical-align: 2px;
}
.avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 750; font-size: 17px;
}

/* ---------- buttons ---------- */
button, .btn {
  font: inherit; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px;
  border-radius: 14px; border: 0;
  background: var(--primary); color: var(--on-primary);
  box-shadow: 0 2px 0 var(--primary-strong);
  cursor: pointer;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
}
button:active { transform: translateY(1px) scale(.98); box-shadow: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
button.secondary { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
button.ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--line); }
button.danger { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
button.big { width: 100%; font-size: 18px; min-height: 58px; border-radius: 16px; }
button.wide { width: 100%; }
button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button.kita { background: var(--coral); color: var(--on-coral); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
button.choice {
  width: 100%; justify-content: flex-start;
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
  margin: 5px 0;
}
button.choice .icon { color: var(--muted); }
button.choice[aria-pressed="true"] { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); color: var(--text); }
button.choice[aria-pressed="true"] .icon { color: var(--primary); }
button:disabled { opacity: .55; }

button.star {
  flex: none; background: none; box-shadow: none;
  color: var(--muted); min-width: 44px; min-height: 44px; padding: 0;
  border-radius: 50%;
}
button.star.on { color: var(--sun); }
button.star:active { transform: scale(.88); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.segmented button.choice { margin: 0; justify-content: center; }
.actions { justify-content: flex-end; margin-top: 14px; }

/* ---------- forms ---------- */
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 5px; }
input[type="text"], input[type="email"], input[type="time"], input[type="search"], textarea {
  width: 100%; font: inherit; color: var(--text);
  min-height: 46px; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface);
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.stack > * + * { margin-top: 8px; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 16px; margin: 0; }
.switch input { width: 22px; height: 22px; accent-color: var(--primary); }
.error { color: var(--danger); font-size: 14px; }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 16px; padding: 0 14px;
  box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line);
}
.search .icon { color: var(--muted); }
.search input { border: 0; padding-left: 0; background: transparent; min-height: 50px; }
.search input:focus-visible { outline: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search button.clear {
  flex: none; min-height: 36px; width: 36px; padding: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); box-shadow: none;
}
.search button.clear[hidden] { display: none; }
.search:focus-within { box-shadow: var(--shadow), inset 0 0 0 2px var(--primary); }

/* ---------- bottom navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  box-shadow: 0 -1px 0 var(--line), 0 -6px 18px rgba(0, 0, 0, .05);
  padding: 4px 4px env(safe-area-inset-bottom);
}
.nav button {
  background: none; box-shadow: none; border-radius: 14px; color: var(--muted);
  min-height: var(--nav-h); padding: 6px 2px; font-size: 11.5px; font-weight: 650;
  flex-direction: column; gap: 3px;
}
.nav .ico {
  display: grid; place-items: center;
  width: 46px; height: 30px; border-radius: 999px;
  transition: background-color .15s ease;
}
.nav button[aria-current="page"] { color: var(--primary); }
.nav button[aria-current="page"] .ico { background: var(--primary-soft); }
.nav button:active { transform: scale(.96); }

/* ---------- feedback button and sheet ---------- */
.fab {
  position: fixed; z-index: 4;
  right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  width: 54px; height: 54px; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--sun); color: var(--on-sun);
  box-shadow: var(--shadow-strong);
}
.fab:active { transform: scale(.94); box-shadow: var(--shadow); }
dialog.sheet {
  width: min(520px, calc(100% - 24px)); max-height: calc(100% - 48px);
  border: 0; border-radius: 22px; padding: 18px 18px 16px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-strong);
}
dialog.sheet h2 { margin-top: 0; }
dialog::backdrop { background: rgba(16, 25, 26, .45); }

/* ---------- admin feedback list ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.tag.bug { background: var(--danger-soft); color: var(--danger); }
.tag.idea { background: var(--sun-soft); color: var(--on-sun); }
@media (prefers-color-scheme: dark) { .tag.idea { color: var(--sun); } }
.feedback-text { white-space: pre-wrap; margin: 10px 0 6px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; z-index: 5;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 84px);
  background: var(--text); color: var(--bg);
  padding: 12px 16px; border-radius: 14px; text-align: center;
  box-shadow: var(--shadow-strong);
}

/* ---------- greeting and notification bell ---------- */
.greet { margin-top: 4px; }
.greet h2 { margin: 6px 0; font-size: 20px; }
button.bell {
  position: relative; flex: none;
  width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--surface); color: var(--muted); box-shadow: var(--shadow);
}
button.bell.on { background: var(--primary-soft); color: var(--primary); }
.bell .dot {
  position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 0 2px var(--surface);
}
.big-bell { color: var(--primary); }
ol.steps { padding-left: 22px; margin: 10px 0; }
ol.steps li { margin: 8px 0; padding-left: 4px; }
ol.steps li::marker { color: var(--primary); font-weight: 750; }
.state { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.state.on { color: var(--primary); }

/* ---------- privacy notice ---------- */
.notice-title { font-size: 16px; margin: 18px 0 4px; }
.notice {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 4px 14px 10px; max-height: 46vh; overflow-y: auto; font-size: 14.5px;
}
.notice h3 { font-size: 14.5px; margin: 12px 0 2px; }
.notice p { margin: 2px 0 6px; color: var(--text); }
dialog .notice { max-height: 62vh; }
.switch.consent { align-items: flex-start; margin-top: 14px; font-size: 15px; }
.switch.consent input { margin-top: 2px; flex: none; }
