/* V34.161 — Result page mobile/desktop correction
   Keeps business logic untouched; focuses on layout, visibility and hierarchy. */
#resultOverlay.vp161-modern{background:rgba(8,18,34,.72)!important;backdrop-filter:blur(7px)}
#resultOverlay.vp161-modern .result-card{
  width:min(1120px,calc(100vw - 36px))!important;
  max-width:1120px!important;
  max-height:calc(100dvh - 34px)!important;
  overflow:auto!important;
  overflow-x:hidden!important;
  border-radius:28px!important;
  padding:24px clamp(18px,3vw,34px) 18px!important;
  background:linear-gradient(180deg,#fff 0%,#fbfcff 100%)!important;
  box-shadow:0 30px 100px rgba(5,20,45,.34)!important;
  scrollbar-gutter:stable;
}
#resultOverlay.vp161-modern #resultArea{max-width:1000px!important;margin:0 auto!important;overflow:visible!important}
#resultOverlay.vp161-modern #resultArea>img{width:92px!important;height:55px!important;margin:0 auto 3px!important;object-fit:contain!important;display:block!important}
#resultOverlay.vp161-modern #resultArea>small{display:block!important;text-align:center!important;font-size:11px!important;letter-spacing:.14em!important;margin:0 0 2px!important;color:#aa1d31!important}
#resultOverlay.vp161-modern #resultArea>h2{text-align:center!important;font-size:clamp(25px,3vw,34px)!important;margin:2px 0 15px!important;color:#102342!important;letter-spacing:-.025em!important}

/* Result summary */
#resultOverlay.vp161-modern .vp-result-head{
  max-width:860px!important;margin:0 auto 12px!important;padding:17px 20px!important;
  border:1px solid #e1e8f0!important;border-radius:20px!important;
  background:linear-gradient(135deg,#f8fbff 0%,#fff 58%,#fff5f6 100%)!important;
  box-shadow:0 9px 26px rgba(17,35,62,.06)!important;
  display:flex!important;justify-content:center!important;align-items:center!important;gap:12px!important;
}
#resultOverlay.vp161-modern .vp-result-head .result-emoji{font-size:42px!important;line-height:1!important}
#resultOverlay.vp161-modern .vp-result-head .big-level{font-size:48px!important;line-height:1!important;color:#c51d32!important;font-weight:950!important}
#resultOverlay.vp161-modern .vp-single-result-layout>p,
#resultOverlay.vp161-modern #resultArea>p{text-align:center!important;color:#536079!important;font-size:14px!important;margin:7px 0 10px!important}

/* Productions */
#resultOverlay.vp161-modern .vp-provisional,
#resultOverlay.vp161-modern .vp-result-section{
  max-width:880px!important;margin:12px auto!important;padding:14px 17px!important;
  border:1px solid #e3e8ef!important;border-radius:16px!important;background:#f8fafc!important;
}
#resultOverlay.vp161-modern .vp-result-section h3{font-size:16px!important;color:#142844!important;margin:0 0 7px!important}
#resultOverlay.vp161-modern .vp-result-section p{font-size:13.5px!important;line-height:1.55!important;color:#58677c!important;margin:0!important}

/* Competencies — explicit grid to prevent percentage/icon/title overlap */
#resultOverlay.vp161-modern .vp-competencies{max-width:880px!important;display:grid!important;gap:9px!important;margin:12px auto!important}
#resultOverlay.vp161-modern .vp-comp-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 58px minmax(120px,190px)!important;
  grid-template-areas:"label level value"!important;
  align-items:center!important;gap:10px!important;
  min-width:0!important;padding:12px 14px!important;border:1px solid #e4e9f0!important;border-radius:14px!important;
  background:#fff!important;box-shadow:none!important;color:#172033!important;
}
#resultOverlay.vp161-modern .vp-comp-row>span{grid-area:label!important;min-width:0!important;font-weight:750!important;line-height:1.35!important;overflow-wrap:anywhere!important}
#resultOverlay.vp161-modern .vp-comp-row>strong{grid-area:level!important;text-align:center!important;font-size:17px!important;color:#b51f2e!important}
#resultOverlay.vp161-modern .vp-comp-row>small{grid-area:value!important;text-align:right!important;color:#58677c!important;line-height:1.35!important;font-size:13px!important;min-width:0!important;overflow-wrap:anywhere!important}

