/* A tela própria das escolhas do «Eu» da criança (student-screen.js): Letras e espaços, Cores e Avatar. */
.student-screen-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.student-screen-head h1 {
  flex: 1 1 200px;
  margin: 0;
}
.student-screen-head button {
  min-height: var(--skin-target, 48px);
}
.student-screen-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 8px;
  border-radius: 999px;
  background: var(--app-soft);
}
.student-screen-points {
  font-weight: 700;
}
.student-screen-hint {
  margin: 12px 0 0;
}
.student-screen-note {
  font-size: 1.1em;
  font-weight: 700;
}
.student-screen-error:empty {
  display: none;
}
.student-reading-sample-title {
  margin: 16px 0 8px;
  font-size: 1em;
}
/* O menu do aluno (canvas PQ13 · GR13): a lista compacta de Grandes e, quando a skin pede ícones (menuIcones), os
   ladrilhos de Pequenos, dois por linha. O fundo escurecido fecha o menu. */
.frame-top-student .account-menu {
  order: 9;
}
.frame-top-student .account-menu[open]::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(29, 43, 51, 0.45);
}
.frame-top-student .account-menu > summary {
  position: relative;
  z-index: 41;
  /* Abre o «Eu»: é navegação, 64 px como a barra (spec 79). */
  min-height: 64px;
}
.frame-top-student .account-menu[open] > summary::after {
  content: '▴';
}
.student-menu-name {
  font-size: 18px;
}

.account-menu[open] > .account-menu-panel.student-menu {
  position: fixed;
  top: 72px;
  right: 20px;
  left: auto;
  z-index: 41;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: min(92vw, 340px);
  max-height: calc(100dvh - 88px);
  padding: 12px;
}
.student-menu-who {
  display: flex;
  color: var(--app-ink);
  align-items: center;
  gap: 14px;
  padding: 6px 8px 12px;
  border-bottom: 1px solid var(--app-line);
}
.student-menu-face {
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--app-tint);
  font-size: 28px;
}
.student-menu-who b {
  display: block;
  font-size: 20px;
}
.student-menu-who small {
  font-size: 16px;
  color: var(--app-muted, var(--app-ink));
}
.student-menu-group {
  margin: 8px 8px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted, var(--app-ink));
}
.student-menu-items {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.account-menu-panel.student-menu .student-menu-items > button {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  width: auto;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--app-ink);
  text-align: left;
  min-height: var(--skin-target, 44px);
  gap: 4px 12px;
  white-space: normal;
  font-size: var(--skin-text-small, 17px);
  font-weight: 700;
}
.account-menu-panel.student-menu .student-menu-items > button[aria-pressed='true'] {
  background: var(--app-tint);
  border-color: var(--app-primary);
}
.account-menu-panel.student-menu .student-menu-items > button:hover {
  background: var(--app-tint);
  filter: none;
}
.student-menu-sub {
  flex: 1 1 100%;
  font-size: 14px;
  font-weight: 400;
  color: var(--app-muted, var(--app-ink));
}
.student-menu-sub b {
  color: var(--app-ink);
}

/* Pequenos: ladrilhos grandes, dois por linha, com o ícone em cima. */
.account-menu-panel.student-menu-tiles {
  width: min(94vw, 420px);
  gap: 8px;
  border-width: 3px;
  border-radius: 28px;
}
.student-menu-tiles .student-menu-items {
  gap: 10px;
}
.account-menu-panel.student-menu-tiles .student-menu-items > button {
  flex: 1 1 calc(50% - 5px);
  flex-direction: column;
  justify-content: center;
  min-height: 62px;
  padding: 4px 6px;
  border: 3px solid var(--app-ink);
  border-radius: 22px;
  background: var(--app-card);
  box-shadow: 0 5px 0 var(--app-ink);
  text-align: center;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.1;
}
.student-menu-tiles .student-menu-icon {
  font-size: 24px;
  line-height: 1;
}
.student-menu-tiles .student-menu-sub {
  flex: none;
  font-size: 15px;
}
.student-menu-tiles .student-menu-group {
  font-size: 17px;
}
.student-menu-tiles .student-menu-who b {
  font-size: 28px;
}
.student-menu-tiles .student-menu-state {
  display: none;
}
@media (max-width: 599px) {
  .account-menu-panel.student-menu {
    top: 64px;
    right: 8px;
  }
}

