    .quiz-pager {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin: 1.5rem 0;
      flex-wrap: wrap;
    }
    .quiz-pager .quiz-btn {
      min-width: 120px;
      text-align: center;
    }
    .quiz-progress {
      text-align: center;
      font-size: 0.95rem;
      color: var(--text-muted);
      font-weight: 500;
    }
    .quiz-progress strong {
      color: var(--primary);
    }
    .quiz-pager .quiz-btn,
    .quiz-actions .quiz-btn {
      border-radius: 999px;
      font-weight: 700;
      padding: 0.7rem 1.5rem;
      transition: transform 0.15s ease, box-shadow 0.2s ease;
    }
    .quiz-pager .quiz-btn:not(:disabled):hover {
      transform: translateY(-1px);
    }
    .quiz-pager .quiz-btn-primary {
      box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
    }
    .quiz-actions {
      display: flex;
      gap: 0.75rem;
      flex-wrap: wrap;
      margin-top: 0.5rem;
    }
    .quiz-actions .quiz-btn-primary {
      box-shadow: 0 4px 12px rgba(26, 115, 232, 0.28);
    }
    .question-card {
      display: none;
      background: #ffffff;
      border: 1px solid #e3ebf7;
      border-radius: 16px;
      padding: 1.5rem 1.75rem;
      box-shadow: 0 4px 16px rgba(26, 115, 232, 0.06);
      animation: cardIn 0.35s ease;
    }
    .question-card.active {
      display: block;
    }
    @keyframes cardIn {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .question-num {
      display: inline-block;
      background: linear-gradient(135deg, var(--primary), var(--primary-light));
      color: #fff;
      font-weight: 800;
      padding: 0.3rem 0.9rem;
      border-radius: 999px;
      font-size: 0.85rem;
      margin-bottom: 0.75rem;
      letter-spacing: 0.3px;
    }
    .question-tag {
      display: inline-block;
      background: var(--brand-100);
      color: var(--primary-dark);
      font-size: 0.75rem;
      font-weight: 700;
      padding: 0.2rem 0.7rem;
      border-radius: 999px;
      margin-left: 0.5rem;
      vertical-align: middle;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }
    .question-card p {
      margin-bottom: 1rem;
      line-height: 1.7;
      font-size: 1.02rem;
      color: #1f2937;
    }
    .question-card .opsi {
      margin: 0.25rem 0 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      max-width: 640px;
    }
    .question-card .opsi-item {
      display: flex;
      align-items: flex-start;
      gap: 0.65rem;
      padding: 0.65rem 0.85rem;
      min-height: 46px;
      border: 1.5px solid var(--border);
      border-radius: 999px;
      cursor: pointer;
      transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
      background: #fff;
    }
    .question-card .opsi-item:hover {
      border-color: var(--primary-light);
      background: var(--bg-soft);
      transform: translateX(2px);
    }
    .question-card .opsi-item:active {
      transform: scale(0.99);
    }
    .question-card .opsi-item.checked {
      border-color: var(--primary);
      background: var(--brand-100);
      box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
    }
    .question-card .opsi-letter {
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1.5px solid var(--border);
      border-radius: 8px;
      font-weight: 800;
      font-size: 0.82rem;
      color: var(--primary-dark);
      background: #fff;
      transition: all 0.18s ease;
    }
    .question-card .opsi-item.checked .opsi-letter {
      background: var(--gradient-soft);
      border-color: transparent;
      color: #fff;
    }
    .question-card .opsi-text {
      line-height: 1.6;
      color: #334155;
      padding-top: 0.15rem;
      min-width: 0;
    }
    .question-card code,
    .opsi-text code {
      background: var(--brand-100);
      color: var(--primary-dark);
      padding: 0.15rem 0.4rem;
      border-radius: 5px;
      font-size: 0.9em;
      font-family: "Consolas", "Menlo", monospace;
      border: 1px solid var(--brand-200);
    }
    .progress-bar-wrap {
      position: fixed;
      top: calc(60px + env(safe-area-inset-top));
      left: 0;
      right: 0;
      z-index: 250;
      height: 6px;
      background: rgba(228, 230, 245, 0.95);
      border-radius: 0;
      overflow: hidden;
      margin: 0;
      box-shadow: 0 1px 4px rgba(76, 29, 149, 0.12);
    }
    .progress-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--primary), var(--primary-light));
      border-radius: 0;
      transition: width 0.35s ease;
    }
    .quiz-timer {
      position: fixed;
      top: calc(58px + env(safe-area-inset-top));
      left: 50%;
      transform: translateX(-50%);
      z-index: 260;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.4rem 0.95rem;
      border-radius: 999px;
      font-weight: 800;
      font-size: 0.92rem;
      letter-spacing: 0.4px;
      color: var(--primary-dark);
      background: rgba(255, 255, 255, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.8);
      box-shadow: 0 6px 18px rgba(109, 40, 217, 0.16);
      backdrop-filter: blur(12px) saturate(160%);
      -webkit-backdrop-filter: blur(12px) saturate(160%);
      transition: opacity 0.3s;
      font-variant-numeric: tabular-nums;
    }
    .quiz-timer.warn {
      color: #b91c1c;
      border-color: rgba(220, 38, 38, 0.5);
      background: rgba(254, 226, 226, 0.75);
      animation: timerPulse 1s ease-in-out infinite;
    }
    .quiz-timer.dim { opacity: 0.5; pointer-events: none; }
    @keyframes timerPulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.72; }
    }
    .pembahasan-card {
      display: none;
      margin-bottom: 1rem;
      padding: 1rem 1.25rem;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--bg);
    }
    .pembahasan-card.show {
      display: block;
    }
    .pembahasan-card benar {
      border-left: 4px solid #16a34a;
      background: #f0fdf4;
    }
    .pembahasan-card.salah {
      border-left: 4px solid #dc2626;
      background: #fef2f2;
    }
    .pembahasan-card .pb-status {
      font-weight: 700;
      font-size: 0.9rem;
      margin-bottom: 0.35rem;
    }
    .pembahasan-card .pb-status.benar-text {
      color: #16a34a;
    }
    .pembahasan-card .pb-status.salah-text {
      color: #dc2626;
    }
    .pembahasan-card .pb-kunci {
      margin-bottom: 0.25rem;
    }
    .pembahasan-card .pb-jawaban-saya {
      font-size: 0.9rem;
      color: var(--text-muted);
    }
    .pembahasan-card .pb-text {
      font-size: 0.93rem;
      line-height: 1.6;
      margin-top: 0.4rem;
    }
    .pb-intro {
      font-size: 0.9rem;
      color: var(--text-muted);
      margin-bottom: 1rem;
    }
    .rekap-status {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      flex-wrap: wrap;
      margin: 1rem auto 1.5rem;
      max-width: 460px;
      padding: 0.9rem 1.1rem;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.55);
      border: 1px solid rgba(255, 255, 255, 0.7);
      backdrop-filter: blur(14px) saturate(160%);
      -webkit-backdrop-filter: blur(14px) saturate(160%);
      box-shadow: 0 8px 24px rgba(45, 18, 90, 0.1);
      color: var(--text);
      font-size: 0.92rem;
      line-height: 1.5;
    }
    .rekap-status.saving #rekapStatusMsg::before {
      content: "";
      display: inline-block;
      width: 16px;
      height: 16px;
      margin-right: 0.55rem;
      border: 2.5px solid var(--brand-200);
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: rekapSpin 0.8s linear infinite;
      vertical-align: -3px;
    }
    .rekap-status .quiz-btn {
      margin: 0;
      padding: 0.55rem 1.1rem;
      font-size: 0.85rem;
    }
    @keyframes rekapSpin {
      to { transform: rotate(360deg); }
    }
    .summary-card {
      position: relative;
      max-width: 760px;
      margin: 0 auto 2rem;
      padding: 1.5rem 1.7rem 1.7rem;
      border-radius: 24px;
      color: var(--primary-dark);
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.3) 100%);
      border: 1px solid rgba(255, 255, 255, 0.75);
      box-shadow: 0 24px 60px rgba(109, 40, 217, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
      backdrop-filter: blur(18px) saturate(160%);
      -webkit-backdrop-filter: blur(18px) saturate(160%);
      overflow: hidden;
    }
    .summary-card > * {
      position: relative;
      z-index: 1;
    }
    .sy-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding-bottom: 1rem;
      border-bottom: 1px solid rgba(109, 40, 217, 0.14);
      margin-bottom: 1.2rem;
    }
    .sy-title h3 {
      margin: 0;
      font-size: 1.3rem;
      font-weight: 800;
    }
    .sy-sub {
      display: block;
      margin-top: 0.15rem;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-muted);
    }
    .sy-badge {
      flex-shrink: 0;
      padding: 0.35rem 0.95rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 0.4px;
      border: 1.5px solid currentColor;
    }
    .sy-badge.pass { color: #15803d; background: rgba(22, 163, 74, 0.08); }
    .sy-badge.fail { color: #92400e; background: rgba(245, 158, 11, 0.1); }
    .sy-body {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
      gap: 1rem;
      align-items: stretch;
    }
    .sy-score {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 1.4rem 1.2rem 1.2rem;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.7);
    }
    .sy-num {
      font-size: 4.2rem;
      font-weight: 800;
      line-height: 1;
      background: var(--gradient);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    .sy-label {
      margin-top: 0.35rem;
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--text-muted);
      letter-spacing: 2px;
      text-transform: uppercase;
    }
    .nilai-note {
      margin: 0.7rem 0 0;
      font-size: 0.84rem;
      font-weight: 700;
      color: #92400e;
    }
    .sy-stats {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.7);
      overflow: hidden;
    }
    .sy-stats li {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      padding: 0.7rem 1.1rem;
    }
    .sy-stats li + li { border-top: 1px solid rgba(109, 40, 217, 0.12); }
    .sy-stat-lbl { font-size: 0.84rem; font-weight: 600; color: var(--text-muted); }
    .sy-stat-val { font-size: 1.25rem; font-weight: 800; color: var(--primary-dark); }
    @media (max-width: 640px) {
      .summary-card { padding: 1.3rem 1rem 1.3rem; border-radius: 20px; }
      .sy-header { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
      .sy-body { grid-template-columns: 1fr; }
      .sy-num { font-size: 3.4rem; }
      .sy-stats li { padding: 0.6rem 1rem; }
    }

    /* ===== Login mengikuti glassmorphism di css/style.css ===== */
    @keyframes loginFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes loginPopIn {
      from { opacity: 0; transform: translateY(28px) scale(0.92); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* ===== Login siswa — konsep sama seperti login admin (split panel terang) ===== */
    #loginModal.login-modal {
      background:
        radial-gradient(600px 320px at 12% 8%, rgba(168,85,247,0.18), transparent 60%),
        radial-gradient(700px 380px at 88% 90%, rgba(76,29,149,0.14), transparent 60%),
        var(--bg-soft);
    }
    #loginModal.login-modal::before { display: none; }
    #loginModal.login-modal::after { display: none; }
    #loginModal .login-floating-shape { display: none; }
    #loginModal .siswa-shell {
      position: relative; width: 100%; max-width: 920px;
      display: grid; grid-template-columns: 1fr 1fr;
      background: #fff; border: 1px solid var(--border); border-radius: 24px;
      box-shadow: var(--shadow-lg); overflow: hidden;
    }
    #loginModal .siswa-brand {
      background: var(--gradient); color: #fff;
      padding: 2.6rem 2.3rem; display: flex; flex-direction: column; justify-content: center;
      position: relative; overflow: hidden;
    }
    #loginModal .siswa-brand::before, #loginModal .siswa-brand::after {
      content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.12);
    }
    #loginModal .siswa-brand::before { width: 280px; height: 280px; right: -90px; top: -90px; }
    #loginModal .siswa-brand::after { width: 200px; height: 200px; left: -60px; bottom: -70px; background: rgba(255,255,255,0.08); }
    #loginModal .siswa-badge-top {
      display: inline-flex; align-items: center; gap: 0.6rem;
      background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.25);
      border-radius: 999px; padding: 0.4rem 0.9rem 0.4rem 0.5rem;
      font-size: 0.72rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
      width: fit-content; position: relative; z-index: 1;
    }
    #loginModal .siswa-badge-top .cap {
      width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--primary-dark);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    #loginModal .siswa-badge-top .cap svg { width: 16px; height: 16px; }
    #loginModal .siswa-brand h2 { font-size: 1.9rem; line-height: 1.2; margin: 1.1rem 0 0.5rem; color: #fff; text-align: left; position: relative; z-index: 1; }
    #loginModal .siswa-brand > p { color: rgba(255,255,255,0.88); font-size: 0.93rem; max-width: 34ch; text-align: left; margin: 0; position: relative; z-index: 1; }
    #loginModal .siswa-features { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; position: relative; z-index: 1; }
    #loginModal .siswa-features li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.88rem; font-weight: 600; color: rgba(255,255,255,0.95); }
    #loginModal .siswa-features .check {
      width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
      background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.25);
      display: flex; align-items: center; justify-content: center;
    }
    #loginModal .siswa-features .check svg { width: 14px; height: 14px; }
    #loginModal .siswa-brand-foot { margin-top: 1.8rem; font-size: 0.78rem; color: rgba(255,255,255,0.75); position: relative; z-index: 1; }
    #loginModal .siswa-side { padding: 2.4rem 2.2rem; display: flex; flex-direction: column; justify-content: center; position: relative; }
    #loginModal .siswa-eyebrow { font-size: 0.7rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--primary); }
    #loginModal .siswa-side h2 { text-align: left; color: var(--text); font-size: 1.45rem; margin: 0.4rem 0 0.3rem; }
    #loginModal .siswa-sub { text-align: left; color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1.2rem; }
    #loginModal .login-input-wrap { position: relative; }
    #loginModal .login-label.float-label {
      position: absolute; left: clamp(2.5rem, 5vw, 3.2rem); top: 50%; transform: translateY(-50%);
      font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
      pointer-events: none; transition: top 0.22s cubic-bezier(0.33,1,0.68,1), transform 0.22s cubic-bezier(0.33,1,0.68,1), font-size 0.22s cubic-bezier(0.33,1,0.68,1), color 0.2s ease;
      margin: 0;
    }
    #loginModal .login-input-group:focus-within .login-label.float-label { color: var(--primary); }
    #loginModal .login-input:focus + .float-label,
    #loginModal .login-input:not(:placeholder-shown) + .float-label {
      top: 0; transform: translateY(-50%); font-size: 0.7rem; font-weight: 700;
      letter-spacing: 0.8px; text-transform: uppercase; color: var(--primary);
      background: #fff; padding: 0 0.45rem; line-height: 1.4; z-index: 1;
    }
    #loginModal .login-input.error + .float-label { color: var(--danger-600); }
    #loginModal .login-input {
      color: var(--text); background: #fff; border: 1.5px solid var(--border);
      backdrop-filter: none; -webkit-backdrop-filter: none;
      padding: 0.7rem 1rem 0.7rem clamp(2.5rem, 5vw, 3.2rem);
      line-height: 1.5; text-align: left; vertical-align: middle;
    }
    #loginModal .login-input::placeholder { color: transparent; }
    #loginModal .login-input:hover { background: #fff; border-color: var(--brand-300); }
    #loginModal .login-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(109,40,217,0.14); }
    #loginModal .login-input-icon {
      color: var(--text-muted);
      /* Ukuran eksplisit di sini (tidak hanya mengandalkan CSS dasar),
         agar ikon tidak pernah membesar walau CSS dasar gagal termuat / versi lama. */
      width: 20px; height: 20px; max-width: 20px; max-height: 20px; flex-shrink: 0;
    }
    #loginModal .login-input-group:focus-within .login-input-icon { color: var(--primary); }
    #loginModal .login-input.error { border-color: var(--danger-600); background: #fef2f2; }
    #loginModal .login-input.error:focus { box-shadow: 0 0 0 4px rgba(220,38,38,0.14); }
    #loginModal .login-error {
      position: absolute;
      z-index: 3;
      left: 0.75rem;
      bottom: calc(100% + 0.55rem);
      width: max-content;
      max-width: calc(100% - 1.5rem);
      display: none;
      align-items: flex-start;
      gap: 0.55rem;
      margin: 0;
      padding: 0.7rem 0.9rem;
      font-size: 0.85rem;
      line-height: 1.35;
      font-weight: 600;
      border: 1px solid #fecaca;
      border-radius: 12px;
      background: var(--danger-100);
      color: var(--danger-700);
      text-align: left;
      animation: toastIn 0.22s ease;
    }
    #loginModal .login-error.show { display: flex; }
    #loginModal .login-error svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
    @keyframes toastIn {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: none; }
    }
    #loginModal .quiz-btn-block {
      width: 100%; min-width: 0; margin-inline: 0;
      background: var(--gradient-soft); border-color: transparent; color: #fff;
      box-shadow: 0 8px 20px rgba(109,40,217,0.32);
    }
    #loginModal .quiz-btn-block:hover:not(:disabled) { box-shadow: 0 12px 26px rgba(109,40,217,0.38); filter: brightness(1.07); }
    /* Link navigasi ala button (pola MDN: a + :hover/:focus/:active, ikon aria-hidden) */
    #loginModal .siswa-link-btn,
    #loginModal .siswa-link-btn:link,
    #loginModal .siswa-link-btn:visited {
      display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
      padding: 0.55rem 0.9rem; min-height: 40px; border: 1.5px solid var(--border); border-radius: 999px;
      background: #fff; color: var(--primary-dark);
      font-size: 0.8rem; font-weight: 800; text-decoration: none; text-align: center;
      transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }
    #loginModal .siswa-link-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
    #loginModal .quiz-btn-block { font-weight: 500; }
    #loginModal .siswa-link-btn:link,
    #loginModal .siswa-link-btn:visited { font-weight: 500; }
    #loginModal .siswa-link-btn:hover,
    #loginModal .siswa-link-btn:focus {
      background: var(--bg-soft); border-color: var(--brand-300);
      transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none;
    }
    #loginModal .siswa-link-btn:active { transform: scale(0.97); box-shadow: none; }
    #loginModal .siswa-link-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(109,40,217,0.3); }
    #loginModal .siswa-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.6rem; }
    @media (max-width: 420px) {
      #loginModal .siswa-link-btn {
        padding: 0.5rem 0.35rem;
        gap: 0.35rem;
        font-size: 0.76rem;
        min-height: 38px;
      }
      #loginModal .siswa-link-btn svg { width: 15px; height: 15px; }
      #loginModal .siswa-links { gap: 0.4rem; }
    }
    #loginModal .siswa-close {
      position: absolute; top: 0.9rem; right: 0.9rem; width: 36px; height: 36px;
      display: flex; align-items: center; justify-content: center;
      background: #fff; border: 1px solid var(--border); border-radius: 50%;
      font-size: 1.2rem; color: var(--text-muted); cursor: pointer; line-height: 1;
      transition: background 0.2s ease, transform 0.15s ease;
    }
    #loginModal .siswa-close:hover { background: var(--bg-soft); color: var(--text); transform: scale(1.05); }
    #loginModal .siswa-close:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(109,40,217,0.3); }
    /* Ritme vertikal form: konsisten + anti-lompat saat error muncul */
    #loginModal .login-input-group { margin-bottom: 0; }
    #loginModal .quiz-btn-block { margin-top: 0.9rem; }
    /* Pembatas elegan antara aksi utama dan link sekunder */
    #loginModal .siswa-divider {
      display: flex; align-items: center; gap: 0.7rem; margin: 1.1rem 0 0;
      color: var(--text-muted); font-size: 0.72rem; font-weight: 800;
      text-transform: uppercase; letter-spacing: 1.2px;
    }
    #loginModal .siswa-divider::before, #loginModal .siswa-divider::after {
      content: ""; flex: 1; height: 1px; background: var(--border);
    }
    /* Ikon ringkas di atas "Login Siswa" — khusus layar kecil */
    #loginModal .siswa-mobile-icon {
      display: none; width: 60px; height: 60px; border-radius: 18px;
      background: var(--gradient); color: #fff;
      align-items: center; justify-content: center;
      box-shadow: 0 10px 24px rgba(109,40,217,0.35);
      margin-bottom: 1rem;
    }
    #loginModal .siswa-mobile-icon svg { width: 30px; height: 30px; }
    @media (max-width: 820px) {
      #loginModal.login-modal { align-items: center; padding: max(1.2rem, env(safe-area-inset-top)) max(0.9rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left)); }
      #loginModal .siswa-shell { grid-template-columns: 1fr; border-radius: 20px; max-width: 480px; width: 100%; }
      #loginModal .siswa-brand { display: none; }
      #loginModal .siswa-side { padding: 1.8rem 1.4rem; }
      #loginModal .siswa-mobile-icon { display: flex; margin: 0 auto 1rem; }
      #loginModal .siswa-eyebrow, #loginModal .siswa-side h2, #loginModal .siswa-sub { text-align: center; }
      #loginModal .siswa-side h2 { font-size: 1.35rem; }
    }
    @media (prefers-reduced-motion: reduce) {
      #loginModal .login-label.float-label { transition: none !important; }
    }

    /* ===== Responsive kecil ===== */
    /* ===== Konfirmasi: Masih ada soal belum dijawab ===== */
    .finish-modal {
      position: fixed;
      inset: 0;
      z-index: 400;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      background: rgba(35, 20, 60, 0.6);
      backdrop-filter: blur(5px);
      -webkit-backdrop-filter: blur(5px);
      overflow-y: auto;
    }
    .finish-modal.show {
      display: flex;
      animation: loginFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .finish-card {
      position: relative;
      overflow: hidden;
      margin: auto;
      max-width: 400px;
      width: 100%;
      background: #fff;
      border-radius: 18px;
      padding: 2rem 1.9rem 1.9rem;
      text-align: center;
      box-shadow: 0 24px 64px rgba(46, 16, 101, 0.35);
      border: 1px solid var(--border);
      animation: loginPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .finish-card::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--accent-500), #fb923c);
      z-index: 1;
    }
    .finish-icon {
      position: relative;
      width: 72px;
      height: 72px;
      margin: 0 auto 1rem;
      border-radius: 50%;
      background: var(--accent-100);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .finish-icon::before,
    .finish-icon::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 50%;
      border: 2px solid rgba(245, 158, 11, 0.45);
      animation: finishPulse 1.8s ease-out infinite;
      pointer-events: none;
    }
    .finish-icon::after {
      animation-delay: 0.45s;
    }
    @keyframes finishPulse {
      0% { transform: scale(1); opacity: 1; }
      100% { transform: scale(1.55); opacity: 0; }
    }
    .finish-icon svg {
      width: 34px;
      height: 34px;
      stroke: var(--accent-600);
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .finish-card h2 {
      font-size: 1.3rem;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 0.4rem;
    }
    .finish-count {
      display: inline-block;
      font-size: 2.4rem;
      font-weight: 800;
      line-height: 1.2;
      background: var(--gradient);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    .finish-msg {
      font-size: 0.92rem;
      color: var(--text-muted);
      line-height: 1.6;
      margin: 0.4rem 0 1.4rem;
    }
    .finish-actions {
      display: flex;
      gap: 0.75rem;
    }
    .finish-actions .quiz-btn {
      flex: 1 1 0;
      padding: 0.75rem 1rem;
      border-radius: 999px;
      font-weight: 700;
    }
    .finish-actions .quiz-btn-primary {
      background: var(--gradient-soft);
      color: #fff;
      box-shadow: 0 8px 20px rgba(109, 40, 217, 0.35);
      transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
    }
    .finish-actions .quiz-btn-primary:hover {
      transform: translateY(-2px);
      filter: brightness(1.08);
    }
    .finish-actions .quiz-btn-primary:active {
      transform: scale(0.96);
    }
    @media (max-width: 480px) {
      .finish-card {
        max-width: 100%;
        padding: 1.6rem 1.3rem 1.4rem;
        border-radius: 16px;
      }
      .finish-icon {
        width: 60px;
        height: 60px;
      }
      .finish-icon svg {
        width: 28px;
        height: 28px;
      }
      .finish-card h2 { font-size: 1.2rem; }
      .finish-actions {
        flex-direction: column-reverse;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .finish-modal,
      .finish-card,
      .finish-icon::before,
      .finish-icon::after {
        animation: none !important;
        transition: none !important;
      }
    }

    /* ===== Dialog Umum (pengganti confirm/alert; tidak mengganggu fullscreen) ===== */
    .dialog-modal {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      background: rgba(35, 20, 60, 0.6);
      backdrop-filter: blur(5px);
      -webkit-backdrop-filter: blur(5px);
      overflow-y: auto;
    }
    .dialog-modal.show {
      display: flex;
      animation: loginFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .dialog-card {
      position: relative;
      overflow: hidden;
      margin: auto;
      max-width: 420px;
      width: 100%;
      background: #fff;
      border-radius: 18px;
      padding: 2rem 1.9rem 1.9rem;
      text-align: center;
      box-shadow: 0 24px 64px rgba(46, 16, 101, 0.35);
      border: 1px solid var(--border);
      animation: loginPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .dialog-card::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: var(--gradient);
      z-index: 1;
    }
    .dialog-icon {
      position: relative;
      width: 64px;
      height: 64px;
      margin: 0 auto 1rem;
      border-radius: 50%;
      background: var(--brand-100);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .dialog-icon svg {
      width: 30px;
      height: 30px;
      stroke: var(--primary);
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .dialog-msg {
      font-size: 0.95rem;
      color: var(--text);
      line-height: 1.6;
      margin: 0.4rem 0 1.4rem;
    }
    .dialog-actions {
      display: flex;
      gap: 0.75rem;
    }
    .dialog-actions .dialog-btn {
      flex: 1 1 0;
      display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
      padding: 0.75rem 1rem;
      min-height: 44px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 0.92rem;
      cursor: pointer;
      border: 1.5px solid transparent;
      transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
    }
    .dialog-btn svg.lucide { width: 18px; height: 18px; flex-shrink: 0; }
    .dialog-btn.dialog-cancel {
      background: #fff;
      border-color: var(--border);
      color: var(--text);
    }
    .dialog-btn.dialog-cancel:hover { background: var(--bg-soft); }
    .dialog-btn.dialog-ok {
      background: var(--gradient-soft);
      color: #fff;
      box-shadow: 0 8px 20px rgba(109, 40, 217, 0.35);
    }
    .dialog-btn.dialog-ok:hover { transform: translateY(-2px); filter: brightness(1.08); }
    .dialog-btn.dialog-ok:active { transform: scale(0.96); }
    .dialog-actions .dialog-btn:only-child { flex: 1 1 100%; }
    @media (max-width: 480px) {
      .dialog-card {
        padding: 1.6rem 1.3rem 1.4rem;
        border-radius: 16px;
      }
      .dialog-actions { flex-direction: column-reverse; }
    }
    @media (prefers-reduced-motion: reduce) {
      .dialog-modal,
      .dialog-card {
        animation: none !important;
        transition: none !important;
      }
    }

    /* ===== Loading Overlay (glassmorphism) ===== */
    .loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 9998;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.18);
      backdrop-filter: blur(14px) saturate(160%);
      -webkit-backdrop-filter: blur(14px) saturate(160%);
      padding: 1.5rem;
    }
    .loading-overlay.show {
      display: flex;
      animation: loadingFadeIn 0.35s ease;
    }
    .loading-glass {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.2rem;
      padding: 2.4rem 2.8rem;
      background: rgba(255, 255, 255, 0.32);
      border: 1px solid rgba(255, 255, 255, 0.55);
      border-radius: 22px;
      box-shadow: 0 20px 50px rgba(46, 16, 101, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      text-align: center;
      max-width: 92%;
    }
    .loading-spinner {
      width: 56px;
      height: 56px;
      border: 5px solid rgba(109, 40, 217, 0.18);
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    .loading-text {
      color: var(--primary-dark);
      font-size: 1.12rem;
      font-weight: 600;
      animation: fadeInUp 0.6s ease;
    }
    .loading-nama {
      color: var(--primary);
      font-size: 1.35rem;
      font-weight: 800;
    }
    @keyframes loadingFadeIn {
      from { opacity: 0; }
    }
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ===== Siswa Badge (di dalam quizArea) ===== */
    .siswa-badge {
      display: none;
      align-items: center;
      gap: 0.85rem;
      padding: 0.7rem 1rem;
      background: linear-gradient(135deg, #ffffff, #f3f7ff);
      border: 1px solid #d6e3f8;
      border-left: 4px solid var(--primary);
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(26, 115, 232, 0.08);
      margin-bottom: 1rem;
    }
    .siswa-badge.show {
      display: flex;
    }
    .s-b-avatar {
      flex-shrink: 0;
      width: 42px;
      height: 42px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, var(--primary), var(--primary-light));
      color: #fff;
      font-weight: 800;
      font-size: 1.05rem;
      border-radius: 50%;
      letter-spacing: 0.5px;
    }
    .s-b-info {
      display: flex;
      flex-direction: column;
      min-width: 0;
    }
    .s-b-label {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text-muted);
      font-weight: 600;
    }
    .s-b-name {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .s-b-nis {
      margin-left: auto;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      padding: 0.25rem 0.7rem;
      background: #eef4ff;
      border: 1px solid #d3e2fb;
      border-radius: 8px;
      flex-shrink: 0;
    }
    .s-b-nis-label {
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--primary);
      font-weight: 700;
    }
    .s-b-nis-value {
      font-size: 0.95rem;
      font-weight: 800;
      color: var(--primary-dark);
      font-family: "Consolas", "Menlo", monospace;
    }
    .s-b-meta {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      flex-shrink: 0;
    }
    .s-b-meta .s-b-nis {
      margin-left: 0;
    }
    @media (max-width: 480px) {
      .s-b-avatar { width: 36px; height: 36px; font-size: 0.9rem; }
      .s-b-info { flex: 1; }
      .s-b-meta { gap: 0.35rem; }
      .s-b-nis { padding: 0.2rem 0.5rem; }
      .s-b-nis-value { font-size: 0.85rem; }
    }

    /* ===== Sembunyikan elemen global (footer/back-to-top) agar view tetap & fokus ===== */
    .footer,
    .back-to-top {
      display: none !important;
    }

    /* ===== Header: badge siswa di navbar ===== */
    .header-user {
      margin-left: auto;
      display: flex;
      align-items: center;
      min-width: 0;
      padding-left: 0.75rem;
    }
    .header-title {
      flex: 0 1 auto;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .header .siswa-badge {
      display: none;
      align-items: center;
      gap: 0.6rem;
      padding: 0.28rem 0.7rem 0.28rem 0.3rem;
      background: rgba(255, 255, 255, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.35);
      border-radius: 999px;
      box-shadow: none;
      margin-bottom: 0;
    }
    .header .siswa-badge.show {
      display: flex;
      animation: headerBadgeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    @keyframes headerBadgeIn {
      from { opacity: 0; transform: translateY(-8px) scale(0.95); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    .header .s-b-avatar {
      width: 32px;
      height: 32px;
      font-size: 0.85rem;
    }
    .header .s-b-label {
      font-size: 0.6rem;
      color: rgba(255, 255, 255, 0.75);
    }
    .header .s-b-name {
      font-size: 0.85rem;
      color: #fff;
      max-width: 190px;
    }
    .header .s-b-nis {
      background: rgba(255, 255, 255, 0.2);
      border: none;
      padding: 0.18rem 0.6rem;
      border-radius: 999px;
    }
    .header .s-b-nis-label {
      color: rgba(255, 255, 255, 0.75);
    }
    .header .s-b-nis-value {
      color: #fff;
      font-size: 0.85rem;
    }

    /* ===== Cek Soal: FAB melayang di bawah header (kanan, di bawah detail siswa) ===== */
    .cek-soal-fab {
      position: fixed;
      top: calc(60px + 0.75rem + env(safe-area-inset-top));
      right: max(1.5rem, env(safe-area-inset-right));
      z-index: 300;
      flex-shrink: 0;
      width: 46px;
      height: 46px;
      border: none;
      border-radius: 50%;
      background: var(--gradient);
      box-shadow: 0 8px 20px rgba(76, 29, 149, 0.4);
      cursor: pointer;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 0;
      transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.25s ease, background 0.2s ease, filter 0.2s ease;
    }
    .cek-soal-fab.show {
      display: flex;
      animation: fabIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    @keyframes fabIn {
      from { opacity: 0; transform: scale(0.5) translateY(-24px); }
      to   { opacity: 1; transform: scale(1) translateY(0); }
    }
    .cek-soal-fab:hover {
      transform: translateY(-3px) scale(1.05);
      filter: brightness(1.08);
      box-shadow: 0 14px 32px rgba(76, 29, 149, 0.55);
    }
    .cek-soal-fab:active {
      transform: scale(0.92);
      box-shadow: 0 4px 12px rgba(76, 29, 149, 0.4);
    }
    @media (prefers-reduced-motion: reduce) {
      .cek-soal-fab,
      .header .siswa-badge {
        animation: none !important;
        transition: none !important;
      }
    }
    .fab-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(2, 1fr);
      gap: 4px;
      width: 56%;
      height: auto;
      aspect-ratio: 3 / 2;
    }
    .fab-grid i {
      display: block;
      width: 100%;
      height: 100%;
      background: #fff;
      border-radius: 3px;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    }

    /* ===== Cek Soal: Sidebar (drawer) kanan ===== */
    .cek-soal-drawer {
      position: fixed;
      inset: 0;
      z-index: 500;
      visibility: hidden;
      pointer-events: none;
    }
    .cek-soal-drawer.open {
      visibility: visible;
      pointer-events: auto;
    }
    .cek-soal-drawer-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.5);
      opacity: 0;
      transition: opacity 0.25s ease;
    }
    .cek-soal-drawer.open .cek-soal-drawer-backdrop {
      opacity: 1;
    }
    .cek-soal-drawer-panel {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      width: min(340px, 88vw);
      background: #fff;
      box-shadow: -10px 0 30px rgba(0, 0, 0, 0.18);
      transform: translateX(100%);
      transition: transform 0.28s ease;
      padding: 1.25rem 1.25rem;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }
    .cek-soal-drawer.open .cek-soal-drawer-panel {
      transform: translateX(0);
    }
    .cek-soal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .cek-soal-title {
      font-weight: 800;
      font-size: 1.05rem;
      color: var(--text);
    }
    .cek-soal-close {
      background: none;
      border: none;
      font-size: 1.6rem;
      line-height: 1;
      color: var(--text-muted);
      cursor: pointer;
      padding: 0.1rem 0.35rem;
      border-radius: 6px;
      transition: color 0.2s, background 0.2s;
    }
    .cek-soal-close:hover {
      color: #dc2626;
      background: #fdecec;
    }
    .cek-soal-legend {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      font-size: 0.85rem;
      color: var(--text);
      font-weight: 600;
      padding-bottom: 0.75rem;
      border-bottom: 1px solid var(--border);
    }
    .cek-soal-legend .leg {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .cek-soal-legend .leg-box {
      width: 16px;
      height: 16px;
      border-radius: 4px;
      display: inline-block;
    }
    .cek-soal-legend .done-box {
      background: #22c55e;
      border: 1.5px solid #16a34a;
    }
    .cek-soal-legend .empty-box {
      background: #f1f5f9;
      border: 1.5px solid #cbd5e1;
    }
    .cek-soal-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 0.6rem;
    }
    .cek-soal-item {
      aspect-ratio: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      font-weight: 800;
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
      font-size: 0.9rem;
      position: relative;
    }
    .cek-soal-item.done {
      background: #d1fae5;
      border: 1.5px solid #16a34a;
      color: #166534;
    }
    .cek-soal-item.empty {
      background: #f1f5f9;
      border: 1.5px solid #cbd5e1;
      color: #94a3b8;
    }
    .cek-soal-item.current {
      outline: 3px solid var(--primary);
      outline-offset: 1px;
      box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    }
    .cek-soal-item.done.current {
      background: #86efac;
      border-color: #15803d;
    }
    .cek-soal-item:hover {
      transform: translateY(-2px);
    }
    .cek-soal-item .done-mark {
      position: absolute;
      top: -4px;
      right: -4px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #16a34a;
      color: #fff;
      font-size: 0.6rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    @media (max-width: 480px) {
      .cek-soal-fab {
        width: 42px;
        height: 42px;
        top: calc(60px + 0.5rem + env(safe-area-inset-top));
        right: max(1rem, env(safe-area-inset-right));
      }
      .header-user { padding-left: 0.4rem; }
      .header .s-b-label { display: none; }
      .header .s-b-name { max-width: 90px; }
      .cek-soal-grid { grid-template-columns: repeat(5, 1fr); }
    }
    @media (max-width: 420px) {
      .header-title { display: none; }
      .header .s-b-name { max-width: 120px; }
    }

    /* ===== Tombol aksi akhir (Keluar) ===== */
    .final-actions {
      display: flex;
      justify-content: center;
      gap: 0.75rem;
      flex-wrap: wrap;
      margin-top: 1.5rem;
    }
    .final-actions .quiz-btn {
      flex: none;
      min-width: 0;
      padding: 0.65rem 1.7rem;
      border-radius: 999px;
      font-weight: 700;
      letter-spacing: 0.2px;
      transition: all 0.2s ease;
    }
    .final-actions .quiz-btn-ghost {
      background: rgba(255, 255, 255, 0.55);
      border: 1px solid rgba(109, 40, 217, 0.25);
      color: var(--primary-dark);
      box-shadow: none;
    }
    .final-actions .quiz-btn-ghost:hover {
      background: rgba(255, 255, 255, 0.85);
      border-color: var(--primary);
      color: var(--primary);
    }
    @media (max-width: 420px) {
      .final-actions .quiz-btn { flex: 1; }
    }
  