/* Generic learning/offers block becomes secondary */
#resultOverlay.vp161-modern .vp-next-actions{max-width:880px!important;margin:12px auto!important;padding:13px 16px!important;border:1px solid #e5e9ef!important;border-radius:16px!important;background:#fff!important}
#resultOverlay.vp161-modern .vp-next-actions h3{font-size:16px!important;margin:0 0 4px!important;color:#142844!important}
#resultOverlay.vp161-modern .vp-next-actions p{font-size:13px!important;margin:0 0 8px!important;color:#637086!important}
#resultOverlay.vp161-modern .vp-next-buttons{display:flex!important;gap:8px!important;flex-wrap:wrap!important;justify-content:center!important}
#resultOverlay.vp161-modern .vp-next-buttons a{min-height:40px!important;padding:9px 14px!important;font-size:12.5px!important;border-radius:11px!important}

/* Primary free-session CTA */
#resultOverlay.vp161-modern .vp-free-session-cta{
  max-width:880px!important;margin:14px auto!important;padding:17px 18px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,300px)!important;gap:16px!important;align-items:center!important;
  border:1px solid #bfe2cf!important;border-radius:18px!important;
  background:linear-gradient(135deg,#f1fff7 0%,#fff 58%,#eefbf5 100%)!important;
  box-shadow:0 9px 26px rgba(17,126,77,.07)!important;
}
#resultOverlay.vp161-modern .vp-free-session-cta small{display:block!important;color:#16804d!important;font-size:10.5px!important;font-weight:900!important;letter-spacing:.08em!important}
#resultOverlay.vp161-modern .vp-free-session-cta h3{font-size:20px!important;margin:3px 0 5px!important;color:#102a20!important}
#resultOverlay.vp161-modern .vp-free-session-cta p{font-size:13px!important;line-height:1.48!important;color:#52665c!important;margin:0!important}
#resultOverlay.vp161-modern .vp-free-session-cta button{
  min-width:0!important;width:100%!important;min-height:49px!important;margin:0!important;
  background:linear-gradient(90deg,#119958,#19b66b)!important;color:#fff!important;border:0!important;
  border-radius:13px!important;box-shadow:0 8px 18px rgba(20,157,90,.18)!important;font-weight:900!important;
}
#resultOverlay.vp161-modern .vp-free-session-cta button.is-done{background:#25a66a!important}

/* International-exam CTA — shown by existing B1+ module; moved below free-session CTA by JS */
#resultOverlay.vp161-modern .vp112-result-prep,
#resultOverlay.vp161-modern .vp161-exam-card{
  max-width:880px!important;margin:12px auto!important;padding:14px 16px!important;
  border:1px solid #f0ccd2!important;border-radius:17px!important;
  background:linear-gradient(135deg,#fff4f5 0%,#fff 72%)!important;
  box-shadow:0 8px 22px rgba(183,28,48,.06)!important;
  text-align:center!important;
}
#resultOverlay.vp161-modern .vp112-result-prep .vp112-form-link,
#resultOverlay.vp161-modern .vp161-exam-button{
  display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:48px!important;
  border-radius:13px!important;background:linear-gradient(90deg,#bd1e34,#df2942)!important;color:#fff!important;
  font-weight:900!important;text-decoration:none!important;border:0!important;box-shadow:0 9px 18px rgba(194,31,53,.16)!important;
}
#resultOverlay.vp161-modern .vp112-result-prep small{display:block!important;margin-top:8px!important;color:#687287!important;font-size:12px!important}

/* Footer actions */
#resultOverlay.vp161-modern .vp-result-actions{
  position:sticky!important;bottom:-1px!important;z-index:30!important;max-width:1000px!important;
  margin:16px auto 0!important;padding:11px 5px 5px!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:center!important;
  background:linear-gradient(180deg,rgba(255,255,255,.84),#fff 28%)!important;border-top:1px solid #e6eaf0!important;backdrop-filter:blur(8px)!important;
}
#resultOverlay.vp161-modern .vp-result-actions button,
#resultOverlay.vp161-modern .vp-result-actions a{
  width:auto!important;min-height:40px!important;padding:9px 13px!important;border-radius:11px!important;font-size:12.5px!important;
  font-weight:850!important;white-space:nowrap!important;text-decoration:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid transparent!important;
}
#resultOverlay.vp161-modern .vp-result-actions .vp-pdf-btn{background:#c61e34!important;color:#fff!important}
#resultOverlay.vp161-modern .vp-result-actions .vp-retake-btn{background:#152842!important;color:#fff!important}
#resultOverlay.vp161-modern .vp-result-actions .vp161-whatsapp-action{background:#0f9f5b!important;color:#fff!important}
#resultOverlay.vp161-modern .vp-result-actions #downloadCertificate{background:#a7192b!important;color:#fff!important}