.student-feedback-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.student-feedback-choices button {
  min-height: var(--touch-target, 56px);
  font-size: 18px;
}
.student-feedback-choices button[aria-pressed='true'] {
  outline: 3px solid var(--app-primary);
  font-weight: 700;
}
.student-thanks {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  margin: 0;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--app-primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* Spec 79 (dono, 17/10: «no tablet, navegação fluida e simples»). A barra da criança fica presa embaixo, com quatro
   lugares grandes; o conteúdo ganha folga para não ficar atrás dela. */
/* A altura que a barra ocupa embaixo (16 px solta da borda + a barra): toda tela da criança rola até o fim acima dela, e
   a legenda sobreposta fica logo em cima (student-guide.css). */
:root.student-workspace:has(#app:not(.entry-shell) .student-dock) {
  --student-dock-space: calc(112px + env(safe-area-inset-bottom));
}
.student-workspace #app:not(.entry-shell) .student-dock {
  position: fixed;
  /* Solta da borda: a criança apoia o pulso na borda de baixo do tablet (Sesame Workshop); 16 px de folga. */
  inset: auto 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 22px;
  border: 2px solid var(--app-border, #d6dccf);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin: 0;
  background: var(--app-card, #fffdf6);
  box-shadow: 0 -6px 18px rgb(0 0 0 / 8%);
}
.student-workspace #app:not(.entry-shell) .student-dock button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  /* Navegação: 64 px ou mais em toda skin (liderança, spec 79). */
  min-height: max(64px, var(--skin-target-big, 72px));
  padding: 6px 4px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 16px;
}
.student-workspace .student-dock .student-dock-icon {
  font-size: 26px;
  line-height: 1;
}
/* O lugar atual: cor, borda grossa e um traço embaixo (nunca só a cor). */
.student-workspace .student-dock [aria-current='page'] {
  border-width: 3px;
  text-decoration: underline 3px;
  text-underline-offset: 4px;
}
.student-workspace #app:not(.entry-shell) .content {
  padding-bottom: calc(var(--student-dock-space, 0px) + 24px);
}

/* «Ouvir» e «Aa» sempre à vista no alto, do tamanho de um dedo. */
.student-quick {
  display: flex;
  align-items: center;
  gap: 8px;
}
.student-quick button {
  /* Fundo e cor próprios: o cabeçalho de Grandes é escuro, e o botão precisa de 4,5:1 sobre qualquer cabeçalho. */
  background: var(--app-card, #fffdf6);
  color: var(--app-text, #1d2b33);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 64px;
  min-height: 64px;
  padding: 6px 14px;
  font-size: 18px;
  font-weight: 700;
  border-radius: 14px;
}
.student-quick [aria-pressed='true'] {
  border-width: 3px;
}

/* «Eu»: o menu da criança como página inteira, com blocos grandes. */
.frame-top-student .account-menu.student-eu[open] .account-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: auto;
  max-width: none;
  transform: none;
  max-height: none;
  overflow: auto;
  padding: 24px max(16px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom));
  border-radius: 0;
}
.frame-top-student .account-menu.student-eu[open] .student-menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.frame-top-student .account-menu.student-eu[open] [data-student-menu] {
  min-height: 88px;
  font-size: 19px;
  border-radius: 16px;
}
.student-eu-close {
  min-height: var(--touch-target, 56px);
  margin-bottom: 12px;
  padding: 8px 18px;
  font-size: 19px;
  font-weight: 700;
  border-radius: 14px;
}
.account-menu:not(.student-eu) .student-eu-close {
  display: none;
}
.frame-top-student .account-menu.student-eu[open] .student-menu-items {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.frame-top-student .account-menu.student-eu[open] [data-student-menu]:not(.student-eu-close) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid var(--app-border, #d6dccf);
}
