/* The shared start screen (spec 12.4): pick the child, then the app.
   Used by every app's page; no class here is one of MathLive's (8.6.2). */

/* profile pick (5.1, 12.4.1) */

.profiles { justify-content: center; }

/* educa's sessions ask a portrait tablet to turn (↻, educa.css); the
   start screen works upright, on a tester's phone too */
main#screen.profiles::before { content: none; }

.profile-row, .apps { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 8vw; }

/* several children wrap to the next line on a phone */
.profile-row { flex-wrap: wrap; align-items: flex-start; gap: 4vmin 8vw; }

.profile-cell { display: flex; flex-direction: column; align-items: center; gap: 1.5vmin; }

.profile {
  border: 0.6vmin solid #333;
  border-radius: 4vmin;
  background: white;
  padding: 2vmin;
  width: 34vmin;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vmin;
  font-size: 4vmin;
}

/* 15.8: the child's letter in his color */
.profile .circle {
  width: 24vmin;
  height: 24vmin;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13vmin;
  font-weight: 700;
  line-height: 1;
}

.profile .nickname { max-width: 100%; overflow-wrap: anywhere; }

/* 15.3.5: small, under the circle; a tap only asks */
.leave {
  border: 0;
  background: none;
  color: #6b6357;
  text-decoration: underline;
  font-size: max(0.9rem, 3vmin);
  min-height: 2.75rem;
  padding: 0 1rem;
}

/* 15.3.4: "Entrar" and "Criar conta" */
.account-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 6vmin; }

.account-links a {
  min-width: 10rem;
  min-height: 3rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid #333;
  border-radius: 0.6rem;
  background: white;
  color: #222;
  font-size: 1.2rem;
  text-align: center;
  text-decoration: none;
}

.account-links a.enter { background: #2f6f3a; border-color: #2f6f3a; color: white; }

/* 15.3.5: the question over the screen */
.leave-ask {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 45%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10;
}

.leave-box {
  background: white;
  border-radius: 0.8rem;
  padding: 1.25rem;
  max-width: 22rem;
  width: 100%;
  font-size: 1.15rem;
  text-align: center;
}

.leave-box p { margin: 0 0 1rem; }

.leave-box form { display: flex; gap: 0.75rem; justify-content: center; }

.leave-box button {
  min-width: 6rem;
  min-height: 3rem;
  border: 2px solid #333;
  border-radius: 0.6rem;
  background: white;
  font-size: 1.1rem;
}

.leave-box .yes { background: #b3261e; border-color: #b3261e; color: white; }

/* app pick (12.4.2) */

.app {
  border: 0.6vmin solid #333;
  border-radius: 4vmin;
  background: white;
  padding: 3vmin;
  width: 34vmin;
  height: 34vmin;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-art { width: 100%; height: 100%; }

/* back to the children's circles (12.4.7) */

.start-back {
  position: fixed;
  top: 2vmin;
  left: 2vmin;
  width: 12vmin;
  height: 12vmin;
  border: 0.6vmin solid #333;
  border-radius: 3vmin;
  background: white;
  font-size: 6vmin;
}

/* way into the parent area (5.2, owner P2) */

/* Small and in the top corner: a child who taps it reaches only the
   code screen. */
.parent-entry {
  position: fixed;
  top: 2vmin;
  right: 2vmin;
  font-size: 4vmin;
  color: #b8b0a2;
  text-decoration: none;
}


/* "Entrar" and "Criar conta" (15.2.1, 15.3.1): one column that fits a
   360 px phone; fields large enough for a child's finger */

body.account {
  margin: 0;
  background: #fdf8ef;
  font-family: system-ui, sans-serif;
  color: #222;
}

.account * { box-sizing: border-box; }

.account-form {
  max-width: 24rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1.15rem;
}

.account-form h1 { margin: 0 0 0.5rem; font-size: 1.8rem; }

.account-form form { display: flex; flex-direction: column; gap: 0.5rem; }

.account-form label { font-weight: 600; margin-top: 0.5rem; }

.account-form input {
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  font-size: 1.2rem;
  border: 2px solid #8a8173;
  border-radius: 0.6rem;
  background: white;
}

.account-form .password { display: flex; gap: 0.5rem; }

.account-form .password input { flex: 1; min-width: 0; }

.account-form button {
  min-height: 3rem;
  border: 2px solid #333;
  border-radius: 0.6rem;
  background: white;
  font-size: 1.1rem;
  cursor: pointer;
}

.account-form .show { min-width: 6.5rem; }

.account-form .submit { margin-top: 1rem; background: #2f6f3a; border-color: #2f6f3a; color: white; font-weight: 600; }

.account-form .hint { margin: 0; font-size: 0.95rem; color: #5e574b; }

.account-form .refusal { margin: 0; padding: 0.5rem 0.75rem; border-radius: 0.5rem; background: #fbe9e6; color: #a12a1a; }

.account-form .back-home {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #333;
  border-radius: 0.6rem;
  background: white;
  color: #222;
  font-size: 1.6rem;
  text-decoration: none;
}
