/* تحدي الحروف — شاشة اختيار نمط اللعب الموحّدة (v1.17.7), على نموذج الكلمات المتقاطعة */
.tm-chooser{width:min(100%,960px);margin:0 auto 24px;overflow:hidden;border:1px solid rgba(255,255,255,.75);border-radius:30px;background:#fff;box-shadow:0 22px 70px rgba(2,6,23,.22);font-family:inherit;box-sizing:border-box;text-align:center}
.tm-chooser[hidden]{display:none!important}
.tm-chooser *{box-sizing:border-box}
.tm-head{position:relative;overflow:hidden;padding:34px 24px;color:#fff;background:linear-gradient(125deg,#0f172a 0%,#12345a 52%,#1e3a8a 100%)}
.tm-head:before,.tm-head:after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;filter:blur(55px);pointer-events:none}
.tm-head:before{top:-145px;right:-65px;background:rgba(56,189,248,.28)}
.tm-head:after{bottom:-170px;left:-50px;background:rgba(96,165,250,.3)}
.tm-head>*{position:relative;z-index:1}
.tm-mark{display:flex;width:66px;height:66px;margin:0 auto 14px;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.22);border-radius:20px;background:rgba(255,255,255,.12);font-size:36px;box-shadow:0 8px 24px rgba(0,0,0,.15)}
.tm-chooser .tm-kicker{margin:0;font-size:12px;font-weight:900;letter-spacing:1px;color:#bae6fd}
.tm-chooser .tm-title{margin:9px 0 0!important;font-size:clamp(25px,4vw,38px)!important;font-weight:900!important;line-height:1.35!important;color:#fff!important;background:none!important;-webkit-text-fill-color:#fff!important;text-shadow:0 2px 12px rgba(0,0,0,.25)}
.tm-chooser .tm-subtitle{max-width:600px;margin:12px auto 0;color:#dbeafe;font-size:14px;font-weight:700;line-height:1.9}
.tm-before{padding:18px 26px 0;background:#f8fafc}
.tm-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:26px;background:#f8fafc}
.tm-form{margin:0;display:flex}
.tm-form .tm-card{width:100%;flex:1 1 auto}
.tm-card{display:flex;min-height:245px;flex-direction:column;align-items:center;padding:25px 18px;border:2px solid #1e293b;border-radius:24px;background:#fff;text-align:center;color:inherit;text-decoration:none;font:inherit;cursor:pointer;box-shadow:0 5px 0 #1e293b,0 3px 12px rgba(15,23,42,.05);transition:transform .2s,border-color .2s,box-shadow .2s}
.tm-card:hover{transform:translateY(-3px);box-shadow:0 8px 0 #1e293b,0 16px 35px rgba(15,23,42,.12)}
.tm-card:active{transform:translateY(2px);box-shadow:0 2px 0 #1e293b}
.tm-card:focus-visible{outline:4px solid #bfdbfe;outline-offset:3px}
.tm-icon{display:flex;width:68px;height:68px;margin-bottom:15px;align-items:center;justify-content:center;border-radius:20px;font-size:38px;line-height:1}
.tm-card.solo .tm-icon{background:#e0f2fe}
.tm-card.daily .tm-icon{background:#fef3c7}
.tm-card.multi .tm-icon{background:#dbeafe}
.tm-card.tool .tm-icon{background:#dcfce7}
.tm-chooser .tm-card-title{font-size:21px;font-weight:900;color:#0f172a!important}
.tm-card-desc{max-width:310px;margin:8px auto 20px;color:#475569;font-size:13px;font-weight:700;line-height:1.9}
.tm-action{display:inline-block;margin-top:auto;padding:12px 22px;border-radius:12px;color:#fff;font-size:14px;font-weight:900;box-shadow:0 7px 16px rgba(15,23,42,.13)}
.tm-card.solo .tm-action{background:#0369a1}
.tm-card.daily .tm-action{background:#b45309}
.tm-card.multi .tm-action{background:#2563eb}
.tm-card.tool .tm-action{background:#15803d}
.tm-card.solo:hover .tm-action{background:#075985}
.tm-card.daily:hover .tm-action{background:#92400e}
.tm-card.multi:hover .tm-action{background:#1d4ed8}
.tm-card.is-done .tm-card-desc{color:#15803d}
.tm-extra{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;padding:0 26px 22px;background:#f8fafc}
.tm-footer{display:flex;align-items:center;justify-content:center;gap:9px;padding:15px;border-top:1px solid #f1f5f9;background:#fff;color:#64748b;font-size:12px;font-weight:800}
.tm-dot{color:#10b981}
/* خيار رابع (مثل «أعرب جملتك») : الشبكة تصبح 2×2 */
.tm-options:has(> :nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}
.tm-options:has(> :nth-child(4)) .tm-card{min-height:215px}
@media (max-width:820px){
  .tm-options,.tm-options:has(> :nth-child(4)){grid-template-columns:1fr;gap:14px;padding:16px}
  .tm-card{min-height:0;padding:20px 16px}
  .tm-head{padding:20px 16px}
  .tm-mark{width:52px;height:52px;font-size:28px;margin-bottom:10px}
  .tm-chooser .tm-title{font-size:24px!important}
  .tm-chooser .tm-subtitle{font-size:13px;line-height:1.8}
  .tm-chooser{border-radius:22px}
}
@media (max-width:420px){
  .tm-card-desc{margin-bottom:14px}
  .tm-icon{width:58px;height:58px;font-size:32px;margin-bottom:10px}
  .tm-card-title{font-size:19px}
}
.tm-mini{display:inline-flex;align-items:center;gap:6px;padding:10px 16px;border:2px solid #1e293b;border-radius:12px;background:#fff;color:#0f172a;font-weight:900;font-size:14px;text-decoration:none;box-shadow:0 3px 0 #1e293b;cursor:pointer;font-family:inherit}
.tm-mini:hover{background:#f1f5f9}
