.bq-family-auth-screen {
  min-height: min(880px, calc(100vh - 40px));
  align-items: stretch;
}

.bq-family-auth-screen:not(.hidden) {
  display: flex;
}

.bq-family-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr);
  width: min(1180px, 100%);
  min-height: 720px;
  margin: auto;
  overflow: hidden;
  border: 1px solid #cfe2f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(20, 45, 86, .16);
}

.bq-family-world {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 42px;
  overflow: hidden;
  color: #10265c;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(238,249,255,.96)),
    #f2f9ff;
}

.bq-family-world::after {
  position: absolute;
  inset: auto -12% -25% 8%;
  height: 58%;
  content: "";
  border: 2px solid rgba(34, 105, 233, .13);
  border-radius: 50% 50% 0 0;
  background: linear-gradient(90deg, rgba(38, 210, 155, .13), rgba(255, 214, 65, .16), rgba(247, 113, 89, .12));
  transform: rotate(-4deg);
}

.bq-family-brand,
.bq-family-world-copy,
.bq-family-worlds {
  position: relative;
  z-index: 1;
}

.bq-family-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
}

.bq-family-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #10265c;
  background: #ffd641;
  font-weight: 900;
}

.bq-family-world-copy {
  max-width: 620px;
}

.bq-family-world-copy h1 {
  max-width: 560px;
  margin: 8px 0 16px;
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: .98;
  letter-spacing: 0;
}

.bq-family-world-copy p:last-child {
  max-width: 540px;
  color: #52627b;
  font-size: 1.05rem;
  line-height: 1.55;
}

.bq-family-landing-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.bq-family-landing-actions .button {
  min-width: 150px;
  min-height: 52px;
  box-shadow: 0 12px 26px rgba(34, 105, 233, .2);
}

.bq-family-landing-actions span {
  max-width: 250px;
  color: #52627b;
  font-size: .82rem;
  line-height: 1.35;
}

.bq-family-worlds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: end;
}

.bq-family-worlds span {
  display: grid;
  min-height: 170px;
  padding: 12px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(34, 64, 112, .12);
}

.bq-family-worlds .exam { border-bottom: 6px solid #2269e9; }
.bq-family-worlds .winter { border-bottom: 6px solid #7b38ed; }
.bq-family-worlds .chemistry { border-bottom: 6px solid #ef7a32; }

.bq-family-worlds img {
  width: 100%;
  height: 150px;
  object-fit: contain;
}

.bq-family-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  border-left: 1px solid #dce8f7;
  background: #fff;
}

.bq-family-panel-head h2 {
  margin: 6px 0 24px;
  color: #10265c;
  font-size: 2rem;
  letter-spacing: 0;
}

.bq-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid #d7e5f5;
  border-radius: 8px;
  background: #eef5fb;
}

.bq-auth-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #52627b;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bq-auth-tabs button[aria-pressed="true"] {
  color: #10265c;
  background: #fff;
  box-shadow: 0 3px 10px rgba(30, 61, 108, .1);
}

.bq-auth-form {
  display: grid;
  gap: 10px;
}

.bq-signup-steps {
  display: grid;
  grid-template-columns: 28px auto 1fr 28px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: #52627b;
  font-size: .75rem;
  font-weight: 800;
}

.bq-signup-steps strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2269e9;
}

.bq-signup-steps i {
  height: 2px;
  background: #d2e0ef;
}

.bq-signup-steps.complete-first strong:first-child,
.bq-signup-steps.complete-first i { background: #26a875; }

.bq-parent-confirm {
  display: grid !important;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 8px !important;
  line-height: 1.4;
}

.bq-parent-confirm input {
  width: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: #2269e9;
}

.bq-honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bq-auth-form label {
  margin-top: 4px;
  color: #273a60;
  font-size: .82rem;
  font-weight: 850;
}

.bq-auth-form input,
.bq-child-choice input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #b9cce4;
  border-radius: 8px;
  color: #10265c;
  background: #fff;
  font: inherit;
}

.bq-auth-form input:focus,
.bq-child-choice input:focus,
.bq-auth-tabs button:focus-visible,
.bq-family-auth-screen .button:focus-visible {
  outline: 3px solid #10265c;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #ffd641;
}

.bq-auth-form .button {
  min-height: 50px;
  margin-top: 12px;
}

.bq-auth-form input:disabled,
.bq-auth-form button:disabled,
.bq-child-choice input:disabled,
.bq-child-choice button:disabled {
  cursor: wait;
  opacity: .62;
}

.bq-field-hint {
  margin-top: -6px;
  color: #64738b;
  font-size: .78rem;
  line-height: 1.35;
}

.bq-auth-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 4px solid #d74366;
  border-radius: 6px;
  color: #7a1833;
  background: #fff1f5;
  font-weight: 750;
}

.bq-family-next {
  display: grid;
  gap: 16px;
}

.bq-family-next h3 {
  margin: 0;
  color: #10265c;
  font-size: 1.55rem;
}

.bq-child-list {
  display: grid;
  gap: 10px;
}

.bq-child-choice {
  display: grid;
  grid-template-columns: 52px minmax(100px, 1fr) minmax(112px, 132px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d5e3f3;
  border-radius: 8px;
  background: #f8fbff;
}

.bq-child-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: #10265c;
  background: #ffd641;
  font-size: 1.15rem;
  font-weight: 900;
}

.bq-child-choice strong { display: block; color: #10265c; }
.bq-child-choice small { color: #64738b; }
.bq-child-choice .button { min-height: 44px; }

.bq-family-child-settings {
  display: grid;
  gap: 10px;
}

.bq-child-pin-row {
  display: grid;
  grid-template-columns: 52px minmax(120px, 1fr) minmax(132px, 160px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d5e3f3;
  border-radius: 8px;
  background: #f8fbff;
}

.bq-child-pin-row strong,
.bq-child-pin-row small {
  display: block;
}

.bq-child-pin-row strong { color: #10265c; }
.bq-child-pin-row small { color: #64738b; }

.bq-child-pin-row input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #b9cce4;
  border-radius: 8px;
  color: #10265c;
  background: #fff;
  font: inherit;
}

.bq-family-add-child {
  padding-top: 16px;
  border-top: 1px solid #dce8f7;
}

.bq-auth-secondary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .bq-family-auth-screen { min-height: 100dvh; padding: 0; }
  .bq-family-auth-layout { grid-template-columns: 1fr; min-height: 100dvh; border: 0; }
  .bq-family-world { min-height: 140px; padding: 20px 24px; }
  .bq-family-world-copy h1 { margin-bottom: 0; font-size: 1.8rem; }
  .bq-family-world-copy p:last-child { display: none; }
  .bq-family-worlds { display: none; }
  .bq-family-panel { padding: 28px 24px 38px; border-top: 1px solid #dce8f7; border-left: 0; }
}

@media (max-width: 460px) {
  .bq-family-world { min-height: 126px; }
  .bq-family-brand-mark { width: 40px; height: 40px; }
  .bq-family-world-copy .eyebrow { display: none; }
  .bq-family-world-copy h1 { margin-top: 14px; font-size: 1.55rem; }
  .bq-family-panel { justify-content: flex-start; }
  .bq-child-choice { grid-template-columns: 44px 1fr; }
  .bq-child-choice input { grid-column: 1 / -1; }
  .bq-child-choice .button { grid-column: 1 / -1; width: 100%; }
  .bq-child-pin-row { grid-template-columns: 44px 1fr; }
  .bq-child-pin-row input,
  .bq-child-pin-row .button { grid-column: 1 / -1; width: 100%; }
}
