:root {
  --bg: #f6f3eb;
  --bg-soft: #fffdf7;
  --panel: #e4f1ea;
  --card: #ffffff;
  --text: #162b2a;
  --muted: #647370;
  --primary: #126b63;
  --primary-soft: #2c7d74;
  --accent: #f26b4f;
  --accent-soft: #ffe0d7;
  --sun: #f6c85f;
  --line: rgba(22, 43, 42, 0.14);
  --shadow: 0 18px 44px rgba(22, 43, 42, 0.09);
  --success: #26866d;
  --warning: #d99d29;
  --danger: #c9534c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Avenir Next', 'Trebuchet MS', sans-serif;
  background: var(--bg);
  color: var(--text);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 2px solid var(--text);
  background: transparent;
  border-radius: 0;
  padding: 16px 22px;
  box-shadow: 0 8px 24px rgba(28, 22, 58, 0.05);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.2rem;
}

.brand-wrap-inline { margin-bottom: 24px; }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-weight: 600;
}

.header-actions,
.footer-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.9rem 1.35rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 23, 57, 0.18);
}

.button-secondary {
  background: rgba(255,255,255,0.7);
  color: var(--primary);
  border-color: var(--line);
}

.full-width {
  width: 100%;
}

.award-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 22px;
  align-items: start;
}

.award-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--text);
}

.child-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.child-choice,
.category-choice {
  cursor: pointer;
}

.child-choice input,
.category-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.child-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px;
  background: var(--bg);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.child-choice .avatar-circle {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.child-choice input:checked + .avatar-circle {
  background: var(--accent);
}

.child-choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-choice span {
  display: block;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.category-choice:has(input:checked) span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.star-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.star-amount {
  min-width: 54px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.star-amount:hover,
.star-amount.selected {
  border-color: var(--sun);
  background: var(--sun);
}

.star-amounts input {
  max-width: 110px;
}

.award-note {
  background: var(--sun);
  border-color: var(--text);
  transform: rotate(1deg);
}

.award-note-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.7rem;
}

.award-note p {
  margin: 0 0 24px;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 700;
}

.award-note strong {
  color: var(--primary);
}

.star-give-group {
  align-items: center;
  text-align: center;
}

.star-submit {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--sun);
  color: var(--accent);
  box-shadow: 0 12px 0 rgba(22, 43, 42, 0.14), 0 20px 28px rgba(22, 43, 42, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.star-submit span {
  font-size: 5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.star-submit:hover {
  transform: translateY(-4px) rotate(-4deg);
  box-shadow: 0 16px 0 rgba(22, 43, 42, 0.14), 0 24px 32px rgba(22, 43, 42, 0.14);
}

.star-submit:active {
  transform: translateY(5px) scale(0.92);
  box-shadow: 0 4px 0 rgba(22, 43, 42, 0.14), 0 10px 16px rgba(22, 43, 42, 0.1);
}

.star-submit:active span {
  transform: scale(1.18) rotate(12deg);
}

.star-submit:focus-visible {
  outline: 4px solid rgba(242, 107, 79, 0.35);
  outline-offset: 5px;
}

.recent-awards {
  margin-top: 22px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 36px;
  align-items: center;
  padding: 70px 0 54px;
}

.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--primary-soft);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 620px;
}

.lead {
  max-width: 620px;
  margin: 1.2rem 0 0;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--muted);
}

.mini-stats {
  list-style: none;
  display: flex;
  gap: 32px;
  padding: 0;
  margin: 2.3rem 0 0;
  flex-wrap: wrap;
}

.mini-stats li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.mini-stats strong {
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.mini-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-card {
  background: var(--sun);
  border: 2px solid var(--text);
  border-radius: 28px 28px 28px 4px;
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
}

.card-head {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff6b7a; }
.dot-amber { background: #f5bb53; }
.dot-green { background: #6bc37a; }

.card-body {
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(22,43,42,0.18);
  border-radius: 20px;
  padding: 18px 16px 12px;
}

.panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--primary);
}

.panel small {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  opacity: 0.75;
}

.panel strong {
  font-size: 1.1rem;
}

.score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) 0 87%, rgba(22,43,42,0.14) 87% 100%);
}

.ring-value {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.8rem;
}

.pill-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(31,23,57,0.9);
  color: white;
  font-size: 0.76rem;
  font-weight: 700;
}

.pill.muted {
  background: rgba(255,255,255,0.38);
  color: var(--primary);
}

