@font-face {
  font-family: system;
  src: local("Avenir Next");
}
* {
  box-sizing: border-box;
}
:root {
  --ink: #14204b;
  --brand: #3267d6;
  --muted: #626d85;
  --paper: #fffdf7;
  --line: #d9e4f4;
  --mint: #e4f0ff;
  --yellow: #fff2bd;
  --pink: #edf5ff;
  --blue: #ddeaff;
  --purple: #e8efff;
  --orange: #fff0b0;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.55 system,
    "Avenir Next",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a.button {
  cursor: pointer;
  min-height: 48px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button {
  color: inherit;
}
a {
  color: var(--ink);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #3267d6;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(32px, 4.3vw, 56px);
  line-height: 1.12;
  letter-spacing: -1.8px;
  font-weight: 650;
  margin-bottom: 20px;
}
h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.7px;
}
h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
p {
  margin-bottom: 18px;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 13px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 750;
}
.topbar {
  height: 92px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--paper);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -1px;
  text-decoration: none;
}
.brand img {
  width: 41px;
  height: 41px;
}
.brand span {
  font-weight: 450;
}
.topbar nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.topbar button {
  background: none;
  border: 0;
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 14px;
}
.topbar .active {
  background: #e4f0ff;
  font-weight: 650;
}
.topbar .round {
  border: 1px solid var(--line);
  width: 48px;
  padding: 0;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 42px 32px 60px;
}
.split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 60px;
  align-items: center;
}
.auth {
  min-height: 80vh;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.auth .card {
  background: #ffffff;
  padding: 34px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  background: #ffffff;
}
.auth-art {
  margin: 24px 0;
  position: relative;
  height: 280px;
  display: grid;
  place-items: center;
}
.auth-art .planet {
  width: 210px;
  height: 210px;
  background: #e4f0ff;
  border: 1px solid #bdd3f4;
  border-radius: 50%;
  font-size: 115px;
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
}
.orbit {
  position: absolute;
  font-size: 42px;
}
.orbit.one {
  left: 10%;
  top: 16px;
  transform: rotate(-12deg);
}
.orbit.two {
  right: 5%;
  bottom: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c5d8f4;
  border-radius: 40px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
}
.button,
button.primary,
button.secondary,
.danger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 15px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
}
.primary {
  background: var(--brand) !important;
  color: white !important;
  border-color: var(--brand) !important;
}
.secondary {
  background: #ffffff !important;
  border-color: var(--line) !important;
}
.danger {
  color: #a03c35;
  border-color: #d9b4ad;
  background: #fff6f2;
}
.wide {
  width: 100%;
}
.link {
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px;
  font-size: 14px;
}
.field {
  display: block;
  margin: 16px 0;
  font-size: 13px;
  font-weight: 650;
}
.field input,
.field select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #c4d6ef;
  border-radius: 12px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--ink);
  min-height: 49px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.error {
  color: #a03c35;
  font-size: 14px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  background: #e4f0ff;
  border-radius: 30px;
  padding: 38px 42px;
  overflow: hidden;
  position: relative;
  border: 1px solid #c4d6ef;
  margin: 26px 0 36px;
}
.hero h1 {
  max-width: 620px;
}
.hero p {
  max-width: 440px;
  color: #626d85;
}
.hero-art {
  display: grid;
  place-items: center;
  font-size: 130px;
  position: relative;
  isolation: isolate;
}
.hero-art:before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border: 1px solid #bdd3f4;
  border-radius: 50%;
  transform: rotate(-20deg);
  z-index: -1;
}
.hero-art:after {
  content: "✧";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 60px;
  color: #dba800;
}
.hero .pill {
  margin-bottom: 20px;
  background: #fff8de;
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 18px;
  gap: 16px;
}
.section-title h2 {
  margin: 0;
}
.grid {
  display: grid;
  gap: 18px;
}
.children {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.child-card {
  padding: 24px;
  position: relative;
}
.avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 39px;
  background: #e4f0ff;
  margin-bottom: 18px;
}
.avatar.large {
  width: 100px;
  height: 100px;
  font-size: 60px;
  margin: 0 auto 20px;
}
.child-card h3 {
  font-size: 23px;
}
.child-card .button {
  margin-top: 18px;
}
.add-card {
  border: 1px dashed #abc4e8;
  border-radius: 24px;
  background: none;
  min-height: 230px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.add-card span {
  font-size: 40px;
  line-height: 1;
}
.modules {
  grid-template-columns: repeat(3, 1fr);
}
.module {
  border: 1px solid #cddff4;
  border-radius: 24px;
  padding: 24px;
  text-align: left;
  min-height: 210px;
  position: relative;
  transition: transform 0.15s;
  background: #fff;
}
.module:hover {
  transform: translateY(-3px);
}
.module .symbol {
  display: block;
  font-size: 44px;
  margin-bottom: 18px;
}
.module .arrow {
  position: absolute;
  right: 24px;
  top: 28px;
  font-size: 22px;
}
.module h3 {
  font-size: 19px;
}
.module p {
  font-size: 13px;
  max-width: 220px;
  margin-bottom: 0;
}
.mint {
  background: var(--mint);
}
.yellow {
  background: var(--yellow);
}
.pink {
  background: var(--pink);
}
.blue {
  background: var(--blue);
}
.purple {
  background: var(--purple);
}
.orange {
  background: var(--orange);
}
.note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 800px;
}
.foot {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin-top: 45px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background: #ffffff;
}
.stat strong {
  font-size: 31px;
  font-weight: 600;
  display: block;
  letter-spacing: -1px;
}
.stat small {
  display: block;
  margin-top: 4px;
}
.chart {
  width: 100%;
  height: 220px;
}
.chart text {
  fill: #626d85;
  font-size: 11px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-weight: 650;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tabs button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: none;
  padding: 9px 15px;
  font-size: 13px;
}
.tabs .active {
  background: var(--ink);
  color: white;
}
.empty {
  text-align: center;
  padding: 45px 24px;
}
.big-emoji {
  font-size: 70px;
  display: block;
  margin-bottom: 20px;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  max-width: 480px;
  width: calc(100% - 32px);
  background: var(--paper);
  color: var(--ink);
  max-height: 90dvh;
  overflow: auto;
}
.dialog::backdrop {
  background: #14204b88;
  backdrop-filter: blur(4px);
}
.avatar-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.avatar-picker button {
  font-size: 29px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 52px;
}
.avatar-picker .selected {
  border: 3px solid var(--ink);
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  min-height: 36px;
}
.check input {
  width: 24px;
  height: 24px;
  accent-color: var(--ink);
}
.task-shell {
  max-width: 840px;
  margin: auto;
  text-align: center;
}
.task-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}
.progress {
  height: 9px;
  border-radius: 20px;
  background: #dbe7f8;
  overflow: hidden;
  flex: 1;
}
.progress div {
  height: 100%;
  background: #3267d6;
  border-radius: 20px;
}
.task-title {
  font-size: clamp(26px, 3vw, 36px);
  max-width: 750px;
  margin: 22px auto;
}
.task-subtitle {
  color: var(--muted);
  font-size: 14px;
}
.task-stage {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 28px;
  margin: 24px 0;
}
.object {
  width: 90px;
  min-height: 100px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 42px;
  border: 1px solid #cddff4;
  background: var(--paper);
  user-select: none;
  -webkit-user-select: none;
}
.object small {
  font-size: 12px;
  color: var(--ink);
}
.object.selected {
  border: 3px solid var(--ink);
  background: #e4f0ff;
}
.objects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 500px;
  margin: 24px auto;
}
.objects .object {
  width: 100%;
  min-height: 108px;
  position: relative;
}
.order {
  position: absolute;
  right: 6px;
  top: 3px;
  font-size: 13px;
  background: var(--ink);
  color: white;
  border-radius: 100%;
  width: 23px;
  height: 23px;
}
.answer-slot {
  width: 82px;
  min-height: 90px;
  border: 2px dashed #a7c2e5;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  touch-action: none;
}
.answer-slot.filled {
  border-style: solid;
  background: #dbeaff;
}
.answer-slot small {
  display: block;
  font-size: 11px;
}
.sound-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.sound-bar button {
  border: 1px solid var(--line);
  border-radius: 40px;
  background: transparent;
  padding: 10px 18px;
}
.feedback {
  padding: 30px;
  border-radius: 24px;
  background: #e4f0ff;
  text-align: center;
}
.feedback h2 {
  font-size: 32px;
}
.room {
  text-align: center;
  font-size: 13px;
}
.room .object {
  margin-top: 10px;
}
.session-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 14px 24px;
  border-radius: 14px;
  z-index: 100;
  max-width: 90%;
  display: none;
}
#toast.visible {
  display: block;
}
.loading {
  opacity: 0.6;
  pointer-events: none;
}
.auth .eyebrow {
  margin-bottom: 24px;
}
.witness {
  border-left: 3px solid #ffd45a;
  padding-left: 18px;
  margin-top: 26px;
  font-size: 13px;
  max-width: 340px;
}
.badge {
  font-size: 11px;
  background: #fff3c4;
  padding: 5px 9px;
  border-radius: 12px;
}
.speech-status {
  font-size: 13px;
  min-height: 24px;
}
.print-only {
  display: none;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
button.dragging {
  background: #fff2bd;
}
.volume {
  width: 120px;
  accent-color: var(--ink);
}
.review {
  border-radius: 18px;
  background: #fff2bd;
  padding: 22px;
  margin: 20px 0;
}
.spinner {
  font-size: 36px;
}
.week-dots {
  display: flex;
  gap: 5px;
  margin: 15px 0;
}
.week-dots i {
  width: 24px;
  height: 7px;
  background: #e4ecf8;
  border-radius: 4px;
}
.week-dots i.done {
  background: #3267d6;
}
@media (max-width: 850px) {
  .auth {
    gap: 30px;
  }
  .modules {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    grid-template-columns: 1fr 190px;
    padding: 30px;
  }
  .hero-art {
    font-size: 100px;
  }
  .hero-art:before {
    width: 170px;
    height: 170px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 76px;
    padding: 0 18px;
  }
  .topbar button {
    padding: 8px 10px;
    font-size: 12px;
  }
  .brand {
    font-size: 21px;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  main {
    padding: 25px 18px 40px;
  }
  .auth {
    display: block;
    padding-top: 32px;
  }
  .auth-art {
    display: none;
  }
  .auth h1 {
    font-size: 37px;
  }
  .auth .witness {
    display: none;
  }
  .auth .card {
    margin-top: 28px;
    padding: 24px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 27px;
    margin: 20px 0 28px;
  }
  .hero-art {
    display: none;
  }
  .hero h1 {
    font-size: 37px;
  }
  .module {
    padding: 19px;
    min-height: 220px;
  }
  .module h3 {
    font-size: 17px;
  }
  .module p {
    font-size: 12px;
  }
  .module .arrow {
    right: 17px;
  }
  .section-title h2 {
    font-size: 23px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .object {
    width: 66px;
    min-height: 80px;
    font-size: 34px;
  }
  .task-stage {
    padding: 20px 12px;
    gap: 9px;
    min-height: 190px;
  }
  .answer-slot {
    width: 60px;
    min-height: 74px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px;
  }
  .foot {
    flex-direction: column;
  }
  .children {
    grid-template-columns: 1fr;
  }
  .add-card {
    min-height: 120px;
  }
  .task-top {
    gap: 12px;
  }
  .task-title {
    font-size: 25px;
  }
  .task-shell main {
    padding: 0;
  }
  .card {
    padding: 21px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .topbar,
  .no-print,
  .foot,
  button,
  .tabs {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .card,
  .stat {
    break-inside: avoid;
  }
  .print-only {
    display: block;
  }
  .chart {
    height: 180px;
  }
  .table-wrap {
    overflow: visible;
  }
}

.settings-grid {
  margin: 24px 0;
}
main > section.card {
  margin-bottom: 24px;
}

/* Shared BrainLab identity across parent, child, training and report screens. */
.brand span {
  color: var(--brand);
  font-weight: 650;
}
.topbar .pill {
  background: #fff3c4;
  border-color: #f0d16a;
}
.auth-art img {
  display: block;
  width: 100%;
  height: 280px;
  min-height: 0;
  min-width: 0;
  object-fit: contain;
}
.hero-art img {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: contain;
}
.hero-art:before,
.hero-art:after {
  display: none;
}
