.student-entry[hidden],
#offline-capsule-pane[hidden] {
  display: none !important;
}

.student-entry {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 12, 19, .78);
  backdrop-filter: blur(12px);
  color: #e6f1f5;
}

.student-entry-card {
  width: min(100%, 480px);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: clamp(24px, 6vw, 42px);
  border: 1px solid rgba(45, 212, 191, .58);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(15, 34, 49, .98), rgba(8, 22, 34, .99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .6), 0 0 48px rgba(45, 212, 191, .1);
}

.entry-kicker {
  margin: 0 0 12px;
  color: #2dd4bf;
  font: 700 11px/1.4 "DM Sans", system-ui, sans-serif;
  letter-spacing: .2em;
}

.student-entry-card h1,
.student-entry-card h2 {
  margin: 0;
  color: #f1f7f8;
  font: 600 clamp(26px, 7vw, 36px)/1.15 Georgia, "Palatino Linotype", serif;
}

.student-entry-card h2 {
  font-size: clamp(23px, 6vw, 30px);
}

.entry-copy {
  margin: 14px 0 24px;
  color: #aec3cd;
  font: 15px/1.55 "DM Sans", system-ui, sans-serif;
}

.student-entry-card label {
  display: block;
  margin-bottom: 8px;
  color: #9ab3bf;
  font: 700 11px/1.4 "DM Sans", system-ui, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
}

#lesson-room-form {
  display: grid;
  gap: 10px;
}

#lesson-room-code,
#offline-capsule-select {
  width: 100%;
  min-height: 62px;
  padding: 8px 14px;
  border: 1px solid #285465;
  border-radius: 10px;
  outline: none;
  background: #081622;
  color: #f3fbfa;
  font: 700 clamp(28px, 8vw, 40px)/1 "Courier New", monospace;
  letter-spacing: .32em;
  text-align: center;
  text-transform: uppercase;
  user-select: text;
}

#offline-capsule-select {
  min-height: 50px;
  margin: 0 0 12px;
  font: 500 15px/1.3 "DM Sans", system-ui, sans-serif;
  letter-spacing: normal;
  text-align: left;
}

#lesson-room-code:focus,
#offline-capsule-select:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .16);
}

.entry-join,
.entry-back {
  width: 100%;
  min-height: 48px;
  border: 1px solid #2dd4bf;
  border-radius: 10px;
  background: #2dd4bf;
  color: #06211f;
  font: 700 14px/1.2 "DM Sans", system-ui, sans-serif;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}

.entry-join:hover,
.entry-back:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.entry-back {
  margin-top: 14px;
  border-color: #285465;
  background: #102b3a;
  color: #c5d9df;
}

.entry-feedback,
.entry-status {
  display: block;
  margin-top: 12px;
  color: #a9c0ca;
  font: 13px/1.45 "DM Sans", system-ui, sans-serif;
}

.entry-feedback:not([hidden]) {
  color: #fbbf24;
}

.offline-link {
  display: inline-block;
  margin-top: 22px;
  color: #7ee7d7;
  font: 500 12px/1.4 "DM Sans", system-ui, sans-serif;
  text-decoration: underline;
  text-decoration-color: rgba(126, 231, 215, .45);
  text-underline-offset: 4px;
}

.offline-link:hover {
  color: #c6fff6;
}

.teacher-studio-link {
  display: block;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid rgba(106, 145, 160, .25);
  color: #afc4ce;
  font: 500 12px/1.4 "DM Sans", system-ui, sans-serif;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(175, 196, 206, .4);
  text-underline-offset: 4px;
}

.teacher-studio-link:hover {
  color: #7ee7d7;
  text-decoration-color: currentColor;
}

@media (max-width: 480px) {
  .student-entry {
    padding: 14px;
  }

  .student-entry-card {
    padding: 24px 20px;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entry-join,
  .entry-back {
    transition: none;
  }
}