/* Dual language */
#resultOverlay.vp161-modern .dual-results.vp-dual-compact{max-width:880px!important;margin:12px auto!important;gap:12px!important}
#resultOverlay.vp161-modern .dual-results.vp-dual-compact>div{border:1px solid #e3e8ef!important;border-radius:18px!important;background:#fff!important;box-shadow:0 7px 20px rgba(17,35,62,.05)!important}
#resultOverlay.vp161-modern .vp-dual-detail{max-width:880px!important}

#resultOverlay.vp161-modern *,#resultOverlay.vp161-modern *:before,#resultOverlay.vp161-modern *:after{box-sizing:border-box}
#resultOverlay.vp161-modern img{max-width:100%}

@media(max-width:760px){
  #resultOverlay.vp161-modern{padding:0!important;align-items:stretch!important}
  #resultOverlay.vp161-modern .result-card{
    width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;
    border-radius:0!important;padding:13px 12px calc(16px + env(safe-area-inset-bottom))!important;box-shadow:none!important;
  }
  #resultOverlay.vp161-modern #resultArea>img{width:72px!important;height:43px!important}
  #resultOverlay.vp161-modern #resultArea>small{font-size:9px!important}
  #resultOverlay.vp161-modern #resultArea>h2{font-size:21px!important;margin-bottom:10px!important}
  #resultOverlay.vp161-modern .vp-result-head{padding:12px 13px!important;border-radius:16px!important;gap:8px!important;flex-direction:row!important}
  #resultOverlay.vp161-modern .vp-result-head .result-emoji{font-size:32px!important}
  #resultOverlay.vp161-modern .vp-result-head .big-level{font-size:38px!important}
  #resultOverlay.vp161-modern .vp-provisional,#resultOverlay.vp161-modern .vp-result-section{padding:12px 13px!important;border-radius:15px!important}

  /* Mobile: title + percentage on one row, long classroom/pending text below */
  #resultOverlay.vp161-modern .vp-comp-row{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"label value"!important;
    gap:8px!important;padding:12px 13px!important;min-height:58px!important;
  }
  #resultOverlay.vp161-modern .vp-comp-row>span{grid-area:label!important;font-size:15px!important;line-height:1.3!important;padding-right:4px!important}
  #resultOverlay.vp161-modern .vp-comp-row>strong{display:none!important}
  #resultOverlay.vp161-modern .vp-comp-row>small{grid-area:value!important;align-self:center!important;justify-self:end!important;text-align:right!important;font-size:13px!important;font-weight:800!important;white-space:nowrap!important;color:#48566a!important}
  #resultOverlay.vp161-modern .vp-comp-row.vp-comp-classroom,
  #resultOverlay.vp161-modern .vp-comp-row.vp-comp-pending{grid-template-areas:"label label" "value value"!important}
  #resultOverlay.vp161-modern .vp-comp-row.vp-comp-classroom>small,
  #resultOverlay.vp161-modern .vp-comp-row.vp-comp-pending>small{justify-self:start!important;text-align:left!important;white-space:normal!important;font-weight:650!important;font-size:12.5px!important;color:#687287!important}

  #resultOverlay.vp161-modern .vp-free-session-cta{grid-template-columns:1fr!important;padding:14px!important;border-radius:16px!important;gap:11px!important}
  #resultOverlay.vp161-modern .vp-free-session-cta h3{font-size:18px!important}
  #resultOverlay.vp161-modern .vp-free-session-cta button{min-height:48px!important;font-size:14px!important}
  #resultOverlay.vp161-modern .vp112-result-prep,#resultOverlay.vp161-modern .vp161-exam-card{padding:12px!important;border-radius:15px!important}
  #resultOverlay.vp161-modern .vp112-result-prep .vp112-form-link,#resultOverlay.vp161-modern .vp161-exam-button{min-height:47px!important;padding:10px 12px!important;font-size:13.5px!important;line-height:1.25!important}
  #resultOverlay.vp161-modern .vp-next-actions{padding:12px!important}

  /* Always two columns on normal phones; one column only on very narrow devices */
  #resultOverlay.vp161-modern .vp-result-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:10px 0 5px!important}
  #resultOverlay.vp161-modern .vp-result-actions button,
  #resultOverlay.vp161-modern .vp-result-actions a{width:100%!important;min-width:0!important;white-space:normal!important;font-size:11.5px!important;line-height:1.2!important;padding:9px 7px!important}
  #resultOverlay.vp161-modern .dual-results.vp-dual-compact{grid-template-columns:1fr!important}
}
@media(max-width:360px){
  #resultOverlay.vp161-modern .vp-result-actions{grid-template-columns:1fr!important}
}
