/* Tin Học 119 – device self-test tools */
.th119-tool{--_blue:var(--th119-blue,#0057D9);--_red:var(--th119-red,#E31E24);--_navy:var(--th119-navy,#0D1B2A);--_line:var(--th119-line,#E2E8F0);--_bg:var(--th119-bg,#F5F7FA);--_muted:var(--th119-muted,#5B6B82);color:var(--th119-ink,#334155)}
.th119-tpanel{background:#fff;border:1px solid var(--_line);border-radius:16px;padding:20px;box-shadow:0 1px 3px rgba(13,27,42,.06)}
@media (min-width:768px){.th119-tpanel{padding:28px}}
.th119-tpanel h2{font-size:1.375rem;margin:0 0 8px}
.th119-tpanel h3{font-size:1.0625rem;margin:0 0 10px}
.th119-tpanel hr{border:0;border-top:1px solid var(--_line);margin:20px 0}
.th119-tool kbd{display:inline-block;padding:1px 7px;border:1px solid var(--_line);border-bottom-width:2px;border-radius:6px;background:var(--_bg);font:600 .8125rem/1.5 inherit;color:var(--_navy)}
.th119-tinfo{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:20px 0 0}
.th119-tinfo div{background:var(--_bg);border-radius:10px;padding:10px 12px}
.th119-tinfo dt{font-size:.75rem;color:var(--_muted)}
.th119-tinfo dd{margin:2px 0 0;font-weight:700;color:var(--_navy);word-break:break-word}
.th119-tinfo--stack{grid-template-columns:1fr}
.th119-tnote{display:flex;gap:8px;align-items:flex-start;font-size:.8125rem;color:var(--_muted);margin:16px 0 0}
.th119-tnote svg{flex:none;margin-top:2px}
.th119-terror{margin:12px 0 0;padding:12px 16px;border-radius:10px;background:#FEF3F2;border:1px solid #FECDCA;color:#B42318}
/* Result */
.th119-tresult{margin-top:20px;padding:20px;border:1px dashed var(--_line);border-radius:16px;background:var(--_bg)}
.th119-tresult h3{font-size:1.0625rem;margin:0 0 4px}
.th119-tresult__btns{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.th119-tresult__btns .th119-btn.is-active[data-result=ok]{background:#ECFDF3;border-color:#079455;color:#067647}
.th119-tresult__btns .th119-btn.is-active[data-result=issue]{background:#FEF3F2;border-color:#D92D20;color:#B42318}
.th119-tresult__issues{border:0;margin:0;padding:0}
.th119-tresult__issues legend{font-weight:600;color:var(--_navy);margin-bottom:8px;padding:0}
.th119-tresult__saved{margin:10px 0 0;font-size:.875rem;color:#067647;font-weight:600}
.th119-tresult__saved:empty{display:none}
/* Screen */
.th119-swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:20px}
.th119-swatch{aspect-ratio:16/10;border-radius:10px;border:1px solid var(--_line);cursor:pointer;position:relative;padding:0;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
.th119-swatch span{background:rgba(255,255,255,.92);color:var(--_navy);font-size:.6875rem;font-weight:600;padding:2px 6px;border-radius:6px 6px 0 0}
.th119-swatch:hover,.th119-swatch:focus-visible{outline:2px solid var(--_blue);outline-offset:2px}
@media (max-width:479px){.th119-swatches{grid-template-columns:repeat(4,1fr)}}
.th119-fs{position:fixed;inset:0;z-index:2147483000;cursor:pointer;outline:0}
.th119-fs__hint{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);font:600 14px/1.4 system-ui,sans-serif;opacity:.85;transition:opacity .4s;text-align:center;padding:0 16px;pointer-events:none}
.th119-fs.is-quiet{cursor:none}
.th119-fs.is-quiet .th119-fs__hint{opacity:0}
/* Camera */
.th119-cam{display:grid;gap:20px}
@media (min-width:1024px){.th119-cam{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}}
.th119-cam__stage{position:relative;aspect-ratio:16/9;background:#0D1B2A;border-radius:14px;overflow:hidden;display:grid;place-items:center}
.th119-cam__stage video{width:100%;height:100%;object-fit:contain;display:none;background:#000}
.th119-cam.is-live video{display:block}
.th119-cam.is-live .th119-cam__empty{display:none}
.th119-cam.is-mirror video{transform:scaleX(-1)}
.th119-cam__empty{color:#7F93AD;text-align:center}
.th119-cam__empty p{margin:8px 0 0}
.th119-cam__side .th119-field{margin:16px 0 0}
.th119-cam__side select{width:100%;min-height:44px;border:1px solid var(--_line);border-radius:10px;padding:8px 10px;font:inherit}
.th119-cam__side .th119-actions{margin-top:12px}
.th119-meter{height:12px;border-radius:6px;background:var(--_bg);overflow:hidden;margin:12px 0 6px;border:1px solid var(--_line)}
.th119-meter i{display:block;height:100%;width:0;background:linear-gradient(90deg,#22C55E,#EAB308 70%,#EF4444);transition:width .06s linear}
/* Speaker */
.th119-spk__lr{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.th119-spkbtn{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 8px;border:1px solid var(--_line);border-radius:14px;background:#fff;cursor:pointer;color:var(--_navy);font:inherit;transition:border-color .15s,background .15s}
.th119-spkbtn svg{color:var(--_blue)}
.th119-spkbtn small{color:var(--_muted);font-size:.75rem}
.th119-spkbtn:hover{border-color:var(--_blue)}
.th119-spkbtn.is-playing,.th119-spk .th119-btn.is-playing{border-color:var(--_blue);background:var(--th119-blue-50,#EAF2FF)}
.th119-spkbtn[data-play=left] svg{transform:scaleX(-1)}
.th119-spk__controls{margin-top:20px;display:grid;gap:14px}
.th119-spk__controls input[type=range]{width:100%;accent-color:var(--_blue)}
.th119-tones{display:flex;flex-wrap:wrap;gap:8px}
.th119-chipbtn{min-height:40px;padding:6px 14px;border-radius:999px;border:1px solid var(--_line);background:#fff;font:600 .875rem inherit;color:var(--_navy);cursor:pointer}
.th119-chipbtn:hover{border-color:var(--_blue);color:var(--_blue)}
.th119-spk__now{margin:0;font-weight:600;color:var(--_navy);min-height:1.5em}
.th119-spk .th119-progress{display:block;visibility:hidden;height:6px;border-radius:3px;background:var(--_bg);overflow:hidden}
.th119-spk .th119-progress.is-on{visibility:visible}
.th119-spk .th119-progress__bar{height:100%;width:0;background:var(--_blue)}
/* Keyboard */
.th119-kb{outline:0}
.th119-kb:focus-visible{box-shadow:0 0 0 3px rgba(0,87,217,.25)}
.th119-kb__bar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}
.th119-kb__stats{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center;font-size:.9375rem}
.th119-kb__stats strong{font-size:1.25rem;color:var(--_blue)}
.th119-kb__stats code{background:var(--_bg);padding:2px 8px;border-radius:6px;color:var(--_navy)}
.th119-kb__warn{color:#B42318;font-weight:600}
.th119-seg{display:inline-flex;border:1px solid var(--_line);border-radius:10px;overflow:hidden}
.th119-seg button{border:0;background:#fff;padding:8px 12px;font:600 .8125rem inherit;color:var(--_muted);cursor:pointer;min-height:40px}
.th119-seg button.is-active{background:var(--_navy);color:#fff}
.th119-kb__board{display:flex;gap:14px;overflow-x:auto;padding:12px;background:#1A2B3F;border-radius:14px;-webkit-overflow-scrolling:touch}
.th119-kblock{display:flex;flex-direction:column;gap:5px;flex:15 0 0;min-width:640px}
.th119-kblock--side{flex:7.5 0 0;min-width:300px}
.th119-krow{display:flex;gap:5px}
.th119-key,.th119-kgap{flex-basis:0;min-width:0}
.th119-key{display:flex;align-items:center;justify-content:center;height:44px;padding:0 4px;border-radius:7px;background:#2B4058;color:#C9D4E3;font-size:.75rem;font-weight:600;border-bottom:3px solid #1B2C40;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .08s,transform .08s;user-select:none}
.th119-key.is-ok{background:#16A34A;color:#fff;border-bottom-color:#0F7A36}
.th119-key.is-down{background:var(--_blue);color:#fff;transform:translateY(2px);border-bottom-width:1px}
.th119-key.is-bad{background:#DC2626;color:#fff;border-bottom-color:#991B1B}
@media (min-width:1024px){.th119-key{height:48px;font-size:.8125rem}}
.th119-kb__hint{margin-top:14px}
.th119-kdemo{display:inline-block;padding:0 6px;border-radius:4px;color:#fff;font-weight:600}
.th119-kdemo.is-ok{background:#16A34A}.th119-kdemo.is-down{background:var(--_blue)}.th119-kdemo.is-bad{background:#DC2626}
.th119-kb__type{margin-top:12px}
.th119-kb__type textarea{width:100%;border:1px solid var(--_line);border-radius:10px;padding:10px 12px;font:inherit;font-size:16px}
/* Grid & report */
.th119-tgrid{display:grid;gap:14px;grid-template-columns:1fr}
@media (min-width:640px){.th119-tgrid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.th119-tgrid{grid-template-columns:repeat(4,1fr)}}
.th119-tcard{position:relative;display:flex;flex-direction:column;gap:6px;padding:20px;border:1px solid var(--_line);border-radius:16px;background:#fff;color:inherit;text-decoration:none;transition:border-color .15s,transform .2s,box-shadow .2s}
.th119-tcard:hover{border-color:var(--_blue);transform:translateY(-2px);box-shadow:0 12px 32px -12px rgba(13,27,42,.22);color:inherit}
.th119-tcard__icon{width:48px;height:48px;border-radius:12px;display:grid;place-items:center;background:var(--th119-blue-50,#EAF2FF);color:var(--_blue);margin-bottom:6px}
.th119-tcard__title{font-weight:700;color:var(--_navy);font-size:1.0625rem}
.th119-tcard__text{font-size:.875rem;color:var(--_muted);flex:1}
.th119-tcard__status{font-size:.8125rem;font-weight:600;color:var(--_muted);margin-top:6px}
.th119-tcard.is-ok .th119-tcard__status{color:#067647}
.th119-tcard.is-bad .th119-tcard__status{color:#B42318}
.th119-report{margin-top:24px;padding:20px;border-radius:16px;border:1px solid #C7DBFF;background:var(--th119-blue-50,#EAF2FF)}
.th119-report__head{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.th119-report__head h2{font-size:1.125rem;margin:0}
.th119-report__list{list-style:none;margin:14px 0;padding:0;display:grid;gap:8px}
.th119-report__list li{display:flex;flex-wrap:wrap;gap:4px 12px;padding:10px 14px;border-radius:10px;background:#fff;margin:0}
.th119-report__list li a{font-weight:700;min-width:140px}
.th119-report__list li.is-ok span{color:#067647}
.th119-report__list li.is-bad span{color:#B42318}
