/* Urdu Typing Speed Test */
.utst-wrap{max-width:900px;margin:30px auto;padding:10px;font-family:Arial,"Noto Nastaliq Urdu","Noto Sans Arabic",sans-serif}
.utst-card{background:#fff;border:1px solid #e7e7e7;border-radius:18px;box-shadow:0 8px 30px rgba(0,0,0,.07);padding:24px;overflow:hidden}
.utst-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.utst-header h2{margin:0 0 6px;font-size:30px;line-height:1.4}
.utst-header p{margin:0;color:#666;font-size:16px}
.utst-badge{background:#f4f4f4;border-radius:999px;padding:9px 14px;font-size:12px;white-space:nowrap}
.utst-controls{display:flex !important;align-items:flex-end !important;gap:12px !important;flex-wrap:wrap !important;margin-bottom:16px !important;visibility:visible !important;opacity:1 !important}
.utst-controls label{display:flex !important;flex-direction:column !important;gap:6px !important;font-size:13px !important;color:#555 !important;visibility:visible !important;opacity:1 !important}
.utst-controls select,.utst-controls button,.utst-again{border:1px solid #d5d5d5 !important;border-radius:10px !important;padding:11px 15px !important;font-size:14px !important;background:#fff !important;color:#222 !important;cursor:pointer !important;box-sizing:border-box !important;opacity:1 !important;visibility:visible !important}
.utst-controls button,.utst-again{background:#222 !important;color:#fff !important;border-color:#222 !important;font-weight:700 !important;display:inline-flex !important;align-items:center !important;justify-content:center !important;min-height:42px !important}
.utst-controls button:hover,.utst-again:hover{opacity:.88}
.utst-controls select{display:block !important;min-width:170px !important;min-height:42px !important;height:42px !important;line-height:20px !important;appearance:auto !important;-webkit-appearance:auto !important;-moz-appearance:auto !important;background-color:#fff !important;color:#222 !important;text-shadow:none !important;font-weight:400 !important;}
.utst-controls select option{background:#fff !important;color:#222 !important;font-size:14px !important;}
.utst-controls .utst-start{display:inline-flex !important;min-width:110px !important;}
.utst-controls .utst-restart[hidden],.utst-start[hidden]{display:none !important;}
.utst-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}
.utst-stats>div{background:#f7f7f7;border-radius:12px;padding:13px;text-align:center}
.utst-stats span{display:block;color:#777;font-size:12px;margin-bottom:4px}
.utst-stats strong{font-size:20px}
.utst-passage{font-size:25px;line-height:2.1;background:#fafafa;border:1px solid #eee;border-radius:12px;padding:20px;margin-bottom:12px;text-align:right}
.utst-input{width:100%;min-height:170px;box-sizing:border-box;resize:vertical;border:2px solid #ddd;border-radius:12px;padding:16px;font-size:23px;line-height:2;background:#fff;color:#222;outline:none}
.utst-input:focus{border-color:#777}
.utst-note{font-size:12px;color:#777;margin:8px 2px 0}
.utst-result{margin-top:20px;border-top:1px solid #eee;padding-top:20px;text-align:center}
.utst-result-icon{font-size:34px}
.utst-result h3{font-size:24px;margin:4px 0 16px}
.utst-result-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
.utst-result-grid>div{background:#f7f7f7;border-radius:12px;padding:13px}
.utst-result-grid span{display:block;font-size:12px;color:#777;margin-bottom:6px}
.utst-result-grid strong{font-size:18px}
@media(max-width:700px){
 .utst-card{padding:16px;border-radius:14px}
 .utst-header{align-items:flex-start;flex-direction:column}
 .utst-header h2{font-size:25px}
 .utst-passage{font-size:21px;line-height:2}
 .utst-input{font-size:20px;min-height:150px}
 .utst-result-grid{grid-template-columns:repeat(2,1fr)}
 .utst-stats strong{font-size:17px}
}

.utst-keyboard{margin-top:18px;border-top:1px solid #eee;padding-top:16px}
.utst-keyboard-title{font-size:16px;font-weight:700;margin-bottom:10px;text-align:left;direction:ltr}
.utst-keys{display:flex;flex-wrap:wrap;gap:7px;justify-content:center}
.utst-keys span{min-width:42px;min-height:48px;padding:5px 7px;border:1px solid #ddd;border-radius:9px;background:#f8f8f8;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box}
.utst-keys b{font-size:12px;line-height:1.2}.utst-keys em{font-style:normal;font-size:19px;line-height:1.4}
.utst-combos{margin-top:12px;background:#fafafa;border-radius:10px;padding:10px;font-size:13px;line-height:1.8;text-align:center;color:#555}
.utst-combos code{font-weight:700;color:#222}
@media(max-width:700px){.utst-controls{align-items:stretch !important}.utst-controls label,.utst-controls select,.utst-controls button{width:100% !important}.utst-keys{gap:5px}.utst-keys span{min-width:38px;min-height:44px}}

/* v1.3.0 name + persistent top-5 leaderboard + wider keyboard */
.utst-keyboard{width:100%!important;max-width:none!important;box-sizing:border-box!important;}
.utst-keys{width:100%!important;box-sizing:border-box!important;}
.utst-name-wrap{margin:16px 0;text-align:left;}
.utst-name-wrap label{display:block;font-weight:600;margin-bottom:6px;}
.utst-player-name{display:block;width:100%!important;min-height:44px;box-sizing:border-box;padding:10px 12px;border:1px solid #ccc;border-radius:6px;font-size:16px;background:#fff;color:#222;}
.utst-leaderboard{width:100%;margin-top:24px;border:1px solid #ddd;border-radius:8px;overflow:hidden;background:#fff;}
.utst-leaderboard-title{font-size:18px;font-weight:700;padding:13px 15px;border-bottom:1px solid #ddd;}
.utst-board-head,.utst-board-row{display:grid;grid-template-columns:50px minmax(0,1fr) 100px;gap:10px;align-items:center;padding:10px 15px;}
.utst-board-head{font-size:13px;font-weight:700;background:#f7f7f7;}
.utst-board-row{border-top:1px solid #eee;}
.utst-board-row strong{overflow-wrap:anywhere;}
.utst-no-results{padding:14px 15px;color:#666;}
@media(max-width:600px){.utst-board-head,.utst-board-row{grid-template-columns:35px minmax(0,1fr) 75px;padding-left:10px;padding-right:10px;}.utst-leaderboard-title{font-size:16px;}}

/* v1.3.2 live wrong-word guidance */
.utst-passage .utst-word { display:inline; }
.utst-passage .utst-word.utst-word-wrong { color:#d00 !important; font-weight:700; }
.utst-passage .utst-word.utst-word-correct { color:inherit; }
.utst-live-feedback{margin-top:8px;padding:8px 10px;border-radius:8px;background:#fff3f3;border:1px solid #f0caca;color:#c00;font-size:14px;font-weight:600;}
.utst-live-feedback .utst-feedback-label{font-weight:700;}
.utst-live-feedback[hidden]{display:none!important;}

/* v1.3.3 reliable start feedback */
.utst-start-message{margin-top:7px;padding:8px 10px;border-radius:7px;background:#fff4f4;border:1px solid #efc4c4;color:#b00000;font-size:13px;font-weight:600;}
.utst-start-message[hidden]{display:none!important;}
