/* Student app shell (public/student.html, public/student.js). The homepage itself is styled by
   home.css; this file covers the page frame and the shell's own screens (sign-in, learner choice,
   class choice, all subjects, "coming next") in the same study-room look. No external assets or
   fonts; logical properties for right-to-left. */

html, body.st-body { margin: 0; min-height: 100%; background: #2c1f5e; }
.st-body {
  color: #1d1b3a;
  font-family: "Nunito", "Baloo 2", "Varela Round", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}
.st-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.st-boot { margin: 0; padding: 40px 16px; color: #ffffff; text-align: center; font-weight: 800; }
.st-skip {
  position: absolute; inset-inline-start: 8px; inset-block-start: -60px; z-index: 20;
  padding: 10px 16px; border-radius: 12px; background: #ffffff; color: #3f2aa8; font-weight: 800;
}
.st-skip:focus { inset-block-start: 8px; }
#st-main:focus { outline: none; }

/* ---------- Shell additions on the homepage ---------- */
.st-account { position: relative; }
.st-menu-btn { cursor: pointer; min-width: 44px; justify-content: center; }
.st-burger { font-size: 1.2rem; line-height: 1; }
.st-menu {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); z-index: 7;
  margin: 0; padding: 6px; list-style: none; min-width: 210px;
  border-radius: 18px; background: #ffffff; box-shadow: 0 10px 30px rgb(30 15 80 / 30%);
}
.st-menu[hidden] { display: none; }
.st-menu-item {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px;
  background: transparent; color: #1d1b3a; font: inherit; font-weight: 700; text-align: start; cursor: pointer;
}
.st-menu-item:hover { background: #f1edff; }
.st-foot {
  grid-column: 1 / -1; margin: 0; justify-self: center; max-width: 60em; padding: 4px 12px; border-radius: 999px;
  background: rgb(30 15 70 / 55%); color: #ffffff; font-size: 0.78rem; font-weight: 700; text-align: center; position: relative; z-index: 1;
}
.st-sim-tag {
  display: inline-block; padding: 0 8px; border-radius: 999px; background: #ffc94a; color: #2a1a00; font-weight: 900; font-size: 0.75rem;
}
.st-toast {
  grid-column: 1 / -1; justify-self: center; position: sticky; inset-block-end: 12px; z-index: 8; margin: 0;
  max-width: min(92vw, 34em); padding: 10px 18px; border-radius: 18px;
  background: #ffffff; color: #1d1b3a; font-weight: 800; text-align: center; box-shadow: 0 10px 30px rgb(30 15 80 / 40%);
}
.st-toast[hidden] { display: none; }
@media (min-width: 1024px) {
  /* The test-version label sits in the bottom edge, under the tutor tray. */
  .hp .st-foot { position: absolute; inset-block-end: 4px; inset-inline: 0; margin-inline: auto; width: fit-content; }
  .hp { padding-block-end: 34px; }
}

/* ---------- Shell screens ---------- */
.st-screen {
  position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; box-sizing: border-box;
  display: grid; align-content: start; justify-items: center; gap: 16px; padding: 12px 12px 24px; overflow: hidden; overflow: clip;
}
.st-screen .hp-scene { position: absolute; inset: 0; z-index: -1; }
.st-brandbar { justify-self: stretch; }
.st-brand {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 20px;
  background: rgb(44 26 96 / 80%); color: #ffffff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%);
}
.st-brand p { margin: 0; }
.st-logo { width: 38px; height: 38px; }
.st-brand-name { font-weight: 900; font-size: 1.25rem; line-height: 1.1; }
.st-tagline { font-size: 0.74rem; font-weight: 700; }
.st-panel {
  box-sizing: border-box; width: 100%; max-width: 30rem; margin: 0; padding: 20px 18px; border-radius: 28px;
  display: grid; gap: 14px;
  background: linear-gradient(150deg, rgb(255 255 255 / 96%), rgb(238 230 255 / 94%));
  box-shadow: 0 0 0 2px rgb(255 255 255 / 85%), 0 0 30px rgb(200 170 255 / 70%), 0 14px 32px rgb(40 20 100 / 30%);
}
.st-center { text-align: center; font-weight: 800; }
.st-title { margin: 0; font-size: 1.6rem; font-weight: 900; line-height: 1.2; }
.st-title:focus { outline: none; }
.st-sub { margin: 0; font-size: 1.15rem; font-weight: 900; }
.st-intro, .st-note { margin: 0; color: #4b4775; font-weight: 700; }
.st-note { font-size: 0.9rem; }
.st-form { display: grid; gap: 12px; }
.st-field { display: grid; gap: 4px; }
.st-field label { font-weight: 800; }
.st-field input, .st-field select {
  box-sizing: border-box; width: 100%; min-height: 48px; padding: 8px 14px; border: 2px solid #c9bdf2; border-radius: 14px;
  background: #ffffff; color: #1d1b3a; font: inherit; font-size: 1rem;
}
.st-field input:focus-visible, .st-field select:focus-visible, .st-check input:focus-visible { outline: 4px solid #ffc94a; outline-offset: 2px; }
.st-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; font-size: 0.92rem; }
.st-check input { flex: none; width: 26px; height: 26px; margin: 2px 0 0; accent-color: #5b3fd6; }
.st-btn {
  justify-self: stretch; min-height: 52px; padding: 10px 24px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #6a4ee8, #3f2aa8); color: #ffffff; font: inherit; font-size: 1.15rem; font-weight: 900; cursor: pointer;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 30%), 0 8px 18px rgb(63 42 168 / 40%);
}
.st-btn[disabled] { opacity: 0.6; cursor: progress; }
.st-link {
  justify-self: center; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px; background: transparent;
  color: #3f2aa8; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer;
}
.st-btn:focus-visible, .st-link:focus-visible, .st-child:focus-visible, .st-subject:focus-visible { outline: 4px solid #ffc94a; outline-offset: 3px; }
.st-error { margin: 0; padding: 10px 14px; border-radius: 14px; background: #fff0f0; color: #8a1c1c; font-weight: 800; }
.st-error[hidden] { display: none; }
.st-children { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 10px; }
.st-child {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 3px solid rgb(255 255 255 / 80%); border-radius: 22px;
  background: linear-gradient(165deg, #f4edff, #d4c2ff); color: #1d1b3a; font: inherit; font-size: 1.1rem; font-weight: 900; cursor: pointer; text-align: start;
  box-shadow: 0 6px 14px rgb(40 20 100 / 20%); overflow-wrap: anywhere;
}
.st-avatar {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe7b0, #ff9fb8); font-weight: 900;
}
.st-add { padding-block-start: 6px; border-block-start: 2px dashed #d9cff7; }
.st-subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-subject {
  min-height: 64px; padding: 8px 10px; border: 3px solid rgb(255 255 255 / 80%); border-radius: 20px;
  background: linear-gradient(165deg, #fff3fb, #f8cfee); color: #1d1b3a; font: inherit; font-weight: 900; cursor: pointer; overflow-wrap: anywhere;
}
.st-subject[aria-pressed="true"] { box-shadow: 0 0 0 3px #ffffff, 0 0 20px rgb(196 150 255 / 90%); }
.st-ai-note {
  margin: 0; max-width: 34rem; padding: 6px 14px; border-radius: 16px; background: rgb(30 15 70 / 60%); color: #ffffff;
  font-size: 0.82rem; font-weight: 700; text-align: center;
}
.st-sim { display: block; opacity: 0.95; }

/* The workspace area: the workspace module styles its own content; this is only the frame. */
.st-workspace { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; box-sizing: border-box; padding: 12px; display: grid; align-content: start; justify-items: center; }
.st-workspace > .hp-scene { position: absolute; inset: 0; z-index: -1; }

@media (min-width: 640px) {
  .st-screen { padding: 20px 24px 32px; align-content: center; }
  .st-brandbar { position: absolute; inset-block-start: 16px; inset-inline-start: 20px; }
  .st-panel { padding: 28px 30px; }
  .st-subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-panel:has(.st-subject-grid) { max-width: 42rem; }
}
@media (prefers-reduced-motion: reduce) {
  .st-body *, .st-body *::before, .st-body *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
