
    /* ==========================================================================
       3. CARTÕES, TELAS E BOTÕES ACESSÍVEIS
       ========================================================================== */
    .screen {
      display: none;
      animation: fadeSlideIn 0.35s ease;
    }

    .screen.active {
      display: block;
    }

    @keyframes fadeSlideIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .card {
      background: var(--surface);
      border-radius: var(--radius-lg);
      padding: 26px;
      box-shadow: var(--shadow-card);
      border: 1px solid #e2e8f0;
      margin-bottom: 20px;
    }

    .hero-banner {
      background: linear-gradient(125deg, #0f766e 0%, #0284c7 60%, #0369a1 100%);
      color: #ffffff;
      border-radius: var(--radius-lg);
      padding: 26px 24px 0 24px;
      margin-bottom: 22px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 14px 28px -8px rgba(15, 118, 110, 0.35);
    }

    .hero-content {
      position: relative;
      z-index: 2;
      margin-bottom: 14px;
    }

    .hero-banner h2 {
      font-size: clamp(1.5rem, 3.2vw, 2.15rem);
      font-weight: 900;
      margin-bottom: 8px;
      line-height: 1.2;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    }

    .hero-banner p {
      font-size: 1rem;
      opacity: 0.96;
      max-width: 740px;
    }

    .hero-illustration {
      width: calc(100% + 48px);
      margin-left: -24px;
      display: block;
      margin-bottom: -4px;
    }

    .badge-100 {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: #fef08a;
      color: #713f12;
      font-weight: 800;
      font-size: 0.85rem;
      padding: 5px 14px;
      border-radius: 999px;
      margin-bottom: 12px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-label {
      display: block;
      font-weight: 800;
      font-size: 1.02rem;
      margin-bottom: 8px;
      color: var(--text-main);
    }

    .text-input {
      width: 100%;
      padding: 14px 18px;
      font-size: 1.08rem;
      border: 2px solid var(--border-color);
      border-radius: var(--radius-md);
      outline: none;
      font-weight: 600;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .text-input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
    }

    /* Seletor de Avatar Explorador */
    .avatar-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 12px;
    }

    .avatar-card {
      border: 3px solid #cbd5e1;
      border-radius: var(--radius-md);
      padding: 12px 10px;
      text-align: center;
      cursor: pointer;
      background: #f8fafc;
      transition: all 0.2s ease;
    }

    .avatar-card:hover {
      border-color: var(--primary);
      transform: translateY(-2px);
    }

    .avatar-card.selected {
      border-color: var(--primary);
      background: var(--primary-light);
      box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
    }

    .avatar-emoji {
      font-size: 2.2rem;
      display: block;
      margin-bottom: 4px;
    }

    .avatar-name {
      font-weight: 800;
      font-size: 0.88rem;
      color: var(--primary-dark);
      display: block;
    }

    /* Seletor de Perfil na Tela Inicial (Estudante vs Professor) */
    .profile-switcher {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      background: #f1f5f9;
      padding: 6px;
      border-radius: var(--radius-md);
      margin-bottom: 22px;
      border: 2px solid #e2e8f0;
    }

    .profile-tab {
      border: none;
      background: transparent;
      padding: 12px 14px;
      border-radius: 11px;
      font-weight: 800;
      font-size: 1rem;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s ease;
    }

    .profile-tab.active {
      background: #ffffff;
      color: var(--primary-dark);
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    }

    .teacher-login-box {
      background: #f8fafc;
      border: 2px solid #cbd5e1;
      border-radius: var(--radius-md);
      padding: 22px;
      text-align: center;
    }

    .pin-input-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin: 16px auto 12px;
      max-width: 340px;
    }

    .pin-input {
      text-align: center;
      letter-spacing: 6px;
      font-size: 1.35rem;
      font-weight: 900;
    }

    .filter-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 14px;
    }

    .filter-chip {
      border: 2px solid #cbd5e1;
      background: #f8fafc;
      color: var(--text-main);
      padding: 6px 14px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 0.85rem;
      cursor: pointer;
    }

    .filter-chip.active {
      background: var(--primary);
      border-color: var(--primary);
      color: #ffffff;
    }

    .level-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 14px;
    }

    .level-card {
      border: 3px solid #cbd5e1;
      border-radius: var(--radius-md);
      padding: 18px;
      cursor: pointer;
      background: #f8fafc;
      transition: all 0.2s ease;
      text-align: left;
      position: relative;
    }

    .level-card:hover {
      border-color: var(--primary);
      background: #f0fdfa;
      transform: translateY(-2px);
    }

    .level-card.selected {
      border-color: var(--primary);
      background: var(--primary-light);
      box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
    }

    .level-card h3 {
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--primary-dark);
      margin-bottom: 6px;
    }

    .level-card p {
      font-size: 0.92rem;
      color: var(--text-muted);
    }

    .btn-primary {
      background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
      color: #ffffff;
      border: none;
      border-radius: var(--radius-md);
      padding: 16px 28px;
      font-size: 1.12rem;
      font-weight: 800;
      cursor: pointer;
      box-shadow: var(--shadow-btn);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: transform 0.12s ease, filter 0.15s ease;
      width: 100%;
    }

    .btn-primary:hover {
      filter: brightness(1.06);
      transform: translateY(-1px);
    }

    .btn-primary:active {
      transform: translateY(2px);
      box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    }

    .btn-secondary {
      background: #ffffff;
      color: var(--primary-dark);
      border: 2px solid var(--primary);
      border-radius: var(--radius-md);
      padding: 12px 20px;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background 0.15s ease;
    }

    .btn-secondary:hover {
      background: var(--primary-light);
    }

    /* ==========================================================================
       7. MODO PROFESSOR (MODAL DE GABARITO COMENTADO) E MENSAGENS
       ========================================================================== */
    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.65);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      z-index: 1000;
    }

    .modal-backdrop.open {
      display: flex;
    }

    .modal-dialog {
      background: #ffffff;
      border-radius: var(--radius-lg);
      max-width: 820px;
      width: 100%;
      max-height: 86vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    }

    .modal-header {
      padding: 18px 24px;
      background: var(--primary-dark);
      color: #ffffff;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-body {
      padding: 20px 24px;
      overflow-y: auto;
    }

    .teacher-item {
      border-bottom: 1px solid #e2e8f0;
      padding: 14px 0;
    }

    .teacher-item:last-child {
      border-bottom: none;
    }

    .footer-bar {
      margin-top: auto;
      text-align: center;
      padding: 16px 8px 6px;
      font-size: 0.84rem;
      color: var(--text-muted);
    }

    .teacher-trigger {
      background: none;
      border: none;
      color: var(--text-muted);
      text-decoration: underline;
      cursor: pointer;
      font-size: 0.84rem;
      font-weight: 600;
      margin-top: 6px;
    }

    .toast-msg {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: #1e293b;
      color: #ffffff;
      padding: 12px 22px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 0.95rem;
      z-index: 2000;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
      display: none;
    }

    /* Partículas de Confete */
    .confetti-piece {
      position: fixed;
      width: 10px;
      height: 10px;
      top: -12px;
      z-index: 3000;
      pointer-events: none;
      border-radius: 2px;
      animation: confettiFall linear forwards;
    }

    @keyframes confettiFall {
      to {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0;
      }
    }