:root {
  --heading-font: "Quicksand", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body-font: "Quicksand", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #edf6fb;
  --text: #22313f;
  --muted: #627181;
  --border: #dce6ee;
  --accent: #f6a81d;
  --accent-dark: #22313f;
  --accent-blue: #3f91d8;
  --accent-green: #8bc34a;
  --good: #6aa82f;
  --warn: #d88912;
  --shadow: 0 18px 50px rgba(34, 49, 63, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-weight: 520;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 250, 252, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar, .container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--heading-font);
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-blue);
  color: #fff;
}
.brand-image {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}
.nav-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 9px 12px;
}
.nav {
  display: none;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 74px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav.is-open { display: grid; gap: 8px; }
.nav a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover, .nav a.is-active { background: var(--surface-soft); color: var(--text); }
.hero {
  padding: 56px 0 38px;
  display: grid;
  gap: 28px;
}
.hero h1, h1 {
  font-family: var(--heading-font);
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}
h2 {
  font-family: var(--heading-font);
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  line-height: 1.1;
  margin: 0 0 14px;
}
h3 {
  font-family: var(--heading-font);
  margin: 0 0 8px;
}
p { color: var(--muted); }
.lead { font-size: 1.12rem; max-width: 720px; }
.eyebrow {
  color: var(--accent-blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
}
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(246, 168, 29, .20);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover, button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(34, 49, 63, .12);
}
.button.secondary, button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.button.danger, button.danger {
  background: #fff;
  color: #b74a2c;
  border: 1px solid #efc4b6;
  box-shadow: none;
}
.small-button {
  width: fit-content;
  min-height: 36px;
  padding: 8px 12px;
  font-size: .9rem;
}
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card, .panel, .auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 28px rgba(34, 49, 63, .06);
}
.section { padding: 36px 0; }
.hero-visual {
  min-height: 280px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(63,145,216,.94), rgba(139,195,74,.88) 58%, rgba(246,168,29,.92)),
    url('/assets/icons/icon.svg') center/180px no-repeat;
  color: #fff;
  display: grid;
  align-content: end;
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero-visual p { color: rgba(255,255,255,.88); }
.app-shell {
  min-height: 100vh;
  display: block;
  background:
    linear-gradient(180deg, rgba(247,250,252,.92), rgba(237,246,251,.92)),
    radial-gradient(circle at 12% 0%, rgba(63,145,216,.10), transparent 28%),
    radial-gradient(circle at 100% 12%, rgba(139,195,74,.12), transparent 24%);
}
.sidebar {
  background: var(--accent-dark);
  color: #fff;
  padding: 10px 16px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sidebar a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
}
.sidebar a:hover, .sidebar a.is-active { background: rgba(255,255,255,.10); color: #fff; }
.sidebar .brand span { display: none; }
.sidebar-user {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav { display: none; }
.sidebar-logout {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .86rem;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
}
.child-topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.child-topbar .brand {
  color: var(--text);
}
.child-topbar .brand span {
  display: inline;
}
.child-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}
.main {
  padding: 16px 14px 86px;
  width: min(980px, 100%);
  margin: 0 auto;
}
.mobile-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 30;
  box-shadow: 0 -10px 28px rgba(34, 49, 63, .10);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tabs a {
  min-height: 58px;
  min-width: 86px;
  flex: 1 0 auto;
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 8px 4px;
  text-align: center;
  font-size: .76rem;
  font-weight: 800;
  color: var(--muted);
  text-decoration: none;
}
.mobile-tabs a:hover { color: var(--accent-blue); }
.tab-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--accent-blue);
  font-family: "Material Symbols Rounded";
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1;
  font-feature-settings: "liga";
}
.icon-points::before { content: "stars"; }
.icon-tasks::before { content: "task_alt"; }
.icon-shop::before { content: "storefront"; color: var(--accent); }
.icon-spent::before { content: "payments"; color: #b74a2c; }
.icon-home::before { content: "home"; }
.icon-family::before,
.icon-users::before { content: "groups"; }
.icon-pages::before { content: "article"; }
.icon-faq::before { content: "quiz"; }
.icon-nav::before { content: "near_me"; }
.icon-settings::before { content: "settings"; }
.icon-account::before { content: "account_circle"; }
.icon-setup::before { content: "rocket_launch"; }
.icon-rocket::before { content: "emoji_events"; }
.icon-bell::before { content: "notifications"; }
.icon-save::before { content: "check"; }
.icon-delete::before { content: "delete"; }
.icon-edit::before { content: "edit"; }
.stat {
  font-size: 2.4rem;
  font-weight: 850;
  color: var(--accent-blue);
}
.points-big {
  font-size: clamp(3.4rem, 20vw, 7rem);
  font-weight: 900;
  color: var(--accent-blue);
  line-height: .95;
}
.points-hero {
  text-align: center;
  border-color: rgba(63,145,216,.25);
  background: linear-gradient(180deg, #fff, #edf6fb);
}
.child-welcome {
  display: grid;
  gap: 18px;
  text-align: left;
}
.child-welcome-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.child-welcome-head .avatar-badge {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 36px;
  background: #fff;
}
.child-welcome-head h1 {
  margin-bottom: 2px;
  font-size: clamp(2rem, 7vw, 3.8rem);
}
.child-welcome-head p:last-child {
  margin: 0;
}
.points-main {
  text-align: center;
}
.points-main > p:first-child {
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--muted);
}
.milestone-box {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  text-align: left;
}
.milestone-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .9rem;
}
.milestone-top span {
  color: var(--muted);
}
.milestone-bar {
  height: 12px;
  border-radius: 999px;
  background: #dce6ee;
  overflow: hidden;
}
.milestone-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green), var(--accent));
}
.milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.milestones span {
  min-width: 34px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 850;
  font-size: .82rem;
}
.milestones span.is-done {
  border-color: rgba(106,168,47,.35);
  background: #eef8e8;
  color: var(--good);
}
.child-space .cards {
  grid-template-columns: 1fr;
}
.task-list {
  display: grid;
  gap: 8px;
}
.task-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.task-row h3 {
  margin: 0;
  font-size: 1rem;
}
.task-row p {
  margin: 2px 0 0;
  font-size: .88rem;
}
.task-row button {
  min-height: 36px;
  padding: 7px 11px;
}
.task-row .icon-button {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 8px;
}
.icon-button .tab-icon {
  margin: 0;
}
.task-row--readonly {
  grid-template-columns: 1fr auto;
}
.child-task-panel h1 {
  margin-bottom: 4px;
}
.child-task-row {
  grid-template-columns: 1fr auto auto;
  border-color: rgba(63,145,216,.22);
}
.child-task-row h3 {
  font-size: 1.08rem;
}
.task-row--wide {
  grid-template-columns: minmax(150px, 1.1fr) minmax(180px, 1.2fr) minmax(74px, .5fr) minmax(74px, .5fr) auto auto auto;
}
.points-pill {
  min-width: 70px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  place-items: center;
  border-radius: 8px;
  background: #edf6fb;
  color: var(--accent-blue);
  font-weight: 900;
  line-height: 1;
}
.points-pill small {
  display: block;
  font-size: .66rem;
  font-weight: 800;
  margin-left: 2px;
}
.points-pill--cost {
  background: #fff7e5;
  color: #9b6507;
}
.milestone-note {
  margin: 2px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff7e5;
  color: #7a5207;
  font-weight: 800;
}
.compact-input {
  width: 76px;
  font-size: .82rem;
  gap: 3px;
}
.compact-input input {
  padding: 6px 8px;
  min-height: 34px;
}
.compact-cards {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--accent-blue);
  border: 1px solid var(--border);
  font-family: "Material Symbols Rounded";
  font-size: 28px;
  font-weight: 600;
}
.avatar-badge--emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", var(--body-font);
  font-size: 24px;
  line-height: 1;
}
.avatar-badge::before { content: "star"; }
.avatar-badge.avatar-badge--emoji::before {
  content: none;
}
.avatar-badge--sun::before { content: "wb_sunny"; color: var(--accent); }
.avatar-badge--bolt::before { content: "bolt"; color: var(--accent-blue); }
.avatar-badge--heart::before { content: "favorite"; color: #d95b73; }
.child-card {
  display: grid;
  gap: 8px;
}
.children-page .compact-head h1 {
  margin-bottom: 4px;
}
.children-page .compact-head p:last-child {
  margin: 0;
}
.children-list {
  display: grid;
  gap: 8px;
}
.children-list-head,
.child-list-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, .95fr) auto;
  gap: 14px;
  align-items: center;
}
.family-list-head,
.family-list-row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, .8fr) minmax(160px, .95fr) auto;
}
.children-list-head {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
  padding: 0 12px;
}
.child-list-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(34,49,63,.04);
}
.child-list-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.child-list-main h3,
.child-list-main p {
  margin: 0;
}
.child-list-main h3 {
  font-size: 1.08rem;
}
.child-list-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.child-list-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdff;
}
.child-list-meta span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.child-list-meta strong {
  color: var(--text);
  white-space: nowrap;
}
.child-list-row code {
  display: inline-flex;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  overflow-wrap: anywhere;
  font-size: .9rem;
  font-weight: 850;
}
.family-add-parent {
  min-width: min(360px, 100%);
}
.family-add-parent summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.family-add-parent summary::-webkit-details-marker {
  display: none;
}
.family-add-parent-form {
  margin-top: 10px;
}
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.row-actions form {
  margin: 0;
}
.dashboard-shortcut {
  text-decoration: none;
}
.dashboard-shortcut h3,
.dashboard-shortcut p {
  margin: 0;
}
.dashboard-shortcuts {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0;
}
.bulk-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: .86rem;
}
.bulk-check input {
  width: 18px;
  height: 18px;
}
.trust-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}
.trust-box summary {
  cursor: pointer;
  font-weight: 850;
}
.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trust-points span {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}
.family-member-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.family-member-groups--full {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 12px;
}
.family-member-groups > div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.family-member-groups h3,
.family-member-groups p {
  margin: 0 0 6px;
}
.admin-member {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdff;
  margin: 8px 0;
  overflow: hidden;
}
.admin-member summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 850;
}
.admin-member form {
  border-top: 1px solid var(--border);
  padding: 10px;
}
.status-chip {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 850;
}
.child-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  box-shadow: 0 8px 28px rgba(34, 49, 63, .06);
}
.child-detail-head .avatar-badge {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  font-size: 32px;
  background: #fff;
}
.child-detail-head h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}
.child-detail-stats,
.child-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.child-detail-stats span,
.child-detail-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
}
.child-detail-links {
  margin-top: 8px;
}
.child-detail-links a:hover {
  color: var(--accent-blue);
  background: #fff;
}
.child-manage-section {
  display: grid;
  gap: 14px;
}
.child-admin-helper {
  margin: 6px 0 2px;
}
.child-admin .task-row--wide {
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.4fr) minmax(76px, .45fr) minmax(70px, auto) auto auto auto;
  align-items: center;
}
.child-admin .task-list {
  gap: 10px;
}
.child-admin .task-list .task-row {
  border-color: #d9e7f3;
  box-shadow: 0 4px 14px rgba(34, 49, 63, .035);
}
.motivation-active-panel {
  display: grid;
  gap: 10px;
  margin-top: 0;
  background: #fbfdff;
}
.motivation-active-panel h3 {
  margin: 0;
  font-size: 1.05rem;
}
.panel-soft {
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}
.setup-wizard {
  gap: 14px;
}
.setup-hero {
  display: grid;
  gap: 14px;
  align-items: end;
}
.setup-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}
.setup-mode-note {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff7e5;
  color: var(--text);
}
.setup-mode-note span {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}
.setup-choice-intro {
  border-color: rgba(63,145,216,.28);
  background: linear-gradient(180deg, #fff, #f7fbff);
}
.setup-tour-meta {
  display: grid;
  gap: 4px;
  margin: 12px 0 14px;
  padding: 13px 14px;
  border: 1px solid #d9e7f3;
  border-left: 4px solid var(--accent-blue);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5faff);
  box-shadow: 0 8px 18px rgba(34, 49, 63, .04);
}
.setup-tour-meta strong {
  color: var(--accent-blue);
  font-size: .82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.setup-tour-meta span {
  color: var(--muted);
  font-size: .94rem;
  font-weight: 700;
}
.setup-flow {
  gap: 12px;
}
.setup-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 16px;
}
.setup-step h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}
.setup-step-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.setup-step-nav--single {
  justify-content: flex-end;
}
.setup-step-nav .button,
.setup-step-nav button {
  min-width: min(220px, 100%);
}
.child-setup-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.child-access-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.child-setup-span-2 {
  grid-column: span 2;
}
.child-access-span-2 {
  grid-column: span 2;
}
.setup-subsection {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.setup-subsection h3 {
  margin: 0;
  font-size: 1rem;
}
.step-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-dark);
  color: #fff;
  font-weight: 900;
}
.choice-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.choice-card--mode {
  min-height: 100%;
}
.choice-card:has(input:checked) {
  border-color: rgba(63,145,216,.42);
  background: var(--surface-soft);
}
.switch-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}
.switch-line input {
  width: auto;
  margin-top: 4px;
}
.focus-grid {
  margin-top: 12px;
}
.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.form-grid--passwords {
  margin-top: 12px;
}
.choice-card {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-weight: 500;
}
.choice-card input {
  width: auto;
  margin-top: 4px;
}
.choice-card span {
  display: grid;
  gap: 4px;
}
.choice-card small {
  color: var(--muted);
}
.points-calculator {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}
.points-calculator > p {
  margin: 0;
}
.calculator-result {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}
.calculator-result > span {
  color: var(--muted);
  font-weight: 800;
}
.calculator-result strong {
  font-family: var(--heading-font);
  font-size: 1.9rem;
  color: var(--accent-blue);
}
.calculator-result small {
  color: var(--muted);
}
.setup-wizard .calculator-hint {
  gap: 10px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-soft) 70%, white 30%);
  border-color: color-mix(in srgb, var(--border) 80%, white 20%);
}
.calculator-toggle {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7fbff;
  box-shadow: 0 6px 18px rgba(34, 49, 63, .04);
}
.calculator-toggle summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 14px;
  font-weight: 800;
  color: var(--text);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.calculator-toggle summary::-webkit-details-marker {
  display: none;
}
.calculator-toggle summary::before {
  content: "💡";
  font-size: 1rem;
  flex: 0 0 auto;
}
.calculator-toggle summary::after {
  content: "Rechner öffnen";
  color: var(--accent-blue);
  font-size: .9rem;
  font-weight: 700;
  flex: 0 0 auto;
  justify-self: end;
}
.calculator-toggle[open] summary::after {
  content: "Rechner schließen";
}
.calculator-toggle .points-calculator {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
}
.setup-wizard .calculator-hint > p {
  color: var(--muted);
  font-size: 0.96rem;
}
.setup-wizard .calculator-hint .calculator-result {
  gap: 2px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
}
.setup-wizard .calculator-hint .calculator-result > span {
  color: var(--muted);
  font-weight: 800;
}
.setup-wizard .calculator-hint .calculator-result strong {
  font-family: var(--heading-font);
  font-size: 1.9rem;
  color: var(--accent-blue);
  font-weight: 800;
}
.setup-wizard .calculator-hint .calculator-result strong span {
  color: inherit;
  font: inherit;
  font-weight: inherit;
}
.setup-wizard .calculator-hint .calculator-result small {
  color: var(--muted);
}
.free-entry-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}
.free-entry-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.2fr) minmax(86px, .35fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}
.free-entry-row label {
  display: grid;
  gap: 5px;
  font-size: .86rem;
  color: var(--muted);
  font-weight: 800;
}
.free-entry-row label span {
  padding-left: 2px;
}
.free-entry-row input {
  background: #fff;
}
.free-setup-section h3 {
  margin-top: 18px;
}
.free-setup-section .form-actions {
  margin-top: 18px;
}
.catalog-groups {
  display: grid;
  gap: 14px;
}
.catalog-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fcff;
}
.catalog-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.catalog-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.catalog-group-note {
  margin: 4px 0 0;
  font-size: .9rem;
}
.catalog-group-head h3,
.catalog-group h3 {
  margin: 0;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 8px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .85rem; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: var(--text); font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field-action-row {
  display: grid;
  gap: 8px;
}
.field-stack {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}
.field-stack--password label {
  margin: 0;
}
.setup-step .field-stack label {
  margin: 0;
}
.field-stack--password input {
  min-height: 48px;
}
.field-action-row .button,
.field-action-row button {
  width: 100%;
  justify-self: stretch;
  min-height: 40px;
  padding: 8px 12px;
  box-shadow: none;
}
.split-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.setup-review {
  gap: 16px;
}
.setup-review-button {
  width: 100%;
  min-height: 54px;
  font-size: 1rem;
  margin-top: 12px;
}
.setup-review-panel {
  display: grid;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.password-checklist {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
.password-checklist span {
  color: var(--muted);
  font-size: .9rem;
}
.password-checklist span.is-valid {
  color: var(--good);
  font-weight: 800;
}
.password-checklist span::before {
  content: "○ ";
}
.password-checklist span.is-valid::before {
  content: "✓ ";
}
.form-note {
  margin: 4px 0 0;
  font-size: .9rem;
  color: var(--muted);
}
.setup-inline-tip {
  display: grid;
  gap: 5px;
  margin: 14px 0 10px;
  padding: 13px 14px;
  border: 1px solid #d9e7f3;
  border-left: 4px solid var(--accent-blue);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5faff);
  box-shadow: 0 8px 18px rgba(34, 49, 63, .04);
}
.setup-inline-tip .eyebrow {
  margin: 0;
}
.setup-inline-tip span {
  font-size: .95rem;
  font-weight: 700;
}
.setup-inline-tip strong {
  font-size: .95rem;
}
.setup-inline-tip .calculator-toggle {
  margin-top: 6px;
}
.calculator-toggle--inline {
  background: rgba(255,255,255,.76);
}
.calculator-toggle--inline summary {
  padding-left: 12px;
  padding-right: 12px;
  font-size: .95rem;
}
.calculator-toggle--inline .points-calculator {
  background: #f7fbff;
}
.motivation-entry-row {
  grid-template-columns: minmax(120px, .8fr) minmax(180px, 1fr) minmax(220px, 1.3fr) minmax(90px, .4fr) minmax(110px, .5fr);
}
.setup-success-card {
  max-width: 760px;
  margin: 0 auto;
}
body.overlay-open {
  overflow: hidden;
}
.setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}
.setup-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 49, 63, .42);
}
.setup-overlay-card {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 28px 60px rgba(34, 49, 63, .22);
}
.overlay-panel {
  display: grid;
  gap: 12px;
}
.motivation-builder > p {
  max-width: 820px;
}
.motivation-form {
  margin-top: 12px;
}
.goal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.goal-card {
  display: block;
  cursor: pointer;
}
.goal-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.goal-card-body {
  min-height: 100%;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.goal-card:hover .goal-card-body,
.goal-card.is-selected .goal-card-body {
  border-color: rgba(63, 145, 216, .55);
  box-shadow: 0 12px 26px rgba(34, 49, 63, .08);
}
.goal-card.is-selected .goal-card-body {
  background: #f7fbff;
}
.goal-card strong {
  font-family: var(--heading-font);
  font-size: 1.18rem;
  color: var(--text);
}
.goal-card span,
.goal-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}
.goal-card em {
  color: var(--text);
}
.goal-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.goal-counts small {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 750;
}
.goal-select-label {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-dark) !important;
  font-weight: 800;
}
.goal-card.is-selected .goal-select-label {
  background: var(--accent-blue);
  color: #fff !important;
}
.motivation-preview {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.motivation-preview[hidden] {
  display: none;
}
.preview-groups {
  display: grid;
  grid-template-columns: minmax(220px, .82fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.preview-group {
  display: grid;
  gap: 10px;
  align-content: start;
}
.preview-group--child {
  grid-row: span 3;
}
.preview-group--tasks,
.preview-group--motivation,
.preview-group--rewards {
  min-width: 0;
}
.preview-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}
.preview-group-head h3 {
  margin: 0;
}
.preview-group-head .small-button {
  min-height: 30px;
  padding: 5px 10px;
  font-size: .84rem;
  box-shadow: none;
}
.preview-group h4 {
  margin: 0;
}
.preview-list {
  display: grid;
  gap: 8px;
}
.preview-item {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.preview-item--empty {
  border-style: dashed;
  background: #fbfdff;
  color: var(--muted);
}
.preview-item h5 {
  margin: 0;
  font-size: .98rem;
}
.preview-item p {
  margin: 0;
  font-size: .9rem;
}
.preview-item strong {
  color: var(--accent-blue);
}
@media (max-width: 759px) {
  .preview-groups {
    grid-template-columns: 1fr;
  }
  .preview-group--child {
    grid-row: auto;
  }
}
.status { font-weight: 800; }
.status.pending { color: var(--warn); }
.status.approved { color: var(--good); }
.status.rejected { color: #b74a2c; }
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(247,250,252,.94), rgba(237,246,251,.96)),
    radial-gradient(circle at 18% 12%, rgba(63,145,216,.13), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(246,168,29,.13), transparent 28%);
}
.auth-card {
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(34,49,63,.12);
}
.auth-card--wide {
  width: min(760px, 100%);
}
.auth-card h1 {
  font-size: clamp(2rem, 10vw, 3.05rem);
  line-height: 1.04;
  margin-bottom: 10px;
}
.auth-card p {
  margin: 0 0 14px;
}
.auth-card form {
  gap: 14px;
}
.auth-card input {
  min-height: 48px;
  border-radius: 10px;
}
.auth-card button {
  width: 100%;
  min-height: 48px;
  border-radius: 10px;
}
.auth-logo {
  width: 82px;
  height: auto;
  display: block;
  margin-bottom: 14px;
}
.site-footer { padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.coming-soon {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    linear-gradient(180deg, rgba(247,250,252,.94), rgba(237,246,251,.96)),
    radial-gradient(circle at 24% 18%, rgba(63,145,216,.14), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(139,195,74,.16), transparent 28%);
}
.coming-soon__content {
  width: min(980px, 100%);
  text-align: center;
}
.coming-soon__logo {
  width: min(320px, 78vw);
  height: auto;
  margin-bottom: 20px;
}
.coming-soon .lead {
  margin-left: auto;
  margin-right: auto;
}
.coming-soon .cards {
  margin: 28px 0 22px;
  text-align: left;
}
.coming-soon__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.coming-soon__links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}
.coming-soon__links a:hover { color: var(--accent-blue); }
@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .nav { display: flex; position: static; padding: 0; background: transparent; border: 0; box-shadow: none; align-items: center; }
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); align-items: center; padding-top: 82px; }
  .app-shell { display: grid; grid-template-columns: 250px 1fr; }
  .sidebar {
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: start;
    display: block;
    padding: 16px;
  }
  .sidebar .brand span { display: inline; }
  .sidebar-user { margin: 12px 0; }
  .sidebar-nav { display: grid; }
  .sidebar-logout { display: none; }
  .role-child .app-shell {
    display: block;
  }
  .role-child .child-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .main { padding: 34px; }
  .mobile-tabs { display: none; }
  .role-child .mobile-tabs {
    display: flex;
  }
  .role-child .main {
    padding-bottom: 86px;
  }
}

