

.cert-header{text-align:center; margin-bottom:14px;}
.cert-brand{font-size:19px; font-weight:800; color:var(--navy);}
.cert-title{font-size:12.5px; color:#666; margin-top:4px;}
.cert-info-table{width:100%; border-collapse:collapse; margin-bottom:14px; font-size:13px;}
.cert-info-table th{text-align:left; padding:6px 8px; color:#555; width:42%; border-bottom:1px solid #eee; font-weight:600;}
.cert-info-table td{padding:6px 8px; font-weight:700; border-bottom:1px solid #eee; color:var(--navy);}
.score-bar-wrap{margin:14px 0 4px;}
.score-bar{position:relative; height:12px; border-radius:6px; background:linear-gradient(to right, #e91e8c, #ff9800, #ffe600, #8bc34a);}
.score-bar-marker{position:absolute; top:-3px; width:2px; height:18px; background:#333;}
.score-bar-labels{display:flex; justify-content:space-between; font-size:10px; color:#666; margin-top:6px;}
.sect-percent-wrap{margin:14px 0; font-size:13px;}
.sect-percent-row{display:flex; align-items:center; gap:8px; margin-top:8px;}
.sect-percent-label{width:34%; font-size:11.5px;}
.sect-percent-bar{flex:1; height:9px; background:#eee; border-radius:5px; overflow:hidden;}
.sect-percent-fill{height:100%; background:var(--accent);}
.sect-percent-value{width:38px; text-align:right; font-weight:700; font-size:12px;}
.cert-topbar{background:var(--navy); color:#fff; text-align:center; padding:9px 14px; border-radius:10px; font-weight:800; font-size:16px; margin-bottom:16px; letter-spacing:.5px; -webkit-print-color-adjust:exact; print-color-adjust:exact;}
.cert-signoff{text-align:center; margin:14px 0 18px; font-size:11.5px; color:#888;}
.review-card{margin-top:16px;}
@media print{
  .no-print{display:none !important;}
  .watermark-overlay{display:none !important;}
  html, body{background:#fff !important; height:auto !important;}
  #resultScreen{min-height:0 !important; display:block !important; padding:0 !important;}
  #resultScreen .card{box-shadow:none !important; border:1px solid #ddd; border-radius:10px; max-width:100% !important; width:100% !important; margin:0 auto; padding:22px 20px !important;}
  * { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
  @page{ margin:14mm; }
}
.pledge-box{max-height:340px; overflow-y:auto; background:#f7f8fb; border:1px solid #d7ddec; border-radius:10px; padding:16px; font-size:14px; line-height:1.8; color:var(--navy); margin-bottom:14px;}
.pledge-note{font-size:12.5px; color:#7a8296; margin:10px 0 16px; line-height:1.6;}
.pledge-btn-yes{background:#1f8f4e; color:#fff; border:none; border-radius:10px; padding:14px; width:100%; font-size:15px; font-weight:700; margin-bottom:10px; cursor:pointer;}
.pledge-btn-no{background:#fff; color:#c0392b; border:2px solid #c0392b; border-radius:10px; padding:14px; width:100%; font-size:15px; font-weight:700; cursor:pointer;}
.watermark-overlay{position:fixed; inset:0; z-index:9999; pointer-events:none; background-image:url('watermark.svg'); background-repeat:repeat;}
:root{
  --navy:#0f1f3d;
  --navy-light:#16294f;
  --accent:#e63946;
  --gold:#f4b400;
  --green:#2a9d5c;
  --red:#d64545;
  --bg:#eef1f8;
}
*{box-sizing:border-box;}
body{
  margin:0; font-family:'Noto Sans Bengali','Noto Sans JP',sans-serif;
  background:var(--bg); color:#1a1a2e;
}
.hidden{display:none !important;}
.screen{min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px;}
.card{
  background:#fff; border-radius:16px; padding:32px 28px; max-width:480px; width:100%;
  box-shadow:0 10px 40px rgba(15,31,61,0.18);
}
.logo-title{text-align:center; margin-bottom:18px;}
.logo-title h1{font-size:22px; color:var(--navy); margin:6px 0 2px;}
.logo-title p{color:var(--accent); font-weight:700; margin:0; font-size:14px;}
.cover-logo{width:150px; height:150px; border-radius:50%; box-shadow:0 6px 20px rgba(15,31,61,.25); margin-bottom:6px;}
.badge-paid{
  display:inline-block; background:var(--accent); color:#fff; font-size:11px;
  padding:3px 10px; border-radius:20px; margin-top:6px; letter-spacing:0.5px;
}
label{display:block; font-size:13px; margin:12px 0 4px; color:#333; font-weight:600;}
input[type=text], input[type=password], input[type=date], select{
  width:100%; padding:10px 12px; border:1px solid #ccc; border-radius:8px; font-size:14px;
}
input[type=file]{width:100%; font-size:13px;}
button{
  cursor:pointer; border:none; border-radius:9px; font-weight:700; font-size:15px;
  padding:12px 20px; transition:transform .15s, opacity .15s;
}
button:active{transform:scale(0.97);}
.btn-primary{background:var(--navy); color:#fff; width:100%; margin-top:18px;}
.btn-primary:hover{opacity:.92;}
.btn-secondary{background:#e2e6f0; color:var(--navy);}
.btn-danger{background:var(--red); color:#fff;}
.btn-gold{background:var(--gold); color:#3a2a00;}
.err{color:var(--red); font-size:13px; margin-top:6px; min-height:16px;}
.wa-line{
  text-align:center; font-size:11.5px; color:#6b7280; margin-top:14px; line-height:1.5;
}
.wa-line a{color:var(--accent); text-decoration:none; font-weight:700;}

/* ===== EXAM SCREEN ===== */
#examScreen{align-items:stretch; justify-content:flex-start; padding:0;}
.exam-header{
  background:var(--navy); color:#fff; padding:12px 18px; display:flex; justify-content:space-between;
  align-items:center; flex-wrap:wrap; gap:8px; position:sticky; top:0; z-index:20;
}
.exam-header .brand{font-size:14px; font-weight:700;}
.exam-header .brand small{display:block; font-weight:400; opacity:.8; font-size:11px;}
.brand-row{display:flex; align-items:center; gap:8px;}
.header-logo{width:32px; height:32px; border-radius:50%; flex-shrink:0;}
.subq-logo{width:20px; height:20px; border-radius:50%; vertical-align:middle; margin-right:6px;}
.timer{
  background:#fff; color:var(--navy); font-weight:800; padding:6px 14px; border-radius:8px; font-size:15px;
  letter-spacing:1px;
}
.timer.low{background:var(--accent); color:#fff;}
.section-bar{
  background:var(--navy-light); color:#dbe4ff; padding:8px 18px; font-size:13px; font-weight:700;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px;
}
.progress-wrap{height:5px; background:#d7ddec;}
.progress-bar{height:100%; background:var(--gold); transition:width .2s;}

.q-container{
  flex:1; width:100%; max-width:720px; margin:0 auto; padding:22px 18px 100px;
}
.q-card{
  background:#0f1f3d0d; background: #eaf0ff; border:1px solid #cfd9f2; border-radius:14px; padding:20px;
}
.q-meta{display:flex; justify-content:space-between; font-size:12.5px; color:#4a5470; margin-bottom:10px; font-weight:700;}
.q-marks{background:var(--gold); color:#3a2a00; padding:2px 10px; border-radius:12px;}
.q-prompt{font-size:17px; line-height:1.9; margin-bottom:14px; color:#0f1f3d; font-weight:600;}
.q-prompt u, .blank{
  text-decoration:none; border-bottom:3px solid #1a1a2e; padding:0 6px;
}
.q-img{width:100%; max-width:420px; border-radius:10px; display:block; margin:0 auto 16px; box-shadow:0 4px 14px rgba(0,0,0,.15);}

.listen-box{background:#fff; border:1px dashed #9aa8cf; border-radius:10px; padding:12px 14px; margin-bottom:14px;}
.listen-box .lb-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.play-btn{background:var(--green); color:#fff; border-radius:50%; width:42px; height:42px; font-size:18px; flex-shrink:0;}
.play-btn:disabled{opacity:.5;}
.script-lines{margin-top:10px; font-size:14.5px; line-height:1.8; display:none;}
.script-line-block{margin-bottom:10px; padding-bottom:8px; border-bottom:1px dashed #e0e4f0;}
.script-line-block:last-child{border-bottom:none; margin-bottom:0;}
.script-line-bn{font-size:12.5px; color:#4a5470; margin-top:3px; padding-left:4px; line-height:1.6;}
.pl-jp{font-weight:600; color:#1a1a2e;}
.script-lines.show{display:block;}
.speaker-badge{
  display:inline-block; font-size:11px; font-weight:800; padding:1px 8px; border-radius:6px; margin-right:6px;
  color:#fff;
}
.spk-男{background:#3b6fd6;}
.spk-女{background:#d6417a;}
.spk-ন্যারেটর, .spk-narr{background:#6b6b6b;}
.bn-toggle{
  background:none; border:1px solid var(--navy); color:var(--navy); font-size:12px; padding:4px 10px; border-radius:20px;
  white-space:nowrap; flex-shrink:0;
}
.bn-inline{display:none; background:#fff8e6; border-radius:8px; padding:8px 10px; margin-top:8px; font-size:14px; color:#333; line-height:1.7;}
.bn-inline.show{display:block;}
.passage-box{background:#fff; border:1px solid #d3daf0; border-radius:10px; padding:14px; margin-bottom:14px; font-size:15.5px; line-height:2;}
.passage-note{font-size:12.5px; color:#555; margin-top:8px; font-style:italic;}

/* ---- redesigned reading posters (replace the original screenshot images) ---- */
.reading-poster{
  border-radius:14px; overflow:hidden; margin-bottom:6px; box-shadow:0 4px 16px rgba(15,31,61,.12);
  font-size:15.5px; line-height:1.9;
}
ruby rt{font-size:10px; color:#666;}

.poster-bday{background:#fff5f8; border:2px solid #f3c8d6;}
.poster-bday .poster-ribbon{
  background:linear-gradient(135deg,#f0759b,#f4a4bd); color:#fff; font-weight:800; font-size:17px;
  text-align:center; padding:16px 14px;
}
.poster-bday .poster-body{padding:16px 18px; color:#4a2536;}
.poster-bday .poster-signature{
  text-align:right; padding:0 18px 16px; font-weight:700; color:#c14a72;
}

.poster-header-bar{
  background:var(--navy); color:#fff; font-weight:800; font-size:16px; padding:12px 16px;
}
.poster-park{background:#f3faf3; border:2px solid #cbe8cc;}
.poster-park .poster-header-bar{background:#3a8f4f;}
.poster-restaurant{background:#fff9f0; border:2px solid #f1ddb0;}
.poster-restaurant .poster-header-bar{background:#c1793a;}
.poster-diary{background:#f3f6fc; border:2px solid #cfd9f2;}
.poster-diary .poster-header-bar{background:#3b5fa8;}

.rule-row{
  display:flex; gap:12px; align-items:flex-start; padding:12px 16px; border-top:1px dashed #d9d9d9;
  color:#2c2c2c;
}
.rule-row:first-of-type{border-top:none;}
.rule-icon{font-size:20px; flex-shrink:0; line-height:1.3;}
.poster-highlight{
  display:inline-block; margin-top:8px; background:#2c2c2c; color:#fff; font-weight:700; font-size:13.5px;
  padding:5px 12px; border-radius:6px;
}

.poster-sub{padding:10px 16px 0; font-size:13.5px; color:#4a4a4a;}
.timeline{padding:6px 16px 4px;}
.tl-item{display:flex; gap:14px; padding:10px 0; border-top:1px dashed #d9d9d9; align-items:flex-start;}
.tl-item:first-child{border-top:none;}
.tl-time{
  background:#3b5fa8; color:#fff; font-weight:800; font-size:13px; padding:4px 9px; border-radius:6px;
  flex-shrink:0; height:fit-content;
}
.poster-summary{background:#eef2fb; margin:8px 16px 16px; border-radius:8px; padding:10px 14px; font-size:14px;}
.poster-summary ul{margin:6px 0 0; padding-left:18px;}
.poster-summary li{margin-bottom:3px;}
.prompt-row{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:14px;}
.subq-block{padding-top:18px; margin-top:18px; border-top:2px dashed #c7d0ea;}
.subq-block:first-of-type{padding-top:0; margin-top:0; border-top:none;}
.subq-tag{display:inline-block; background:var(--navy); color:#fff; font-size:11.5px; font-weight:800; padding:2px 10px; border-radius:6px; margin-bottom:8px;}

.options{display:flex; flex-direction:column; gap:10px; margin-top:6px;}
.opt-btn{
  text-align:left; background:#fff; border:2px solid #d3daf0; border-radius:10px; padding:12px 14px;
  font-size:15px; display:flex; gap:10px; align-items:flex-start;
}
.opt-btn .opt-label{
  background:#e2e6f0; color:var(--navy); font-weight:800; border-radius:50%; width:26px; height:26px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:13px;
}
.opt-btn .opt-text{flex:1;}
.opt-btn .opt-jp{font-weight:700; font-size:16px;}
.opt-btn .opt-sub{font-size:12px; color:#666; margin-top:2px;}
.opt-btn.selected{border-color:var(--navy); background:#dde5ff;}
.opt-btn.correct{border-color:var(--green); background:#e4f8ec;}
.opt-btn.correct .opt-label{background:var(--green); color:#fff;}
.opt-btn.wrong{border-color:var(--red); background:#fdeaea;}
.opt-btn.wrong .opt-label{background:var(--red); color:#fff;}
.opt-btn:disabled{cursor:default;}

.explain-box{
  margin-top:16px; background:#fff; border-left:5px solid var(--gold); border-radius:8px; padding:12px 14px;
  font-size:14px; line-height:1.8; color:#222; display:none;
}
.explain-box.show{display:block;}
.explain-box b{color:var(--navy);}
.opt-breakdown{margin-top:10px; background:#f4f6fb; border-radius:8px; padding:10px 12px; font-size:13.5px;}
.opt-breakdown ul{margin:6px 0 0; padding-left:18px;}
.opt-breakdown li{margin-bottom:4px;}

.nav-bar{
  position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid #d7ddec;
  display:flex; justify-content:space-between; padding:12px 18px; gap:10px; z-index:20;
}
.nav-bar button{flex:1; max-width:220px;}
.finish-top-btn{background:var(--accent); color:#fff; padding:7px 14px; font-size:13px; border-radius:8px;}

/* candidate summary */
.info-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 14px;}

/* results */
.result-card{max-width:640px;}
.score-hero{
  text-align:center; background:linear-gradient(135deg,var(--navy),#233a68); color:#fff; border-radius:14px;
  padding:24px; margin-bottom:18px;
}
.score-hero .big{font-size:44px; font-weight:900;}
.score-hero .sub{opacity:.85; font-size:13px; margin-top:4px;}
.grade-pill{display:inline-block; margin-top:10px; padding:6px 18px; border-radius:20px; font-weight:800; font-size:14px;}
.g-fail{background:var(--red);}
.g-a1{background:#4a7fd6;}
.g-a21{background:#2a9d5c;}
.g-a22{background:var(--gold); color:#3a2a00;}
.sect-table{width:100%; border-collapse:collapse; margin:16px 0;}
.sect-table th, .sect-table td{padding:8px 10px; border-bottom:1px solid #e5e8f2; font-size:13.5px; text-align:left;}
.sect-table th{color:#4a5470;}
.grading-scale{font-size:12.5px; background:#f4f6fb; border-radius:10px; padding:10px 12px; margin-top:6px;}
.grading-scale div{display:flex; justify-content:space-between; padding:2px 0;}
.review-list{margin-top:20px;}
.review-item{border:1px solid #e2e6f0; border-radius:10px; padding:14px; margin-bottom:12px;}
.review-item.is-wrong{border-left:4px solid var(--red);}
.review-item.is-correct{border-left:4px solid var(--green);}
.review-q-head{display:flex; justify-content:space-between; font-size:12px; font-weight:700; color:#555;}
.dua-box{
  background:#f3f9f2; border:1px solid #bfe3c4; border-radius:12px; padding:14px 16px; margin-bottom:18px;
  font-size:13.5px; line-height:1.9; color:#204a2d;
}
.dua-box p{margin:0 0 8px;}
.dua-box p:last-child{margin-bottom:0;}


.bar-hero-wrap{margin:14px 0 10px;}
.bar-hero-label{text-align:center; font-weight:800; color:var(--navy); font-size:19px; margin-bottom:8px;}
.bar-hero-track{width:100%; height:28px; background:#eef0f7; border-radius:16px; overflow:hidden; box-shadow:inset 0 1px 3px rgba(0,0,0,.08);}
.bar-hero-fill{height:100%; width:0%; border-radius:16px; background:linear-gradient(90deg,#ffd54f,#ff9800,#43a047); background-size:200% 100%; transition:width 1.4s cubic-bezier(.22,.9,.32,1); box-shadow:0 0 10px rgba(255,152,0,.55);}
@keyframes barShine{0%{filter:brightness(1); background-position:0% 50%;} 50%{filter:brightness(1.3); background-position:100% 50%;} 100%{filter:brightness(1); background-position:0% 50%;}}
.bar-hero-fill.shine{animation:barShine 2.4s ease-in-out infinite;}

#sectPercentWrap{display:flex; flex-direction:column; gap:0;}
.bar-row{margin-bottom:14px;}
.bar-row-top{display:flex; justify-content:space-between; align-items:baseline; font-size:13.5px; margin-bottom:5px;}
.bar-row-name{font-weight:700; color:var(--navy);}
.bar-row-pct{font-weight:800; font-size:14px;}
.bar-row-track{width:100%; height:16px; background:#eef0f7; border-radius:10px; overflow:hidden; box-shadow:inset 0 1px 2px rgba(0,0,0,.07);}
.bar-row-fill{height:100%; width:0%; border-radius:10px; transition:width 1.2s cubic-bezier(.22,.9,.32,1); box-shadow:0 0 6px rgba(0,0,0,.25);}
.bar-row-fill.shine{animation:barShine 2.4s ease-in-out infinite;}

.ring-hero-wrap{display:flex; justify-content:center; margin:10px 0 6px;}
.ring-hero{position:relative; width:170px; height:170px;}
.ring-hero svg{width:170px; height:170px; transform:rotate(-90deg);}
.ring-hero circle{fill:none; stroke-width:14;}
.ring-hero .ring-track{stroke:#eef0f7;}
.ring-hero .ring-fill{
  stroke:url(#ringGradHero); stroke-linecap:round;
  transition:stroke-dashoffset 1.4s cubic-bezier(.22,.9,.32,1);
  filter:drop-shadow(0 0 6px rgba(255,193,7,.65));
}
.ring-hero .ring-center{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.ring-hero .ring-center .big{font-size:28px; font-weight:800; color:var(--navy);}
.ring-hero .ring-center .sub{font-size:11px; color:#777; margin-top:2px;}
@keyframes ringShine{
  0%{filter:drop-shadow(0 0 4px rgba(255,193,7,.4));}
  50%{filter:drop-shadow(0 0 14px rgba(255,193,7,.9));}
  100%{filter:drop-shadow(0 0 4px rgba(255,193,7,.4));}
}
.ring-hero .ring-fill.shine{animation:ringShine 2.2s ease-in-out infinite;}

.circle-ring-wrap{display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin:18px 0;}
.circle-ring{width:104px; text-align:center;}
.circle-ring .ring-box{position:relative; width:92px; height:92px; margin:0 auto;}
.circle-ring svg{width:92px; height:92px; transform:rotate(-90deg);}
.circle-ring circle{fill:none; stroke-width:9;}
.circle-ring .ring-track{stroke:#eef0f7;}
.circle-ring .ring-fill{stroke-linecap:round; transition:stroke-dashoffset 1.2s cubic-bezier(.22,.9,.32,1);}
.circle-ring .ring-num{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:800; color:#2a2a2a;
}
.circle-ring .ring-label{font-size:11px; color:#555; margin-top:6px; font-weight:700; line-height:1.3;}
@keyframes ringPulse{
  0%{filter:brightness(1) drop-shadow(0 0 2px rgba(0,0,0,.05));}
  50%{filter:brightness(1.18) drop-shadow(0 0 8px currentColor);}
  100%{filter:brightness(1) drop-shadow(0 0 2px rgba(0,0,0,.05));}
}
.circle-ring .ring-fill{animation:ringPulse 2.6s ease-in-out infinite;}
.circle-ring:nth-child(1) .ring-fill{animation-delay:0s;}
.circle-ring:nth-child(2) .ring-fill{animation-delay:.2s;}
.circle-ring:nth-child(3) .ring-fill{animation-delay:.4s;}
.circle-ring:nth-child(4) .ring-fill{animation-delay:.6s;}

@media(max-width:520px){
  .info-grid{grid-template-columns:1fr;}
  .card{padding:22px 16px;}
  .score-hero .big{font-size:36px;}
  .ring-hero{width:140px; height:140px;}
  .ring-hero svg{width:140px; height:140px;}
}

.opt-btn:disabled{opacity:1; color:#111;}
.opt-btn:disabled .opt-jp{color:#111;}
.ans-expl{display:none; margin-top:10px; border-radius:10px; padding:10px 12px; background:#f4f8ff; border:1px solid #c9d6f5; font-size:14px; line-height:1.65;}
.ae-verdict{font-weight:800; font-size:15px; margin-bottom:4px;}
.ae-verdict.ok{color:#1a8a4a;} .ae-verdict.ng{color:#c62828;}
.ae-ans{margin-bottom:6px;}
.ae-expl{background:#fffbe8; border-radius:8px; padding:7px 9px; margin-bottom:6px;}
.ae-opts{font-size:13.5px;}
.ae-opt{padding:3px 0; border-bottom:1px dashed #d8e0f3;}
.ae-opt:last-child{border-bottom:none;}
.ae-opt.c{color:#1a6b3c; font-weight:700;}
.tr-toggle{display:inline-block; margin-top:10px; background:#eef3ff; border:1px solid var(--navy); color:var(--navy); font-size:12.5px; padding:6px 12px; border-radius:20px; cursor:pointer;}
.tr-box{display:none; margin-top:10px; background:#fffdf4; border:1px solid #f0e2b0; border-radius:10px; padding:10px 12px; font-size:14px; line-height:1.6;}
.tr-box.show{display:block;}
.tr-head{font-weight:700; color:var(--navy); font-size:13px; margin:4px 0 6px;}
.tr-line{padding:7px 0; border-bottom:1px dashed #eadfb8;}
.tr-line:last-child{border-bottom:none;}
.tr-jp{font-size:15px; color:#111;}
.tr-rm{font-size:13px; color:#1f6f5c; font-style:italic;}
.tr-bn{font-size:13.5px; color:#7a3b00;}
.tr-lab{display:inline-block; min-width:22px; font-weight:700; color:var(--navy);}

/* ================= v2 additions: themes, furigana, toolbar, cards ================= */
:root{--card:#fff; --ink:#1a1a2e; --muted:#5b6474; --soft:#f4f6fb; --line:#d3daf0; --qcard:#eaf0ff; --qline:#cfd9f2; --paper:#fff; --navy-dark:#0a1630; --opt:#fff; --hl:#fff8e6;}
body{background:var(--bg); color:var(--ink); transition:background .25s,color .25s;}
ruby rt{font-size:10px; color:#5b6474; font-weight:500; cursor:pointer; user-select:none;}
ruby{ruby-position:over;}
body.furi-off rt, body.furi-off rp{display:none;}
body.furi-off ruby{cursor:pointer;}

/* toolbar */
.tool-row{display:flex; gap:6px; align-items:center;}
.tool-btn{background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:20px; padding:5px 10px; font-size:12.5px; font-weight:700; line-height:1.2;}
.tool-btn.on{background:#fff; color:var(--navy);}
.float-tools{position:fixed; top:10px; right:10px; z-index:70; background:var(--navy); border-radius:24px; padding:5px; box-shadow:0 4px 14px rgba(0,0,0,.25);}
.theme-pop{position:absolute; right:0; top:calc(100% + 6px); background:var(--card); border:1px solid var(--line); border-radius:12px; padding:6px; box-shadow:0 8px 24px rgba(0,0,0,.2); display:none; min-width:150px; z-index:80;}
.theme-pop.show{display:block;}
.theme-pop button{display:block; width:100%; text-align:left; background:none; color:var(--ink); font-size:14px; padding:9px 10px; border-radius:8px;}
.theme-pop button:hover,.theme-pop button.cur{background:var(--soft);}
.tool-wrap{position:relative;}
.exam-header .brand small{max-width:52vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}

/* option pictures */
.opt-pic{display:block; width:110px; max-width:40vw; height:auto; border-radius:8px; border:1px solid var(--line); background:#fff; margin-bottom:6px;}
.q-ill{width:100%; max-width:420px; display:block; margin:0 auto 16px; border-radius:10px; background:#fff; box-shadow:0 4px 14px rgba(0,0,0,.12);}

/* explanation boxes */
.ae-expl .gx{display:block; margin-top:6px; padding:7px 9px; border-radius:8px; background:rgba(42,157,92,.08); border-left:3px solid var(--green);}
.ae-expl .gx b{color:var(--green);}
.ae-expl .jp, .jp{font-family:'Noto Sans JP','Noto Sans Bengali',sans-serif;}
.tr-head.p{margin-top:12px;}

/* reading cards (ported) */
.passage-card{margin-bottom:14px; font-size:16px; line-height:2.1;}
.q-passage{background:var(--paper); border-left:3px solid var(--gold); border-radius:0 6px 6px 0; padding:14px 16px; margin-bottom:14px; font-size:16px; line-height:2.1;}
.passage-diary{background:#fffdf5; border:1px solid #e3dcc0; border-radius:6px; padding:14px 16px; box-shadow:0 1px 4px rgba(0,0,0,.08);}
.passage-diary-header{font-size:12px; font-weight:700; color:#b07d00; margin-bottom:6px;}
.passage-memo{background:#fff; border:1px solid var(--line); border-radius:8px; overflow:hidden;}
.passage-memo-header{background:var(--navy); color:#fff; font-size:13px; font-weight:700; padding:8px 16px;}
.passage-memo-body{padding:14px 16px;}
.passage-letter{background:#fbf9f4; border:1px solid var(--line); border-left:4px solid var(--navy); border-radius:8px; padding:16px 18px;}
.passage-signboard{background:var(--navy); border-radius:10px; overflow:hidden; border:3px solid var(--navy-dark);}
.passage-signboard-title{background:var(--gold); color:#2a1e00; font-weight:800; text-align:center; padding:8px; font-size:14px;}
.passage-signboard-rows{padding:12px 16px;}
.signboard-row{color:#fff; font-size:14.5px; padding:6px 0; border-bottom:1px solid rgba(255,255,255,.15);}
.signboard-row:last-child{border-bottom:none;}
.passage-signboard rt{color:#ffe38a;}
.passage-flyer{background:#fff; border:2px dashed var(--gold); border-radius:10px; padding:14px 16px;}
.passage-flyer-title{background:var(--accent); color:#fff; font-weight:700; text-align:center; padding:7px 10px; border-radius:6px; font-size:14px; margin-bottom:10px;}
.passage-flyer-title rt{color:#ffe;}
.flyer-row,.menu-row{font-size:15px; padding:4px 0;}
.passage-menu{background:#fffaf0; border:1px solid #e6cf9a; border-radius:10px; padding:14px 16px;}
.passage-menu-title{font-weight:700; font-size:15px; color:var(--accent); margin-bottom:8px; border-bottom:2px solid var(--gold); padding-bottom:6px;}
.passage-social{background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px 14px;}
.passage-social-twitter{border-color:#bcdcf5; background:#f7fbff;}
.social-header{display:flex; align-items:center; gap:10px; margin-bottom:6px;}
.social-avatar{width:38px; height:38px; border-radius:50%; background:#e8eefb; display:flex; align-items:center; justify-content:center; font-size:20px;}
.social-meta{display:flex; flex-direction:column; line-height:1.3;}
.social-handle{font-weight:700; font-size:14px;}
.social-time{font-size:12px; color:var(--muted);}
.social-icons{margin-top:6px; color:var(--muted); font-size:13px; letter-spacing:6px;}
.passage-notice-board{background:#fff; border:2px solid var(--navy); border-radius:10px; overflow:hidden;}
.notice-board-title{background:var(--navy); color:#fff; font-weight:800; text-align:center; padding:8px; font-size:15px;}
.notice-board-title rt{color:#cfe0ff;}
.notice-board-rules{margin:0; padding:10px 16px 10px 34px; font-size:15px;}
.notice-board-rules li{margin-bottom:4px;}
.passage-ticket{background:linear-gradient(135deg,#fdf6e3,#fff); border:2px solid #c8a24a; border-radius:12px; padding:12px 16px; font-size:15px;}
.ticket-title{font-weight:800; color:#8a5a12; text-align:center; border-bottom:1px dashed #c8a24a; padding-bottom:6px; margin-bottom:6px;}
.ticket-route{display:flex; justify-content:center; align-items:center; gap:14px; font-size:20px; font-weight:800; color:var(--navy);}
.ticket-row{text-align:center;}
.ticket-price{text-align:right; font-weight:800; font-size:18px; color:var(--accent);}
.ticket-barcode{text-align:center; letter-spacing:-1px; color:#333; font-size:14px;}
.passage-weather{background:#eef6ff; border:1px solid #bcd6f5; border-radius:12px; padding:10px;}
.weather-days-row{display:flex; gap:8px;}
.weather-day{flex:1; background:#fff; border-radius:10px; padding:8px; text-align:center; font-size:14px; line-height:1.6;}
.weather-date{font-weight:800;}
.weather-icon{font-size:28px;}
.weather-hourly-row{display:flex; overflow-x:auto; gap:4px; margin-top:8px;}
.weather-hour-col{min-width:46px; background:#fff; border-radius:8px; text-align:center; font-size:12px; padding:4px 2px; line-height:1.5;}
.weather-hour-label{font-weight:800;}
.passage-map{background:#f3faf3; border:2px solid #cbe8cc; border-radius:12px; padding:10px 14px;}
.map-legend-icon{font-size:24px;}
.map-area-block{padding:8px 0; border-top:1px dashed #b8d8ba;}
.map-area-name{font-weight:800; color:#2e6b3a;}
.map-area-desc{font-size:15px;}
.passage-receipt{background:#fff; border:1px solid #ccc; border-radius:6px; padding:14px 18px; font-family:'Noto Sans JP',monospace; font-size:14.5px; max-width:340px; margin-left:auto; margin-right:auto; box-shadow:0 2px 8px rgba(0,0,0,.08);}
.receipt-shopname{text-align:center; font-weight:800; font-size:17px;}
.receipt-meta{text-align:center; font-size:12.5px; color:#555;}
.receipt-divider{border-top:1px dashed #999; margin:8px 0;}
.receipt-item-row{display:flex; justify-content:space-between;}
.receipt-total-row{text-align:right;}
.receipt-total-main{font-weight:800; font-size:16px;}
.passage-timetable{background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden;}
.timetable-header{background:#3b5fa8; color:#fff; display:flex; justify-content:center; gap:10px; padding:8px; font-weight:800;}
.timetable-header rt{color:#dfe8ff;}
.timetable-summary{text-align:center; font-weight:700; padding:6px; background:#eef2fb;}
.timetable-legs{padding:8px 14px;}
.timetable-leg{padding:6px 0; border-bottom:1px dashed #d9d9d9;}
.timetable-leg-time{font-weight:800; color:#3b5fa8; margin-right:8px;}
.timetable-leg-label{background:#3b5fa8; color:#fff; border-radius:4px; padding:0 6px; font-size:12px; margin-right:8px;}
.timetable-leg-line{font-size:13px; color:var(--muted);}
.passage-memo-note{background:#fffbd6; border:1px solid #e8dc8a; border-radius:4px; padding:14px 16px; box-shadow:2px 3px 8px rgba(0,0,0,.08); transform:rotate(-.4deg);}
.memo-note-to{font-weight:700; margin-bottom:6px;}
.memo-note-footer{display:flex; justify-content:space-between; font-size:12.5px; color:#6a6a3a; border-top:1px dashed #d4c870; padding-top:6px; margin-top:8px;}
.passage-plain{background:var(--paper); border:1px solid var(--line); border-radius:10px; padding:14px 16px; font-size:16px; line-height:2.1;}

/* ================= THEME: COLOR ================= */
[data-theme="color"]{--navy:#3a1c71; --navy-light:#5b2a9e; --accent:#ff3d7f; --gold:#ffb800; --green:#12a150; --red:#e5384f; --bg:#fff4e6; --qcard:#ffffff; --qline:#ffd2a6; --soft:#fff1f7;}
[data-theme="color"] body{background:linear-gradient(160deg,#fff4e6 0%,#ffe6f2 45%,#e6f4ff 100%) fixed;}
[data-theme="color"] .exam-header{background:linear-gradient(90deg,#3a1c71,#d76d77,#ffaf7b);}
[data-theme="color"] .section-bar{background:linear-gradient(90deg,#5b2a9e,#ff3d7f);}
[data-theme="color"] .progress-bar{background:linear-gradient(90deg,#ffb800,#ff3d7f,#7b2ff7);}
[data-theme="color"] .q-card{background:#fff; border:2px solid #ffd2a6; box-shadow:0 6px 22px rgba(255,61,127,.12);}
[data-theme="color"] .q-prompt{color:#3a1c71;}
[data-theme="color"] .opt-btn{border-width:2px;}
[data-theme="color"] .opt-btn:nth-child(1) .opt-label{background:#ff3d7f; color:#fff;}
[data-theme="color"] .opt-btn:nth-child(2) .opt-label{background:#2f80ed; color:#fff;}
[data-theme="color"] .opt-btn:nth-child(3) .opt-label{background:#12a150; color:#fff;}
[data-theme="color"] .opt-btn:nth-child(4) .opt-label{background:#ff8a00; color:#fff;}
[data-theme="color"] .opt-btn:nth-child(1){border-color:#ffc2d6;} [data-theme="color"] .opt-btn:nth-child(2){border-color:#bcd7fb;}
[data-theme="color"] .opt-btn:nth-child(3){border-color:#bfe8cf;} [data-theme="color"] .opt-btn:nth-child(4){border-color:#ffd9a8;}
[data-theme="color"] .opt-btn.correct{border-color:var(--green); background:#e4f8ec;}
[data-theme="color"] .opt-btn.wrong{border-color:var(--red); background:#fdeaea;}
[data-theme="color"] .listen-box{border-color:#7b2ff7; background:#f6f0ff;}
[data-theme="color"] .play-btn{background:linear-gradient(135deg,#12a150,#2f80ed);}
[data-theme="color"] .btn-primary{background:linear-gradient(90deg,#7b2ff7,#ff3d7f);}
[data-theme="color"] .card{box-shadow:0 10px 40px rgba(123,47,247,.18);}
[data-theme="color"] .subq-tag{background:linear-gradient(90deg,#7b2ff7,#ff3d7f);}
[data-theme="color"] .q-marks{background:linear-gradient(90deg,#ffb800,#ff8a00);}
[data-theme="color"] .tr-toggle{background:#fff1f7; border-color:#ff3d7f; color:#c2185b;}
[data-theme="color"] .bn-toggle{border-color:#7b2ff7; color:#7b2ff7;}
[data-theme="color"] .ans-expl{background:#f3f8ff; border-color:#bcd7fb;}
[data-theme="color"] .ae-expl{background:#fff6d6;}
[data-theme="color"] .cert-topbar{background:linear-gradient(90deg,#3a1c71,#ff3d7f);}
[data-theme="color"] .float-tools{background:linear-gradient(90deg,#7b2ff7,#ff3d7f);}
[data-theme="color"] ruby rt{color:#c2185b;}

/* ================= THEME: DARK ================= */
[data-theme="dark"]{--navy:#9db8ff; --navy-light:#1b2a4a; --accent:#ff6b7a; --gold:#f4c430; --green:#3ccf7f; --red:#ff6b6b; --bg:#0e1424; --card:#18213a; --ink:#e8ecf6; --muted:#a3acbc; --soft:#202b48; --line:#2f3b5c; --qcard:#151e35; --qline:#2a3656; --paper:#1d2742; --opt:#1d2742; --hl:#2a2a1e; --navy-dark:#0a1020;}
[data-theme="dark"] body{background:#0e1424; color:#e8ecf6;}
[data-theme="dark"] .card{background:#18213a; color:#e8ecf6; box-shadow:0 10px 40px rgba(0,0,0,.5);}
[data-theme="dark"] .exam-header{background:#0a1020;}
[data-theme="dark"] .exam-header .brand{color:#fff;}
[data-theme="dark"] .timer{background:#e8ecf6; color:#0a1020;}
[data-theme="dark"] .section-bar{background:#1b2a4a;}
[data-theme="dark"] .q-card{background:#151e35; border-color:#2a3656;}
[data-theme="dark"] .q-prompt, [data-theme="dark"] .pl-jp, [data-theme="dark"] .tr-jp{color:#f2f5ff;}
[data-theme="dark"] .q-meta{color:#a9b6d8;}
[data-theme="dark"] .opt-btn{background:#1d2742; border-color:#2f3b5c; color:#e8ecf6;}
[data-theme="dark"] .opt-btn .opt-label{background:#2f3b5c; color:#e8ecf6;}
[data-theme="dark"] .opt-btn:disabled, [data-theme="dark"] .opt-btn:disabled .opt-jp{color:#e8ecf6;}
[data-theme="dark"] .opt-btn.correct{background:#123826; border-color:#3ccf7f;}
[data-theme="dark"] .opt-btn.wrong{background:#3d1820; border-color:#ff6b6b;}
[data-theme="dark"] .listen-box, [data-theme="dark"] .passage-box{background:#1d2742; border-color:#3a4a73; color:#e8ecf6;}
[data-theme="dark"] .bn-inline{background:#2a2a1e; color:#f1e7c8;}
[data-theme="dark"] .tr-box{background:#232a22; border-color:#4a4a2a; color:#e8ecf6;}
[data-theme="dark"] .tr-rm{color:#7fd8c0;} [data-theme="dark"] .tr-bn{color:#ffc48a;}
[data-theme="dark"] .tr-toggle, [data-theme="dark"] .bn-toggle{background:#1d2742; color:#9db8ff; border-color:#9db8ff;}
[data-theme="dark"] .ans-expl{background:#17213b; border-color:#2f3b5c; color:#e8ecf6;}
[data-theme="dark"] .ae-expl{background:#2a2715;}
[data-theme="dark"] .ae-opt.c{color:#5fe39b;}
[data-theme="dark"] .nav-bar{background:#121a2e; border-color:#2f3b5c;}
[data-theme="dark"] .btn-secondary{background:#2f3b5c; color:#e8ecf6;}
[data-theme="dark"] .btn-primary{background:#3557b7; color:#fff;}
[data-theme="dark"] input, [data-theme="dark"] select{background:#1d2742; color:#e8ecf6; border-color:#3a4a73;}
[data-theme="dark"] label{color:#c9d2ea;}
[data-theme="dark"] .pledge-box{background:#1d2742; border-color:#3a4a73; color:#e8ecf6;}
[data-theme="dark"] .pledge-btn-no{background:transparent;}
[data-theme="dark"] .logo-title h1{color:#e8ecf6;}
[data-theme="dark"] ruby rt{color:#a9b6d8;}
[data-theme="dark"] .review-item{border-color:#2f3b5c;}
[data-theme="dark"] .explain-box, [data-theme="dark"] .opt-breakdown{background:#1d2742; color:#e8ecf6;}
[data-theme="dark"] .cert-info-table th{color:#a9b6d8; border-color:#2f3b5c;} [data-theme="dark"] .cert-info-table td{border-color:#2f3b5c;}
[data-theme="dark"] .dua-box{background:#142a1d; border-color:#2b5a3a; color:#cfeedd;}
[data-theme="dark"] .bar-hero-track, [data-theme="dark"] .bar-row-track{background:#25304f;}
[data-theme="dark"] .cert-topbar{background:#3557b7;}
[data-theme="dark"] .float-tools{background:#1b2a4a;}
[data-theme="dark"] .subq-tag{background:#3557b7;}
[data-theme="dark"] .q-prompt u,[data-theme="dark"] .blank{border-color:#e8ecf6;}
[data-theme="dark"] .q-ill,[data-theme="dark"] .q-img,[data-theme="dark"] .opt-pic{background:#fff;}
[data-theme="dark"] .passage-card,[data-theme="dark"] .passage-plain,[data-theme="dark"] .q-passage{color:#1a1a2e;}
[data-theme="dark"] .passage-plain,[data-theme="dark"] .q-passage{background:#1d2742; color:#e8ecf6; border-color:#3a4a73;}
[data-theme="dark"] .passage-card ruby rt{color:#5b6474;}
[data-theme="dark"] .passage-signboard{color:#fff; background:#16294f;}
[data-theme="dark"] .passage-memo-header,[data-theme="dark"] .notice-board-title{background:#16294f;}
[data-theme="dark"] .passage-notice-board{border-color:#16294f;}
[data-theme="dark"] .watermark-overlay{opacity:.35;}
@media print{ html[data-theme] body{background:#fff !important; color:#111 !important;} .float-tools{display:none !important;} }
html{background:var(--bg);}
[data-theme="dark"]{background:#0e1424;}
.tool-btn.on{color:#0f1f3d !important;}
#pledgeScreen,#loginScreen,#infoScreen,#resultScreen{padding-top:64px;}

/* ===== left question navigator (per section) ===== */
.exam-body{display:flex; align-items:flex-start; width:100%;}
.qnav{position:sticky; top:var(--hdrH,64px); flex:0 0 76px; align-self:flex-start; max-height:calc(100vh - var(--hdrH,64px) - 64px); overflow-y:auto; padding:14px 6px 16px 8px; background:#f5f7fc; border-right:1px solid #d7ddec; display:flex; flex-direction:column; align-items:center; scrollbar-width:thin;}
.qnav-inner{display:flex; gap:6px; align-items:stretch;}
.qnav-nums{display:flex; flex-direction:column; gap:9px;}
.qn{width:44px; height:38px; border-radius:11px; border:2.5px solid var(--sc); background:#fff; color:#0f1f3d; font-weight:800; font-size:15px; font-family:inherit; cursor:pointer; padding:0; transition:background .2s, transform .15s;}
.qn.done{background:var(--ss);}
.qn.cur{background:var(--sc); color:#fff; transform:scale(1.06); box-shadow:0 3px 10px rgba(0,0,0,.18);}
.qnav-track{width:8px; border-radius:8px; background:#f3d4d8; position:relative; overflow:hidden;}
.qnav-fill{position:absolute; left:0; right:0; top:0; height:0; background:var(--sc); border-radius:8px; transition:height .6s ease;}
.qnav-sec{margin-top:14px; width:68px; background:#2f6fe4; color:#fff; font-size:9.5px; font-weight:800; line-height:1.3; padding:9px 3px; border-radius:11px; text-align:center; word-break:normal; overflow-wrap:normal; hyphens:none; box-shadow:0 2px 6px rgba(47,111,228,.35);}
.exam-body .q-container{min-width:0; padding:18px 12px 100px;}
@media (min-width:700px){ .qnav{flex-basis:92px;} .qn{width:52px;} .qnav-sec{width:78px;} .exam-body .q-container{padding:22px 18px 100px;} }

/* ===== Language 1 / Language 2 ===== */
.lang-row{display:flex; gap:8px; flex-wrap:wrap; margin:2px 0 10px;}
.lang-btn{display:flex; flex-direction:column; align-items:flex-start; gap:1px; background:var(--navy); color:#fff; border:0; border-radius:10px; padding:8px 12px; font-family:inherit; font-weight:800; font-size:13.5px; cursor:pointer; line-height:1.2;}
.lang-btn small{font-weight:500; font-size:10.5px; opacity:.85;}
.lang-btn.on{outline:3px solid var(--gold); outline-offset:1px;}
.lang1-box{margin:0 0 10px;}
.q-card > .tr-box, .subq-block > .tr-box{margin:0 0 12px;}

/* ===== Quran ayah seal on result certificate ===== */
.cert-info-wrap{position:relative;}
.cert-info-wrap .cert-info-table tr:nth-child(n+2):nth-child(-n+5) td{padding-right:126px;}
.ayah-seal{position:absolute; right:-4px; top:50%; transform:translateY(-58%) rotate(-6deg); width:122px; height:122px; border-radius:50%; padding:4px;
  background:conic-gradient(from 0deg,#f5a623,#e0508a,#8a5cf6,#17a2b8,#2a9d5c,#f4b400,#f5a623);
  box-shadow:0 6px 18px rgba(138,92,246,.28), 0 0 0 3px rgba(255,255,255,.9); z-index:3; pointer-events:none;}
.ayah-inner{width:100%; height:100%; border-radius:50%; background:radial-gradient(circle at 35% 30%,#fffdf6 0%,#fff6dc 60%,#fde8c4 100%);
  border:2px dashed rgba(201,140,20,.55); display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:10px 9px;}
.ayah-ar{font-size:12px; color:#2a9d5c; line-height:1; margin-bottom:3px;}
.ayah-bn{font-size:10.6px; line-height:1.38; font-weight:800; color:#5b2a86;}
.ayah-src{margin-top:4px; font-size:9.5px; font-weight:800; color:#c0392b; letter-spacing:.3px;}
@media (min-width:560px){ .ayah-seal{width:140px; height:140px;} .ayah-bn{font-size:12px;} .cert-info-wrap .cert-info-table tr:nth-child(n+2):nth-child(-n+5) td{padding-right:136px;} }
[data-theme="dark"] .ayah-inner{background:radial-gradient(circle at 35% 30%,#2c2440,#1d1830); border-color:rgba(245,166,35,.5);}
[data-theme="dark"] .ayah-bn{color:#e9d8ff;}
@media print{ .ayah-seal{box-shadow:none;} }

/* Language 1 instructions + bottom line-by-line button */
.lang1-box{margin:0 0 10px;}
.instr-title{font-weight:800; color:var(--navy); font-size:12.5px; margin-bottom:6px;}
.instr-row{font-size:13.5px; line-height:1.55; padding:5px 0; border-top:1px dashed #d9e0f0;}
.instr-row:first-of-type{border-top:0;}
.instr-lang{display:inline-block; min-width:78px; font-weight:800; font-size:11.5px; color:#2f6fe4; margin-right:6px;}
.lang2-box{margin:0 0 10px;}
.tr-bottom{display:block; width:100%; text-align:center; margin-top:14px; font-weight:700; padding:10px 12px; border-radius:12px;}
.tr-bottom.on{background:var(--navy); color:#fff;}
.subq-block > .tr-box{margin:10px 0 0;}
.lang-row{flex-wrap:nowrap;}
.lang-btn{flex:1 1 0; min-width:0; text-align:left;}
.lang-btn small{white-space:normal; line-height:1.25;}
.instr-lang{display:block; margin:0 0 2px;}

/* Your Language 1 / 2 — small stacked buttons, top-left corner */
.lang-corner{display:flex; flex-direction:column; align-items:flex-start; gap:5px; margin:-6px 0 12px -4px;}
.lang-mini{background:var(--navy); color:#fff; border:0; border-radius:8px; padding:5px 10px; font-family:inherit; font-size:11.5px; font-weight:800; line-height:1.2; cursor:pointer; box-shadow:0 1px 4px rgba(15,31,61,.2);}
.lang-mini.on{background:var(--gold); color:#2a1d00;}
.q-card > .lang1-box, .q-card > .lang2-box{margin:0 0 12px;}


/* real-audio play state */
.play-btn.playing{animation:playPulse 1.1s ease-in-out infinite;}
@keyframes playPulse{0%{box-shadow:0 0 0 0 rgba(42,157,92,.55);}70%{box-shadow:0 0 0 12px rgba(42,157,92,0);}100%{box-shadow:0 0 0 0 rgba(42,157,92,0);}}
/* reading posters keep dark ink in dark mode */
[data-theme="dark"] .reading-poster,[data-theme="dark"] .passage-notice-board,[data-theme="dark"] .passage-flyer,[data-theme="dark"] .passage-ticket{color:#1a1a2e;}
[data-theme="dark"] .reading-poster ruby rt,[data-theme="dark"] .passage-notice-board ruby rt{color:#5b6474;}
[data-theme="dark"] .passage-notice-board{background:#fff;}
.passage-plain b{color:var(--accent);}

.q-img{cursor:zoom-in}
/* ================= lesson-test additions (same design language) ================= */
.q-line{display:flex; gap:6px; align-items:baseline; margin:2px 0;}
.q-line + .q-line{margin-top:6px;}
.q-sp{flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:24px; padding:0 6px; border-radius:7px; background:var(--navy); color:#fff; font-size:12.5px; font-weight:800; font-family:'Noto Sans JP',sans-serif; transform:translateY(-2px);}
.q-sp.s2{background:var(--accent);}
.q-sp.s3{background:var(--green);}
.q-note{background:#fff8e6; border:1px dashed #e8c66a; border-radius:9px; padding:7px 10px; font-size:12.5px; color:#6b4e00; margin:-6px 0 12px; line-height:1.55;}
[data-theme="dark"] .q-note{background:#2a2a1e; color:#f1e7c8; border-color:#6b5a22;}
.lesson-chip{display:inline-block; font-size:11px; font-weight:700; padding:2px 9px; border-radius:20px; background:var(--soft); color:var(--navy); border:1px solid var(--line); margin:0 4px 4px 0;}
.ae-expl .ex-point{display:block; font-weight:700; margin:4px 0 6px;}
.ae-expl .ex-form{display:block; background:rgba(15,31,61,.05); border-radius:7px; padding:6px 9px; margin:6px 0;}
[data-theme="dark"] .ae-expl .ex-form{background:rgba(255,255,255,.06);}
.ae-expl ul{margin:6px 0 4px; padding-left:20px;}
.ae-expl li{margin-bottom:5px;}
.ae-expl .ex-tip{display:block; margin-top:6px; padding:7px 9px; border-radius:8px; background:rgba(244,180,0,.14); border-left:3px solid var(--gold);}
.ae-opt .why{display:block; font-weight:400; color:var(--muted); font-size:12.8px; margin:1px 0 2px 18px;}
.ae-opt.c .why{color:inherit;}
.ae-opt .opt-mini{display:inline-block; width:46px; height:auto; vertical-align:middle; border-radius:5px; border:1px solid var(--line); background:#fff; margin-right:4px;}
.tr-scene{background:rgba(42,157,92,.08); border-left:3px solid var(--green); border-radius:6px; padding:6px 9px; margin:2px 0 8px; font-size:13.5px;}
.options.pic-opts{flex-direction:row; flex-wrap:wrap;}
.options.pic-opts .opt-btn{flex:1 1 30%; min-width:0; flex-direction:column; align-items:center; text-align:center; padding:10px 8px;}
.options.pic-opts .opt-pic{width:100%; max-width:130px; margin:6px auto;}
.lesson-sub{font-size:13px; color:var(--navy); font-weight:700; margin-top:4px;}
.lesson-meta{display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:8px;}
.res-actions{display:flex; flex-direction:column; gap:10px; margin-top:12px;}
.res-actions a, .res-actions button{display:block; text-align:center; text-decoration:none; border-radius:9px; font-weight:700; font-size:15px; padding:12px 20px; width:100%; margin:0;}
.btn-next{background:linear-gradient(90deg,var(--green),#1f7a48); color:#fff;}
.btn-retry{background:var(--gold); color:#3a2a00;}
.btn-hub{background:#e2e6f0; color:var(--navy);}
[data-theme="dark"] .btn-hub{background:#2f3b5c; color:#e8ecf6;}
.res-msg{border-radius:12px; padding:12px 14px; margin:4px 0 16px; font-size:13.5px; line-height:1.8;}
.res-msg h3{margin:0 0 4px; font-size:15.5px;}
.res-msg.t1{background:#e9f8ef; color:#1d5a37; border:1px solid #bfe6cd;}
.res-msg.t2{background:#eef4ff; color:#1f3d7a; border:1px solid #c9d8f6;}
.res-msg.t3{background:#fff6e3; color:#6b4a00; border:1px solid #f1dca6;}
.res-msg.t4{background:#fdeef0; color:#7a2531; border:1px solid #f3c9cf;}
[data-theme="dark"] .res-msg{background:#1d2742 !important; color:#e8ecf6 !important; border-color:#2f3b5c !important;}
.welcome-back{font-size:12px; color:var(--green); font-weight:700; margin-top:6px; min-height:0;}
@media print{ .res-actions{display:none !important;} }
/* dark-mode polish */
[data-theme="dark"] .qnav{background:#121a2e; border-color:#2f3b5c;}
[data-theme="dark"] .qn{background:#1d2742; color:#e8ecf6;}
[data-theme="dark"] .qn.done{background:var(--ss); color:#1a1a2e;}
[data-theme="dark"] .qn.cur{background:var(--sc); color:#fff;}
[data-theme="dark"] .qnav-track{background:#2f3b5c;}
[data-theme="dark"] .q-sp{background:#3557b7;}
[data-theme="dark"] .q-sp.s2{background:#c2185b;}
[data-theme="dark"] .tr-bottom.on, [data-theme="dark"] .lang-mini, [data-theme="dark"] .lang-btn{background:#3557b7; color:#fff;}
[data-theme="dark"] .lang-mini.on{background:var(--gold); color:#2a1d00;}
[data-theme="dark"] .lesson-chip{background:#202b48; color:#c9d2ea;}
[data-theme="color"] .q-sp{background:linear-gradient(135deg,#7b2ff7,#5b2a9e);}
[data-theme="color"] .q-sp.s2{background:linear-gradient(135deg,#ff3d7f,#ff8a00);}
