.asma-wrap{ padding: 30px 20px 60px; }

/* -------- اسم اليوم -------- */
.asma-day-banner{
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border:1px solid var(--gold); border-radius: var(--radius);
  padding: 14px 18px; text-align:center; margin-bottom:18px; cursor:pointer;
  font-size:.9rem; color: var(--text); transition: transform .2s ease;
}
.asma-day-banner:hover{ transform: translateY(-2px); }
.asma-day-banner b{ font-family: var(--font-display); color: var(--gold-bright); font-size:1.15rem; }

/* -------- شريط أدوات -------- */
.asma-toolbar{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-bottom:16px; }

/* -------- شريط تقدّم الحفظ -------- */
.asma-progress-wrap{ max-width:420px; margin: 0 auto 20px; }
.asma-progress-label{ text-align:center; font-size:.82rem; color: var(--text-dim); margin-bottom:6px; }
.asma-progress-label b{ color: var(--gold-bright); }
.asma-progress-bar{ height:8px; border-radius:8px; background: var(--surface-2); overflow:hidden; }
.asma-progress-fill{ height:100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .4s ease; width:0%; }

/* ===== شبكة الأسماء: ٣ كروت في الصف (وأكتر على الشاشات الكبيرة) ===== */
.asma-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
@media (min-width:640px){ .asma-grid{ grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:14px; } }
@media (max-width:480px){ .asma-wrap{ padding-inline:14px; } }

/* الكارت على شكل محراب (قوس من فوق) — رقم الاسم في نجمة ثمانية، والاسم في النص، وتحته المفضلة والحفظ */
.asma-card{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:12px 6px 8px; text-align:center; cursor:pointer; min-width:0;
  border-radius:50% 50% 16px 16px / 36% 36% 16px 16px;
  background:
    radial-gradient(90% 55% at 50% 0%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 75%),
    var(--surface);
  border:1px solid color-mix(in srgb, var(--gold) 30%, var(--border));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
@media (hover:hover){ .asma-card:hover{ transform:translateY(-3px); border-color:var(--gold); box-shadow:var(--shadow); } }
.asma-card:active{ transform:scale(.97); }

.asma-card .num{
  position:relative; isolation:isolate; width:32px; height:32px; display:grid; place-items:center; margin-top:4px;
  font-size:.68rem; font-weight:800; color:var(--gold-bright); line-height:1;
}
.asma-card .num::before, .asma-card .num::after{
  content:''; position:absolute; inset:6px; z-index:-1; border-radius:3px;
  background:color-mix(in srgb, var(--gold) 16%, var(--surface));
  border:1px solid color-mix(in srgb, var(--gold) 65%, transparent);
}
.asma-card .num::after{ transform:rotate(45deg); }

.asma-card .name{
  flex:1; width:100%; display:flex; align-items:center; justify-content:center;
  min-height:2.9em; padding:0 2px;
  font-family:var(--font-display); font-weight:700; line-height:1.7; color:var(--gold-bright);
  font-size:clamp(1.05rem, 5.4vw, 1.3rem); text-wrap:balance; overflow-wrap:anywhere;
}

.asma-foot{ display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:26px; }
.asma-fav-star{
  position:static; font-size:.95rem; padding:3px; line-height:1; color:var(--text-dim);
  transition: transform .15s ease, color .15s ease;
}
.asma-fav-star:hover{ transform:scale(1.2); }
.asma-fav-star.active{ color:var(--star-color); }
.asma-fav-star.active:hover{ color:var(--star-color-hover); }
.mem-badge{
  position:static; width:20px; height:20px; border-radius:50%;
  background:var(--gold); color:#171203; font-size:.68rem; font-weight:900;
  display:flex; align-items:center; justify-content:center;
}
.mem-badge.hidden{ display:none; }

.asma-card.search-hidden, .asma-card.filtered-out{ display:none; }
.asma-card.is-memorized{
  border-color:var(--gold);
  background:
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--gold) 30%, transparent), transparent 78%),
    var(--surface);
}
.asma-card.is-memorized .num::before, .asma-card.is-memorized .num::after{ background:var(--gold); border-color:var(--gold); }
.asma-card.is-memorized .num{ color:#171203; }
.asma-card.playing{ border-color:var(--gold); box-shadow:0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); animation: asmaPulse 1s ease-in-out infinite; }
@keyframes asmaPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.04); } }
@media (prefers-reduced-motion:reduce){ .asma-card.playing{ animation:none; } }
[data-reduce-motion="1"] .asma-card.playing{ animation:none; }

/* الوضع الفاتح: الذهبي الفاتح باهت على الأبيض فبنغمّقه (وبيحترم لون التمييز المختار) */
[data-theme="light"] .asma-card .name, [data-theme="light"] .asma-card .num{ color:color-mix(in srgb, var(--gold-bright) 62%, #000); }
[data-theme="light"] .asma-card.is-memorized .num{ color:#171203; }

/* شريط الأدوات: البحث في صف لوحده والأزرار تحته */
.asma-toolbar .city-input{ flex:1 1 100%; width:100%; }
.asma-toolbar .btn{ flex:1 1 auto; }

.asma-modal{
  position: fixed; inset:0; background: rgba(0,0,0,.6); display:none;
  align-items:center; justify-content:center; z-index: 300; padding:20px;
}
.asma-modal.show{ display:flex; }
.asma-modal-content{
  background: var(--surface); border:1px solid var(--gold); border-radius: var(--radius);
  padding: 30px; max-width: 420px; width:100%; text-align:center; box-shadow: var(--shadow);
}
.asma-modal-num{ display:inline-block; margin-bottom:8px; padding:3px 12px; border-radius:99px; font-size:.75rem; font-weight:700; color:var(--gold-bright); background:color-mix(in srgb, var(--gold) 14%, transparent); border:1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
[data-theme="light"] .asma-modal-num{ color:color-mix(in srgb, var(--gold-bright) 62%, #000); }
.asma-modal-content h2{ font-family: var(--font-display); color: var(--gold-bright); font-size:1.8rem; margin-bottom:14px; }
.asma-modal-content p{ color: var(--text-dim); line-height:1.8; margin-bottom:18px; }
.asma-modal-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }

/* -------- مودال اختبار حفظ الأسماء الحسنى -------- */
.quiz-modal{ position:fixed; inset:0; background:rgba(0,0,0,.7); z-index:400; display:flex; align-items:center; justify-content:center; padding:16px; }
.quiz-modal.hidden{ display:none; }
.quiz-modal-content{
  background: var(--surface); border:1px solid var(--gold); border-radius: var(--radius);
  padding: 26px; max-width: 480px; width:100%; text-align:center; box-shadow: var(--shadow);
}
.quiz-question{ font-family: var(--font-display); font-size:1.6rem; color: var(--gold-bright); margin-bottom:18px; }
.quiz-option{
  display:block; width:100%; text-align:right; padding:12px 16px; margin-bottom:10px;
  border-radius:12px; border:1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: background .2s ease, border-color .2s ease;
}
.quiz-option:hover{ border-color: var(--gold); }
.quiz-option.correct{ background: var(--green); border-color: var(--green); color:#fff; }
.quiz-option.wrong{ background: var(--danger); border-color: var(--danger); color:#fff; }
.quiz-progress{ font-size:.8rem; color: var(--text-dim); margin-bottom:10px; }
.quiz-score{ font-family: var(--font-display); font-size:1.4rem; color: var(--gold-bright); margin:14px 0; }
