.wcl-app-v4{max-width:1100px;margin:25px auto;padding:24px;border-radius:18px;background:#fff;box-shadow:0 8px 35px rgba(0,0,0,.07);font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#222}.wcl-v4-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:22px}.wcl-brand{font-weight:800}.wcl-brand span{color:#d00000}.wcl-controls{display:flex;gap:8px;flex-wrap:wrap}.wcl-select,.wcl-controls button,.wcl-again{padding:10px 13px;border:1px solid #d5d5d5;border-radius:9px;background:#fff;font-size:14px}.wcl-start,.wcl-again{background:#d00000!important;color:#fff;border-color:#d00000!important;cursor:pointer}.wcl-reset{cursor:pointer}.wcl-v4-stats{display:flex;justify-content:center;gap:50px;margin:10px 0 25px;text-align:center}.wcl-v4-stats small,.wcl-result-grid small{display:block;font-size:11px;color:#777;letter-spacing:1px}.wcl-v4-stats strong{font-size:23px}.wcl-passage{height:105px;overflow:hidden;padding:15px 5px;display:flex;align-items:center;font-size:27px;line-height:1.65;word-break:normal;border-top:1px solid #eee;border-bottom:1px solid #eee}.wcl-passage span{opacity:.35}.wcl-passage span.done{opacity:1}.wcl-passage span.current{opacity:1;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px}.wcl-passage span.wrong{color:#d00000;background:#ffe5e5;opacity:1}.wcl-typebox-wrap{margin-top:18px}.wcl-typebox{width:100%;box-sizing:border-box;min-height:58px;padding:14px 16px;border:2px solid #bbb;border-radius:12px;font-size:22px;line-height:1.4;outline:none;background:#fff}.wcl-typebox:focus{border-color:#d00000;box-shadow:0 0 0 3px rgba(208,0,0,.08)}.wcl-help{text-align:center;color:#777;font-size:13px}.wcl-result{margin-top:25px;padding:25px;background:#f7f7f7;border-radius:14px;text-align:center}.wcl-timeup{display:inline-block;padding:8px 14px;border-radius:20px;background:#ffe1e1;color:#b00000;font-weight:800}.wcl-result-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:18px 0}.wcl-result-grid>div{padding:14px;background:#fff;border-radius:10px}.wcl-result-grid strong{display:block;font-size:24px;margin-top:5px}.wcl-wrong-box{text-align:left;margin:18px 0;padding:18px;background:#fff;border-radius:12px}.wcl-wrong-list{display:flex;gap:8px;flex-wrap:wrap}.wcl-wrong-word{padding:6px 10px;border-radius:7px;background:#ffe5e5;color:#b00000;font-weight:600}.wcl-wrong-word small{color:#666;margin-left:4px}@media(max-width:750px){.wcl-v4-head{flex-direction:column;align-items:stretch}.wcl-v4-stats{gap:15px;justify-content:space-around}.wcl-v4-stats strong{font-size:19px}.wcl-passage{font-size:21px;height:90px}.wcl-typebox{font-size:18px}.wcl-result-grid{grid-template-columns:repeat(3,1fr)}}

/* V5: preserve real word spacing in the flowing passage */
.wcl-passage {
  white-space: nowrap !important;
  word-spacing: 0 !important;
  letter-spacing: normal;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.wcl-passage::-webkit-scrollbar { display: none; }
.wcl-char {
  display: inline-block;
  white-space: pre !important;
}
.wcl-char.wcl-space {
  width: 0.42em;
  min-width: 0.42em;
}
.wcl-char.current {
  border-left: 2px solid currentColor;
  margin-left: -2px;
}

/* V6 timer selector */
.wcl-duration-control{display:inline-flex;align-items:center;gap:8px;margin:0 8px}
.wcl-duration-control>span{font-size:12px;font-weight:700;opacity:.7}
.wcl-duration-select{min-width:125px;height:38px;padding:0 10px;border:1px solid rgba(127,127,127,.35);border-radius:8px;background:inherit;color:inherit;font-weight:600}
@media(max-width:600px){.wcl-duration-control{width:100%;justify-content:center;margin:6px 0}.wcl-duration-select{flex:1;max-width:180px}}

/* V6.1 - Dedicated time chooser */
.wcl-time-picker{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:12px auto 16px;
  padding:8px 12px;
}
.wcl-time-label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  opacity:.72;
}
.wcl-duration-select{
  min-width:145px;
  height:40px;
  padding:0 12px;
  border:1px solid rgba(127,127,127,.35);
  border-radius:9px;
  background:inherit;
  color:inherit;
  font-weight:700;
  cursor:pointer;
}
.wcl-duration-select:focus{
  outline:2px solid currentColor;
  outline-offset:2px;
}
@media(max-width:600px){
  .wcl-time-picker{
    width:100%;
    box-sizing:border-box;
    gap:8px;
  }
  .wcl-duration-select{
    flex:1;
    max-width:190px;
  }
}

/* V6.2 - Separate TEST TIME box */
.wcl-time-picker-separate{
  display:flex !important;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px 12px;
  width:fit-content;
  max-width:calc(100% - 24px);
  margin:14px auto 18px !important;
  padding:12px 16px;
  border:1px solid rgba(127,127,127,.35);
  border-radius:12px;
  box-sizing:border-box;
}
.wcl-time-picker-title{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  opacity:.75;
  white-space:nowrap;
}
.wcl-time-picker-separate .wcl-duration-select{
  min-width:155px;
  height:42px;
  padding:0 12px;
  border:1px solid rgba(127,127,127,.45);
  border-radius:9px;
  background:inherit;
  color:inherit;
  font-weight:700;
  cursor:pointer;
}
.wcl-time-picker-note{
  width:100%;
  text-align:center;
  font-size:11px;
  opacity:.58;
}
@media(max-width:600px){
  .wcl-time-picker-separate{
    width:calc(100% - 16px);
    max-width:none;
  }
  .wcl-time-picker-separate .wcl-duration-select{
    flex:1;
    min-width:140px;
  }
}

/* V7 candidate + result */
.wcl-candidate-box{
  display:flex;
  flex-direction:column;
  gap:7px;
  width:min(420px,calc(100% - 24px));
  margin:0 auto 14px;
}
.wcl-candidate-box label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  opacity:.72;
}
.wcl-candidate-name{
  height:42px;
  padding:0 12px;
  border:1px solid rgba(127,127,127,.35);
  border-radius:9px;
  background:inherit;
  color:inherit;
  font-size:15px;
}
.wcl-candidate-name:focus{outline:2px solid currentColor;outline-offset:2px}
.wcl-name-required{animation:wclNameShake .25s linear 2;border-color:#d33!important}
@keyframes wclNameShake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
.wcl-candidate-result{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:0 0 14px;
}
.wcl-candidate-result>div{
  flex:1 1 160px;
  padding:10px 12px;
  border:1px solid rgba(127,127,127,.25);
  border-radius:8px;
}
.wcl-candidate-result strong,.wcl-candidate-result span{display:block}
.wcl-candidate-result strong{font-size:11px;opacity:.65;margin-bottom:3px}
.wcl-candidate-result span{font-weight:800}
.wcl-passed{font-weight:900}
.wcl-not-passed{font-weight:900}
.wcl-print-result{
  margin:10px 8px 0 0;
  padding:10px 16px;
  border-radius:8px;
  border:1px solid rgba(127,127,127,.35);
  background:inherit;
  color:inherit;
  cursor:pointer;
  font-weight:700;
}
@media print{
  body *{visibility:hidden!important}
  .wcl-result,.wcl-result *{visibility:visible!important}
  .wcl-result{position:absolute;left:0;top:0;width:100%}
  .wcl-print-result,.wcl-again{display:none!important}
}

/* V7.1 fixes */
.wcl-candidate-box{display:flex;flex-direction:column;gap:6px;width:min(420px,calc(100% - 24px));margin:0 auto 12px}
.wcl-candidate-box label{font-size:12px;font-weight:800;letter-spacing:.08em;opacity:.72}
.wcl-candidate-name{width:100%;height:42px;box-sizing:border-box;padding:0 12px;border:1px solid rgba(127,127,127,.35);border-radius:9px;background:inherit;color:inherit;font-size:15px}
.wcl-time-picker-separate{display:flex!important;align-items:center;justify-content:center;flex-wrap:wrap;gap:9px 12px;width:fit-content;max-width:calc(100% - 24px);margin:12px auto 18px!important;padding:12px 16px;border:1px solid rgba(127,127,127,.35);border-radius:12px;box-sizing:border-box}
.wcl-time-picker-title{font-size:12px;font-weight:800;letter-spacing:.08em;opacity:.72}
.wcl-time-picker-note{width:100%;text-align:center;font-size:11px;opacity:.55}
.wcl-duration-select{min-width:155px;height:42px;padding:0 12px;border:1px solid rgba(127,127,127,.4);border-radius:9px;background:inherit;color:inherit;font-weight:700}
.wcl-v71-wrong-section{margin-top:18px;text-align:left}
.wcl-v71-wrong-section h3{margin:0 0 9px;font-size:15px}
.wcl-wrong-list{display:flex;flex-direction:column;gap:6px}
.wcl-mistake{display:flex;align-items:center;gap:9px;padding:7px 9px;border:1px solid rgba(127,127,127,.2);border-radius:7px}
.wcl-mistake b{min-width:28px;opacity:.6}
.wcl-mistake span{font-weight:700}
.wcl-mistake em{opacity:.55;font-style:normal}
.wcl-no-mistakes{padding:9px;border-radius:7px;opacity:.7}
.wcl-candidate-result{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px}
.wcl-candidate-result>div{flex:1 1 150px;padding:10px;border:1px solid rgba(127,127,127,.22);border-radius:8px}
.wcl-candidate-result strong,.wcl-candidate-result span{display:block}
.wcl-candidate-result strong{font-size:11px;opacity:.6;margin-bottom:3px}
.wcl-candidate-result span{font-weight:800}
.wcl-print-result{display:inline-block;margin:12px 8px 0 0;padding:10px 16px;border:1px solid rgba(127,127,127,.35);border-radius:8px;background:inherit;color:inherit;font-weight:700;cursor:pointer}
.wcl-passed{font-weight:900}.wcl-not-passed{font-weight:900}
@media(max-width:600px){.wcl-time-picker-separate{width:calc(100% - 16px);max-width:none}.wcl-duration-select{flex:1;min-width:140px}}
@media print{
  body *{visibility:hidden!important}
  .wcl-result,.wcl-result *{visibility:visible!important}
  .wcl-result{position:absolute!important;left:0;top:0;width:100%!important;background:white!important;color:black!important}
  .wcl-print-result,.wcl-again{display:none!important}
}

/* V7.2 - Result spacing + Word Class Live logo watermark */
.wcl-candidate-result > div{
  display:flex !important;
  align-items:baseline;
  justify-content:flex-start;
  gap:12px !important;
  text-align:left;
}
.wcl-candidate-result > div strong{
  flex:0 0 auto;
  margin:0 !important;
  white-space:nowrap;
}
.wcl-candidate-result > div span{
  flex:1 1 auto;
  min-width:0;
  margin:0 !important;
  padding-left:2px;
  white-space:normal;
}
.wcl-result{
  position:relative !important;
  overflow:hidden;
}
.wcl-result-watermark{
  position:absolute;
  width:min(360px,55%);
  height:auto;
  left:50%;
  top:55%;
  transform:translate(-50%,-50%);
  opacity:.075;
  pointer-events:none;
  z-index:0;
}
.wcl-result > *:not(.wcl-result-watermark){
  position:relative;
  z-index:1;
}
.wcl-result-brand{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:0 auto 10px;
}
.wcl-result-brand img{
  width:155px;
  max-width:45%;
  height:auto;
  object-fit:contain;
}
.wcl-result-actions{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.wcl-print-result{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:42px;
  padding:10px 18px !important;
  border:1px solid rgba(127,127,127,.35);
  border-radius:9px;
  background:inherit;
  color:inherit;
  font-weight:800;
  cursor:pointer;
  visibility:visible !important;
}
.wcl-again{min-height:42px}
@media(max-width:600px){
  .wcl-candidate-result > div{gap:9px !important}
  .wcl-result-brand img{width:135px}
}
@media print{
  body *{visibility:hidden!important}
  .wcl-result,.wcl-result *{visibility:visible!important}
  .wcl-result{
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:100%!important;
    min-height:100vh!important;
    box-sizing:border-box!important;
    background:#fff!important;
    color:#111!important;
    padding:28px!important;
  }
  .wcl-result-watermark{
    display:block!important;
    visibility:visible!important;
    opacity:.08!important;
  }
  .wcl-result-actions{display:none!important}
}

/* V7.3 - A4 print result and no-page-refresh Try Again */
@page{
  size:A4 portrait;
  margin:10mm;
}
@media print{
  html,body{
    width:210mm!important;
    min-height:297mm!important;
    margin:0!important;
    padding:0!important;
  }
  body{
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }
  .wcl-result{
    width:190mm!important;
    min-height:277mm!important;
    max-height:277mm!important;
    margin:0 auto!important;
    padding:12mm!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    position:relative!important;
    page-break-after:avoid!important;
    break-after:avoid-page!important;
  }
  .wcl-result-brand img{
    width:42mm!important;
    max-width:42mm!important;
  }
  .wcl-result-watermark{
    width:85mm!important;
    max-width:85mm!important;
  }
  .wcl-result-actions{
    display:none!important;
  }
}

/* V7.4 - very subtle transparent watermark */
.wcl-result-watermark{
  opacity:.035!important;
  filter:grayscale(100%)!important;
  mix-blend-mode:multiply;
  pointer-events:none!important;
}
.wcl-result-brand img{opacity:.92}
.wcl-try-again,.wcl-again{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 18px;
  border-radius:9px;
  cursor:pointer!important;
  pointer-events:auto!important;
  position:relative;
  z-index:10;
}
@media print{
  .wcl-result-watermark{
    opacity:.035!important;
    filter:grayscale(100%)!important;
  }
}

.wcl-category-box{display:flex;align-items:center;justify-content:center;gap:9px;margin:10px auto 12px}
.wcl-category-box label{font-size:12px;font-weight:800;opacity:.7}
.wcl-category-select{min-width:220px;height:40px;padding:0 10px;border:1px solid rgba(127,127,127,.35);border-radius:8px;background:inherit;color:inherit;font-weight:600}
.wcl-rule-result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:12px 0 15px}
.wcl-rule-result-grid>div{padding:10px;border:1px solid rgba(127,127,127,.22);border-radius:8px}
.wcl-rule-result-grid strong,.wcl-rule-result-grid span{display:block}.wcl-rule-result-grid strong{font-size:10px;opacity:.6;margin-bottom:4px}.wcl-rule-result-grid span{font-weight:800}

/* V7.6 - Current typed passage with wrong-character highlighting */
.wcl-current-passage-result{
  margin:18px 0 16px;
  text-align:left;
}
.wcl-current-passage-result h3{
  margin:0 0 9px;
  font-size:15px;
}
.wcl-typed-passage-box{
  padding:13px 14px;
  border:1px solid rgba(127,127,127,.28);
  border-radius:9px;
  background:rgba(127,127,127,.035);
  line-height:1.8;
  word-break:break-word;
  overflow-wrap:anywhere;
  font-family:inherit;
}
.wcl-typed-correct{
  white-space:pre-wrap;
}
.wcl-typed-wrong{
  white-space:pre-wrap;
  text-decoration-line:underline;
  text-decoration-style:wavy;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  font-weight:800;
  background:rgba(255,0,0,.08);
  border-radius:2px;
}
.wcl-wrong-underlined{
  text-decoration:underline;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  font-weight:800;
}
.wcl-expected-word{
  font-weight:700;
}
.wcl-empty-typed{
  opacity:.55;
  font-style:italic;
}

/* V7.8 - Separate wrong-word report and clean serial result layout */
.wcl-result-category{
  margin:18px auto 22px!important;
}
.wcl-current-passage-result{
  margin:0 0 22px!important;
}
.wcl-typed-passage-box{
  min-height:48px;
  background:#fff!important;
  line-height:1.8;
}
.wcl-rule-result-grid{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0 0 18px!important;
}
.wcl-rule-result-grid>div{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:12px 15px!important;
  background:#fff!important;
  min-height:24px;
  box-sizing:border-box;
}
.wcl-rule-result-grid strong{
  display:block!important;
  font-size:14px!important;
  opacity:1!important;
  margin:0!important;
  font-weight:800!important;
}
.wcl-rule-result-grid span{
  display:block!important;
  font-size:16px!important;
  font-weight:800!important;
  text-align:right!important;
}
.wcl-candidate-result{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0 0 18px!important;
}
.wcl-candidate-result>div{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  width:100%!important;
  box-sizing:border-box!important;
  padding:12px 15px!important;
  background:#fff!important;
}
.wcl-candidate-result>div strong{
  flex:0 0 auto!important;
  font-size:14px!important;
  opacity:1!important;
}
.wcl-candidate-result>div span{
  flex:1 1 auto!important;
  text-align:right!important;
  font-size:16px!important;
}
.wcl-result-grid{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0 0 18px!important;
}
.wcl-result-grid>div{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:12px 15px!important;
  background:#fff!important;
  border-radius:10px!important;
}
.wcl-result-grid small{
  display:block!important;
  font-size:14px!important;
  color:#222!important;
  letter-spacing:0!important;
  font-weight:800!important;
}
.wcl-result-grid strong{
  display:block!important;
  font-size:16px!important;
  margin:0!important;
}
.wcl-wrong-box{
  margin:0 0 18px!important;
  padding:16px!important;
}
.wcl-wrong-box h3{
  margin:0 0 12px!important;
  font-size:16px!important;
}
.wcl-wrong-list{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
.wcl-mistake{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:10px 12px!important;
  background:#fff!important;
}
.wcl-mistake b{
  min-width:30px!important;
  font-size:12px!important;
  opacity:.6!important;
}
.wcl-wrong-typed{
  min-width:90px;
  font-size:16px;
}
.wcl-wrong-typed s{
  text-decoration-thickness:2px;
  text-decoration-color:#c00000;
}
.wcl-expected-word{
  font-size:16px!important;
  font-weight:800!important;
  color:#b00000;
}
@media(max-width:600px){
  .wcl-rule-result-grid>div,
  .wcl-candidate-result>div,
  .wcl-result-grid>div{
    gap:10px!important;
    padding:11px 12px!important;
  }
  .wcl-wrong-typed{min-width:75px}
}


/* V7.9 - Complete result summary box, status emphasis, and expected-word-only bolding */
.wcl-result-summary-box{
  border:2px solid rgba(0,0,0,.14)!important;
  border-radius:14px!important;
  padding:14px!important;
  margin:0 0 18px!important;
  background:rgba(255,255,255,.72)!important;
  box-sizing:border-box!important;
}
.wcl-result-summary-box .wcl-rule-result-grid{margin-bottom:16px!important}
.wcl-result-summary-box .wcl-candidate-result{margin-bottom:16px!important}
.wcl-result-summary-box .wcl-result-grid{margin-bottom:0!important}
.wcl-wrong-typed{font-weight:500!important}
.wcl-wrong-typed s{ text-decoration:none!important; }
.wcl-expected-word{font-weight:700!important}
.wcl-expected-word strong{font-weight:900!important}
.r-status.wcl-passed{color:#168a2f!important;font-weight:900!important}
.r-status.wcl-not-passed{color:#c00000!important;font-weight:900!important}
.wcl-candidate-result .r-status{font-weight:900!important}
@media print{
  .wcl-result-summary-box{border:1.5px solid #777!important;background:#fff!important}
}


/* V8.0 - pause/resume and restart controls */
.wcl-pause,.wcl-restart{cursor:pointer!important;background:#fff!important;color:#222!important;border:1px solid #d5d5d5!important}
.wcl-pause:disabled{opacity:.45!important;cursor:not-allowed!important}
.wcl-controls button.wcl-pause.is-paused{background:#168a2f!important;color:#fff!important;border-color:#168a2f!important}
.wcl-typebox:disabled{background:#f3f3f3!important;cursor:not-allowed!important}
@media(max-width:600px){.wcl-controls{width:100%}.wcl-controls>*{flex:1 1 auto}}


/* V8.2: stable live caret animation for the active typing character */
.wcl-passage span.current{
  opacity:1 !important;
  border-left:2px solid currentColor;
  margin-left:-2px;
  text-decoration:none !important;
  animation:wclTypingCaret .8s steps(1,end) infinite;
}
@keyframes wclTypingCaret{0%,49%{border-left-color:currentColor;opacity:1}50%,100%{border-left-color:transparent;opacity:.72}}
.wcl-restart{cursor:pointer}


/* V8.3 - corrected word alignment and backspace correction report */
.wcl-correction-box{
  margin:0 0 18px!important;
  padding:16px!important;
  background:#fff!important;
  border-radius:12px!important;
  text-align:left!important;
}
.wcl-correction-box h3{margin:0 0 12px!important;font-size:16px!important}
.wcl-correction-list{display:flex!important;flex-direction:column!important;gap:7px!important}
.wcl-correction-word{display:block!important;padding:9px 11px!important;border:1px solid rgba(127,127,127,.2)!important;border-radius:7px!important;background:#fafafa!important;font-weight:700!important}
.wcl-correction-word b{display:inline-block!important;min-width:28px!important;opacity:.6!important}
.wcl-no-corrections{opacity:.65!important;padding:5px 0!important}
.r-backspace-corrections{font-weight:900!important}
.wcl-category-box,.wcl-result-category{display:none!important}
