/* =========================================================
   مدار — مظهر المنصة: المعرض، الشعار، بطاقات الألعاب، الملف الشخصي
   ========================================================= */
.md-hero { text-align: center; padding: 2rem 0 1.4rem; }
.md-hero h1 { font-family: var(--ww-font-head); font-weight: 900; font-size: clamp(2.6rem, 9vw, 4.2rem); margin: .2rem 0 .2rem;
    background: linear-gradient(90deg, var(--ww-cyan), var(--ww-violet), var(--ww-pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.md-hero p { color: var(--ww-muted); margin: 0; font-size: 1.05rem; }
.md-hero-sm { padding: 1.2rem 0 .6rem; }
.md-hero-sm h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }

/* الشعار: نواة يدور حولها قمر في مدار */
.md-logo { position: relative; width: 92px; height: 92px; margin: 0 auto .3rem; }
.md-orbit { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(120, 160, 255, .35); transform: rotateX(62deg) rotateZ(-18deg); }
.md-core { position: absolute; inset: 28%; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, #7ee8ff 18%, #6a5cff 55%, #2a1a7a);
    box-shadow: 0 0 28px rgba(110, 140, 255, .8), inset -6px -8px 12px rgba(0, 0, 0, .35); }
.md-moon { position: absolute; inset: 0; animation: mdSpin 6s linear infinite; }
.md-moon::after { content: ''; position: absolute; top: 18%; left: 2%; width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, #ffd23f 40%, #ff8a3d); box-shadow: 0 0 14px rgba(255, 190, 70, .9); }
@keyframes mdSpin { to { rotate: 360deg; } }

.md-section-title { font-family: var(--ww-font-head); font-weight: 900; font-size: 1.5rem; margin: .6rem 0 .9rem; }

/* بطاقات الألعاب */
.md-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.md-game { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ww-text); border-radius: 20px; overflow: hidden;
    background: var(--ww-panel); border: 1px solid var(--ww-border); box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
    transition: transform .2s, box-shadow .2s, border-color .2s; }
.md-game:hover, .md-game:focus-visible { transform: translateY(-4px); color: var(--ww-text); border-color: rgba(255, 255, 255, .4); box-shadow: 0 20px 50px rgba(0, 0, 0, .55), 0 0 30px rgba(120, 140, 255, .25); }
.md-game-art { position: relative; height: 150px; background: var(--accent); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.md-game-art::before { content: ''; position: absolute; inset: 0; background:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 70%, #fff, transparent), radial-gradient(1px 1px at 40% 80%, #fff, transparent); opacity: .7; }
.md-game-art svg { position: absolute; width: 150px; height: 150px; inset-inline-end: -26px; bottom: -40px; opacity: .95; animation: wwPlanetSpin 30s linear infinite; }
.md-game-icon { position: relative; font-size: 3.6rem; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); transition: transform .25s; }
.md-game:hover .md-game-icon { transform: scale(1.12) rotate(-6deg); }
.md-game-body { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.md-game-body > b { font-family: var(--ww-font-head); font-weight: 900; font-size: 1.35rem; }
.md-game-desc { color: var(--ww-muted); font-size: .92rem; }
.md-game-tracks { display: flex; flex-wrap: wrap; gap: .3rem; }
.md-game-tracks i { font-style: normal; font-size: .78rem; padding: .15rem .55rem; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.md-game-stats { display: flex; gap: 1rem; font-size: .85rem; color: var(--ww-muted); }
.md-game-stats b { color: var(--ww-gold); }
.md-game-play { margin-top: auto; align-self: flex-start; font-weight: 800; padding: .4rem 1rem; border-radius: 99px; background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.md-game-mini .md-game-art { height: 96px; }

/* الملف الشخصي: تقدّمك في كل لعبة */
.md-progress-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.md-pg { border-radius: 14px; padding: .8rem .9rem; background: rgba(255, 255, 255, .04); border: 1px solid var(--ww-border); position: relative; overflow: hidden; }
.md-pg::before { content: ''; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; background: var(--accent); }
.md-pg-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.md-pg-icon { font-size: 1.6rem; }
.md-pg-tracks { display: grid; gap: .45rem; }
.md-pg-track { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: .5rem; font-size: .88rem; }
.md-pg-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.md-pg-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .6s; }
.md-pg-track small { color: var(--ww-muted); white-space: nowrap; }

@media (max-width: 575.98px) {
    .md-hero { padding: 1.2rem 0 .8rem; }
    .md-game-art { height: 120px; }
    .md-pg-track { grid-template-columns: 6rem 1fr auto; }
}

/* الرمز التعبيري في عناوين الألعاب: يبقى بألوانه ولا يأخذ تدرّج النص */
.ww-hero-ic { -webkit-text-fill-color: initial; color: initial; background: none; }

/* بنوك أسئلة الفصل (لوحة المعلم) */
.ww-banks li { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border-radius: 10px; background: rgba(255, 255, 255, .04); margin-bottom: .35rem; }
.ww-banks li b { min-width: 0; }
.ww-bank-form textarea { font-size: .9rem; }
/* محطة مدار: هوية نهارية مع نافذة فضائية واحدة */
.md-home {
    --ww-font-head: ui-sans-serif, system-ui, 'Segoe UI', Tahoma, Arial, sans-serif;
    --ww-text: #203454; --ww-muted: #526580; --ww-panel: #fff;
    --ww-border: #d5e1ef; --ww-gold: #896000;
}
body.md-home { background: #f1f6fc; color: var(--ww-text); }
.md-home .ww-nav { background: #fff; border-bottom: 1px solid #d5e1ef; box-shadow: none; }
.md-home .navbar-brand { color: #152c58; }
.md-home .ww-nav .btn { color: #203454; border-color: #b5c6db; min-height: 42px; display: inline-flex; align-items: center; }
.md-home main { padding-bottom: 3rem !important; }
.md-home a:focus-visible, .md-home button:focus-visible { outline: 3px solid #087f83; outline-offset: 5px; }
.md-launch { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; background: #152c58; color: #fff; border-radius: 28px; margin: 1.2rem 0; overflow: hidden; min-height: 360px; }
.md-launch-copy { padding: clamp(1.5rem, 4vw, 3.5rem); z-index: 1; }
.md-welcome { color: #bdeae8; font-size: .95rem; }
.md-launch h1 { font-family: var(--ww-font-head); font-size: clamp(2rem, 3.7vw, 3rem); font-weight: 850; line-height: 1.5; margin: .8rem 0; max-width: 17ch; }
.md-launch p { color: #d6e4f6; line-height: 1.9; max-width: 43ch; margin-bottom: 1.5rem; }
.md-launch-button { display: inline-flex; align-items: center; gap: 1.5rem; padding: .85rem 1.4rem; min-height: 48px; background: #ffd166; color: #152c58; font-weight: 800; border-radius: 14px; text-decoration: none; transition: background .18s, transform .18s; }
.md-launch-button:hover { color: #152c58; background: #ffe29a; transform: translateY(-2px); }
.md-launch-note { display: block; color: #c4d7ed; font-size: .8rem; margin-top: 1rem; }
.md-universe { position: relative; width: min(100%, 420px); aspect-ratio: 1; justify-self: center; direction: ltr; }
.md-trajectory { position: absolute; inset: 12%; border: 1px dashed #6380a8; border-radius: 50%; transform: rotate(-25deg) scaleY(.82); }
.md-trajectory-inner { inset: 24%; transform: rotate(30deg) scaleY(1.2); border-style: solid; opacity: .55; }
.md-sun { position: absolute; inset: 33%; display: grid; place-items: center; background: #ffd166; color: #152c58; border-radius: 50%; font-size: 4rem; font-weight: 800; box-shadow: inset -12px -12px 0 #edb84b, 0 0 0 18px #ffd1660b; }
.md-satellite { position: absolute; display: grid; place-items: center; width: 85px; height: 85px; border-radius: 24px; font-size: 1.6rem; font-weight: 800; box-shadow: 0 8px 0 #0002; transition: transform .25s; }
.md-universe:hover .md-satellite { transform: translateY(-6px) rotate(5deg); }
.md-satellite-word { background: #bdeae8; color: #155557; top: 12%; left: 17%; transform: rotate(-12deg); }
.md-satellite-number { background: #c8c4f7; color: #403b79; right: 6%; top: 40%; transform: rotate(12deg); }
.md-satellite-en { background: #ffc4af; color: #703e31; left: 16%; bottom: 12%; font-size: 1.3rem; transform: rotate(-6deg); }
.md-space-star { position: absolute; color: #ffd166; font-size: 1.8rem; }
.md-space-star-one { top: 17%; right: 24%; } .md-space-star-two { bottom: 17%; right: 25%; }
.md-home .ww-panel { box-shadow: none; border-radius: 18px; }
.md-home .ww-btn { color: #203454; background: #e8eff8; border-color: #b5c6db; }
.md-home .ww-btn-primary { background: #087f83; color: #fff; }
.md-home-progress { padding: 1.2rem 1.5rem; }
.md-catalog-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2rem 0 1rem; }
.md-catalog-heading h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.6; }
.md-catalog-heading p { margin: .25rem 0 0; color: #526580; }
.md-review-link { color: #08696d; font-weight: 700; text-underline-offset: 5px; padding: .7rem; flex-shrink: 0; }
.md-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.md-filters[hidden], .md-family[hidden] { display: none; }
.md-filters button { background: #fff; color: #526580; border: 1px solid #c8d6e6; border-radius: 12px; padding: .65rem 1rem; min-height: 44px; font: inherit; font-size: .9rem; transition: background .15s, color .15s; }
.md-filters button[aria-pressed="true"] { background: #152c58; border-color: #152c58; color: #fff; }
.md-home .md-section-title { font-size: 1.1rem; margin: 1.3rem 0 .8rem; color: #526580; }
.md-home .md-games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.md-home .md-game { border-radius: 20px; box-shadow: 0 4px 0 #dae5f1; transition: border-color .2s, box-shadow .2s; }
.md-home .md-game:hover { transform: none; border-color: #087f83; box-shadow: 0 4px 0 #087f83; }
.md-home .md-game-art { height: 110px; background: #e4edf9; justify-content: flex-start; padding-inline: 1.5rem; }
.md-home .md-game-art svg { animation: none; width: 145px; height: 145px; bottom: -42px; opacity: .8; }
.md-home .md-game-icon { font-size: 2.8rem; filter: none; }
.md-home .md-game-body { padding: 1.2rem; gap: .7rem; }
.md-home .md-game-body > b { font-size: 1.15rem; }
.md-home .md-game-desc { line-height: 1.8; }
.md-home .md-game-tracks i { background: #f1f6fc; border-color: #d5e1ef; }
.md-home .md-game-stats { font-size: .78rem; flex-wrap: wrap; gap: .5rem 1rem; }
.md-home .md-game-play { background: #e6f4f3; color: #076568; box-shadow: none; border-radius: 10px; font-size: .9rem; }
.md-home #activities { scroll-margin-top: 90px; }
@media (max-width: 850px) {
    .md-home .md-games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md-launch { grid-template-columns: 1.3fr 1fr; }
    .md-satellite { width: 64px; height: 64px; font-size: 1.2rem; }
    .md-sun { font-size: 2.8rem; }
}
@media (max-width: 575px) {
    .md-launch { grid-template-columns: 1fr; margin-top: .6rem; border-radius: 20px; }
    .md-launch-copy { padding-bottom: 0; }
    .md-launch h1 { max-width: none; }
    .md-universe { width: 240px; margin-top: -.5rem; }
    .md-home .md-games { grid-template-columns: 1fr; }
    .md-catalog-heading { align-items: flex-start; flex-direction: column; gap: .2rem; }
    .md-home .md-game-art { height: 95px; }
}
@media (prefers-reduced-motion: reduce) {
    .md-home *, .md-home *::before, .md-home *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .md-home .md-game:hover .md-game-icon, .md-universe:hover .md-satellite, .md-launch-button:hover { transform: none; }
}
.md-home .ww-pf-level { background: #e6f4f3; color: #076568; box-shadow: none; }
.md-home .ww-pf-bar, .md-home .ww-pf-goal .bg { background: #e3ebf5; stroke: #e3ebf5; }
.md-home .ww-pf-bar i { background: #087f83; }
.md-home .ww-pf-select { min-height: 44px; background: #fff; color-scheme: light; }
.md-home .ww-pf-select option { background: #fff; color: #203454; }
.md-home #rv-banner a { color: #203454; }
/* حظيرة الكلمات: الإعدادات هادئة والخريطة تحتفظ بألوان الفضاء */
.md-hub-back { display: inline-block; color: #08696d; padding: .8rem .3rem .2rem; text-underline-offset: 5px; font-weight: 700; }
.md-word-hub .md-hangar { min-height: 285px; margin-top: .6rem; }
.md-word-hub .md-hangar h1 { font-size: clamp(2rem, 4vw, 3rem); }
.md-hub-map-link { display: inline-block; color: #fff; padding: .9rem 1rem; text-underline-offset: 5px; }
.md-hub-map-link:hover { color: #ffd166; }
.md-flight-demo { position: relative; height: 280px; width: min(100%, 320px); justify-self: center; display: flex; align-items: center; flex-direction: column; justify-content: space-between; padding: 1.5rem 0; }
.md-demo-word { background: #fff; color: #152c58; border: 3px solid #bdeae8; border-radius: 18px; padding: .35rem 2rem; font-size: 2rem; font-weight: 800; transform: rotate(-5deg); z-index: 1; }
.md-demo-beam { position: absolute; top: 90px; height: 70px; width: 3px; background: #ffd166; transform: rotate(15deg); }
.md-demo-ship { font-size: 4rem; transform: rotate(-45deg); margin-top: 2rem; transition: transform .2s; }
.md-flight-demo:hover .md-demo-ship { transform: rotate(-45deg) translate(4px, -4px); }
.md-demo-keys { border: 1px solid #7990b0; border-bottom: 4px solid #7990b0; color: #d6e4f6; border-radius: 8px; padding: .25rem 1.2rem; word-spacing: .6rem; }
.md-word-hub .ww-panel { padding: 1.4rem; }
.md-settings-heading { font-size: 1.35rem; font-weight: 800; margin-bottom: 1.2rem; }
.md-word-hub .text-secondary { color: #526580 !important; }
.md-word-hub .ww-choice { flex-wrap: wrap; gap: .25rem; }
.md-word-hub .ww-choice .btn { border-radius: 9px !important; min-height: 44px; display: inline-flex; align-items: center; }
.md-word-hub .ww-choice .btn-check:checked + .btn { background: #087f83; color: #fff; }
.md-word-hub .btn-check:focus-visible + .btn { outline: 3px solid #087f83; outline-offset: 3px; }
.md-hub-options { border-block: 1px solid #d5e1ef; margin-bottom: 1.5rem; }
.md-hub-options summary, .md-hub-disclosure summary { cursor: pointer; padding-block: 1rem; font-weight: 700; min-height: 48px; }
.md-hub-options[open] summary, .md-hub-disclosure[open] summary { margin-bottom: .7rem; }
.md-word-hub summary:focus-visible { outline: 3px solid #087f83; outline-offset: 4px; border-radius: 4px; }
.md-word-hub .form-check { min-height: 32px; display: flex; gap: .6rem; align-items: center; }
.md-word-hub .form-check-input { background-color: #c8d6e6; border-color: #526580; flex-shrink: 0; }
.md-word-hub .form-check-input:checked { background-color: #087f83; }
.md-word-hub .ww-mode, .md-word-hub .ww-tile, .md-word-hub .ww-chapter { background: #f1f6fc; box-shadow: none; }
.md-word-hub .ww-mode:hover, .md-word-hub .ww-tile:hover { border-color: #087f83; }
.md-word-hub .ww-tile small, .md-word-hub .ww-chapter small { color: #087f83; }
.md-word-hub .ww-custom textarea { background: #f1f6fc; color: #203454; border-color: #b5c6db; }
.md-word-hub .ww-custom textarea:focus-visible { outline: 3px solid #087f83; }
.md-word-hub .md-hub-disclosure { padding-block: .25rem; }
.md-word-hub .md-hub-disclosure[open] { padding-bottom: 1.4rem; }
.md-word-hub #mission-settings { scroll-margin-top: 85px; }
.md-word-hub .table { --bs-table-color: #203454; --bs-table-bg: transparent; --bs-table-border-color: #d5e1ef; }
@media (max-width: 575px) {
    .md-word-hub .md-hangar { grid-template-columns: 1fr; }
    .md-flight-demo { height: 245px; margin: .5rem 0; }
    .md-word-hub .ww-panel { padding: 1rem; }
    .md-word-hub .ww-pf-row { flex-wrap: wrap; }
    .md-word-hub .ww-chapters { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .md-flight-demo:hover .md-demo-ship { transform: rotate(-45deg); }
}

/* نظام مدار المشترك: صفحات التعلم والإدارة */
.md-interface { --ww-green: #087f63; --ww-cyan: #087f83; --ww-pink: #b83554; --ww-violet: #6253a5; color-scheme: light; }
.md-skip { position: fixed; inset-block-start: -100px; inset-inline-start: 1rem; z-index: 2000; padding: .8rem 1.2rem; border-radius: 10px; background: #ffd166; color: #152c58; }
.md-skip:focus { inset-block-start: 1rem; }
.md-section-nav, .md-local-nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding-block: .7rem; }
.md-section-nav { border-bottom: 1px solid #d5e1ef; }
.md-section-nav a, .md-local-nav a { color: #35506e; padding: .5rem .7rem; min-height: 44px; text-decoration: none; border-radius: 8px; font-size: .9rem; display: inline-flex; align-items: center; }
.md-section-nav a:hover, .md-local-nav a:hover { background: #dfeaf6; color: #152c58; }
.md-page-head { padding: 2.2rem 1rem 1.6rem; text-align: start; max-width: 75ch; }
.md-page-head h1, .md-game-intro h1 { color: #152c58; font: 850 clamp(1.9rem, 4vw, 2.8rem)/1.5 var(--ww-font-head); margin: 0 0 .6rem; }
.md-page-head p, .md-game-intro p { color: #526580; line-height: 1.9; max-width: 65ch; margin-bottom: .8rem; }
.md-game-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; padding: 2rem 0; }
.md-game-intro > div { padding-inline: 1rem; }
.md-game-guide { border-inline-start: 4px solid #087f83; background: #e5f2f3; padding: 1.4rem; border-radius: 8px 24px 24px 8px; }
.md-game-guide h2 { font-size: 1.1rem; font-weight: 800; }
.md-guide-icon { float: inline-end; font-size: 2.5rem; margin-inline-start: 1rem; }
.md-game-guide p { color: #31595d; font-size: .95rem; margin: 0; }
.md-interface .ww-panel { padding: 1.4rem; }
.md-interface .ww-panel h5 { font-size: 1.15rem; font-weight: 800; line-height: 1.6; }
.md-interface .text-secondary { color: #526580 !important; }
.md-interface .ww-input-dark, .md-interface .ww-look select { background-color: #f8fbff !important; color: #203454 !important; border-color: #b5c6db !important; min-height: 44px; color-scheme: light; }
.md-interface select option { background: #fff; color: #203454; }
.md-interface :is(input, select, textarea):focus-visible { outline: 3px solid #087f83; outline-offset: 2px; box-shadow: none; }
.md-interface .ww-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: none; }
.md-interface .ww-btn-primary:hover { background: #06676b; color: #fff; }
.md-interface .ww-btn.disabled, .md-interface .ww-btn[aria-disabled="true"] { cursor: default; }
.md-interface .ww-choice { flex-wrap: wrap; gap: .3rem; }
.md-interface .ww-choice .btn { min-height: 44px; border-radius: 9px !important; display: inline-flex; align-items: center; }
.md-interface .ww-choice .btn-check:checked + .btn, .md-interface .ww-choice .btn.active { background: #087f83; color: #fff; border-color: #087f83; }
.md-interface .btn-check:focus-visible + .btn { outline: 3px solid #087f83; outline-offset: 3px; }
.md-interface .form-check-input { border-color: #7186a1; }
.md-interface .form-check-input:checked { background-color: #087f83; border-color: #087f83; }
.md-interface .ww-mode, .md-interface .ww-tile, .md-interface .ww-chapter, .md-interface .md-pg, .md-interface .ww-chart { background: #f1f6fc; box-shadow: none; }
.md-interface .md-pg { padding: 1.2rem; border-radius: 14px; }
.md-interface .md-pg-track { grid-template-columns: minmax(5rem, 1fr) minmax(2rem, 1fr) auto; }
.md-interface .md-pg-bar { background: #d9e4f0; }
.md-interface .md-pg-head { flex-wrap: wrap; }
.md-interface .ww-mode:hover, .md-interface .ww-tile:hover { border-color: #087f83; }
.md-interface .ww-chapter small, .md-interface .ww-tile small { color: #087f83; }
.md-interface .ww-table { --bs-table-color: #203454; --bs-table-bg: transparent; --bs-table-border-color: #d5e1ef; --bs-table-striped-bg: #f1f6fc; }
.md-interface .ww-table thead { background: #edf3fa; }
.md-interface .ww-table th, .md-interface .ww-table td { padding: .65rem .5rem; }
.md-interface .ww-table tbody tr:hover { background: #f1f6fc; }
.md-interface .ww-opbtns button { background: #edf3fa; color: #203454; min-height: 44px; border-color: #b5c6db; }
.md-interface .ww-opbtns button.on { background: #087f83; color: #fff; }
.md-interface .ww-badge { background: #edf3fa; border-color: #d5e1ef; }
.md-interface .ww-badge:not(.on) { opacity: .8; }
.md-interface .ww-shop-item { background: #f1f6fc; border-color: #c8d6e6; padding: 1.2rem .8rem; }
.md-interface .ww-shop-item.on { border-color: #087f83; box-shadow: inset 0 3px 0 #087f83; }
.md-interface .ww-shop-ship { background: #152c58; border-radius: 12px; padding: .5rem; box-sizing: content-box; }
.md-interface .ww-day { background: #f1f6fc; }
.md-interface .ww-day.today { border-color: #087f83; background: #e5f2f3; }
.md-interface .ww-font-sample { background: #e8eff8; }
.md-interface .ww-banks li { background: #edf3fa; padding: .6rem; flex-wrap: wrap; }
.md-interface .ww-board-head { border-top: 5px solid #087f83; background: #fff; }
.md-interface .ww-board-title h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.md-interface .ww-class-code { color: #152c58; letter-spacing: .12em; }
.md-interface .ww-board-join { background: #e5f2f3; padding: 1rem; border-radius: 16px; }
.md-interface .ww-join-url { overflow-wrap: anywhere; }
.md-interface .ww-code-input { letter-spacing: .15em; font-weight: 700; }
.md-interface .md-student-entry { border-top: 5px solid #087f83; }
.md-interface .md-teacher-entry { border-top: 5px solid #6253a5; }
.md-interface .md-teacher-entry h6 { border-top: 1px solid #d5e1ef; padding-top: 1rem; }
.md-report-title { font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.7; font-weight: 800; }
.md-review-empty { margin-top: 1.5rem; padding: 2rem; background: #e5f2f3; border-radius: 18px; text-align: center; }
.md-review-empty > span { font-size: 3rem; }
.md-review-empty p { max-width: 55ch; margin: 1rem auto; line-height: 1.9; }
.md-interface #rv-summary > div { flex: 1 1 180px; border-inline-start: 3px solid #087f83; padding-inline-start: 1rem; }
.md-interface #rv-summary .ww-num { display: block; color: #087f83; font-weight: 800; }
.md-interface :is(#game-setup, #your-progress, #your-badges, #your-ships, #your-settings) { scroll-margin-top: 85px; }
/* شاشة اللعب: ألوان هادئة وتباين مستقل عن صفحات التنقل */
.md-play-shell { --ww-font-head: ui-sans-serif, system-ui, 'Segoe UI', Tahoma, Arial, sans-serif; --ww-bg: #101f3e; --ww-bg2: #152c58; --ww-panel: #1c355f; --ww-muted: #b9cce4; --ww-border: #526b91; --ww-text: #f1f6fc; --ww-gold: #ffd166; color-scheme: dark; }
body.md-play-shell { background: #101f3e; }
/* شاشة اللعب: المحتوى لا يتجاوز ارتفاع الشاشة مطروحاً منه الشريط العلوي. الشريط يأخذ ارتفاعه الفعلي (قد يلتف على الجوال)
   والمحتوى يملأ الباقي، فلا حاجة لرقم ثابت مثل calc(100dvh - 70px) */
body.md-play-shell { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
body.md-play-shell > .ww-nav { flex: 0 0 auto; }
body.md-play-shell > #main-content { flex: 1 1 0; min-height: 0; width: 100%; display: flex; flex-direction: column; overflow: auto; }
body.md-play-shell #game { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
body.md-play-shell #game > .ww-root { flex: 1 1 0; height: auto; min-height: min(100%, 320px); }
.md-play-shell .ww-nav { background: #152c58; box-shadow: none; }
.md-play-shell .navbar-brand { background: none; color: #fff; }
.md-play-shell .ww-root { border-radius: 22px; border-color: #526b91; box-shadow: none; background: #101f3e; }
.md-play-shell .ww-hud, .md-play-shell .wl-hud { background: #1c355f; padding: .7rem 1rem; }
.md-play-shell .ww-btn-icon { min-width: 44px; min-height: 44px; background: #25436c; }
.md-play-shell .ww-card-panel { border-radius: 24px; background: #1c355f; box-shadow: 0 18px 60px #0005; border-color: #647fa4; }
.md-play-shell .ww-title { background: none; color: #fff; }
.md-play-shell .ww-howto { gap: .6rem; }
.md-play-shell .ww-howto li { line-height: 1.7; background: #25436c; }
.md-play-shell .ww-btn { min-height: 44px; background: #25436c; box-shadow: none; }
.md-play-shell .ww-btn-primary { background: #ffd166; color: #152c58; border-color: #ffd166; }
.md-play-shell .ww-btn-primary:hover { background: #ffe09a; }
.md-play-shell :is(a, button, input, select):focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }
.md-play-shell .wl-root, .md-play-shell .mm-root { background: #132c4b; }
.md-play-shell .wl-planet { opacity: .1; }
.md-play-shell .wl-planet svg { animation: none; }
.md-play-shell .mm-back { background: #285a72; border-color: #7fc4cd; box-shadow: 0 4px 0 #0b1e32; color: #fff; }
.md-play-shell .mm-front { background: #f1f6fc; color: #203454; box-shadow: 0 4px 0 #0b1e32; }
.md-play-shell .mm-card { animation: none; }
.md-play-shell .mm-card.done .mm-front { background: #c4efdd; border-color: #57c99f; box-shadow: none; }
@media (max-width: 700px) {
    .md-game-intro { grid-template-columns: 1fr; gap: 1rem; padding: 1rem 0; }
    .md-game-guide { margin-inline: .5rem; }
    .md-page-head { padding: 1.3rem .5rem; }
    .md-section-nav { gap: .15rem; justify-content: space-between; }
    .md-section-nav a { font-size: .78rem; padding-inline: .4rem; }
    .md-interface .ww-panel { padding: 1rem; }
    .md-interface .ww-charts { grid-template-columns: 1fr; }
    .md-interface .ww-board-head { align-items: stretch; }
    .md-interface .ww-table { font-size: .8rem; }
    .md-play-shell .ww-card-panel { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .md-play-shell *, .md-play-shell *::before, .md-play-shell *::after { animation: none !important; transition: none !important; }
}