.services, .story {
  margin-top: 42px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2, .story h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.06em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 22px;
}

.info-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 4px 20px 20px 20px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 24px rgba(31, 23, 57, 0.04);
}

.card-index {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 1rem;
  font-weight: 800;
}

.info-card h3 {
  margin: 1rem 0 0.7rem;
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 54px;
  padding-top: 48px;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bullet-list li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-soft);
}

.footer {
  margin-top: 54px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.footer small {
  color: var(--muted);
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-shell {
  width: min(100%, 460px);
}

.auth-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px 28px 28px 28px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: -0.05em;
}

.auth-subtitle {
  color: var(--muted);
  margin: 12px 0 24px;
  line-height: 1.6;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stack-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px 12px 12px 12px;
  background: var(--bg-soft);
  padding: 0.9rem 0.95rem;
  color: var(--text);
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  outline: 2px solid rgba(31, 23, 57, 0.14);
  border-color: rgba(31, 23, 57, 0.2);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  margin: 22px 0 18px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.demo-panel {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.demo-panel strong {
  display: block;
  margin-bottom: 10px;
}

.demo-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

.demo-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.demo-note {
  font-size: 0.85rem;
}

.auth-footer {
  text-align: center;
  color: var(--muted);
  margin: 12px 0 0;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 700;
}

.secondary-link { margin-top: 8px; }

.alert {
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.alert ul {
  margin: 0;
  padding-left: 18px;
}

.alert-success {
  background: rgba(47, 158, 114, 0.12);
  border: 1px solid rgba(47, 158, 114, 0.25);
  color: #16573e;
}

.alert-error {
  background: rgba(212, 95, 114, 0.08);
  border: 1px solid rgba(212, 95, 114, 0.2);
  color: #7a2d3d;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  background: var(--primary);
  color: white;
  padding: 28px 18px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.side-nav a {
  color: rgba(255,255,255,0.8);
  padding: 0.8rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}

.side-nav a.active,
.side-nav a:hover {
  background: var(--sun);
  color: var(--text);
}

.main-panel {
  max-width: 1100px;
  width: 100%;
  padding: 42px 38px 64px;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.top-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.06em;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sun);
  color: var(--primary);
  border: 1px solid var(--line);
  border-radius: 4px 999px 999px 999px;
  padding: 0.75rem 1rem;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card,
.panel-block,
.mini-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px 20px 20px 20px;
  box-shadow: 0 12px 24px rgba(31, 23, 57, 0.04);
}

.stat-card {
  padding: 18px 18px 16px;
}

.stat-card p,
.stat-card span {
  margin: 0;
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 2.1rem;
  letter-spacing: -0.06em;
}

.highlight-card {
  background: var(--primary);
  color: white;
}

.highlight-card p,
.highlight-card span {
  color: rgba(255,255,255,0.7);
}

.panel-block {
  padding: 20px;
  margin-bottom: 22px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stars-cell {
  color: var(--success);
  font-weight: 800;
}

.compact-form {
  max-width: 420px;
}

.avatar-picker {
  border: 0;
  padding: 0;
  margin: 0;
}

.avatar-picker legend {
  font-weight: 700;
  margin-bottom: 10px;
}

.avatar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.avatar-option {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.avatar-name {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.avatar-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-choice {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 4px 50% 50% 50%;
  background: var(--bg-soft);
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 800;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.avatar-option input:checked + .avatar-choice {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.kid-avatar {
  --skin: #c9825b;
  --hair: #3d2924;
  --shirt: #126b63;
  --background: #e4f1ea;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 180px;
  height: 210px;
  overflow: hidden;
  border: 0;
  border-radius: 4px 50% 50% 50%;
  background: var(--background);
  vertical-align: middle;
  animation: kid-bob 4s ease-in-out infinite;
}

.kid-avatar.avatar-choice {
  width: 160px;
  height: 185px;
  border: 2px solid var(--line);
  background: var(--background);
}

.kid-avatar.avatar-circle {
  width: 150px;
  height: 175px;
  border-radius: 18px 50% 50% 50%;
}

.kid-face {
  position: absolute;
  z-index: 2;
  left: 22%;
  top: 22%;
  width: 56%;
  height: 52%;
  border-radius: 46% 46% 48% 48%;
  background: var(--skin);
}

.kid-hair {
  position: absolute;
  z-index: 3;
  left: 17%;
  top: 11%;
  width: 66%;
  height: 28%;
  border-radius: 60% 60% 35% 35%;
  background: var(--hair);
}

.kid-body {
  position: absolute;
  z-index: 1;
  left: 9%;
  bottom: -13%;
  width: 82%;
  height: 48%;
  border-radius: 50% 50% 0 0;
  background: var(--shirt);
}

.kid-eye {
  position: absolute;
  top: 43%;
  width: 9%;
  height: 11%;
  border-radius: 50%;
  background: var(--text);
}

.kid-eye-left { left: 25%; }
.kid-eye-right { right: 25%; }

.kid-mouth {
  position: absolute;
  left: 39%;
  top: 67%;
  width: 22%;
  height: 12%;
  border-bottom: 2px solid var(--text);
  border-radius: 0 0 50% 50%;
}

.kid-accessory {
  position: absolute;
  z-index: 4;
  display: none;
}

.avatar-sun, .avatar-rainbow { --background: #fff0b7; --shirt: #f26b4f; }
.avatar-star { --background: #fff0b7; --skin: #f2c39c; --hair: #6c442f; --shirt: #126b63; }
.avatar-heart, .avatar-flower { --background: #ffe0d7; --shirt: #d95778; }
.avatar-bolt, .avatar-rocket { --background: #dbe8ff; --shirt: #3256a8; }
.avatar-music, .avatar-headphones { --background: #eadfff; --shirt: #8050a8; }
.avatar-gem, .avatar-crown { --background: #d9f1ed; --shirt: #168a83; }
.avatar-smile, .avatar-cloud { --background: #eaf4f5; --shirt: #46a7a0; }
.avatar-leaf, .avatar-flower { --background: #e4f1ea; --shirt: #3f8c5d; }
.avatar-moon, .avatar-book { --background: #e8e5d8; --shirt: #456b70; }
.avatar-cap, .avatar-skate { --background: #f6e1bc; --shirt: #d88935; }
.avatar-glasses, .avatar-soccer { --background: #f0e1d8; --shirt: #bb5b47; }

.avatar-heart, .avatar-bolt, .avatar-gem, .avatar-leaf,
.avatar-rainbow, .avatar-moon, .avatar-crown, .avatar-soccer {
  --skin: #5d362c;
  --hair: #211b1c;
}

.avatar-sun, .avatar-music, .avatar-smile, .avatar-cloud,
.avatar-rocket, .avatar-flower, .avatar-book, .avatar-skate {
  --skin: #e7ad82;
  --hair: #a55232;
}

.avatar-cap, .avatar-glasses, .avatar-headphones, .avatar-rainbow {
  --skin: #f2c39c;
  --hair: #6c442f;
}

.avatar-sun {
  --skin: #f2c39c;
  --hair: #6c442f;
  --shirt: #f26b4f;
}

.avatar-bolt .kid-hair { border-radius: 20% 70% 20% 55%; transform: rotate(-10deg); }
.avatar-music .kid-hair, .avatar-headphones .kid-hair { height: 38%; border-radius: 50%; }
.avatar-leaf .kid-hair, .avatar-flower .kid-hair { border-radius: 50% 50% 20% 60%; }
.avatar-cap .kid-hair { top: 4%; height: 17%; border-radius: 50% 50% 10% 10%; }
.avatar-glasses .kid-accessory { display: block; left: 25%; top: 39%; width: 50%; height: 13%; border-top: 2px solid var(--text); border-bottom: 2px solid var(--text); }
.avatar-headphones .kid-accessory { display: block; left: 13%; top: 23%; width: 74%; height: 43%; border: 3px solid var(--accent); border-bottom: 0; border-radius: 50% 50% 0 0; }
.avatar-crown .kid-accessory { display: block; left: 31%; top: 3%; width: 38%; height: 15%; background: var(--sun); clip-path: polygon(0 100%, 12% 0, 42% 60%, 62% 0, 88% 60%, 100% 0, 100% 100%); }
.avatar-cap .kid-accessory { display: block; left: 15%; top: 5%; width: 70%; height: 12%; border-radius: 50%; background: var(--accent); transform: rotate(-7deg); }
.avatar-rocket .kid-accessory, .avatar-soccer .kid-accessory { display: block; right: 8%; top: 10%; width: 19%; height: 19%; border-radius: 50%; background: var(--sun); }
.avatar-star .kid-accessory { display: block; right: 11%; top: 9%; width: 22%; height: 22%; background: var(--accent); clip-path: polygon(50% 0, 61% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 39% 36%); animation: star-pulse 2.8s ease-in-out infinite; }
.avatar-sun .kid-hair { height: 31%; border-radius: 18% 18% 35% 35%; clip-path: polygon(0 100%, 0 42%, 12% 0, 22% 35%, 35% 0, 46% 35%, 60% 0, 70% 35%, 86% 0, 100% 42%, 100% 100%); }

.avatar-star .kid-eye {
  animation: kid-blink 4.8s ease-in-out infinite;
}

.avatar-star .kid-eye-right {
  animation-delay: 0.04s;
}

.avatar-star .kid-mouth {
  animation: kid-smile 4.8s ease-in-out infinite;
}

@keyframes kid-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-2px) rotate(1deg); }
}

@keyframes kid-blink {
  0%, 40%, 48%, 100% { transform: scaleY(1); }
  44% { transform: scaleY(0.08); }
}

@keyframes kid-smile {
  0%, 59%, 100% {
    width: 22%;
    height: 12%;
    left: 39%;
    top: 67%;
    border-bottom-width: 2px;
  }
  67%, 86% {
    width: 34%;
    height: 23%;
    left: 33%;
    top: 61%;
    border-bottom-width: 3px;
  }
}

@keyframes star-pulse {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.08) rotate(8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .kid-avatar,
  .avatar-star .kid-eye,
  .avatar-star .kid-accessory { animation: none; }
}

.avatar-option input:focus-visible + .avatar-choice {
  outline: 3px solid rgba(255, 111, 145, 0.35);
  outline-offset: 2px;
}

.gender-options {
  display: flex;
  gap: 10px;
}

.gender-option {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.gender-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-option span {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  background: var(--bg-soft);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gender-option input:checked + span {
  border-color: var(--primary);
  background: var(--panel);
  color: var(--primary);
  transform: translateY(-2px);
}

.gender-option input:focus-visible + span {
  outline: 3px solid rgba(18, 107, 99, 0.25);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mini-card {
  padding: 16px;
}

.mini-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 800;
}

.avatar-circle.accent {
  background: var(--accent);
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-heading .eyebrow {
  margin-bottom: 6px;
}

.profile-heading h1 {
  margin: 0;
}

.mini-card-header h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.mini-card-header small,
.mini-card-meta span {
  color: var(--muted);
}

.mini-card-meta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-card-meta strong {
  font-size: 1.1rem;
}

.edit-child-details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.edit-child-details summary {
  color: var(--primary-soft);
  cursor: pointer;
  font-weight: 700;
}

.edit-child-details[open] summary {
  margin-bottom: 14px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 12px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.history-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(47, 158, 114, 0.12);
  color: var(--success);
  font-weight: 800;
}

.history-item strong {
  display: block;
  margin-bottom: 6px;
}

.history-item p {
  margin: 0;
  color: var(--muted);
}

.history-item small {
  color: var(--muted);
}

.history-item .kid-avatar.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

@media (max-width: 900px) {
  .page-shell,
  .main-panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px 18px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .sidebar .brand-wrap-inline {
    margin: 0;
  }

  .side-nav {
    flex-direction: row;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav a {
    flex: 0 0 auto;
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }

  .top-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav,
  .header-actions,
  .footer-actions,
  .hero-actions {
    justify-content: center;
  }

  .hero,
  .story,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .award-layout {
    grid-template-columns: 1fr;
  }

  .award-note {
    transform: none;
  }
}

@media (max-width: 540px) {
  body {
    padding-bottom: 74px;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px rgba(22, 43, 42, 0.08);
    display: block;
  }

  .sidebar .brand-wrap {
    display: none;
  }

  .side-nav {
    justify-content: space-around;
    width: 100%;
  }

  .side-nav a {
    color: var(--muted);
    padding: 0.6rem 0.5rem;
    text-align: center;
  }

  .side-nav a.active,
  .side-nav a:hover {
    color: var(--primary);
    background: var(--panel);
  }

  .main-panel {
    padding: 28px 16px 38px;
  }

  .panel-block {
    padding: 16px;
  }

  .top-header h1 {
    font-size: 2.35rem;
  }

  .auth-card {
    padding: 20px 18px;
  }

  .button {
    width: 100%;
  }

  .hero-badge {
    width: 100%;
    justify-content: center;
  }
}
