:root {
  --bg: #f6f2ea;
  --surface: #ffffff;
  --surface-alt: #f0eae0;
  --text: #262019;
  --text-muted: #8a8074;
  --border: #e6dfd0;

  --primary: #b1552e;
  --primary-dark: #8f421f;
  --primary-soft: #f0e0d5;

  --success: #5c7c58;
  --success-dark: #45603f;
  --success-soft: #e6ece3;

  --danger: #ad4a3f;
  --danger-dark: #8a3a30;
  --danger-soft: #f1e2df;

  --pending: #ab8a3d;
  --pending-dark: #8a6d2e;
  --pending-soft: #f2ebd9;

  --chart-earned: var(--primary);
  --chart-spent: #2a7ab8;
  --chart-axis: var(--border);

  --font-display: Georgia, 'Iowan Old Style', 'Times New Roman', ui-serif, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(38, 32, 25, 0.04), 0 8px 20px rgba(38, 32, 25, 0.05);
  --touch: 84px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input {
  font-family: inherit;
}

/* ---------- Layout generique ---------- */

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-back {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10;
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

.top-back:active {
  background: var(--surface-alt);
}

/* ---------- index.html ---------- */

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 64px;
  padding: 40px;
}

.home-heading {
  text-align: center;
  animation: fadeIn 0.5s ease both;
}

.home-greeting {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-clock {
  font-family: var(--font-display);
  font-size: 8rem;
  line-height: 1;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.home h1 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--text);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

.home-date {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weather-strip {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 14px;
}

.weather-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.weather-entry .weather-label {
  font-weight: 600;
}

.weather-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.weather-temps {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.weather-rain {
  color: var(--chart-spent);
  font-size: 0.85rem;
}

.today-agenda {
  width: 100%;
  max-width: 620px;
  animation: fadeIn 0.6s ease both;
}

.agenda-row {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}

.agenda-row:last-child {
  border-bottom: none;
}

.agenda-row.is-past {
  opacity: 0.55;
}

.agenda-time {
  position: relative;
  min-width: 68px;
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}

.agenda-time::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.agenda-row.is-past .agenda-time {
  color: var(--text-muted);
}

.agenda-row.is-past .agenda-time::before {
  content: '✓';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--chart-spent);
  font-size: 0.85rem;
  font-weight: 700;
}

.agenda-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agenda-title {
  text-align: left;
  color: var(--text);
  font-size: 0.98rem;
}

.agenda-row.is-past .agenda-title {
  text-decoration: line-through;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
}

.agenda-location {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.agenda-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.kid-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 56px;
}

.kid-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: none;
  padding: 12px;
  border-radius: var(--radius-lg);
  animation: riseIn 0.4s ease both;
  transition: transform 0.15s ease;
}

.kid-tile:active {
  transform: scale(0.97);
}

@media (hover: hover) {
  .kid-tile:hover .kid-avatar {
    transform: translateY(-3px);
    box-shadow: var(--shadow), 0 0 0 1px var(--border);
  }
}

.kid-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 500;
  color: var(--primary-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kid-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kid-tile .kid-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.parent-link {
  position: fixed;
  bottom: 22px;
  right: 24px;
  z-index: 2;
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.parent-link:active {
  opacity: 1;
}

/* ---------- kid.html ---------- */

.kid-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.4s ease both;
}

.kid-topbar-back {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 22px;
  text-decoration: none;
}

.kid-topbar-back:active {
  background: var(--surface-alt);
}

.kid-topbar-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.kid-topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kid-topbar-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  white-space: nowrap;
}

.kid-topbar-points {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kid-topbar-points .unit {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.kid-topbar-tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
}

.kid-topbar-tabs .kid-tab {
  min-height: 44px;
  padding: 0 12px;
  font-size: 1rem;
  white-space: nowrap;
}

.streak-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.streak-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.streak-icon path {
  fill: currentColor;
}

.streak-card[data-level='1'] {
  background: #f5e6da;
  border-color: #c98a5f;
}

.streak-card[data-level='2'] {
  background: #eed3bf;
  border-color: var(--primary);
}

.streak-card[data-level='3'] {
  background: #e4b998;
  border-color: var(--primary-dark);
}

.streak-card[data-level='4'] {
  background: #d99a6a;
  border-color: var(--primary-dark);
  border-width: 2px;
}

.streak-card[data-level='1'] .streak-icon {
  color: #c98a5f;
}

.streak-card[data-level='2'] .streak-icon {
  color: var(--primary);
}

.streak-card[data-level='3'] .streak-icon,
.streak-card[data-level='4'] .streak-icon {
  color: var(--primary-dark);
}

.streak-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.streak-count {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.streak-card[data-level='1'] .streak-count,
.streak-card[data-level='2'] .streak-count {
  color: var(--primary-dark);
}

.streak-card[data-level='3'] .streak-count,
.streak-card[data-level='4'] .streak-count {
  color: #4a2712;
}

.streak-next {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.streak-next strong {
  color: var(--text);
}

.streak-week {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.streak-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}

.streak-dot.ok {
  background: var(--pending-soft);
  border-color: transparent;
}

.streak-dot.incident {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.streak-dot.future {
  opacity: 0.35;
}

.kid-tab {
  min-height: 64px;
  padding: 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.kid-tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.kid-tab-panel {
  display: none;
}

.kid-tab-panel.active {
  display: block;
}

.kid-body {
  flex: 1;
  padding: 28px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

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

.chore-card,
.reward-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  animation: riseIn 0.35s ease both;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
  .chore-card:hover,
  .reward-card:hover {
    background: var(--surface-alt);
    border-color: var(--text-muted);
  }
}

.chore-info .chore-name,
.reward-info .reward-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.chore-points,
.reward-cost {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.btn {
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 26px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

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

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  background: var(--pending-soft);
  color: var(--pending-dark);
}

.status-approved {
  background: var(--success-soft);
  color: var(--success-dark);
}

/* ---------- parent.html ---------- */

.pin-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 30px;
}

.pin-screen h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.7rem;
  margin: 0;
}

.pin-dots {
  display: flex;
  gap: 20px;
}

.pin-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
}

.pin-error {
  color: var(--danger-dark);
  font-weight: 600;
  min-height: 1.5em;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 18px;
}

.pin-key {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--text);
}

.pin-key:active {
  background: var(--surface-alt);
}

.pin-key.wide {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-nav {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 100px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.admin-nav button {
  background: none;
  text-align: left;
  padding: 18px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 3px solid transparent;
}

.admin-nav button.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
}

.admin-main {
  flex: 1;
  padding: 40px 48px 80px;
  overflow-y: auto;
  max-height: 100vh;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-panel h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 24px;
}

.list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.list-item .item-main {
  flex: 1;
  min-width: 200px;
}

.list-item .item-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.list-item .item-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.list-item .item-actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  min-height: 52px;
  padding: 0 18px;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.field input,
.field select {
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field.checkbox input {
  width: 24px;
  height: 24px;
  min-height: auto;
}

.form-card.stacked {
  flex-direction: column;
  align-items: stretch;
}

.form-card.stacked .field,
.form-card.stacked input {
  width: 100%;
}

.form-help {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.empty-state {
  color: var(--text-muted);
  font-style: italic;
  padding: 20px 0;
}

/* ---------- Comportement ---------- */

.behavior-kid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
}

.behavior-kid-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.week-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.day-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.day-cell:active {
  transform: scale(0.97);
}

.day-cell .day-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.day-cell .day-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.day-cell .day-pts {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 1em;
}

.day-cell.ok {
  background: var(--success-soft);
  border-color: var(--success);
}

.day-cell.ok .day-num,
.day-cell.ok .day-pts {
  color: var(--success-dark);
}

.day-cell.incident {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.day-cell.incident .day-num {
  color: var(--danger-dark);
}

.day-cell.future {
  cursor: not-allowed;
  opacity: 0.4;
}

.behavior-summary {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.behavior-summary strong {
  color: var(--text);
}

.tier-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.tier-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 84px;
}

.tier-field label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tier-field input {
  min-height: 48px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 1rem;
  text-align: center;
}

/* ---------- Historique ---------- */

.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-row select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.stat-tile .stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-tile .stat-value {
  font-family: var(--font-body);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 20px 8px;
  margin-bottom: 28px;
  position: relative;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.chart-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend .legend-key {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.chart-day-hit {
  fill: transparent;
  cursor: pointer;
}

.chart-day-hit:hover,
.chart-day-hit:focus {
  fill: rgba(11, 11, 11, 0.03);
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip .tooltip-value {
  font-weight: 700;
}

.history-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.history-row .history-main {
  flex: 1;
  min-width: 200px;
}

.history-row .history-title {
  font-weight: 600;
  font-size: 1rem;
}

.history-row .history-sub {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 2px;
}

.history-delta {
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 56px;
  text-align: right;
}

.history-delta.positive {
  color: var(--chart-earned);
}

.history-delta.negative {
  color: var(--chart-spent);
}

.logout-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}

/* ---------- Responsive : tablette portrait (iPad et similaires) ---------- */

@media (max-width: 900px) {
  /* index.html */
  .home {
    gap: 36px;
    padding: 24px;
  }

  .home-clock {
    font-size: 5.6rem;
  }

  .weather-strip {
    gap: 18px;
    flex-wrap: wrap;
  }

  .home h1 {
    font-size: 2rem;
  }

  .home .kid-avatar {
    width: 150px;
    height: 150px;
    font-size: 3rem;
  }

  .kid-grid {
    gap: 28px;
  }

  .kid-tile .kid-name {
    font-size: 1.25rem;
  }

  .today-agenda {
    max-width: 100%;
  }

  /* kid.html */
  .kid-topbar {
    padding: 8px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .kid-topbar-name {
    font-size: 1.05rem;
  }

  .kid-topbar-points {
    font-size: 0.95rem;
  }

  .kid-topbar-tabs {
    margin-left: 0;
    width: 100%;
    order: 1;
  }

  .kid-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .streak-card {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .streak-week {
    margin-left: 0;
    width: 100%;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  /* parent.html */
  .admin-shell {
    flex-direction: column;
  }

  .admin-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 90px 10px 10px;
  }

  .admin-main {
    max-height: none;
    padding: 24px 20px 60px;
  }

  .tier-field {
    width: 72px;
  }
}
