.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-bottom: 2px solid rgba(43, 36, 32, 0.08);
}

.children-switch {
  display: flex;
  gap: 8px;
}

.child-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--tap-radius);
  background: #fff;
  border: 2px solid transparent;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}
.child-pill .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: #fff;
}
.child-pill.active {
  color: var(--ink);
  border-color: var(--pill-color, var(--salome));
  background: var(--pill-soft, var(--salome-soft));
}

.points-summary {
  text-align: right;
}
.points-summary .big {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
}
.points-summary .small {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.tabbar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: var(--tap-radius);
  background: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}
.tab-btn.active {
  background: var(--ink);
  color: #fff;
}

#main {
  padding: 4px 16px 100px;
}

.task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  width: 100%;
  text-align: left;
}
.task-card .icon {
  font-size: 1.7rem;
  flex-shrink: 0;
}
.task-card .label {
  flex: 1;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}
.task-card .meta {
  margin-top: 4px;
}

.bonus-card {
  padding: 16px;
  border-radius: var(--card-radius);
  background: var(--bonus-soft);
  margin-bottom: 14px;
}
.bonus-card .title {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  color: #a5670a;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.bonus-card .bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(165, 103, 10, 0.15);
  overflow: hidden;
}
.bonus-card .bar-fill {
  height: 100%;
  background: var(--bonus);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.bonus-card .bar-label {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #a5670a;
  font-weight: 700;
}

.souper-note {
  text-align: center;
  padding: 30px 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.souper-note .icon { font-size: 2.4rem; margin-bottom: 6px; }

.reward-card {
  padding: 14px;
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  margin-bottom: 10px;
}
.reward-card .row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reward-card .icon { font-size: 1.7rem; }
.reward-card .label { flex: 1; font-weight: 700; }
.reward-card .price { font-size: 0.82rem; color: var(--ink-soft); }
.reward-card .controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border-radius: var(--tap-radius);
  padding: 4px;
}
.stepper button {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.stepper .qty {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
}
.buy-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--tap-radius);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.buy-btn:disabled {
  opacity: 0.4;
}

.footnote {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  padding: 6px 0 24px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--tap-radius);
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
