@charset "UTF-8";

:root {
  color-scheme: light;
  --page: #f8f6f0;
  --paper: #fffefa;
  --ink: #17364d;
  --muted: #586b77;
  --quiet: #62717a;
  --line: #d2dcd9;
  --accent: #ad4851;
  --accent-soft: #fbecee;
  --accent-deep: #8c3941;
  --green: #2c6248;
  --green-soft: #e8f3ea;
  --gold: #74521c;
  --gold-soft: #fff1cc;
  --blue: #216b94;
  --blue-soft: #e9f4fa;
  --radius: 20px;
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}
body[data-child="jules"] {
  --accent: #216b94;
  --accent-soft: #e8f4fb;
  --accent-deep: #195270;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled {
  cursor: default;
  opacity: 1;
}
button:disabled:not(.selected) { color: var(--muted); background-color: #f0f3f1; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }
svg { display: block; width: 24px; height: 24px; flex-shrink: 0; }
[hidden] { display: none !important; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 1px solid #9baeb5;
  border-radius: 11px;
  background: white;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 16px;
}
input::placeholder, textarea::placeholder { color: #62747e; opacity: 1; }
input:disabled, select:disabled, textarea:disabled {
  background: #eef2f0;
  color: #485e6b;
  -webkit-text-fill-color: #485e6b;
  opacity: 1;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { min-height: 112px; resize: vertical; line-height: 1.65; }
input[type="checkbox"] { width: 22px; min-height: 22px; accent-color: var(--blue); }
label { font-size: 15px; font-weight: 650; }
small { font-size: 14px; }
.skip-link {
  position: absolute;
  top: -90px;
  left: 16px;
  background: var(--ink);
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  z-index: 100;
}
.skip-link:focus { top: 12px; }
.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;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
}
.muted { color: var(--muted); }
.initial-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
  text-align: center;
}
.initial-loading h1 { font-size: 30px; letter-spacing: -.035em; }
.initial-loading p { color: var(--muted); }
.loading-sun { color: var(--gold); font-size: 46px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 18px;
  background: white;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.button svg { width: 21px; height: 21px; }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: #244e68; }
.button-primary:disabled { background: #405b6b; color: white; }
.button-outline { border-color: #aabbbf; background: transparent; }
.button-outline:hover { background: #edf2ef; }
.button-subtle { background: transparent; color: var(--muted); }
.button-subtle:hover { color: var(--ink); background: #eef1ef; }
.button-danger { color: #963f45; background: #fff0f0; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #b7c5c7;
  border-radius: 10px;
  background: var(--paper);
}
.icon-button svg { width: 23px; height: 23px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-hint { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.6; }
.password-field { position: relative; }
.password-field input { padding-right: 55px; }
.password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
}
.password-toggle svg { width: 22px; height: 22px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 22px;
}
.form-error {
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid #dfb6ab;
  border-radius: 11px;
  background: #fff0ed;
  color: #873e3c;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.form-error:empty { display: none; }
.empty-state { padding: 34px 22px; color: var(--muted); font-size: 16px; text-align: center; }
.empty-state svg { width: 36px; height: 36px; margin: 0 auto 12px; color: var(--muted); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.status-pill.pending { background: #edf1f2; color: #4f626d; }
.status-pill.validated { background: var(--green-soft); color: var(--green); }
.status-pill.not_validated { background: #fbe9e6; color: #964742; }
.status-pill.joker { background: var(--gold-soft); color: var(--gold); }
.status-pill svg { width: 17px; height: 17px; }

/* Connexion et première ouverture */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,1fr);
  width: min(1200px,100%);
  min-height: 740px;
  border: 1px solid #d8e0d9;
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 18px 80px #283e5110;
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px;
  overflow: hidden;
  background: #edf2ef;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffdf8a;
  color: #74531b;
  flex-shrink: 0;
}
.brand-logo svg { width: 29px; height: 29px; }
.brand-title { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.brand-family { margin-top: 3px; color: var(--muted); font-size: 15px; }
.auth-story h1 {
  max-width: 380px;
  margin-top: 48px;
  font-size: 44px;
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.16;
}
.auth-story > p { max-width: 390px; margin-top: 20px; color: #536a5d; font-size: 17px; line-height: 1.75; }
.family-scene { position: relative; min-height: 190px; margin-top: 36px; }
.scene-card {
  position: absolute;
  top: 18px;
  left: 0;
  width: 180px;
  height: 145px;
  padding: 20px;
  border: 1px solid #dec9c6;
  border-radius: 22px;
  background: #fff7f4;
  box-shadow: 0 12px 28px #203a4710;
  transform: rotate(-6deg);
}
.scene-card.jules { top: 40px; left: 190px; border-color: #c7dce7; background: #f0f8fc; transform: rotate(7deg); }
.scene-card strong { display: flex; align-items: center; gap: 8px; color: var(--accent-deep); font-size: 20px; }
.scene-card.jules strong { color: #216b94; }
.scene-avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; background: #f7dde1; font-size: 16px; }
.jules .scene-avatar { background: #d5ebf6; }
.scene-lines { display: grid; gap: 9px; margin-top: 17px; }
.scene-lines span { display: flex; align-items: center; gap: 9px; }
.scene-lines svg { width: 17px; height: 17px; color: var(--green); }
.scene-lines i { width: 94px; height: 5px; border-radius: 5px; background: #dfc8c5; }
.jules .scene-lines i { background: #c6dce7; }
.scene-sun { position: absolute; top: -12px; right: 30px; color: #a87720; }
.scene-sun svg { width: 46px; height: 46px; }
.scene-spark { position: absolute; left: 0; bottom: 4px; color: #6a8a76; }
.scene-spark svg { width: 26px; height: 26px; }
.auth-footnote { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 32px; color: #4c6655; font-size: 15px; line-height: 1.65; }
.auth-footnote svg { width: 23px; height: 23px; }
.auth-form-side { display: flex; flex-direction: column; justify-content: center; padding: 48px 46px; min-width: 0; }
.auth-form-side h2 { margin-top: 12px; font-size: 31px; line-height: 1.25; letter-spacing: -.035em; }
.auth-intro { margin: 15px 0 28px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.auth-form { display: grid; gap: 21px; }
.auth-submit { width: 100%; min-height: 52px; margin-top: 6px; font-size: 16px; }
.adult-roster { margin-top: 32px; padding-top: 25px; border-top: 1px solid var(--line); }
.adult-roster-title { margin-bottom: 17px; color: var(--muted); font-size: 14px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.adult-roster-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.adult-roster-person { display: flex; align-items: center; flex-direction: column; gap: 5px; color: var(--muted); font-size: 14px; min-width: 0; }
.adult-roster-person b { margin-top: 3px; color: var(--ink); font-size: 15px; }
.adult-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #eaece3; color: #536b51; font-size: 17px; font-weight: 750; }
.adult-roster-person:nth-child(2) .adult-avatar { background: #e8f1f5; color: #2e657f; }
.adult-roster-person:nth-child(3) .adult-avatar { background: #fcf0d6; color: #78561d; }
.adult-roster-person:nth-child(4) .adult-avatar { background: #f0eaf5; color: #72558e; }
.auth-small-print { margin-top: 22px; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* Navigation et structure */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0,1fr); }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 20px 22px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  overflow-y: auto;
}
.sidebar .brand { padding-left: 2px; gap: 10px; }
.sidebar .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
.sidebar .brand-logo svg { width: 27px; height: 27px; }
.sidebar .brand-title { font-size: 18px; }
.sidebar .brand-family { font-size: 14px; }
.sidebar-label { margin: 36px 12px 12px; color: var(--muted); font-size: 13px; line-height: 1.7; font-weight: 750; letter-spacing: .08em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 7px; }
.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 11px;
  padding: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 650;
  text-align: left;
}
.sidebar-nav button svg { width: 23px; height: 23px; }
.sidebar-nav button:hover { background: #f0f3ef; color: var(--ink); }
.sidebar-nav button.active { background: #e8f1e9; color: #2c6248; }
.sidebar-note {
  margin: 28px 0 20px;
  padding: 18px 15px;
  border: 1px solid #dfd1a9;
  border-radius: 14px;
  background: #f9f1dc;
  color: #74521c;
  font-size: 14px;
  line-height: 1.7;
}
.sidebar-note svg { width: 26px; height: 26px; margin-bottom: 9px; }
.sidebar-note strong { display: block; margin-bottom: 6px; color: #644616; font-size: 16px; }
.sidebar-profile { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.profile-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: #e6efe8; color: #3f664e; font-size: 16px; font-weight: 800; }
.profile-description { min-width: 0; flex: 1; }
.profile-description strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.profile-description span { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }
.logout-button { display: grid; place-items: center; width: 48px; min-width: 48px; height: 48px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.logout-button:hover { background: #eaf0eb; color: var(--ink); }
.logout-button svg { width: 23px; height: 23px; }
.workspace { width: 100%; max-width: 1600px; min-width: 0; margin: 0 auto; padding: 36px 34px 24px; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.workspace-header > div:first-child { min-width: 0; }
.workspace-header h1 { margin-top: 9px; font-size: 32px; font-weight: 750; letter-spacing: -.04em; line-height: 1.25; overflow-wrap: anywhere; }
.workspace-header .intro { margin-top: 11px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 11px; padding-top: 4px; }
.connection-status { display: flex; align-items: center; gap: 7px; color: #456953; font-size: 14px; white-space: nowrap; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #547d5e; }
.connection-status.saving { color: var(--gold); }
.connection-status.saving .connection-dot { background: #926518; }
.readonly-tag { display: flex; align-items: center; gap: 7px; border-radius: 8px; padding: 9px 11px; background: #eee8f4; color: #674982; font-size: 14px; font-weight: 650; }
.readonly-tag svg { width: 18px; height: 18px; }
.readonly-tag + .connection-status { display: none; }
.global-error { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 15px 17px; border: 1px solid #dfb6ab; border-radius: 12px; background: #fff0eb; color: #8e4434; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.global-error > span { min-width: 0; flex: 1; }
.global-error button { width: 48px; min-width: 48px; height: 48px; border: 0; border-radius: 9px; background: none; color: inherit; font-size: 25px; }
.children-overview { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-bottom: 24px; }
.child-score-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 24px;
  border: 1px solid #cbd8d2;
  border-radius: var(--radius);
  background: var(--paper);
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.child-score-card:hover { box-shadow: 0 4px 16px #344c5b0d; }
.child-score-card.selected { border-color: var(--card-color); box-shadow: 0 0 0 1px var(--card-color); }
.child-score-card.romy { --card-color: #ad4851; --card-fill: #fbecef; }
.child-score-card.jules { --card-color: #216b94; --card-fill: #e9f4fa; }
.child-score-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.child-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.child-title > div { min-width: 0; }
.child-initial { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: var(--card-fill); color: var(--card-color); font-size: 20px; font-weight: 750; }
.child-title h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.025em; }
.child-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 400; }
.child-card-choice { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border: 1px solid #96a9ad; border-radius: 50%; }
.child-card-choice svg { width: 13px; height: 13px; color: white; }
.selected .child-card-choice { border-color: var(--card-color); background: var(--card-color); }
.child-score-numbers { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin-top: 14px; color: var(--card-color); }
.child-score-numbers strong { font-size: 44px; font-weight: 750; letter-spacing: -.05em; line-height: 1.1; }
.child-score-numbers span { color: var(--muted); font-size: 21px; }
.child-score-numbers small { margin-left: 3px; color: var(--muted); font-size: 15px; }
.progress-track { height: 8px; margin: 18px 0 12px; border-radius: 5px; overflow: hidden; background: #e4e9e4; }
.score-progress { display: block; width: 100%; height: 100%; border: 0; appearance: none; -webkit-appearance: none; background: transparent; color: var(--card-color); }
.score-progress::-webkit-progress-bar { background: transparent; }
.score-progress::-webkit-progress-value { background: var(--card-color); border-radius: 5px; }
.score-progress::-moz-progress-bar { background: var(--card-color); border-radius: 5px; }
.child-card-footer { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.child-card-footer .reached { color: var(--green); font-weight: 750; }
.reward-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 25px; border: 1px solid #d5e1d2; border-radius: 12px; padding: 15px 18px; background: #edf3e9; color: #506c51; font-size: 15px; line-height: 1.65; }
.reward-inline svg { width: 25px; height: 25px; color: #456a43; }
.reward-inline strong { color: #345b36; font-weight: 750; }
.reward-inline .rule-note { margin-left: auto; color: #536a52; font-size: 14px; }
.workspace-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 27px; }
.week-navigation { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; align-items: center; gap: 10px; }
.week-label { min-width: 184px; color: var(--ink); font-size: 15px; line-height: 1.5; font-weight: 650; text-align: center; }
.date-select { display: flex; align-items: center; gap: 10px; min-width: 0; }
.date-select label { color: var(--muted); font-size: 14px; font-weight: 500; }
.date-select input { width: 166px; background: var(--paper); }
.date-select .button { padding-inline: 13px; }
.view-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.view-intro > div:first-child { min-width: 0; }
.view-intro h2 { font-size: 25px; line-height: 1.35; letter-spacing: -.03em; }
.view-intro p { margin-top: 7px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.day-points { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 15px; line-height: 1.45; text-align: right; }
.day-points strong { color: var(--accent); font-size: 29px; letter-spacing: -.03em; }
.day-utilities { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 18px; margin-bottom: 23px; }
.daily-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.context-chip { border: 1px solid #d9dfd4; border-radius: 8px; padding: 8px 11px; background: #edf0e8; color: #53664f; font-size: 14px; line-height: 1.6; }
.joker-info { display: flex; align-items: center; gap: 9px; max-width: 100%; min-height: 48px; border: 1px solid #dfcfa6; border-radius: 10px; padding: 11px 13px; background: #fbf0d9; color: #74521c; font-size: 14px; line-height: 1.5; }
.joker-info svg { width: 22px; height: 22px; }
.joker-info.used { border-color: #cbd5cb; background: #edf1eb; color: #50654e; }
.weather-box { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 20px; margin-bottom: 29px; border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px; background: var(--paper); }
.weather-caption { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 15px; font-weight: 650; }
.weather-caption svg { width: 23px; height: 23px; color: #88601e; }
.weather-options { display: flex; flex: 1; gap: 7px; flex-wrap: wrap; }
.weather-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border: 1px solid #d0dbd9; border-radius: 9px; padding: 10px 12px; background: white; color: #596b75; font-size: 14px; font-weight: 600; }
.weather-button svg { width: 32px; height: 32px; }
.weather-button:hover { background: #fcf5e7; color: #74521c; }
.weather-button.selected { border-color: #aa8136; background: #fff2d2; color: #72501b; }
.weather-button.selected svg { color: #72501b; }
body[data-mode="adult"] .adult-period-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
body[data-mode="adult"] .adult-period-button { --period-color: #74521c; --period-fill: #fff5dc; --period-border: #ddc99e; position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; min-width: 0; min-height: 94px; border: 2px solid var(--period-border); border-radius: 17px; padding: 17px 38px; background: var(--paper); color: var(--period-color); text-align: left; }
body[data-mode="adult"] .adult-period-button.evening { --period-color: #285775; --period-fill: #eaf3fa; --period-border: #b7cdda; }
body[data-mode="adult"] .adult-period-button > svg { width: 36px; height: 36px; }
body[data-mode="adult"] .adult-period-button > span:not(.adult-period-selected) { min-width: 0; }
body[data-mode="adult"] .adult-period-button strong { display: block; font-size: 22px; line-height: 1.35; }
body[data-mode="adult"] .adult-period-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.5; }
body[data-mode="adult"] .adult-period-button:hover { background: var(--period-fill); border-color: var(--period-color); }
body[data-mode="adult"] .adult-period-button.selected { background: var(--period-fill); border-color: var(--period-color); box-shadow: inset 0 0 0 1px var(--period-color); }
body[data-mode="adult"] .adult-period-selected { position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--period-color); color: white; visibility: hidden; }
body[data-mode="adult"] .adult-period-selected svg { width: 15px; height: 15px; }
body[data-mode="adult"] .adult-period-button.selected .adult-period-selected { visibility: visible; }
body[data-mode="adult"] .adult-period-placeholder { display: grid; grid-template-columns: 36px minmax(0,1fr); align-content: center; align-items: center; gap: 5px 16px; min-height: 116px; border: 1px dashed #aebfbc; border-radius: 16px; padding: 24px; background: var(--paper); }
body[data-mode="adult"] .adult-period-placeholder > svg { grid-row: 1 / 3; width: 36px; height: 36px; color: var(--muted); }
body[data-mode="adult"] .adult-period-placeholder h3 { font-size: 20px; line-height: 1.4; }
body[data-mode="adult"] .adult-period-placeholder p { color: var(--muted); font-size: 15px; line-height: 1.65; }
body[data-mode="adult"] .routine-grid.adult-period-routines { grid-template-columns: minmax(0,1fr); }
.routine-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; align-items: start; }
.routine-grid.weekend-routines { grid-template-columns: minmax(0,1fr); max-width: 920px; }
.routine-section { min-width: 0; }
.routine-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 17px 2px; }
.routine-symbol { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; background: #f9efd4; color: #7d5b1b; }
.routine-symbol.evening { background: #eaf0f7; color: #42617e; }
.routine-symbol.weekend { background: #e8f1eb; color: #416a4f; }
.routine-symbol svg { width: 34px; height: 34px; }
.routine-heading h3 { font-size: 20px; line-height: 1.4; letter-spacing: -.015em; }
.routine-heading p { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.mission-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.mission-card { border: 1px solid #ccd8d0; border-radius: 15px; padding: 20px 18px 16px; background: var(--paper); }
.mission-card.is-validated { border-color: #94b89e; }
.mission-card.is-joker { border-color: #c4a663; background: #fffdf6; }
.mission-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mission-icon { display: grid; place-items: center; width: 54px; height: 54px; flex-shrink: 0; border-radius: 14px; background: #edf1e9; color: #4c6a55; }
.mission-icon svg { width: 36px; height: 36px; }
.mission-title { min-width: 0; flex: 1; font-size: 18px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.mission-value { border-radius: 7px; padding: 4px 7px; background: #fff1cc; color: #71501a; font-size: 14px; font-weight: 750; white-space: nowrap; }
.mission-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 9px; margin-top: 17px; }
.mission-action { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 50px; border: 1px solid #adbfb8; border-radius: 9px; padding: 11px 9px; background: var(--paper); color: #4c625b; font-size: 15px; line-height: 1.4; font-weight: 600; }
.mission-action svg { width: 19px; height: 19px; }
.mission-action:hover { border-color: #7f9d89; background: #f0f5ed; color: #31593f; }
.mission-action[data-status="validated"].selected { border-color: #6c9b7c; background: #e3f1e6; color: #275d3e; }
.mission-action[data-status="not_validated"].selected { border-color: #ca9c91; background: #fae9e4; color: #91463b; }
.mission-action[data-status="joker"].selected { border-color: #bd9b4b; background: #fff0c4; color: #73511a; }
.mission-action[data-status="pending"].selected { border-color: #a7baab; background: #eaf0e8; color: #4e654d; }
.mission-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 24px; margin-top: 14px; }
.mission-author { color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.mission-note { margin-top: 6px; color: var(--muted); font-size: 14px; }
.mission-note summary { display: flex; align-items: center; gap: 7px; min-height: 48px; cursor: pointer; list-style: none; font-weight: 600; }
.mission-note summary::-webkit-details-marker { display: none; }
.mission-note summary svg { width: 19px; height: 19px; }
.mission-note[open] { width: 100%; }
.mission-note[open] summary { margin-bottom: 10px; }
.mission-note-form textarea { min-height: 100px; font-size: 16px; }
.mission-note-form .form-actions { margin-top: 10px; }
.mission-note-form .button { font-size: 14px; }
.mission-note-saved { margin-top: 11px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.daily-note-card { margin-top: 28px; border: 1px solid var(--line); border-radius: 17px; padding: 24px; background: var(--paper); }
.daily-note-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 17px; }
.daily-note-heading svg { width: 25px; height: 25px; color: #4b6c58; }
.daily-note-heading h3 { font-size: 18px; line-height: 1.4; }
.daily-note-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.daily-note-card textarea { min-height: 112px; }
.daily-note-card .form-actions { margin-top: 13px; }
.daily-note-read { color: var(--muted); font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.future-banner { margin-bottom: 22px; border: 1px solid #becbd1; border-radius: 12px; padding: 15px 18px; background: #edf2f4; color: #4d6572; font-size: 15px; line-height: 1.65; }
.workspace-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; margin-top: 36px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--quiet); font-size: 14px; line-height: 1.65; }

/* Vue hebdomadaire */
.week-table-wrap { max-width: 100%; overflow: auto; border: 1px solid #c9d7cd; border-radius: 16px; background: var(--paper); overscroll-behavior-inline: contain; }
.week-table { width: 100%; min-width: 800px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.week-table th, .week-table td { padding: 13px 15px; border-bottom: 1px solid #dbe3db; text-align: center; }
.week-table th:first-child, .week-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 230px; max-width: 270px; background: var(--paper); text-align: left; }
.week-table thead th { padding-block: 17px; background: #eaf1e8; color: #3e6247; font-size: 15px; font-weight: 750; }
.week-table thead th:first-child { background: #eaf1e8; }
.week-table th small { display: block; margin-top: 4px; color: #576f5b; font-size: 14px; line-height: 1.5; font-weight: 400; }
.week-table tbody tr:last-child th, .week-table tbody tr:last-child td { border-bottom: 0; }
.week-row-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 650; }
.week-row-label svg { width: 23px; height: 23px; color: #4c6a55; }
.week-row-label small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 400; }
.week-cell { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 62px; min-height: 48px; border: 1px solid #cad5cd; border-radius: 8px; background: #edf1ee; color: #536851; font-size: 15px; font-weight: 650; }
.week-cell svg { width: 18px; height: 18px; }
.week-cell.validated { border-color: #a2c0aa; background: #e4f0e6; color: #2c6248; }
.week-cell.not_validated { border-color: #dbb6aa; background: #faeae5; color: #974c3e; }
.week-cell.joker { border-color: #d0b56e; background: #fff0c8; color: #73521b; }
.week-total-row th, .week-total-row td { background: #e7f0e5 !important; color: #3d6042; font-size: 16px; font-weight: 750; }
.week-legend { display: flex; flex-wrap: wrap; gap: 12px 19px; margin: 17px 3px 25px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.week-legend span { display: flex; align-items: center; gap: 7px; }
.week-legend svg { width: 18px; height: 18px; }
.weekend-summary-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.weekend-summary-card { min-width: 0; border: 1px solid #cbd8cd; border-radius: 16px; padding: 22px; background: var(--paper); }
.weekend-summary-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.weekend-summary-title h3 { font-size: 20px; line-height: 1.4; }
.weekend-summary-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; }
.weekend-summary-score { color: var(--accent); font-size: 24px; font-weight: 750; white-space: nowrap; }
.weekend-task { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 12px 0; font-size: 16px; line-height: 1.6; }
.weekend-task > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.weekend-task svg { width: 23px; height: 23px; color: #4c6a55; }
.weekend-joker { margin-top: 12px; color: var(--gold); font-size: 14px; }

/* Journal */
.journal-list { display: flex; flex-direction: column; gap: 14px; }
.journal-entry { display: flex; gap: 15px; border: 1px solid #ccd8cf; border-radius: 15px; padding: 21px 22px; background: var(--paper); }
.journal-marker { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: #e8f0e7; color: #4c6a4d; }
.journal-marker svg { width: 25px; height: 25px; }
.journal-content { min-width: 0; flex: 1; }
.journal-line { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 15px; }
.journal-line strong { font-size: 17px; line-height: 1.5; }
.journal-line time { color: var(--muted); font-size: 14px; line-height: 1.6; }
.journal-content p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.journal-transition { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.journal-transition > svg { width: 19px; height: 19px; color: var(--muted); }
.journal-date { margin-top: 9px; color: var(--muted); font-size: 14px; }

/* Administration et dialogue de compte */
.admin-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,1fr); gap: 24px; align-items: start; }
.admin-card { min-width: 0; border: 1px solid #ccd8cf; border-radius: 18px; padding: 26px; background: var(--paper); }
.admin-card h3 { font-size: 22px; letter-spacing: -.025em; line-height: 1.4; }
.admin-card > p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.admin-user-list { display: flex; flex-direction: column; margin-top: 23px; }
.admin-user { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; border-bottom: 1px solid var(--line); padding: 18px 0; }
.admin-user:first-child { padding-top: 0; }
.admin-user:last-child { border-bottom: 0; }
.admin-user .profile-avatar { width: 42px; height: 42px; }
.admin-user-info { min-width: 0; flex: 1; }
.admin-user-info strong { display: block; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.admin-user-info small { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.admin-user .button { font-size: 14px; }
.account-tag { display: inline-block; margin-left: 5px; border-radius: 6px; padding: 2px 7px; background: #e4f0e3; color: #3c653a; font-size: 13px; line-height: 1.7; font-weight: 650; }
.account-tag.disabled { background: #f5e5e0; color: #914c3a; }
.account-role { color: var(--muted); font-size: 14px; }
.admin-suggestions { margin-top: 21px; border-top: 1px solid var(--line); padding-top: 20px; }
.admin-suggestions p { margin-bottom: 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.suggestion-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.suggestion-buttons .button { border-color: #b8cbb6; background: #eef3e9; color: #456241; font-size: 14px; }
.create-user-form { display: grid; gap: 20px; margin-top: 25px; }
.create-user-form .form-grid { gap: 16px; }
.create-user-form label { font-size: 15px; }
.create-user-form .button { margin-top: 4px; }
.admin-tip { margin-top: 21px; border: 1px solid #e2d2ad; border-radius: 12px; padding: 15px 16px; background: #faf0da; color: #73541d; font-size: 14px; line-height: 1.75; }
.checkbox-field { display: flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 18px; font-size: 15px; line-height: 1.6; font-weight: 500; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 24px; }
.modal-heading h2 { font-size: 25px; letter-spacing: -.03em; line-height: 1.3; }
.modal-heading p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.modal-password { margin-block: 22px; }
dialog { width: min(560px,calc(100% - 28px)); max-height: calc(100dvh - 32px); border: 1px solid #bacdc0; border-radius: 20px; padding: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px #16314935; overflow-y: auto; }
dialog::backdrop { background: #16314966; backdrop-filter: blur(3px); }
dialog label { font-size: 15px; }
dialog .form-grid { gap: 18px; }
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 100; width: max-content; max-width: calc(100% - 28px); transform: translateX(-50%); border-radius: 12px; padding: 14px 20px; background: #264b3e; color: white; box-shadow: 0 5px 30px #183e342b; font-size: 15px; line-height: 1.65; text-align: center; }
.toast.error { background: #91463d; }
.nav-count { display: grid; place-items: center; min-width: 25px; height: 25px; margin-left: auto; padding-inline: 5px; border-radius: 8px; background: #fff1cc; color: #74521c; font-size: 14px; font-weight: 750; }
.mission-requested { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 10px 12px; border: 1px solid #e3cc8e; border-radius: 10px; background: var(--gold-soft); color: var(--gold); font-size: 15px; font-weight: 650; }
.mission-requested svg { width: 20px; height: 20px; }

/* Les enfants déclarent une mission ; les adultes attribuent les points. */
.review-rule { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 25px; padding: 18px 20px; border: 1px solid #d6c28b; border-radius: 14px; background: #fff6de; color: #6a4d1e; font-size: 16px; }
.review-rule svg { margin-top: 2px; }
.review-list { display: grid; gap: 20px; }
.review-card { --card-color: #ad4851; --card-fill: #fbecef; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.review-card.jules { --card-color: #216b94; --card-fill: #e9f4fa; }
.review-card-heading { display: flex; align-items: center; gap: 12px; }
.review-card-heading > div { min-width: 0; }
.review-card-heading h3 { color: var(--card-color); font-size: 20px; line-height: 1.3; }
.review-card-heading p { margin-top: 3px; color: var(--muted); font-size: 14px; }
.review-card-heading .status-pill { margin-left: auto; }
.review-mission { display: flex; align-items: center; gap: 12px; margin-top: 23px; }
.review-mission > svg { width: 30px; height: 30px; color: var(--card-color); }
.review-mission h4 { font-size: 20px; line-height: 1.45; }
.review-request-time { margin-top: 10px; color: var(--muted); font-size: 14px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 21px; }
.review-actions .button { min-height: 52px; font-size: 15px; }
.review-readonly { margin-top: 18px; color: var(--muted); font-size: 15px; }

.child-app { min-height: 100dvh; }
.child-app-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(0,1fr) 156px; align-items: center; gap: 12px; max-width: 1200px; margin-inline: auto; padding: 10px 36px; border-bottom: 1px solid #b8cac5; background: var(--page); box-shadow: 0 3px 7px #17364d08; }
.child-header-top { display: contents; }
.child-header-top > .brand { display: none; }
.child-header-actions { display: grid; grid-column: 2; grid-row: 1; grid-template-columns: minmax(0,1fr); gap: 6px; min-width: 0; }
.child-app-header .button { justify-content: center; min-height: 42px; padding: 8px; font-size: 14px; line-height: 1.3; }
.child-app-header .button > svg { width: 22px; height: 22px; }
.child-status-band { display: grid; grid-column: 1; grid-row: 1; grid-template-columns: minmax(0,1fr) 170px; align-items: stretch; gap: 12px; min-width: 0; }
.child-profile-switcher { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; min-width: 0; }
.child-profile-tab { --profile-color: #a5444f; --profile-fill: #fbecef; --profile-light: #e48b9c; display: grid; grid-template-columns: 32px max-content minmax(0,1fr) 24px; grid-template-rows: auto auto 22px; align-items: center; gap: 2px 8px; min-width: 0; min-height: 94px; border: 2px solid #becdca; border-radius: 14px; padding: 7px 12px; background: var(--paper); color: var(--profile-color); text-align: left; }
.child-profile-tab.jules { --profile-color: #216b94; --profile-fill: #e9f4fa; --profile-light: #70badd; }
.child-profile-tab.selected, .child-profile-tab[aria-pressed="true"] { border-color: var(--profile-color); background: var(--profile-fill); box-shadow: inset 0 0 0 1px var(--profile-color); }
.child-profile-tab:not(:disabled):hover { border-color: var(--profile-color); background: var(--profile-fill); }
.child-profile-tab:disabled { cursor: wait; opacity: .65; }
.child-profile-initial { display: grid; grid-column: 1; grid-row: 1 / span 2; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--profile-fill); color: var(--profile-color); font-size: 18px; font-weight: 750; }
.child-profile-tab.selected .child-profile-initial { background: var(--paper); }
.child-profile-name { grid-column: 2; grid-row: 1; min-width: 0; font-size: 22px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.child-profile-period { grid-column: 3; grid-row: 1; justify-self: end; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.child-profile-points { grid-column: 2 / 4; grid-row: 2; min-width: 0; color: var(--profile-color); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
.child-profile-progress { display: block; grid-column: 1 / -1; grid-row: 3; width: 100%; min-width: 0; height: 12px; margin-top: 2px; border: 0; border-radius: 99px; background: #dce5e0; color: var(--gauge-color,#bd4b46); accent-color: var(--gauge-color,#bd4b46); appearance: none; overflow: hidden; }
.child-profile-progress::-webkit-progress-bar { border-radius: 99px; background: #dce5e0; }
.child-profile-progress::-webkit-progress-value { border-radius: 99px; background: var(--gauge-color,#bd4b46); }
.child-profile-progress::-moz-progress-bar { border-radius: 99px; background: var(--gauge-color,#bd4b46); }
.child-profile-gauge { position: relative; display: flex; grid-column: 1 / -1; grid-row: 3; align-items: center; min-width: 0; height: 22px; padding-right: 25px; }
.child-profile-gauge::before { content: ''; position: absolute; z-index: 1; left: calc(50% - 15px); top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px #48625d26; pointer-events: none; }
.child-profile-gauge .child-profile-progress { grid-column: auto; grid-row: auto; height: 14px; margin-top: 0; border: 1px solid #b4c5bd; background: #e3ebe5; }
.child-profile-gauge .child-profile-progress::-webkit-progress-bar { background: repeating-linear-gradient(90deg,#e3ebe5 0 10px,#edf2ed 10px 13px); }
.child-profile-gauge .child-profile-progress::-webkit-progress-value { background: linear-gradient(90deg,var(--gauge-color,#bd4b46),var(--gauge-light,#e99388)); }
.child-profile-gauge .child-profile-progress::-moz-progress-bar { background: linear-gradient(90deg,var(--gauge-color,#bd4b46),var(--gauge-light,#e99388)); }
.child-gauge-goal { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #d1b567; border-radius: 50%; background: #fff5d9; color: #806027; }
.child-gauge-goal > svg { width: 19px; height: 19px; }
.child-profile-tab.is-reached .child-gauge-goal { border-color: #ad842d; background: #ffe59a; color: #705014; box-shadow: 0 0 0 2px #fff2c8; }
.child-profile-tab.is-reached .child-profile-gauge .child-profile-progress { border-color: #ad842d; }
.child-profile-tab > svg { grid-column: 4; grid-row: 1 / span 2; width: 24px; height: 24px; color: var(--profile-color); }
.gauge-tone-0 { --gauge-color: hsl(0 62% 43%); --gauge-light: hsl(0 65% 68%); }
.gauge-tone-1 { --gauge-color: hsl(4 62% 43%); --gauge-light: hsl(4 65% 68%); }
.gauge-tone-2 { --gauge-color: hsl(8 62% 43%); --gauge-light: hsl(8 65% 68%); }
.gauge-tone-3 { --gauge-color: hsl(13 62% 43%); --gauge-light: hsl(13 65% 68%); }
.gauge-tone-4 { --gauge-color: hsl(18 62% 43%); --gauge-light: hsl(18 65% 68%); }
.gauge-tone-5 { --gauge-color: hsl(22 62% 43%); --gauge-light: hsl(22 65% 68%); }
.gauge-tone-6 { --gauge-color: hsl(27 62% 43%); --gauge-light: hsl(27 65% 68%); }
.gauge-tone-7 { --gauge-color: hsl(31 62% 43%); --gauge-light: hsl(31 65% 68%); }
.gauge-tone-8 { --gauge-color: hsl(36 62% 43%); --gauge-light: hsl(36 65% 68%); }
.gauge-tone-9 { --gauge-color: hsl(40 62% 43%); --gauge-light: hsl(40 65% 68%); }
.gauge-tone-10 { --gauge-color: hsl(45 62% 43%); --gauge-light: hsl(45 65% 68%); }
.gauge-tone-11 { --gauge-color: hsl(54 62% 43%); --gauge-light: hsl(54 65% 68%); }
.gauge-tone-12 { --gauge-color: hsl(63 62% 43%); --gauge-light: hsl(63 65% 68%); }
.gauge-tone-13 { --gauge-color: hsl(72 62% 43%); --gauge-light: hsl(72 65% 68%); }
.gauge-tone-14 { --gauge-color: hsl(81 62% 43%); --gauge-light: hsl(81 65% 68%); }
.gauge-tone-15 { --gauge-color: hsl(90 62% 43%); --gauge-light: hsl(90 65% 68%); }
.gauge-tone-16 { --gauge-color: hsl(99 62% 43%); --gauge-light: hsl(99 65% 68%); }
.gauge-tone-17 { --gauge-color: hsl(108 62% 43%); --gauge-light: hsl(108 65% 68%); }
.gauge-tone-18 { --gauge-color: hsl(117 62% 43%); --gauge-light: hsl(117 65% 68%); }
.gauge-tone-19 { --gauge-color: hsl(126 62% 43%); --gauge-light: hsl(126 65% 68%); }
.gauge-tone-20 { --gauge-color: hsl(135 62% 43%); --gauge-light: hsl(135 65% 68%); }
.child-band-weather { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 92px; margin: 0; border: 1px solid #d8c595; border-radius: 14px; padding: 8px 11px; background: #fff5df; color: #6b501d; font: inherit; text-align: left; appearance: none; }
.child-band-weather:not(:disabled):hover { border-color: #a57a29; background: #fff0ce; }
.child-band-weather:focus-visible { outline: 3px solid #216b94; outline-offset: 3px; }
.child-band-weather-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 40px; }
.child-band-weather-icon > svg { width: 34px; height: 34px; }
.child-band-weather-copy { display: grid; align-content: center; gap: 1px; min-width: 0; }
.child-band-weather-place { font-size: 14px; font-weight: 650; line-height: 1.3; }
.child-band-weather-value { font-size: 26px; font-weight: 780; font-variant-numeric: tabular-nums; line-height: 1.15; }
.child-band-weather--text .child-band-weather-value { font-size: 16px; line-height: 1.3; }
.child-band-weather-label, .child-band-weather-note { color: #705b31; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
dialog.child-weather-dialog { width: min(920px,calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; border: 1px solid #b7cac4; border-radius: 22px; padding: 0; background: var(--paper); font-size: 18px; overflow-y: auto; overscroll-behavior: contain; }
.child-weather-dialog-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 18px 24px; background: var(--paper); }
.child-weather-dialog-heading h2 { min-width: 0; font-size: 26px; line-height: 1.3; letter-spacing: -.02em; }
.child-weather-dialog-heading .button { flex-shrink: 0; justify-content: center; gap: 10px; min-height: 52px; padding: 11px 15px; font-size: 18px; }
.child-weather-dialog-heading .button > svg { width: 28px; height: 28px; }
.child-weather-dialog-content { display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: stretch; gap: 20px; min-width: 0; padding: 24px; }
.child-weather-dialog .child-weather h2 { font-size: 19px; }
.child-weather-dialog .child-weather-advice { font-size: 18px; }
.child-weather-dialog .child-weather-icon { width: 76px; height: 80px; }
.child-weather-dialog .child-weather-icon > svg { width: 64px; height: 64px; }
.child-workspace { max-width: 1200px; margin-inline: auto; padding: 38px 36px 32px; }
.child-welcome h1 { margin-top: 9px; font-size: clamp(29px,3.5vw,42px); line-height: 1.23; letter-spacing: -.035em; }
.child-welcome > p:last-child { margin-top: 13px; color: var(--muted); font-size: 18px; }
.child-person-choice { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; margin-block: 28px; }
.child-person-button { --person-color: #ad4851; --person-fill: #fbecef; display: flex; align-items: center; gap: 16px; min-width: 0; min-height: 98px; padding: 20px 23px; border: 2px solid #b8c9cb; border-radius: 18px; background: var(--paper); color: var(--person-color); text-align: left; }
.child-person-button.jules { --person-color: #216b94; --person-fill: #e9f4fa; }
.child-person-button.selected { border-color: var(--person-color); background: var(--person-fill); box-shadow: 0 0 0 1px var(--person-color); }
.child-person-button > span { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; background: var(--person-fill); color: var(--person-color); font-size: 25px; font-weight: 750; }
.child-person-button.selected > span { background: var(--paper); }
.child-person-button strong { min-width: 0; font-size: 25px; }
.child-person-button > svg { margin-left: auto; width: 29px; height: 29px; }
.child-day-tools { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 20px; margin-bottom: 28px; }
.child-weather { display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: center; gap: 14px; min-width: 0; border: 1px solid #dec99c; border-radius: 18px; padding: 16px 18px; background: #fff7e4; color: #59461e; }
.child-weather-icon { display: grid; place-items: center; width: 76px; height: 76px; flex-shrink: 0; border-radius: 18px; background: #ffedbb; color: #805d14; }
.child-weather-icon > svg { width: 56px; height: 56px; }
.child-weather-content { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; min-width: 0; }
.child-weather-details { min-width: 0; }
.child-weather h2 { font-size: 17px; line-height: 1.35; }
.child-weather-value { margin-top: 3px; color: #59461e; font-size: 22px; font-weight: 750; line-height: 1.3; }
.child-weather-advice { margin-top: 4px; font-size: 16px; line-height: 1.45; }
.child-weather-temperature { margin-top: 5px; color: #705b31; font-size: 14px; line-height: 1.4; }
.child-clothing-options { min-width: 0; padding-left: 14px; border-left: 1px solid #e2cfa4; }
.child-clothing-caption { margin: 0 0 8px; color: #705b31; font-size: 14px; font-weight: 700; line-height: 1.3; }
.child-clothing-list { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-start; gap: 10px; margin: 0; padding: 0; list-style: none; }
.child-clothing-item { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 5px; width: max-content; min-width: 76px; max-width: 100%; text-align: center; }
.child-clothing-icon { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #d9c188; border-radius: 16px; background: #fffdfa; color: #6e531d; }
.child-clothing-icon > svg { width: 54px; height: 54px; }
.child-clothing-label { max-width: 100%; color: #59461e; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: normal; word-break: normal; }
.child-day-summary { display: flex; grid-column: 1 / -1; align-items: center; gap: 16px; border: 1px solid #b4cdb8; border-radius: 18px; padding: 23px 25px; background: var(--green-soft); color: var(--green); }
.child-summary-icon { display: grid; place-items: center; width: 56px; height: 56px; flex-shrink: 0; border: 1px solid #b7cbb8; border-radius: 16px; background: #fffefb; }
.child-summary-icon > svg { width: 36px; height: 36px; }
.child-day-summary h2 { font-size: 22px; line-height: 1.4; }
.child-day-summary p { margin-top: 6px; font-size: 16px; }
.child-routine-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; align-items: start; }
.child-routine:only-child { grid-column: 1 / -1; }
.child-routine-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.child-routine-heading > svg { width: 40px; height: 40px; color: var(--gold); }
.child-routine-heading h2 { font-size: 26px; line-height: 1.3; }
.child-mission-list { display: grid; gap: 17px; margin: 0; padding: 0; list-style: none; }
.child-mission { min-width: 0; padding: 24px; border: 1px solid #bfcfca; border-radius: 18px; background: var(--paper); }
.child-mission.waiting { border-color: #c7a654; background: #fffaf0; }
.child-mission.complete { border-color: #a7c6ad; background: #f2f8f0; }
.child-mission-heading { display: flex; align-items: center; gap: 14px; }
.child-mission-icon { display: grid; place-items: center; width: 72px; height: 72px; flex-shrink: 0; border-radius: 18px; background: var(--accent-soft); color: var(--accent); }
.child-mission-icon > svg { width: 48px; height: 48px; }
.child-mission h3 { min-width: 0; font-size: 21px; line-height: 1.45; }
.child-mission-message { margin-top: 15px; color: var(--muted); font-size: 16px; line-height: 1.65; }
.child-mission.waiting .child-mission-message { color: var(--gold); }
.child-mission.complete .child-mission-message { color: var(--green); }
.child-complete-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 62px; margin-top: 20px; border: 1px solid var(--accent-deep); border-radius: 13px; padding: 14px; background: var(--accent); color: white; font-size: 18px; font-weight: 700; line-height: 1.45; }
.child-complete-button:not(:disabled):hover { background: var(--accent-deep); }
.child-complete-button.withdraw { border-color: #b39952; background: #fff0c4; color: #6c4a13; }
.child-complete-button.withdraw:not(:disabled):hover { background: #f8e7ad; }
.child-mission.complete .child-complete-button:disabled { border-color: #b5cfbb; background: #e5f1e3; color: var(--green); }
.child-complete-button:disabled { border-color: #bdcac7; background: #edf1ef; color: #526660; }
.child-complete-button > svg { width: 28px; height: 28px; flex-shrink: 0; }
.child-adult-validation { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 62px; margin-top: 20px; border: 1px solid #b7cdbb; border-radius: 13px; padding: 14px; background: #eef5ed; color: #3d6347; font-size: 17px; font-weight: 700; line-height: 1.45; }
.child-adult-validation > svg { width: 32px; height: 32px; flex-shrink: 0; }
.child-adult-validation > span { min-width: 0; }
.child-app-footer { display: flex; align-items: flex-start; gap: 12px; margin-top: 35px; padding-top: 25px; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.child-app-footer > svg { width: 34px; height: 34px; flex-shrink: 0; color: var(--gold); }
.child-app-footer strong { color: var(--ink); }
.child-step-header { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.child-step-header .child-welcome { flex: 1; min-width: 0; }
.child-back-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; min-height: 62px; border: 2px solid #b5c7c4; border-radius: 15px; padding: 13px 18px; background: var(--paper); color: #355951; font-size: 18px; font-weight: 700; line-height: 1.35; }
.child-back-button > svg { width: 32px; height: 32px; flex-shrink: 0; }
.child-back-button:hover { border-color: #6b8d82; background: #eff5ef; }
.child-person-screen .child-welcome, .child-period-screen .child-welcome { text-align: center; }
.child-person-screen .child-person-choice { max-width: 920px; margin: 36px auto; gap: 26px; }
.child-person-screen .child-person-button { position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 270px; border-width: 3px; border-radius: 26px; padding: 30px 24px; text-align: center; }
.child-person-screen .child-person-button > span { width: 96px; height: 96px; border-radius: 27px; font-size: 46px; }
.child-person-screen .child-person-button strong { font-size: 36px; line-height: 1.25; }
.child-person-screen .child-person-button > svg { position: absolute; top: 20px; right: 20px; width: 32px; height: 32px; margin: 0; }
.child-period-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px; max-width: 920px; margin: 36px auto; }
.child-period-card { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 17px; min-width: 0; min-height: 290px; border: 3px solid #dbc28a; border-radius: 26px; padding: 28px 22px; background: #fff5dc; color: #78551a; text-align: center; }
.child-period-card.evening { border-color: #a9bdd7; background: #eaf1fb; color: #365b82; }
.child-period-card > svg { width: 104px; height: 104px; flex-shrink: 0; }
.child-period-card > strong { font-size: 34px; font-weight: 750; line-height: 1.25; }
.child-period-card > span { max-width: 280px; font-size: 17px; line-height: 1.45; }
.child-period-card:hover { border-color: currentColor; box-shadow: 0 3px 0 #1a394112; }
.child-missions-screen .child-routine-grid { display: block; }
.child-missions-screen .child-mission-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.child-missions-screen .child-routine-heading { margin-bottom: 18px; }
.child-missions-screen .child-day-summary { gap: 12px; padding: 10px 16px; }
.child-missions-screen .child-day-summary > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 18px; min-width: 0; }
.child-missions-screen .child-day-summary h2 { font-size: 20px; }
.child-missions-screen .child-day-summary p { margin-top: 0; font-size: 16px; }
.child-missions-screen .child-summary-icon { width: 44px; height: 44px; border-radius: 13px; }
.child-missions-screen .child-summary-icon > svg { width: 32px; height: 32px; }
.child-step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.child-weeks-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 62px; border: 2px solid #d6bf89; border-radius: 15px; padding: 13px 18px; background: #fff5dc; color: #78551a; font-size: 18px; font-weight: 700; line-height: 1.35; }
.child-weeks-link > svg { width: 30px; height: 30px; }
.child-weeks-link:hover { border-color: #a27b31; background: #ffedbe; }
.child-weeks-intro { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; border: 1px solid #d9d8b7; border-radius: 17px; padding: 18px 21px; background: #fff8e7; color: #655326; font-size: 18px; line-height: 1.5; }
.child-weeks-intro > p { flex: 1 1 300px; min-width: 0; }
.child-weeks-intro .button, .child-weeks-actions .button { justify-content: center; min-height: 54px; padding: 12px 18px; font-size: 17px; }
.child-weeks-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 22px; }
.child-week-card { --week-color: #a5444f; --week-fill: #fbecef; --week-light: #e48b9c; position: relative; min-width: 0; border: 2px solid #d4ddd8; border-radius: 23px; padding: 24px; background: var(--paper); }
.child-week-card.jules { --week-color: #216b94; --week-fill: #e9f4fa; --week-light: #70badd; }
.child-week-card.is-current { border-color: var(--week-color); }
.child-week-card.is-reached { border-color: #c3ad67; background: #fffdf4; }
.child-week-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 22px; }
.child-week-period { display: grid; gap: 7px; min-width: 0; }
.child-week-number { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; min-height: 29px; margin: 0; border: 1px solid #cbd8c9; border-radius: 9px; padding: 3px 10px; background: #f0f5e9; color: #435c43; font-size: 16px; font-weight: 750; line-height: 1.35; }
.child-week-dates { min-width: 0; color: var(--ink); font-size: 19px; line-height: 1.4; }
.child-week-current { display: inline-flex; align-items: center; justify-content: center; width: max-content; max-width: 100%; min-height: 30px; border: 1px solid #c5d7ce; border-radius: 99px; padding: 3px 10px; background: #ecf4ef; color: #3a6352; font-size: 14px; font-weight: 700; line-height: 1.35; }
.child-week-points { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; color: var(--week-color); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.3; }
.child-week-points strong { font-size: 48px; font-weight: 780; letter-spacing: -.04em; }
.child-week-progress { display: block; width: 100%; height: 18px; margin-top: 16px; border: 1px solid #bdcbc3; border-radius: 99px; background: #e3ebe5; color: var(--gauge-color,#bd4b46); accent-color: var(--gauge-color,#bd4b46); appearance: none; overflow: hidden; }
.child-week-progress::-webkit-progress-bar { border-radius: 99px; background: repeating-linear-gradient(90deg,#e3ebe5 0 18px,#edf2ed 18px 22px); }
.child-week-progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg,var(--gauge-color,#bd4b46),var(--gauge-light,#e99388)); }
.child-week-progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg,var(--gauge-color,#bd4b46),var(--gauge-light,#e99388)); }
.child-week-card.is-reached .child-week-progress { border-color: #c3ad67; }
.child-week-badge { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; min-height: 42px; margin-top: 20px; border: 1px solid #d4c7a2; border-radius: 13px; padding: 8px 12px; background: #fff5df; color: #775822; font-size: 16px; font-weight: 750; line-height: 1.4; }
.child-week-badge > svg { width: 25px; height: 25px; }
.child-week-card.is-reached .child-week-badge { border-color: #b6cdb5; background: #e8f4e6; color: #35603d; }
.child-week-jokers { margin-top: 14px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.child-weeks-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.child-weeks-empty, .child-weeks-error { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; min-height: 220px; border: 1px solid #d1ddd6; border-radius: 22px; padding: 34px 26px; background: var(--paper); color: var(--muted); font-size: 18px; line-height: 1.55; text-align: center; }
.child-weeks-empty > svg, .child-weeks-error > svg { width: 52px; height: 52px; color: var(--gold); }
.child-weeks-grid + .child-weeks-empty { min-height: 110px; margin-top: 22px; padding: 24px; }
.child-weeks-error { border-color: #d9b3b3; background: #fff8f6; color: #88464b; }
.child-weeks-error .button { min-height: 54px; padding: 12px 18px; font-size: 17px; }
.child-temperature { display: grid; grid-template-columns: minmax(0,1fr) 82px; align-content: center; column-gap: 12px; row-gap: 5px; min-width: 0; border: 1px solid #bcd0d7; border-radius: 18px; padding: 15px; background: #f2f7f9; color: #304f5b; }
.child-temperature h2, .child-temperature h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.child-temperature-heading, .child-temperature-value, .child-temperature-label { grid-column: 1; min-width: 0; }
.child-temperature-heading { font-size: 17px; font-weight: 700; line-height: 1.35; }
.child-temperature-value { margin-top: 2px; font-size: 42px; font-weight: 780; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.04em; }
.child-temperature-label { margin-top: 1px; color: #304f5b; font-size: 18px; font-weight: 700; line-height: 1.35; }
.child-temperature--cold .child-temperature-label { color: #225f81; }
.child-temperature--cool .child-temperature-label { color: #236963; }
.child-temperature--mild .child-temperature-label { color: #75601e; }
.child-temperature--hot .child-temperature-label { color: #9f4d30; }
.child-temperature-scale { display: flex; grid-column: 2; grid-row: 1 / span 3; align-items: center; align-self: center; gap: 16px; min-width: 0; margin: 4px 0 4px 4px; }
.child-temperature-track { position: relative; flex: 0 0 24px; width: 24px; height: 144px; border: 2px solid #6c838c; border-radius: 999px; background: linear-gradient(to top,#3284bd 0%,#45a5ba 22%,#70ae83 45%,#b7ba63 60%,#efb34f 77%,#d45b53 100%); }
.child-temperature-marker { position: absolute; left: -9px; bottom: 0; width: 38px; height: 5px; border-radius: 4px; background: #203e4b; box-shadow: 0 0 0 2px white; transform: translateY(50%); }
.child-temperature-ticks { display: flex; flex-direction: column; justify-content: space-between; height: 144px; min-width: 0; color: #435e69; font-size: 14px; font-weight: 650; line-height: 1.2; }
.child-temperature-ticks > span { white-space: nowrap; }
.child-temperature-source { grid-column: 1 / -1; margin-top: 6px; color: #4e6974; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.child-temperature-source a { color: #355e70; text-decoration: underline; }
.child-temperature-empty { margin-top: 9px; color: #4e6974; font-size: 17px; line-height: 1.45; }
.child-temperature--unavailable { display: block; }
.child-temperature-unavailable { margin-top: 9px; color: #4e6974; font-size: 17px; line-height: 1.45; }
.child-temperature-icon { display: grid; place-items: center; width: 64px; height: 64px; margin-top: 10px; color: #4e6974; }
.child-temperature-icon > svg { width: 48px; height: 48px; }
.temperature-step-0 .child-temperature-marker { bottom: 0%; }
.temperature-step-1 .child-temperature-marker { bottom: 5%; }
.temperature-step-2 .child-temperature-marker { bottom: 10%; }
.temperature-step-3 .child-temperature-marker { bottom: 15%; }
.temperature-step-4 .child-temperature-marker { bottom: 20%; }
.temperature-step-5 .child-temperature-marker { bottom: 25%; }
.temperature-step-6 .child-temperature-marker { bottom: 30%; }
.temperature-step-7 .child-temperature-marker { bottom: 35%; }
.temperature-step-8 .child-temperature-marker { bottom: 40%; }
.temperature-step-9 .child-temperature-marker { bottom: 45%; }
.temperature-step-10 .child-temperature-marker { bottom: 50%; }
.temperature-step-11 .child-temperature-marker { bottom: 55%; }
.temperature-step-12 .child-temperature-marker { bottom: 60%; }
.temperature-step-13 .child-temperature-marker { bottom: 65%; }
.temperature-step-14 .child-temperature-marker { bottom: 70%; }
.temperature-step-15 .child-temperature-marker { bottom: 75%; }
.temperature-step-16 .child-temperature-marker { bottom: 80%; }
.temperature-step-17 .child-temperature-marker { bottom: 85%; }
.temperature-step-18 .child-temperature-marker { bottom: 90%; }
.temperature-step-19 .child-temperature-marker { bottom: 95%; }
.temperature-step-20 .child-temperature-marker { bottom: 100%; }
.automatic-weather { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; border: 1px solid #c8d7d9; border-radius: 14px; padding: 18px; background: #f4f8f6; color: #36564f; }
.automatic-weather > svg { width: 48px; height: 48px; flex-shrink: 0; }
.automatic-weather p { line-height: 1.5; }
.automatic-weather small { color: #4e6974; font-size: 13px; line-height: 1.45; }
.weather-auto-summary { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 12px 18px; min-width: 0; }
.weather-auto-value { color: #36564f; font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.2; }
.weather-auto-note, .weather-auto-source { color: #526a69; font-size: 13px; line-height: 1.45; }
.weather-auto-source a { color: #355e70; text-decoration: underline; }
.loading-panel { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 17px; padding: 78px 25px; color: var(--muted); font-size: 16px; }
.spinner { width: 28px; height: 28px; border: 3px solid #dbe4d9; border-top-color: #567e56; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Adaptations : réorganiser, sans réduire les textes */
@media (min-width: 1251px) {
  body[data-mode="adult"] .adult-period-routines .mission-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
}

@media (max-width: 1250px) {
  .routine-grid, .admin-layout { grid-template-columns: minmax(0,1fr); }
  .workspace-header { flex-direction: column; }
  .header-actions { justify-content: flex-start; padding-top: 0; }
  .workspace-tools { align-items: stretch; }
  .week-navigation { flex: 1; }
  .date-select { flex-wrap: wrap; }
  .day-utilities { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .joker-info { width: max-content; }
  .weather-box { align-items: flex-start; flex-direction: column; }
  .weather-options { width: 100%; }
  .reward-inline .rule-note { width: 100%; margin-left: 0; }
}

@media (max-width: 980px) {
  .child-day-tools { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .child-routine-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }
  .child-workspace { max-width: 760px; }
  .child-app-header { max-width: 760px; }
  .app-layout { grid-template-columns: 224px minmax(0,1fr); }
  .sidebar { padding-inline: 16px; }
  .sidebar .brand { gap: 8px; }
  .sidebar .brand-logo { width: 34px; height: 38px; border-radius: 11px; }
  .sidebar .brand-title { font-size: 17px; }
  .sidebar .brand-family { font-size: 14px; }
  .sidebar-nav button { gap: 9px; padding-inline: 10px; font-size: 15px; }
  .sidebar-profile { gap: 7px; flex-wrap: wrap; }
  .profile-description { min-width: 104px; }
  .sidebar-profile .logout-button { margin-left: auto; }
  .workspace { padding: 29px 23px 24px; }
  .workspace-header h1 { font-size: 29px; }
  .children-overview, .weekend-summary-grid { grid-template-columns: minmax(0,1fr); gap: 17px; }
  .workspace-tools { flex-direction: column; }
  .week-navigation { width: 100%; }
  .week-label { min-width: 0; }
  .date-select { display: grid; grid-template-columns: minmax(0,1fr) auto; width: 100%; }
  .date-select label { grid-column: 1 / -1; }
  .date-select input { width: 100%; }
  .weather-button { flex: 1 1 112px; }
  .auth-page { padding: 22px; }
  .auth-layout { grid-template-columns: minmax(0,1fr); max-width: 600px; min-height: 0; }
  .auth-story { padding: 30px 34px; }
  .auth-story h1 { max-width: none; margin-top: 29px; font-size: 37px; }
  .auth-story > p { max-width: none; font-size: 17px; }
  .family-scene, .auth-footnote { display: none; }
  .auth-form-side { padding: 35px 34px; }
}

@media (min-width: 701px) and (max-width: 980px) {
  .child-app-header { grid-template-columns: minmax(0,1fr) auto; padding: 8px 18px; gap: 8px; }
  .child-status-band { display: contents; }
  .child-profile-switcher { grid-column: 1 / -1; grid-row: 1; width: 100%; gap: 10px; }
  .child-profile-tab { grid-template-columns: minmax(0,1fr) 24px; grid-template-rows: auto auto 18px 22px; gap: 2px 6px; min-height: 100px; padding: 6px 12px; }
  .child-profile-initial { display: none; }
  .child-profile-name { grid-column: 1; grid-row: 1; }
  .child-profile-points { grid-column: 1 / -1; grid-row: 2; }
  .child-profile-period { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .child-profile-gauge { grid-row: 4; }
  .child-profile-tab > svg { grid-column: 2; grid-row: 1; }
  .child-band-weather { grid-column: 1; grid-row: 2; min-height: 64px; padding: 6px 10px; }
  .child-band-weather-icon, .child-band-weather-icon > svg { width: 30px; height: 30px; }
  .child-band-weather-value { font-size: 24px; }
  .child-header-actions { display: flex; grid-column: 2; grid-row: 2; align-items: center; gap: 6px; }
  .child-header-actions .button { width: 48px; min-width: 48px; min-height: 48px; padding: 10px; font-size: 0; }
  .child-header-actions .button > span { font-size: 0; }
  .child-header-actions .button > svg { width: 26px; height: 26px; }
}

@media (min-width: 701px) and (max-width: 1200px) and (max-height: 900px) {
  .child-app-header { padding-block: 10px; }
  .child-workspace { padding-top: 16px; }
  .child-welcome h1 { margin-top: 5px; font-size: 32px; }
  .child-welcome > p:last-child { margin-top: 7px; font-size: 17px; }
  .child-person-choice { margin-block: 12px; gap: 18px; }
  .child-person-button { min-height: 72px; padding-block: 8px; }
  .child-day-tools { margin-bottom: 16px; gap: 16px; }
  .child-weather { padding-block: 13px; }
  .child-day-summary { padding: 15px 18px; }
  .child-day-summary p { margin-top: 2px; }
  .child-routine-heading { margin-bottom: 10px; }
  .child-mission { padding-block: 14px; }
  .child-mission-message { margin-top: 8px; }
  .child-complete-button, .child-adult-validation { margin-top: 10px; }
}

@media (max-width: 700px) {
  .workspace[data-view="review"] .children-overview,
  .workspace[data-view="review"] .reward-inline,
  .workspace[data-view="review"] .date-select { display: none; }
  .app-layout { display: block; }
  .sidebar { position: relative; display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; height: auto; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .sidebar .brand-logo { width: 40px; height: 40px; }
  .sidebar .brand-title { font-size: 20px; }
  .sidebar .brand-family { font-size: 15px; }
  .sidebar-label, .sidebar-note { display: none; }
  .sidebar-profile { width: 100%; margin: 0; padding-top: 15px; border-top: 1px solid var(--line); flex-wrap: nowrap; gap: 11px; }
  .sidebar-profile .profile-avatar { width: 36px; height: 36px; }
  .profile-description { min-width: 0; }
  .profile-description strong { font-size: 16px; }
  .profile-description span { font-size: 14px; }
  .sidebar-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 5px; border-top: 1px solid #b9cbc0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fffefaf5; backdrop-filter: blur(12px); }
  .sidebar-nav button { justify-content: center; gap: 8px; min-height: 50px; padding: 10px 7px; border-radius: 10px; font-size: 14px; line-height: 1.4; text-align: center; }
  .sidebar-nav button svg { width: 21px; height: 21px; }
  .sidebar-nav button:last-child:nth-child(3) { grid-column: 1 / -1; }
  .sidebar-nav.nav-five { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .sidebar-nav.nav-five button { grid-column: span 2; }
  .sidebar-nav.nav-five button:nth-child(-n+3) { flex-direction: column; gap: 4px; min-height: 65px; padding: 7px 3px; }
  .sidebar-nav.nav-five button:nth-child(n+4) { grid-column: span 3; }
  .sidebar-nav .nav-count { display: none; }
  .workspace { padding: 27px 20px calc(150px + env(safe-area-inset-bottom)); }
  .workspace-header { gap: 18px; margin-bottom: 25px; }
  .workspace-header h1 { font-size: 29px; }
  .workspace-header .intro { font-size: 16px; }
  .header-actions { width: 100%; gap: 10px 13px; }
  .header-actions .connection-status { font-size: 14px; }
  .header-actions .button { margin-left: auto; padding-inline: 13px; }
  .children-overview { gap: 15px; margin-bottom: 21px; }
  .child-score-card { padding: 21px; border-radius: 18px; }
  .child-score-numbers strong { font-size: 42px; }
  .child-card-footer { font-size: 14px; }
  .reward-inline { padding: 15px; font-size: 15px; gap: 10px; }
  .reward-inline > span { min-width: 0; }
  .workspace-tools { margin-bottom: 26px; }
  .week-navigation { gap: 8px; }
  .week-label { font-size: 15px; }
  .date-select { gap: 8px; }
  .view-intro { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .view-intro h2 { font-size: 24px; }
  .view-intro p { font-size: 15px; }
  .day-points { justify-content: flex-start; font-size: 15px; text-align: left; }
  .day-points strong { font-size: 28px; }
  .context-chip { padding: 8px 10px; font-size: 14px; }
  .joker-info { width: auto; max-width: 100%; font-size: 14px; }
  .weather-box { padding: 15px; gap: 12px; }
  .weather-caption { font-size: 15px; }
  .weather-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .weather-button { flex-direction: column; gap: 6px; min-height: 77px; padding: 10px 5px; font-size: 14px; }
  .weather-button svg { width: 32px; height: 32px; }
  body[data-mode="adult"] .adult-period-choice { gap: 12px; margin-bottom: 21px; }
  body[data-mode="adult"] .adult-period-button { flex-direction: column; gap: 9px; min-height: 128px; padding: 16px 10px; text-align: center; }
  body[data-mode="adult"] .adult-period-button strong { font-size: 21px; }
  body[data-mode="adult"] .adult-period-selected { top: 8px; right: 8px; width: 20px; height: 20px; }
  body[data-mode="adult"] .adult-period-selected svg { width: 14px; height: 14px; }
  body[data-mode="adult"] .adult-period-placeholder { grid-template-columns: 30px minmax(0,1fr); align-items: start; gap: 5px 12px; min-height: 0; padding: 19px 17px; }
  body[data-mode="adult"] .adult-period-placeholder > svg { width: 30px; height: 30px; }
  body[data-mode="adult"] .adult-period-placeholder h3 { font-size: 19px; }
  .routine-grid { gap: 27px; }
  .routine-heading h3 { font-size: 21px; }
  .routine-heading p { font-size: 14px; }
  .mission-card { padding: 19px 16px 15px; }
  .mission-head { gap: 10px; align-items: flex-start; }
  .mission-icon { width: 52px; height: 52px; border-radius: 13px; }
  .mission-icon svg { width: 34px; height: 34px; }
  .mission-title { padding-top: 5px; font-size: 18px; }
  .mission-value { margin-top: 6px; padding: 4px 6px; font-size: 14px; }
  .mission-actions { gap: 8px; margin-top: 17px; }
  .mission-action { gap: 6px; min-height: 50px; padding: 11px 7px; font-size: 15px; }
  .mission-action svg { width: 18px; height: 18px; }
  .mission-author { font-size: 14px; }
  .mission-note { font-size: 14px; }
  .mission-meta { align-items: flex-start; }
  .daily-note-card { padding: 21px 17px; }
  .daily-note-heading h3 { font-size: 18px; }
  .daily-note-heading p { font-size: 14px; }
  .workspace-footer { font-size: 14px; }
  .week-table { min-width: 700px; font-size: 15px; }
  .week-table th, .week-table td { padding: 12px 10px; }
  .week-table th:first-child, .week-table td:first-child { min-width: 172px; max-width: 190px; width: 172px; }
  .week-table thead th { font-size: 14px; }
  .week-table th small, .week-row-label small { font-size: 14px; }
  .week-row-label { gap: 7px; }
  .week-row-label svg { width: 20px; height: 20px; }
  .week-cell { min-width: 60px; min-height: 48px; font-size: 15px; }
  .week-legend { font-size: 14px; gap: 11px 15px; }
  .weekend-summary-card { padding: 21px 17px; }
  .weekend-summary-title h3 { font-size: 20px; }
  .weekend-summary-title small { font-size: 14px; }
  .weekend-task { font-size: 16px; }
  .journal-entry { padding: 18px 16px; gap: 12px; }
  .journal-marker { width: 35px; height: 35px; border-radius: 10px; }
  .journal-marker svg { width: 23px; height: 23px; }
  .journal-line { flex-direction: column; gap: 5px; }
  .journal-line strong { font-size: 17px; }
  .journal-line time, .journal-date { font-size: 14px; }
  .journal-content p { font-size: 15px; }
  .admin-card { padding: 23px 18px; border-radius: 16px; }
  .admin-card h3 { font-size: 22px; }
  .admin-card > p { font-size: 15px; }
  .admin-user { gap: 11px; }
  .admin-user-info { flex-basis: calc(100% - 55px); }
  .admin-user .button { margin-left: 53px; }
  .admin-user-info strong { font-size: 17px; }
  .admin-user-info small { font-size: 14px; }
  .create-user-form .form-grid, .form-grid { grid-template-columns: minmax(0,1fr); }
  .auth-page { padding: 16px; }
  .auth-layout { border-radius: 22px; }
  .auth-story { padding: 27px; }
  .auth-story h1 { margin-top: 27px; font-size: 35px; }
  .auth-story > p { font-size: 16px; }
  .auth-form-side { padding: 30px 27px; }
  .auth-form-side h2 { font-size: 29px; }
  .auth-intro { font-size: 16px; }
  .auth-form label { font-size: 15px; }
  .adult-roster-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 17px 12px; }
  .adult-roster-person { font-size: 14px; }
  .adult-roster-person b { font-size: 15px; }
  .adult-avatar { width: 40px; height: 40px; font-size: 17px; }
  .auth-small-print { font-size: 14px; }
  dialog { padding: 24px 20px; }
  .modal-heading { align-items: flex-start; }
  .modal-heading h2 { font-size: 24px; }
  .modal-heading p { font-size: 15px; }
  .toast { bottom: calc(136px + env(safe-area-inset-bottom)); font-size: 15px; }
  .global-error { padding: 14px; font-size: 15px; }
  .review-rule { padding: 16px; font-size: 15px; }
  .review-card { padding: 20px 16px; }
  .review-card-heading { flex-wrap: wrap; gap: 10px; }
  .review-card-heading h3 { font-size: 20px; }
  .review-card-heading .status-pill { margin-left: 54px; }
  .review-mission h4 { font-size: 19px; }
  .review-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
  .review-actions .button { width: 100%; justify-content: center; font-size: 15px; }
  .child-app-header { grid-template-columns: minmax(0,1fr) auto; padding: 8px 14px; gap: 8px; }
  .child-app-header .brand-logo { width: 42px; height: 46px; }
  .child-app-header .brand-title { font-size: 20px; }
  .child-status-band { display: contents; }
  .child-profile-switcher { grid-column: 1 / -1; grid-row: 1; gap: 8px; width: 100%; min-width: 0; }
  .child-profile-tab { grid-template-columns: minmax(0,1fr) 20px; grid-template-rows: auto auto 18px 22px; gap: 2px 6px; min-height: 100px; padding: 6px 9px; }
  .child-profile-initial { display: none; }
  .child-profile-name { grid-column: 1; grid-row: 1; font-size: 20px; }
  .child-profile-points { grid-column: 1 / -1; grid-row: 2; font-size: 18px; }
  .child-profile-period { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .child-profile-gauge { grid-row: 4; }
  .child-profile-progress { height: 12px; }
  .child-profile-tab > svg { grid-column: 2; grid-row: 1; width: 20px; height: 20px; }
  .child-band-weather { grid-column: 1; grid-row: 2; gap: 7px; min-height: 64px; padding: 6px 8px; border-radius: 12px; }
  .child-band-weather-icon { width: 28px; height: 32px; }
  .child-band-weather-icon > svg { width: 28px; height: 28px; }
  .child-band-weather-value { font-size: 24px; }
  .child-band-weather-place { font-size: 13px; }
  .child-band-weather-note { font-size: 13px; }
  .child-header-actions { display: flex; grid-column: 2; grid-row: 2; align-items: center; gap: 6px; width: auto; }
  .child-header-actions .button { flex: none; width: 48px; min-width: 48px; min-height: 48px; padding: 10px; font-size: 0; }
  .child-header-actions .button > span { font-size: 0; }
  .child-header-actions .button > svg { width: 26px; height: 26px; }
  .child-workspace { padding: 28px 18px 27px; }
  .child-welcome h1 { font-size: 30px; }
  .child-welcome > p:last-child { font-size: 17px; }
  .child-person-choice { gap: 12px; margin-block: 24px; }
  .child-person-button { min-height: 96px; padding: 16px 12px; gap: 9px; border-radius: 15px; }
  .child-person-button > span { width: 39px; height: 43px; border-radius: 12px; font-size: 22px; }
  .child-person-button strong { font-size: 22px; }
  .child-person-button > svg { display: none; }
  .child-day-summary { padding: 20px 16px; gap: 12px; }
  .child-weather { grid-template-columns: 70px minmax(0,1fr); align-items: center; padding: 18px 16px; gap: 12px; }
  .child-weather-icon { width: 70px; height: 70px; border-radius: 17px; }
  .child-weather-icon > svg { width: 52px; height: 52px; }
  .child-weather-content { display: contents; }
  .child-clothing-options { grid-column: 1 / -1; padding: 12px 0 0; border-top: 1px solid #e2cfa4; border-left: 0; }
  .child-clothing-item { flex: 1 0 auto; min-width: 64px; }
  .child-summary-icon { width: 52px; height: 52px; border-radius: 15px; }
  .child-summary-icon > svg { width: 34px; height: 34px; }
  .child-day-summary h2 { font-size: 20px; }
  .child-day-summary p { font-size: 16px; }
  .child-routine-heading h2 { font-size: 24px; }
  .child-mission { padding: 22px 18px; }
  .child-mission h3 { font-size: 21px; }
  .child-mission-heading { gap: 12px; }
  .child-mission-message { font-size: 16px; }
  .child-complete-button { font-size: 18px; min-height: 62px; padding-inline: 10px; }
  body[data-mode="child"] .toast, body[data-mode="auth"] .toast { bottom: 22px; }
}

@media (max-width: 380px) {
  .sidebar { padding: 18px 14px; }
  .workspace { padding-inline: 12px; }
  .workspace-header h1 { font-size: 27px; }
  .eyebrow { letter-spacing: .05em; }
  .child-score-card { padding: 18px; }
  .child-title h2 { font-size: 21px; }
  .mission-card { padding-inline: 13px; }
  .mission-head { gap: 8px; }
  .mission-icon { width: 48px; height: 48px; }
  .mission-title { font-size: 18px; }
  .mission-action { font-size: 14px; padding-inline: 6px; }
  .mission-value { font-size: 14px; padding-inline: 5px; }
  .weather-box { padding: 13px; }
  .auth-page { padding: 10px; }
  .auth-story, .auth-form-side { padding-inline: 22px; }
  .auth-story h1 { font-size: 32px; }
  .auth-form-side h2 { font-size: 27px; }
  .modal-heading h2 { font-size: 22px; }
  .child-app-header { padding-inline: 14px; }
  .child-workspace { padding-inline: 14px; }
  .child-person-button { gap: 7px; padding-inline: 9px; }
  .child-person-button > span { width: 33px; height: 38px; }
  .child-person-button strong { font-size: 21px; }
  .child-day-summary { align-items: flex-start; }
  .child-mission { padding-inline: 15px; }
}

@media (max-width: 700px) {
  .child-step-header { align-items: stretch; flex-direction: column; gap: 18px; margin-bottom: 24px; }
  .child-back-button { align-self: flex-start; min-height: 58px; font-size: 17px; }
  .child-person-screen .child-person-choice { grid-template-columns: minmax(0,1fr); gap: 18px; margin-block: 26px; }
  .child-person-screen .child-person-button { flex-direction: row; min-height: 164px; gap: 22px; padding: 24px 20px; }
  .child-person-screen .child-person-button > span { width: 80px; height: 80px; border-radius: 24px; font-size: 38px; }
  .child-person-screen .child-person-button strong { font-size: 32px; }
  .child-person-screen .child-person-button > svg { display: none; }
  .child-period-choice { grid-template-columns: minmax(0,1fr); gap: 18px; margin-block: 26px; }
  .child-period-card { min-height: 220px; gap: 12px; padding: 22px 18px; }
  .child-period-card > svg { width: 86px; height: 86px; }
  .child-period-card > strong { font-size: 30px; }
  .child-period-card > span { font-size: 17px; }
  .child-missions-screen .child-mission-list { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .child-step-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; width: 100%; }
  .child-step-actions > .button, .child-step-actions > .child-back-button, .child-step-actions > .child-weeks-link { flex-direction: column; gap: 6px; width: 100%; min-width: 0; min-height: 76px; padding: 10px 8px; font-size: 16px; text-align: center; }
  .child-step-actions > :only-child { grid-column: 1 / -1; flex-direction: row; width: auto; justify-self: start; min-height: 56px; padding-inline: 15px; }
  .child-step-actions > .button > svg, .child-step-actions > .child-back-button > svg, .child-step-actions > .child-weeks-link > svg { width: 27px; height: 27px; }
  .child-weeks-intro { gap: 14px; padding: 17px; font-size: 17px; }
  .child-weeks-intro > p { flex-basis: 100%; }
  .child-weeks-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .child-week-card { padding: 20px 18px; border-radius: 20px; }
  .child-week-dates { font-size: 20px; }
  .child-week-heading { margin-bottom: 17px; }
  .child-week-points strong { font-size: 44px; }
  .child-week-badge { font-size: 16px; }
  .child-weeks-actions > .button { width: 100%; }
  .child-weeks-empty, .child-weeks-error { min-height: 190px; padding: 26px 19px; font-size: 17px; }
  .child-temperature { padding: 18px 16px; }
  .child-temperature-value { font-size: 42px; }
  .child-temperature-scale { gap: 16px; }
  .automatic-weather { align-items: flex-start; padding: 16px; }
  dialog.child-weather-dialog { border-radius: 18px; }
  .child-weather-dialog-heading { align-items: center; gap: 12px; padding: 14px 16px; }
  .child-weather-dialog-heading h2 { font-size: 23px; }
  .child-weather-dialog-heading .button { gap: 7px; min-height: 50px; padding: 10px 12px; font-size: 17px; }
  .child-weather-dialog-heading .button > svg { width: 24px; height: 24px; }
  .child-weather-dialog-content { grid-template-columns: minmax(0,1fr); gap: 16px; padding: 16px; }
  .child-weather-dialog .child-weather { grid-template-columns: 70px minmax(0,1fr); padding: 16px 12px; }
  .child-weather-dialog .child-weather-icon { width: 70px; height: 74px; }
  .child-weather-dialog .child-weather-icon > svg { width: 60px; height: 60px; }
  .child-weather-dialog .child-weather-advice { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
