.bb-apu, .bb-apu *{box-sizing:border-box}
.bb-apu{margin:0;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;background:linear-gradient(135deg,#eff6ff,#e0e7ff);color:#1e293b}
.bb-apu #root{min-height:100vh;padding:24px 12px;position:relative}
.bb-apu .card{position:relative;max-width:560px;margin:auto;background:white;border:4px solid #c7d2fe;border-radius:24px;box-shadow:0 10px 30px #0001;padding:26px}
.bb-apu .top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.bb-apu .badge{background:#eef8ff;color:#0084d1;border-radius:30px;padding:7px 12px;font-size:13px;font-weight:800}
.bb-apu .controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bb-apu .toggle{background:#eef8ff;color:#0084d1;border:1px solid #c7d2fe;border-radius:30px;padding:7px 12px;cursor:pointer;font-weight:700}
.bb-apu .bar{height:10px;background:#eef2ff;border-radius:20px;overflow:hidden;margin:16px 0 22px}
.bb-apu .fill{height:100%;background:#818cf8;transition:width .3s}
.bb-apu .cover{text-align:center}
.bb-apu .cover h1{font-size:28px;margin:12px 0}
.bb-apu .cover p{color:#64748b;line-height:1.6}
.bb-apu .meta{display:flex;gap:10px;margin:24px 0}
.bb-apu .meta>div{flex:1;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:15px 6px}
.bb-apu .meta strong{display:block;color:#0084d1;font-size:22px}
.bb-apu .meta small{color:#64748b}
.bb-apu .btn{border:0;border-radius:30px;padding:12px 20px;font-size:15px;font-weight:800;cursor:pointer;background:#0084d1;color:white}
.bb-apu .btn:hover{background:#4f46e5}
.bb-apu .btn:disabled{opacity:.45;cursor:not-allowed}
.bb-apu .btn.secondary{background:white;border:2px solid #c7d2fe;color:#0084d1}
.bb-apu .actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px;flex-wrap:wrap}
.bb-apu .question{border:1px solid #e2e8f0;border-radius:17px;padding:18px;margin:20px 0;background:white}
.bb-apu .check-row{display:flex;justify-content:flex-end;margin-top:12px}
.bb-apu .check-one{background:#eff6ff;color:#3459a5;border:2px solid #bfdbfe;border-radius:999px;padding:9px 17px;font-weight:800;cursor:pointer}
.bb-apu .check-one:hover{background:#dbeafe}
.bb-apu .check-one:disabled{opacity:.6;cursor:default}
.bb-apu .feedback h4{margin:0 0 7px}
.bb-apu .feedback p{margin:7px 0}
.bb-apu .feedback .tip{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:9px;color:#111827}
.bb-apu .feedback, .bb-apu .feedback *{color:#111827}
.bb-apu .number-badge{width:38px;height:38px;display:grid;place-items:center;border:2px solid #a5b4fc;border-radius:50%;background:#eef8ff;color:#0084d1;font-weight:900;font-size:17px;margin-bottom:12px}
.bb-apu .question h3{font-size:18px;margin:0 0 12px}
.bb-apu .sentence{font-style:italic;background:#f8fafc;border-left:4px solid #818cf8;border-radius:8px;padding:14px 16px;line-height:1.6;margin-bottom:14px;font-size:17px}
.bb-apu .options{display:grid;gap:8px}
.bb-apu .option{display:flex;align-items:center;gap:12px;text-align:left;background:white;border:2px solid #e2e8f0;border-radius:14px;padding:6px 12px;cursor:pointer;font:inherit;color:#1e293b;width:100%}
.bb-apu .option:hover:not(:disabled){border-color:#a5b4fc;background:#eef2ff}
.bb-apu .option.selected{border-color:#818cf8;background:#eef2ff}
.bb-apu .option.correct{border-color:#60a5fa;background:#dbeafe}
.bb-apu .option.incorrect{border-color:#fca5a5;background:#fee2e2}
.bb-apu .letter{width:29px;height:29px;display:grid;place-items:center;border:2px solid #cbd5e1;border-radius:50%;font-weight:800;font-size:13px;flex-shrink:0}
.bb-apu .selected .letter{background:#0084d1;color:white;border-color:#0084d1}
.bb-apu .correct .letter{background:#0084d1;color:white;border-color:#0084d1}
.bb-apu .incorrect .letter{background:#f87171;color:white;border-color:#f87171}
.bb-apu .feedback{margin-top:14px;border-radius:12px;padding:12px;font-size:14px;line-height:1.5}
.bb-apu .feedback.good{background:#f7fcff;color:#111827;border:1.5px solid #c7ddf4;box-shadow:0 3px 12px rgba(30,64,120,.10)}
.bb-apu .feedback.bad{background:#fffafa;color:#111827;border:1.5px solid #f2d5d5;box-shadow:0 3px 12px rgba(120,30,30,.09)}
.bb-apu .results{text-align:center}
.bb-apu .score{font-size:52px;font-weight:900;color:#0084d1}
.bb-apu .stats{display:flex;gap:10px;margin:20px 0}
.bb-apu .stats>div{flex:1;background:#fff7ed;padding:16px;border-radius:12px}
.bb-apu .stats strong{display:block;font-size:22px;color:#ea580c}
.bb-apu .brand{text-align:center;margin-top:22px;padding-top:15px;border-top:1px solid #eef2ff;font-size:12px;color:#94a3b8;font-weight:800}
.bb-apu .brand strong{color:#d97706}
.bb-apu .note{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:14px;margin:18px 0;color:#92400e;font-size:14px}
.bb-apu .confetti{position:fixed;pointer-events:none;inset:0;width:100%;height:100%;z-index:4}
@media (max-width:520px){.bb-apu .card{padding:16px;border-width:3px}
.bb-apu .meta{gap:5px}
.bb-apu .question{padding:12px}
.bb-apu .stats{flex-direction:column}}
@media (prefers-reduced-motion:reduce){.bb-apu, .bb-apu *{transition:none!important}}
.bb-apu .mascot{width:71px;height:auto;object-fit:contain;display:block;margin:4px auto 0}
.bb-apu .main-title{color:#b30f85!important;margin:7px 0 0!important;line-height:1.13}
.bb-apu .level-line{font-size:13px;font-weight:700;color:#64748b;margin:0 0 3px;line-height:1.1}
.bb-apu .subhead{font-size:17px;margin:2px 0 10px}
.bb-apu .group-menu{display:grid;gap:8px;margin:18px 0}
.bb-apu .group-tile{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;background:#f8fafc;border:1px solid #c7d2fe;border-radius:12px;padding:13px;color:#334155;font-weight:700;cursor:pointer}
.bb-apu .group-tile:disabled{opacity:.55;cursor:not-allowed}
.bb-apu .group-tile:not(:disabled):hover{background:#eef2ff}
.bb-apu .quiz-title h2{font-size:21px;margin:12px 0 2px;color:#0084d1}
.bb-apu .quiz-title p{font-size:13px;color:#64748b}
.bb-apu .question{position:relative}
.bb-apu .question .number-badge{margin-bottom:12px}
.bb-apu .check-wrap{text-align:right;margin-top:12px}
.bb-apu .check-one{background:#eff6ff;color:#0084d1;border:1.5px solid #93c5fd;border-radius:10px;padding:9px 17px;font-weight:700;cursor:pointer}
.bb-apu .check-one:disabled{opacity:.4;cursor:not-allowed}
.bb-apu .feedback p{margin:7px 0}
.bb-apu .feedback, .bb-apu .feedback *{color:#111827}
.bb-apu .end-actions{text-align:center;margin:22px 0}
.bb-apu .primary{display:inline-block;background:#0084d1;color:white;border:0;border-radius:12px;padding:13px 20px;font-weight:800;cursor:pointer;margin:6px}
.bb-apu .secondary{background:#eef8ff;color:#0084d1;border:1px solid #c7d2fe;border-radius:12px;padding:12px 18px;font-weight:700;cursor:pointer;margin:6px}
.bb-apu .report{margin:20px 0;text-align:left}
.bb-apu .report-row{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid #e2e8f0;padding:12px 4px;font-size:14px}
.bb-apu .report-row strong{white-space:nowrap}
.bb-apu .report-row.total{font-weight:800;color:#0084d1;font-size:17px}
.bb-apu .primary:hover{background:#006eae}
.bb-apu .check-one:hover:not(:disabled){background:#e0f3ff}
.bb-apu .secondary:hover{background:#dff2ff}
.bb-apu .tip-icon{font-size:18px;vertical-align:-1px;margin-right:3px}
.bb-apu .fill{background:#0084d1!important}
.bb-apu .badge{border-color:#b7e3fb}
.bb-apu{background:linear-gradient(135deg,#eff6ff,#e0e7ff);border-radius:18px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1e293b}.bb-apu button{font-family:inherit}.bb-apu #root{min-height:0}.bb-apu .card{box-sizing:border-box}.bb-apu .confetti{pointer-events:none}.bb-apu .feedback p{margin:7px 0}.bb-apu .group-tile:focus-visible,.bb-apu button:focus-visible{outline:3px solid #0084d1;outline-offset:2px}

/* v1.1.0: full-bleed learning background while keeping content readable */
.bb-apu{position:relative!important;width:100vw!important;max-width:none!important;left:50%!important;right:auto!important;margin-left:-50vw!important;margin-right:0!important;border-radius:0!important;background:#e0f3ff!important;overflow:visible!important}
.bb-apu #root{min-height:100vh!important;padding:30px 14px 48px!important}
.bb-apu .card{max-width:560px!important;margin:0 auto!important}
.bb-apu .results .completion-title{font-size:clamp(22px,4.5vw,27px)!important;line-height:1.2!important;margin-bottom:8px!important}
.bb-apu .cover .audience{font-size:13px!important;font-weight:700!important;color:#43637b!important;margin:4px auto 12px!important;line-height:1.4!important}
.bb-apu .confetti{z-index:9999!important}
@media(max-width:600px){.bb-apu #root{padding:18px 10px 32px!important}}

.bb-apu[hidden],#bb-apu-dashboard[hidden]{display:none!important}
.bb-apu-back{display:flex;justify-content:flex-start;margin-bottom:10px}
.bb-apu-levels-link{border:1px solid #b7d7ed;background:#eff8ff;color:#006ba8;padding:7px 12px;border-radius:20px;font-weight:700;cursor:pointer}
#bb-apu-dashboard{background:#e0f3ff;padding:30px 12px;min-height:500px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
#bb-apu-dashboard *{box-sizing:border-box}
#bb-apu-dashboard .bb-apu-dashboard-card{max-width:720px;margin:auto;background:#fff;border:3px solid #c7d2fe;border-radius:24px;padding:clamp(20px,4vw,38px);box-shadow:0 10px 30px #0001;text-align:center}
#bb-apu-dashboard h2{color:#b30f85;font-size:clamp(25px,4vw,34px);margin:8px 0}
#bb-apu-dashboard .bb-apu-level-option{display:flex;align-items:center;gap:15px;text-align:left;background:#f6fbff;border:1px solid #c6e0f3;border-radius:14px;padding:16px;margin:12px 0;width:100%;font:inherit;color:#1e293b}
#bb-apu-dashboard button.bb-apu-level-option{cursor:pointer}
#bb-apu-dashboard button.bb-apu-level-option:hover{border-color:#0084d1;background:#e7f4ff}
#bb-apu-dashboard .bb-apu-level-number{background:#0084d1;color:#fff;border-radius:10px;padding:12px 15px;font-weight:800;flex:none}
#bb-apu-dashboard .bb-apu-level-copy{flex:1}
#bb-apu-dashboard .bb-apu-level-copy strong{display:block;margin-bottom:5px}
#bb-apu-dashboard .bb-apu-level-copy small{color:#475569}
#bb-apu-dashboard .bb-apu-level-option.locked{opacity:.6}

/* v1.5.5: balanced, readable answer feedback */
.bb-apu .feedback-contrast{margin-top:8px;opacity:.9}.bb-apu .feedback-tip{margin-top:8px;font-size:.94em}


/* v1.5.6 — immersive full-width level-selection dashboard */
#bb-apu-dashboard {
  position:relative!important;
  isolation:isolate;
  left:50%!important;
  width:100vw!important;
  width:100dvw!important;
  max-width:none!important;
  margin-left:-50vw!important;
  margin-left:-50dvw!important;
  margin-right:0!important;
  min-height:min(850px,100vh)!important;
  padding:clamp(32px,5vw,72px) 18px!important;
  overflow:hidden;
  background:radial-gradient(ellipse at 10% 12%,rgba(183,229,255,.95),transparent 36%),
             radial-gradient(ellipse at 90% 22%,rgba(232,209,255,.75),transparent 38%),
             radial-gradient(ellipse at 70% 88%,rgba(255,217,238,.65),transparent 39%),
             linear-gradient(135deg,#e0f3ff 0%,#f2efff 54%,#e5f5ff 100%)!important;
}
#bb-apu-dashboard::before,#bb-apu-dashboard::after {
  content:"";position:absolute;pointer-events:none;z-index:-1;border-radius:50%;
  border:2px solid rgba(0,132,209,.12);
}
#bb-apu-dashboard::before {width:300px;height:300px;top:-150px;left:-90px;box-shadow:0 0 0 40px rgba(0,132,209,.035)}
#bb-apu-dashboard::after {width:380px;height:380px;bottom:-240px;right:-110px;box-shadow:0 0 0 60px rgba(179,15,133,.035)}
#bb-apu-dashboard .bb-apu-dashboard-card {
  max-width:820px!important;
  position:relative;
  padding:clamp(22px,4vw,48px)!important;
  border:1px solid rgba(255,255,255,.9)!important;
  border-radius:28px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 22px 65px rgba(52,77,132,.15),0 3px 12px rgba(52,77,132,.06)!important;
}
#bb-apu-dashboard h2 {font-size:clamp(29px,4.5vw,42px)!important;line-height:1.15!important;color:#b30f85!important;margin:4px 0 9px!important}
#bb-apu-dashboard .bb-apu-dashboard-card>p {max-width:580px;margin:9px auto 14px;line-height:1.55;color:#41546d;font-size:clamp(14px,2vw,16px)}
#bb-apu-dashboard .bb-apu-dashboard-card>p:first-of-type {font-size:clamp(18px,2.5vw,21px);font-weight:800;color:#173958}
#bb-apu-dashboard .bb-apu-level-option {
  position:relative;min-height:86px;
  background:linear-gradient(110deg,#f5fbff,#fff)!important;
  border:1.5px solid #d6e8f7!important;
  border-radius:17px!important;
  padding:clamp(12px,2vw,17px)!important;
  margin:11px 0!important;
  box-shadow:0 3px 10px rgba(31,78,132,.045);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
#bb-apu-dashboard button.bb-apu-level-option:hover {
  transform:translateY(-2px);
  border-color:#0084d1!important;
  box-shadow:0 10px 25px rgba(0,132,209,.13);
}
#bb-apu-dashboard button.bb-apu-level-option:focus-visible {outline:3px solid #0084d1;outline-offset:3px}
#bb-apu-dashboard .bb-apu-level-number {
  display:grid;place-items:center;min-width:52px;min-height:52px;
  padding:8px!important;border-radius:15px!important;
  background:linear-gradient(135deg,#0084d1,#3764c9)!important;
  box-shadow:0 5px 13px rgba(0,132,209,.19);
  font-size:21px;
}
#bb-apu-dashboard .bb-apu-level-copy strong {font-size:clamp(14px,1.9vw,17px);line-height:1.35;color:#20324a}
#bb-apu-dashboard .bb-apu-level-copy small {font-size:13px;line-height:1.4}
#bb-apu-dashboard .bb-apu-level-option>span:last-child {font-size:22px;color:#0084d1;font-weight:800}
@media(max-width:600px){
 #bb-apu-dashboard {padding:25px 12px 38px!important}
 #bb-apu-dashboard .bb-apu-dashboard-card {padding:22px 14px!important;border-radius:20px!important}
 #bb-apu-dashboard .bb-apu-level-option {gap:10px!important;min-height:78px}
 #bb-apu-dashboard .bb-apu-level-number {min-width:43px;min-height:43px;font-size:18px}
 #bb-apu-dashboard .bb-apu-level-copy small {font-size:12px}
}
@media(prefers-reduced-motion:reduce){#bb-apu-dashboard .bb-apu-level-option{transition:none!important}}