.role-admin .main {
  padding: 18px 16px 78px;
}
.admin-page {
  display: grid;
  gap: 12px;
}
.admin-head { display: block; }
.admin-head h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0;
}
.admin-head .eyebrow {
  margin: 0 0 4px;
}
.admin-create {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
}
.admin-create--wide {
  width: 100%;
}
.admin-create summary,
.admin-row summary,
.admin-settings summary {
  cursor: pointer;
  font-weight: 850;
  color: var(--text);
}
.admin-create summary {
  padding: 10px 12px;
}
.admin-create form {
  padding: 0 12px 12px;
}
.admin-list {
  display: grid;
  gap: 6px;
}
.admin-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.admin-row summary,
.admin-row--head {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(80px, .7fr) minmax(80px, .7fr) minmax(80px, .7fr) minmax(84px, auto);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  list-style: none;
  font-size: .9rem;
}
.admin-row--head {
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  border: 0;
}
.admin-row--five summary,
.admin-row--five.admin-row--head {
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.4fr) minmax(80px, .7fr) minmax(70px, .6fr) minmax(84px, auto);
}
.admin-row--four summary,
.admin-row--four.admin-row--head {
  grid-template-columns: minmax(170px, 1.2fr) minmax(180px, 1.4fr) minmax(80px, .7fr) minmax(84px, auto);
}
.admin-row summary::-webkit-details-marker,
.admin-create summary::-webkit-details-marker,
.admin-settings summary::-webkit-details-marker {
  display: none;
}
.admin-row summary span:last-child,
.admin-create summary {
  color: var(--accent-blue);
}
.admin-edit-form {
  border-top: 1px solid var(--border);
  padding: 12px;
  background: #fbfdff;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-admin button.danger {
  background: #fff;
  color: #b74a2c;
  border: 1px solid #efc4b6;
}
.inline-delete {
  display: inline;
}
.inline-delete button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: .82rem;
}
.role-admin .panel,
.role-admin .card {
  padding: 12px;
  box-shadow: none;
}
.role-admin .grid {
  gap: 10px;
}
.role-admin h2 {
  font-size: 1.25rem;
}
.role-admin h3 {
  font-size: 1rem;
}
.role-admin input,
.role-admin textarea,
.role-admin select {
  padding: 8px 10px;
  min-height: 38px;
}
.role-admin textarea {
  min-height: 90px;
}
.role-admin button,
.role-admin .button {
  min-height: 38px;
  padding: 8px 12px;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.checkline input {
  width: auto;
  min-height: auto;
}
.admin-settings {
  display: grid;
  gap: 10px;
}
.admin-settings details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.admin-settings summary {
  margin-bottom: 8px;
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.admin-metrics .stat {
  font-size: 1.8rem;
}
.admin-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-table th,
.admin-table td {
  padding: 9px 10px;
  font-size: .9rem;
}
@media (max-width: 759px) {
  .split-head {
    display: grid;
  }
  .field-action-row {
    grid-template-columns: 1fr;
  }
  .free-entry-row {
    grid-template-columns: 1fr;
  }
  .child-setup-grid {
    grid-template-columns: 1fr;
  }
  .child-access-grid {
    grid-template-columns: 1fr;
  }
  .child-setup-span-2 {
    grid-column: auto;
  }
  .child-access-span-2 {
    grid-column: auto;
  }
  .catalog-group-head,
  .catalog-group-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .motivation-entry-row {
    grid-template-columns: 1fr;
  }
  .task-row--wide {
    grid-template-columns: 1fr;
  }
  .children-list-head {
    display: none;
  }
  .child-list-row {
    grid-template-columns: 1fr auto;
  }
  .child-list-facts {
    grid-column: 1;
    display: grid;
    gap: 8px;
  }
  .row-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .admin-head {
    display: grid;
  }
  .admin-row summary,
  .admin-row--head,
  .admin-row--five summary {
    grid-template-columns: 1fr auto;
  }
  .admin-row summary span:nth-child(2),
  .admin-row summary span:nth-child(3),
  .admin-row summary span:nth-child(4),
  .admin-row--head span:nth-child(2),
  .admin-row--head span:nth-child(3),
  .admin-row--head span:nth-child(4) {
    display: none;
  }
}
@media (min-width: 760px) {
  .field-action-row {
    grid-template-columns: 1fr;
  }
  .role-admin .main {
    padding: 22px 24px;
  }
}
