/* =====================================================================
   حسابدار کوچک — Modern, kid-friendly stylesheet
   100% local — no CDN, no external CSS/JS frameworks.
   ===================================================================== */

@font-face {
    font-family: "IRANSans";
    src: url("../fonts/IRANSansWeb.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    src: url("../fonts/IRANSansWeb_Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    src: url("../fonts/IRANSansWeb_Light.woff2") format("woff2");
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: "IRANSans";
    src: url("../fonts/IRANSansWeb_Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5253;
    --accent: #4ecdc4;
    --accent-dark: #38ada9;
    --yellow: #feca57;
    --yellow-dark: #f0a500;
    --purple: #a55eea;
    --blue: #54a0ff;
    --green: #1dd1a1;
    --dark: #2f3542;
    --soft: #f1f2f6;
    --paper: #ffffff;
    --shadow-sm: 0 4px 14px rgba(31, 38, 135, 0.08);
    --shadow-md: 0 10px 30px rgba(31, 38, 135, 0.12);
    --shadow-lg: 0 20px 50px rgba(31, 38, 135, 0.18);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --transition: 220ms cubic-bezier(.2,.8,.2,1);
    /* Scale: دکمه‌ها، متن پایه، آیکن داخل کارت‌ها */
    --fs-body: clamp(0.9375rem, 0.28vw + 0.91rem, 1rem);
    --fs-btn: 0.9375rem;
    --lh-body: 1.6;
    --btn-pad-y: 10px;
    --btn-pad-x: 22px;
    --btn-min-h: 44px;
    --icon-card-sm: 52px;
    --icon-card-md: 56px;
    --icon-in-card: 28px;
    /* فاصلهٔ یکنواخت از لبه‌های چپ/راست برای هدر، بدنه و فوتر */
    --layout-inline-pad: clamp(22px, 5vw, 42px);
    /* ارتفاع نوار منو (برای جبران position: fixed) */
    --navbar-height: 64px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    direction: rtl;
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    color: var(--dark);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    background:
        radial-gradient(1100px 700px at 90% -10%, rgba(254, 202, 87, 0.35), transparent 60%),
        radial-gradient(900px 700px at -10% 30%, rgba(165, 94, 234, 0.20), transparent 65%),
        radial-gradient(1000px 700px at 50% 110%, rgba(78, 205, 196, 0.20), transparent 60%),
        #fff8f0;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    scroll-padding-top: calc(var(--navbar-height) + env(safe-area-inset-top, 0px));
}

body {
    padding-top: calc(var(--navbar-height) + env(safe-area-inset-top, 0px));
}

main{
    padding: 0px 22px; 
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 8px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding-inline-start: max(env(safe-area-inset-start, 0px), var(--layout-inline-pad));
    padding-inline-end: max(env(safe-area-inset-end, 0px), var(--layout-inline-pad));
}

/* ---------- Global SVG icon helper ---------- */
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 36px; height: 36px; }
.icon-2xl { width: 48px; height: 48px; }

/* ---------- Top navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-sm);
}
.navbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 13px;
}
.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--dark);
}
.navbar .brand .brand-logo {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(255,107,107,0.25));
}
.navbar .brand .brand-text {
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}
.navbar .brand .brand-text small {
    color: #888;
    font-size: 0.72rem;
    font-weight: 500;
}
.navbar nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.navbar nav a {
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.92rem;
    transition: var(--transition);
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.navbar nav a .icon { width: 16px; height: 16px; opacity: 0.7; }
.navbar nav a:hover { background: rgba(255, 107, 107, 0.10); color: var(--primary-dark); }
.navbar nav a:hover .icon { opacity: 1; }
.navbar nav a.active { background: var(--primary); color: white; }
.navbar nav a.active .icon { opacity: 1; }

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: white !important;
    font-weight: 600;
    font-size: 0.88rem !important;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    max-width: 220px;
    min-width: 0;
    overflow: hidden;
}
.user-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.user-pill .avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.user-pill .avatar .icon { width: 16px; height: 16px; color: white; }
.user-pill .avatar .hk-avatar {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.user-pill .nav-user-name {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    unicode-bidi: plaintext;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--soft);
    cursor: pointer;
    color: var(--dark);
}
.mobile-toggle .icon { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    min-height: var(--btn-min-h);
    font-family: inherit;
    font-weight: 700;
    font-size: var(--fs-btn);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: white;
    box-sizing: border-box;
}
.btn .icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary  { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.btn-accent   { background: linear-gradient(135deg, var(--accent), var(--blue)); }
.btn-purple   { background: linear-gradient(135deg, var(--purple), var(--blue)); }
.btn-danger   { background: linear-gradient(135deg, #ee5253, #ff6b6b); }
.btn-success  { background: linear-gradient(135deg, var(--green), var(--accent)); }
.btn-ghost {
    background: white;
    color: var(--dark);
    border: 2px solid rgba(0,0,0,0.06);
    box-shadow: none;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ردیف دکمه‌های اصلی (هیرو، مدارس، …) */
.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* ---------- Hero ---------- */
.hero {
    padding: 60px 0 30px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 40px;
}
.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    line-height: 1.2;
    margin: 0 0 14px;
}
.hero h1 .stroke {
    background: linear-gradient(135deg, var(--primary), var(--purple), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { font-size: 1.15rem; color: #555; max-width: 540px; margin: 10px 0 24px; }

.hero-art {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 460px;
    margin: 0 auto;
}
@media (min-width: 881px) {
    .hero-art.hero-art-kids {
        max-width: min(540px, 100%);
    }
}
.hero-art .bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(0.4px);
    animation: floaty 6s ease-in-out infinite;
    z-index: 1;
}
.hero-art .b1 { width: 60%; height: 60%; top: 10%; right: 10%; background: linear-gradient(135deg, var(--primary), var(--yellow)); box-shadow: var(--shadow-lg); }
.hero-art .b2 { width: 32%; height: 32%; bottom: 10%; left: 6%; background: linear-gradient(135deg, var(--accent), var(--blue)); animation-delay: -2s; box-shadow: var(--shadow-md); }
.hero-art .b3 { width: 22%; height: 22%; top: 18%; left: 14%; background: linear-gradient(135deg, var(--purple), var(--primary)); animation-delay: -4s; box-shadow: var(--shadow-md); }
.hero-art .glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* صفحهٔ درباره: اعداد فارسی رنگی + حرکت خیلی آرام (در موبایل مخفی) */
.hero-art .glyph-about-digits {
    gap: clamp(0.05em, 1vw, 0.16em);
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 900;
    line-height: 1;
    unicode-bidi: isolate;
}
.hero-art .glyph-about-digits .glyph-num {
    display: inline-block;
    animation: aboutDigitDrift 5.5s ease-in-out infinite;
    will-change: transform;
}
.hero-art .glyph-about-digits .glyph-num--1 {
    color: #ff5e62;
    text-shadow:
        0 2px 0 rgba(180, 50, 55, 0.2),
        0 10px 28px rgba(255, 94, 98, 0.35);
    animation-delay: 0s;
}
.hero-art .glyph-about-digits .glyph-num--2 {
    color: #2ec4b6;
    text-shadow:
        0 2px 0 rgba(0, 120, 105, 0.18),
        0 10px 28px rgba(46, 196, 182, 0.32);
    animation-delay: -1.85s;
}
.hero-art .glyph-about-digits .glyph-num--3 {
    color: #9b6bff;
    text-shadow:
        0 2px 0 rgba(88, 50, 160, 0.2),
        0 10px 28px rgba(155, 107, 255, 0.32);
    animation-delay: -3.7s;
}
@keyframes aboutDigitDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-5px) rotate(-1.2deg); }
    66% { transform: translateY(4px) rotate(1deg); }
}

/* Floating + − × ÷ on home hero (kid-friendly gradients + motion) */
.hero-art-kids .hero-math-glyphs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    unicode-bidi: isolate;
}
.hero-art-kids .math-float {
    position: absolute;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    font-family: "IRANSans", "Vazirmatn", Tahoma, "Segoe UI Symbol", "Noto Sans Math", sans-serif;
    font-size: clamp(2.85rem, 10vw, 5.6rem);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    will-change: transform;
    /* بدون filter روی متن گرادیانی — در کروم باعث ناپدید شدن گلیف می‌شود */
    isolation: isolate;
}
.hero-art-kids .math-float::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160%;
    height: 160%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.08) 45%,
        transparent 62%
    );
    z-index: -1;
    opacity: 0.85;
    pointer-events: none;
}
.hero-art-kids .math-float--plus {
    left: 2%;
    top: 4%;
    color: #ff4757;
    text-shadow:
        0 3px 0 rgba(196, 56, 56, 0.28),
        0 8px 28px rgba(255, 71, 87, 0.42);
    animation-name: mathBobPlusDesk;
    animation-duration: 6.8s;
    animation-delay: 0s;
}
.hero-art-kids .math-float--minus {
    left: 4%;
    bottom: 4%;
    color: #00c9a7;
    text-shadow:
        0 3px 0 rgba(0, 120, 96, 0.22),
        0 8px 28px rgba(0, 201, 167, 0.38);
    animation-name: mathBobMinusDesk;
    animation-duration: 7.4s;
    animation-delay: -1.8s;
}
.hero-art-kids .math-float--times {
    right: 2%;
    top: 8%;
    color: #9b59ff;
    text-shadow:
        0 3px 0 rgba(88, 42, 168, 0.28),
        0 8px 28px rgba(155, 89, 255, 0.42);
    animation-name: mathBobTimesDesk;
    animation-duration: 7s;
    animation-delay: -2.6s;
}
.hero-art-kids .math-float--divide {
    right: 4%;
    bottom: 5%;
    color: #f39c12;
    text-shadow:
        0 3px 0 rgba(180, 110, 0, 0.25),
        0 8px 28px rgba(243, 156, 18, 0.4);
    animation-name: mathBobDivideDesk;
    animation-duration: 6.4s;
    animation-delay: -4s;
}

/* دسکتاپ: حرکت گسترده در فضای خالی قاب */
@keyframes mathBobPlusDesk {
    0%, 100% { transform: translate(0, 0) rotate(-8deg) scale(1.04); }
    25% { transform: translate(28px, -34px) rotate(10deg) scale(1.12); }
    50% { transform: translate(-24px, 22px) rotate(-6deg) scale(1); }
    75% { transform: translate(32px, 26px) rotate(14deg) scale(1.08); }
}
@keyframes mathBobMinusDesk {
    0%, 100% { transform: translate(0, 0) rotate(6deg) scale(1.02); }
    25% { transform: translate(-30px, -22px) rotate(-12deg) scale(1.1); }
    50% { transform: translate(26px, -36px) rotate(8deg) scale(1.05); }
    75% { transform: translate(-18px, 30px) rotate(-9deg) scale(1.11); }
}
@keyframes mathBobTimesDesk {
    0%, 100% { transform: translate(0, 0) rotate(-10deg) scale(1.03); }
    25% { transform: translate(-26px, 30px) rotate(12deg) scale(1.09); }
    50% { transform: translate(30px, -20px) rotate(-14deg) scale(1); }
    75% { transform: translate(-22px, -32px) rotate(9deg) scale(1.13); }
}
@keyframes mathBobDivideDesk {
    0%, 100% { transform: translate(0, 0) rotate(8deg) scale(1.04); }
    25% { transform: translate(24px, 28px) rotate(-11deg) scale(1); }
    50% { transform: translate(-32px, -26px) rotate(13deg) scale(1.11); }
    75% { transform: translate(20px, -30px) rotate(-7deg) scale(1.06); }
}

/* موبایل / تبلت باریک: همان مسیرها با دامنه کوچک‌تر */
@keyframes mathBobPlusMob {
    0%, 100% { transform: translate(0, 0) rotate(-6deg) scale(1.02); }
    25% { transform: translate(11px, -12px) rotate(7deg) scale(1.06); }
    50% { transform: translate(-9px, 9px) rotate(-4deg) scale(1); }
    75% { transform: translate(12px, 11px) rotate(9deg) scale(1.04); }
}
@keyframes mathBobMinusMob {
    0%, 100% { transform: translate(0, 0) rotate(5deg) scale(1); }
    25% { transform: translate(-10px, -8px) rotate(-8deg) scale(1.05); }
    50% { transform: translate(9px, -13px) rotate(6deg) scale(1.03); }
    75% { transform: translate(-7px, 11px) rotate(-6deg) scale(1.06); }
}
@keyframes mathBobTimesMob {
    0%, 100% { transform: translate(0, 0) rotate(-8deg) scale(1); }
    25% { transform: translate(-9px, 11px) rotate(9deg) scale(1.05); }
    50% { transform: translate(10px, -8px) rotate(-10deg) scale(1); }
    75% { transform: translate(-8px, -11px) rotate(7deg) scale(1.06); }
}
@keyframes mathBobDivideMob {
    0%, 100% { transform: translate(0, 0) rotate(6deg) scale(1.02); }
    25% { transform: translate(9px, 10px) rotate(-8deg) scale(1); }
    50% { transform: translate(-11px, -10px) rotate(10deg) scale(1.05); }
    75% { transform: translate(8px, -11px) rotate(-5deg) scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-art-kids .math-float {
        animation: none;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
    .hero-art .glyph-about-digits .glyph-num {
        animation: none;
    }
    .ms-product-emoji,
    .ms-wait-ico {
        animation: none !important;
    }
}

@keyframes floaty {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-14px) rotate(2deg); }
}

@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 36px; }
    .hero p { margin-inline: auto; }
    .hero .cta { justify-content: center; }
    .hero-art { max-width: 280px; }
    .hero-art-kids .math-float {
        font-size: clamp(1.85rem, 13vw, 2.75rem);
    }
    .hero-art-kids .math-float--plus {
        left: 3%;
        top: 6%;
        animation-name: mathBobPlusMob;
        animation-duration: 6s;
    }
    .hero-art-kids .math-float--minus {
        left: 5%;
        bottom: 6%;
        animation-name: mathBobMinusMob;
        animation-duration: 6.4s;
    }
    .hero-art-kids .math-float--times {
        right: 3%;
        top: 12%;
        animation-name: mathBobTimesMob;
        animation-duration: 6.2s;
    }
    .hero-art-kids .math-float--divide {
        right: 5%;
        bottom: 7%;
        animation-name: mathBobDivideMob;
        animation-duration: 5.8s;
    }
}

@media (max-width: 400px) {
    .hero-art-kids .math-float {
        font-size: clamp(1.55rem, 12vw, 2.35rem);
    }
    .hero-art-kids .math-float--plus {
        left: 1%;
        top: 5%;
    }
    .hero-art-kids .math-float--minus {
        left: 2%;
        bottom: 5%;
    }
    .hero-art-kids .math-float--times {
        right: 1%;
        top: 10%;
    }
    .hero-art-kids .math-float--divide {
        right: 2%;
        bottom: 6%;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: 50px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 14px;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.section-title-wrap { text-align: center; }
.section-title-wrap .icon { color: var(--primary); }
.section-sub {
    text-align: center;
    color: #666;
    margin: 0 auto 36px;
    max-width: 680px;
}

/* Homepage — بازی‌های ما */
.home-games-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.home-games-section .game-grid {
    width: 100%;
    align-self: stretch;
}
.home-games-intro {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
}
.section-sub--kids {
    font-size: clamp(1.02rem, 2.3vw, 1.14rem);
    line-height: 1.8;
    color: #5a5a5a;
    margin-bottom: 28px;
}
.section-sub--kids strong {
    color: var(--primary);
    font-weight: 700;
}

/* ---------- Game cards ---------- */
.game-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 520px) {
    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Row of three cards (e.g. homepage contests) — keep 3 cols on large screens */
    .game-grid--max-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.game-card {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.04);
}
.game-card::after {
    content: "";
    position: absolute;
    inset: -50% -50% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,107,107,0.18), transparent 65%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.game-card:hover::after { opacity: 1; }

.game-card .tile {
    width: var(--icon-card-md);
    height: var(--icon-card-md);
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    box-shadow: var(--shadow-sm);
}
.game-card .tile .icon { width: 28px; height: 28px; color: white; }
.game-card.color-1 .tile { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.game-card.color-2 .tile { background: linear-gradient(135deg, var(--accent), var(--blue)); }
.game-card.color-3 .tile { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.game-card.color-4 .tile { background: linear-gradient(135deg, var(--green), var(--accent)); }
.game-card.color-5 .tile { background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.game-card.color-6 .tile { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.game-card.color-7 .tile { background: linear-gradient(135deg, var(--primary), var(--purple)); }
.game-card h3 { margin: 0; font-size: 1.08rem; }
.game-card p  { color: #666; flex: 1; margin: 0; }
.game-card .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.85rem; color: #888; }
.game-card .meta .pill { background: var(--soft); padding: 4px 10px; border-radius: 999px; }
.game-card .play-btn {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 14px;
    background: var(--soft);
    font-weight: 600;
    transition: var(--transition);
}
.game-card .play-btn .icon { width: 18px; height: 18px; }
.game-card:hover .play-btn { background: var(--primary); color: white; }

.game-card--popular {
    border-color: rgba(255, 167, 38, 0.42);
    box-shadow: var(--shadow-sm), 0 0 0 2px rgba(255, 193, 7, 0.2);
}
.game-card--trial {
    border-color: rgba(95, 39, 205, 0.22);
}
.game-card--school {
    border-color: rgba(30, 144, 255, 0.2);
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}
.game-card-badge-access {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    z-index: 2;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    line-height: 1;
}
.game-card-badge-access--trial {
    background: linear-gradient(135deg, #5f27cd, #a55eea);
    box-shadow: 0 2px 8px rgba(95, 39, 205, 0.35);
}
.game-card-badge-access--school {
    background: linear-gradient(135deg, #2980b9, #54a0ff);
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.35);
}
.game-card-badge-popular {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 6px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffb300, #ff9100);
    color: #fff;
    box-shadow: 0 3px 10px rgba(255, 145, 0, 0.38);
    line-height: 1;
}

/* ---------- Game page header ---------- */
.game-header {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px 28px;
    border-radius: var(--radius-lg);
    color: white;
    margin: 24px 0 18px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.game-header h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); display: inline-flex; align-items: center; gap: 8px; }
.game-header p  { margin: 6px 0 0; opacity: 0.95; font-size: 0.98rem; max-width: 620px; }
.game-header .ghdr-icon {
    width: 62px; height: 62px;
    border-radius: 20px;
    background: rgba(255,255,255,0.22);
    display: grid;
    place-items: center;
    flex: 0 0 62px;
    backdrop-filter: blur(6px);
}
.game-header .ghdr-icon .icon { width: 32px; height: 32px; color: white; }
.game-header::after {
    content: "";
    position: absolute;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.10);
    border-radius: 50%;
    top: -100px; left: -60px;
    pointer-events: none;
}
.game-header::before {
    content: "";
    position: absolute;
    width: 140px; height: 140px;
    background: rgba(255,255,255,0.10);
    border-radius: 50%;
    bottom: -60px; right: -40px;
    pointer-events: none;
}
.game-header.theme-arithmetic { background: linear-gradient(135deg, #ff6b6b, #feca57); }
.game-header.theme-compare    { background: linear-gradient(135deg, #4ecdc4, #54a0ff); }
.game-header.theme-missing    { background: linear-gradient(135deg, #a55eea, #ee5253); }
.game-header.theme-sequence   { background: linear-gradient(135deg, #1dd1a1, #4ecdc4); }
.game-header.theme-memory     { background: linear-gradient(135deg, #feca57, #ff6b6b); }
.game-header.theme-truefalse  { background: linear-gradient(135deg, #54a0ff, #a55eea); }
.game-header.theme-oddeven    { background: linear-gradient(135deg, #feca57, #ff9f43); }
.game-header.theme-clock      { background: linear-gradient(135deg, #54a0ff, #5f27cd); }
.game-header.theme-dice       { background: linear-gradient(135deg, #ff6b6b, #ee5253); }
.game-header.theme-counting   { background: linear-gradient(135deg, #1dd1a1, #feca57); }
.game-header.theme-numword    { background: linear-gradient(135deg, #a55eea, #54a0ff); }
.game-header.theme-bingo      { background: linear-gradient(135deg, #ff9ff3, #f368e0); }
.game-header.theme-sudoku     { background: linear-gradient(135deg, #48dbfb, #0abde3); }
.game-header.theme-snakes     { background: linear-gradient(135deg, #10ac84, #1dd1a1); }
.game-header.theme-puzzle15   { background: linear-gradient(135deg, #5f27cd, #341f97); }
.game-header.theme-tangram    { background: linear-gradient(135deg, #feca57, #ff9f43); }
.game-header.theme-numcards   { background: linear-gradient(135deg, #54a0ff, #2e86de); }
.game-header.theme-magicsq    { background: linear-gradient(135deg, #a55eea, #8854d0); }
.game-header.theme-numcode    { background: linear-gradient(135deg, #576574, #222f3e); }
.game-header.theme-mathxo     { background: linear-gradient(135deg, #ff6b6b, #ee5253); }
.game-header.theme-geopattern { background: linear-gradient(135deg, #1dd1a1, #10ac84); }
.game-header.theme-measure    { background: linear-gradient(135deg, #00d2d3, #01a3a4); }
.game-header.theme-rubik      { background: linear-gradient(135deg, #ff6b6b, #feca57, #1dd1a1, #54a0ff); }
.game-header.theme-fractions  { background: linear-gradient(135deg, #ff9ff3, #feca57); }
.game-header.theme-bonds      { background: linear-gradient(135deg, #ee5253, #a55eea); }
.game-header.theme-money-shop   { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 45%, #8fd3f4 100%); }
.game-header.theme-money-wallet { background: linear-gradient(135deg, #11998e, #38ef7d); }
.game-header.theme-money-change { background: linear-gradient(135deg, #8e2de2, #4a00e0); }
.game-header.theme-money-buyer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
}

.mb-panel { position: relative; }

.mb-wallet-counter-split {
    display: grid;
    gap: 14px;
}
@media (min-width: 768px) {
    .mb-wallet-counter-split {
        grid-template-columns: 1fr 1fr;
        align-items: start;
        gap: 16px 18px;
    }
}
.mb-wallet-counter-split > .mb-section {
    margin-bottom: 0;
}
.mb-wallet-col .ms-wallet-rows {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
}

.mb-wallet-col .ms-banknote.mb-wallet-bill {
    min-height: 96px;
    padding: 12px 10px 10px;
    border-radius: 14px;
    justify-content: flex-start;
    gap: 0;
}

.mb-wallet-col .mb-bill-deco {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(ellipse 100% 55% at 12% 18%, rgba(255, 255, 255, 0.28), transparent 52%),
        radial-gradient(ellipse 70% 45% at 92% 85%, rgba(0, 0, 0, 0.07), transparent 55%),
        linear-gradient(148deg, rgba(255, 255, 255, 0.22) 0%, transparent 46%);
}

.mb-wallet-col .ms-banknote.mb-wallet-bill::after {
    opacity: 0.42;
}

.mb-wallet-col .mb-bill-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    flex: 1;
    justify-content: center;
}

.mb-wallet-col .mb-bill-rial-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 5px 8px;
}

.mb-wallet-col .mb-bill-rial-num {
    font-size: clamp(0.92rem, 3vw, 1.12rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.mb-wallet-col .mb-bill-rial-unit {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
}

.mb-wallet-col .mb-bill-toman-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 2px 4px;
    font-weight: 700;
    line-height: 1.35;
    max-width: 100%;
    text-align: center;
}

.mb-wallet-col .mb-bill-toman-num {
    font-size: 0.78rem;
    opacity: 0.96;
}

.mb-wallet-col .mb-bill-toman-unit {
    font-size: 0.68rem;
    opacity: 0.94;
}

.mb-wallet-col .mb-bill-caption {
    position: relative;
    z-index: 2;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.35);
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0.88;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.mb-wallet-col .ms-banknote.bn-500k.mb-wallet-bill .mb-bill-rial-unit {
    background: rgba(93, 55, 15, 0.14);
}

.mb-wallet-col .ms-banknote.bn-500k.mb-wallet-bill .mb-bill-caption {
    border-top-color: rgba(62, 39, 35, 0.28);
    color: #4e342e;
}

.mb-wallet-col .ms-banknote.bn-500k.mb-wallet-bill .mb-bill-toman-num,
.mb-wallet-col .ms-banknote.bn-500k.mb-wallet-bill .mb-bill-toman-unit {
    color: inherit;
}
.mb-counter-col .ms-counter-inner {
    padding: 12px 12px 10px;
}
.mb-product-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff9fb, #f0f9ff);
    border: 2px solid rgba(245, 87, 108, 0.28);
    box-shadow: var(--shadow-sm);
}
.mb-product-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.mb-product-emoji .mb-product-svg {
    width: clamp(2.5rem, 6vw, 3.5rem);
    height: clamp(2.5rem, 6vw, 3.5rem);
    color: var(--primary-dark);
}
.mb-product-name { margin: 0 0 6px; font-size: clamp(1.15rem, 3vw, 1.45rem); font-weight: 900; color: #4a3a55; }
.mb-product-price-line { margin: 0; font-size: 1rem; color: #555; }
.mb-product-price { font-size: clamp(1.25rem, 3.5vw, 1.75rem); color: var(--green); margin-inline: 4px; }

.mb-section { margin-bottom: 16px; }
.mb-section-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 800;
    color: #5c4b6e;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mb-ico { display: inline-flex; align-items: center; line-height: 0; }
.mb-ico .icon { width: 1.35rem; height: 1.35rem; color: var(--purple); }
.mb-desk-hint { font-size: 0.78rem; color: #777; margin: 0 0 8px; line-height: 1.45; }
.mb-counter-wrap .mb-desk-inner { text-align: center; }
.mb-desk-sum {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #555;
}
.mb-desk-sum.mb-desk-sum--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 6px 10px;
    margin-bottom: 10px;
}
.mb-desk-sum-lbl {
    font-size: 0.85rem;
    font-weight: 700;
    color: #666;
}
.mb-desk-sum-nums {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
.mb-desk-sum strong {
    font-size: clamp(1.25rem, 3.8vw, 1.75rem);
    color: #1a936f;
}
.mb-desk-sum.mb-desk-sum--inline strong {
    display: inline;
    margin-top: 0;
}
.mb-desk-rows {
    min-height: 40px;
    text-align: right;
    direction: rtl;
}
.mb-desk-empty { margin: 6px 0 0; font-size: 0.82rem; color: #999; line-height: 1.45; }
.mb-desk-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #ffffff, #fafdff);
    border: 1px solid rgba(84, 160, 255, 0.14);
    box-shadow: var(--shadow-sm);
}
.mb-desk-stack-col {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding-block: 2px;
    scrollbar-width: thin;
}
.mb-desk-notes-stack {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 2px 4px;
    min-height: 34px;
}
.mb-mini-note {
    position: relative;
    flex-shrink: 0;
    width: 54px;
    height: 30px;
    margin-inline-start: -21px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.11),
        0 5px 10px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: mbMiniNoteLand 0.44s cubic-bezier(.34, 1.56, .64, 1) both;
}
.mb-mini-note:first-child {
    margin-inline-start: 0;
}
.mb-mini-face {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 1px 3px;
    gap: 1px;
    overflow: hidden;
}
.mb-mini-toman-num {
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    font-size: 0.48rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mb-mini-toman-unit {
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    font-size: 0.24rem;
    font-weight: 700;
    line-height: 1.08;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mb-mini-note::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.42) 0%, transparent 45%);
    pointer-events: none;
}
.mb-mini-note.bn-10k { background: linear-gradient(145deg, #9e9e9e, #6d4c41); }
.mb-mini-note.bn-20k { background: linear-gradient(145deg, #78909c, #455a64); }
.mb-mini-note.bn-50k { background: linear-gradient(145deg, #66bb6a, #2e7d32); }
.mb-mini-note.bn-100k { background: linear-gradient(145deg, #ab47bc, #6a1b9a); }
.mb-mini-note.bn-500k {
    background: linear-gradient(145deg, #ffd54f, #f9a825);
}
.mb-mini-note.bn-500k .mb-mini-toman-num,
.mb-mini-note.bn-500k .mb-mini-toman-unit {
    color: #3e2723;
    text-shadow: none;
}
.mb-mini-note.bn-1m { background: linear-gradient(145deg, #26c6da, #00838f); }
@keyframes mbMiniNoteLand {
    from {
        opacity: 0;
        transform: translateY(-11px) rotate(-5deg) scale(0.88);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}
.mb-desk-side-col {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    max-width: 42%;
}
.mb-desk-amt-compact {
    font-size: 0.72rem;
    font-weight: 800;
    color: #444;
    line-height: 1.25;
    text-align: end;
}
.mb-desk-amt-compact .money-rial-chip {
    font-size: 0.68rem;
}
.mb-remove-btn {
    font-size: 0.74rem !important;
    padding: 5px 11px !important;
    border-radius: 999px;
    background: #fff5f5 !important;
    border: 1px solid #f0b4b4 !important;
    color: #a33 !important;
    white-space: nowrap;
}
.mb-breakdown {
    font-size: 0.82rem;
    color: #666;
    text-align: center;
    margin: 10px auto 14px;
    max-width: 560px;
    line-height: 1.55;
    min-height: 1.4em;
}
.mb-actions { margin-top: 8px; }
#money-buyer.mb-game-running #mbStart {
    display: none !important;
}

/* ---------- Stats row ---------- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 24px;
}
.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-card .num {
    font-size: clamp(1.45rem, 4vw, 1.85rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-card .lbl { color: #666; font-size: 0.95rem; }
.stats-row-home {
    max-width: 640px;
}
@media (min-width: 620px) {
    .stats-row-home {
        grid-template-columns: 1fr minmax(260px, 1.15fr);
        align-items: stretch;
    }
}
.stat-card-sub {
    margin-top: 8px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #888;
    font-weight: 500;
}

/* ---------- Score chip / floating UI ---------- */
.float-score {
    position: fixed;
    top: calc(var(--navbar-height) + env(safe-area-inset-top, 0px) + 14px);
    left: 16px;
    background: linear-gradient(135deg, var(--primary), var(--yellow));
    color: white;
    padding: 8px 18px;
    border-radius: 999px;
    z-index: 30;
    box-shadow: var(--shadow-md);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.float-score .icon { width: 20px; height: 20px; color: white; }

/* ---------- Game panel ---------- */
.game-panel {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}
.game-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.game-controls label {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}
.game-controls label .icon { width: 14px; height: 14px; color: var(--primary); }
.game-controls select,
.game-controls input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.06);
    background: var(--soft);
    font: inherit;
    text-align: center;
    transition: var(--transition);
}
.game-controls select:focus,
.game-controls input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.question-box {
    text-align: center;
    padding: 28px 16px;
    background: linear-gradient(135deg, rgba(255,107,107,0.06), rgba(78,205,196,0.08));
    border-radius: var(--radius-md);
    border: 2px dashed rgba(255,107,107,0.18);
    margin-bottom: 18px;
}
.question-box .expr {
    font-size: clamp(1.65rem, 5.5vw, 3rem);
    font-weight: 800;
    direction: ltr;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: var(--dark);
}
.question-box .expr .icon { width: 0.9em; height: 0.9em; color: var(--primary); }
.question-box .expr span {
    min-width: 1.2em;
    display: inline-block;
}
.answer-input {
    margin-top: 16px;
    width: min(280px, 100%);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 3px solid rgba(255,107,107,0.18);
    text-align: center;
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    font-weight: 700;
    background: white;
    transition: var(--transition);
}
.answer-input:focus { outline: none; border-color: var(--primary); }

/* Sequence pattern chips */
.seq-display {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.seq-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4em;
    padding: 8px 16px;
    border-radius: 14px;
    font-weight: 800;
    direction: ltr;
    unicode-bidi: plaintext;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(78, 205, 196, 0.18));
    border: 2px solid rgba(255, 107, 107, 0.22);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}
.seq-chip:nth-child(4n+1) { background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(254, 202, 87, 0.2)); }
.seq-chip:nth-child(4n+2) { background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(84, 160, 255, 0.16)); }
.seq-chip:nth-child(4n+3) { background: linear-gradient(135deg, rgba(165, 94, 234, 0.16), rgba(255, 107, 107, 0.14)); }
.seq-chip.seq-q {
    background: linear-gradient(135deg, var(--primary), var(--yellow));
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
}
.seq-sep {
    color: #aaa;
    font-weight: 700;
    user-select: none;
}

/* بازتاب زندهٔ تنظیمات بازی محاسبه، هم‌تراز با نوار پیشرفت پایین */
.game-settings-echo {
    margin: 0 0 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #555;
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
#arithmetic .game-settings-echo {
    background: var(--soft);
}

.progress-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.progress-card {
    background: var(--soft);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.progress-card .lbl { font-size: 0.85rem; color: #666; display: flex; align-items: center; gap: 6px; }
.progress-card .lbl .icon { width: 14px; height: 14px; color: var(--primary); }
.progress-card .bar {
    margin-top: 8px;
    background: rgba(255,255,255,0.6);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.progress-card .bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--yellow));
    border-radius: 999px;
    transition: width 0.4s ease;
}
.progress-card.ok .bar > span    { background: linear-gradient(90deg, var(--green), var(--accent)); }
.progress-card.warn .bar > span  { background: linear-gradient(90deg, var(--yellow), var(--primary)); }

/* امتیاز: فقط نوار هدف (بدون عدد تکراری) — مثل خریدار کوچک */
.progress-card--goal-only {
    padding: 8px 10px;
}
.progress-card--goal-only .hk-score-goal.hk-score-goal--compact {
    margin: 0;
}

.answer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    direction: rtl;
    margin-top: 6px;
    justify-content: center;
}
.answer-list--dense { gap: 3px 5px; margin-top: 4px; }
.answer-pill {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(46,213,115,0.12);
    color: #169c7a;
    font-weight: 600;
    font-size: 0.68rem;
    border: 1px solid rgba(46,213,115,0.28);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
    max-width: 100%;
}
.answer-pill .icon { width: 11px; height: 11px; flex-shrink: 0; }
.answer-pill .answer-pill-num {
    font-variant-numeric: tabular-nums;
    font-size: 0.66rem;
    font-weight: 700;
    opacity: 0.95;
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.answer-pill.wrong { background: rgba(238,82,83,0.1); color: #d63031; border-color: rgba(238,82,83,0.28); }

/* True/False tiles */
.tf-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 480px;
    margin: 14px auto 0;
}
.tf-btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 16px 14px;
    min-height: var(--btn-min-h);
    font-size: 1.05rem;
    font-weight: 800;
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.tf-btn .icon { width: 22px; height: 22px; }
.tf-btn.tf-true  { background: linear-gradient(135deg, var(--green), var(--accent)); }
.tf-btn.tf-false { background: linear-gradient(135deg, #ee5253, #ff6b6b); }
.tf-btn.oe-even  { background: linear-gradient(135deg, #1dd1a1, #10ac84); }
.tf-btn.oe-odd   { background: linear-gradient(135deg, #5f27cd, #341f97); }
.tf-btn:hover    { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tf-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.oe-prompt {
    text-align: center;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 6px;
}
.oe-number {
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    font-weight: 900;
    letter-spacing: 0.02em;
    margin: 8px auto 4px;
    min-height: 1.2em;
}
.nw-prompt-display {
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 800;
}

.clk-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 420px;
    margin: 14px auto 0;
}
@media (min-width: 520px) {
    .clk-options { grid-template-columns: repeat(4, 1fr); }
}
.clk-opt {
    min-height: 48px;
    font-weight: 800;
    font-size: 1.05rem;
}

.hk-clock-wrap {
    display: flex;
    justify-content: center;
    margin: 12px auto 8px;
}
.hk-clock {
    position: relative;
    width: min(220px, 72vw);
    height: min(220px, 72vw);
    border-radius: 50%;
    background: linear-gradient(145deg, #fff 0%, #f0f4ff 100%);
    border: 6px solid rgba(84, 160, 255, 0.35);
    box-shadow: var(--shadow-md), inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}
.hk-clock-ticks {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from -90deg,
        rgba(45, 52, 54, 0.12) 0deg 4deg,
        transparent 4deg 30deg
    );
}
.hk-clock-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform-origin: 50% 100%;
    border-radius: 6px;
    transition: transform 0.35s ease;
}
.hk-clock-hour {
    width: 8px;
    height: 28%;
    margin-left: -4px;
    background: linear-gradient(180deg, #2d3436, #636e72);
    z-index: 2;
}
.hk-clock-minute {
    width: 5px;
    height: 38%;
    margin-left: -2.5px;
    background: linear-gradient(180deg, #ee5253, #ff6b6b);
    z-index: 3;
}
.hk-clock-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #2d3436;
    z-index: 4;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}

.dice-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 10px auto 6px;
}
.hk-die {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 88px;
    height: 88px;
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff, #f8f9fa);
    border: 3px solid rgba(45, 52, 54, 0.12);
    box-shadow: var(--shadow-sm);
}
.hk-die-pip {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin: auto;
    opacity: 0;
}
.hk-die-pip.on {
    opacity: 1;
    background: #2d3436;
}

.count-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    max-width: 480px;
    margin: 12px auto;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.65);
}

/* ---------- Snakes & Ladders board ---------- */
.snl-stage {
    display: grid;
    gap: 16px;
    margin: 0 auto;
    max-width: 720px;
}
@media (min-width: 640px) {
    .snl-stage {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: start;
    }
}
.snl-board-wrap {
    position: relative;
    padding: 10px;
    border-radius: var(--radius-lg);
    background: linear-gradient(165deg, #e8f8f0 0%, #fff9e6 45%, #e3f2fd 100%);
    border: 3px solid rgba(16, 172, 132, 0.28);
    box-shadow: var(--shadow-md), inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}
.snl-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 3px;
    aspect-ratio: 8 / 5;
    min-height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
}
.snl-links {
    position: absolute;
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    pointer-events: none;
    z-index: 2;
}
.snl-link-snake {
    fill: none;
    stroke: #e74c3c;
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0.85;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}
.snl-link-ladder {
    stroke: #3498db;
    stroke-width: 4;
    opacity: 0.9;
}
.snl-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: clamp(0.62rem, 2.2vw, 0.82rem);
    color: #2d3436;
    border-radius: 6px;
    min-height: 0;
    transition: background 0.2s, transform 0.2s;
}
.snl-cell:nth-child(8n+1),
.snl-cell:nth-child(8n+3),
.snl-cell:nth-child(8n+5),
.snl-cell:nth-child(8n+7) {
    background: linear-gradient(145deg, #fffef5, #f0fff4);
}
.snl-cell:nth-child(8n+2),
.snl-cell:nth-child(8n+4),
.snl-cell:nth-child(8n+6),
.snl-cell:nth-child(8n) {
    background: linear-gradient(145deg, #f5fbff, #fff8f0);
}
.snl-cell--start {
    background: linear-gradient(145deg, #55efc4, #81ecec) !important;
    box-shadow: inset 0 0 0 2px rgba(0, 184, 148, 0.45);
}
.snl-cell--finish {
    background: linear-gradient(145deg, #ffeaa7, #fdcb6e) !important;
    box-shadow: inset 0 0 0 2px rgba(253, 203, 110, 0.7);
}
.snl-cell--here {
    z-index: 4;
    box-shadow: inset 0 0 0 3px rgba(16, 172, 132, 0.55);
    transform: scale(1.04);
}
.snl-cell-mark {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 0.72em;
    line-height: 1;
    pointer-events: none;
}
.snl-cell--snake-head .snl-cell-mark { filter: drop-shadow(0 0 2px #fff); }
.snl-cell--ladder-foot .snl-cell-mark { filter: drop-shadow(0 0 2px #fff); }
.snl-token {
    position: absolute;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    z-index: 5;
    pointer-events: none;
    transition: left 0.35s ease, top 0.35s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.snl-token-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff6b6b, #ee5253);
    border: 3px solid #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    line-height: 1;
}
.snl-token--bounce .snl-token-inner {
    animation: snl-token-bounce 0.45s ease;
}
@keyframes snl-token-bounce {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.2) translateY(-4px); }
}
.snl-play-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
}
.snl-dice-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.snl-dice-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--muted);
}
.snl-dice {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    width: 64px;
    height: 64px;
    padding: 10px;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f0f4ff);
    border: 3px solid rgba(16, 172, 132, 0.35);
    box-shadow: var(--shadow-sm);
}
.snl-dice--roll {
    animation: snl-dice-shake 0.5s ease;
}
@keyframes snl-dice-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}
.snl-dice-pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: auto;
    opacity: 0;
}
.snl-dice-pip.on {
    opacity: 1;
    background: #2d3436;
}
.snl-status {
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--muted);
    min-height: 1.4em;
    margin: 0;
}
.snl-status--snake { color: #d63031; }
.snl-status--ladder { color: #0984e3; }
.snl-status--win { color: #00b894; font-size: 1rem; }
.snl-question .expr {
    margin: 4px auto 8px;
}
.snl-question .clk-options {
    margin-top: 8px;
}
.snl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-top: 6px;
}
.snl-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ct-shape {
    display: inline-block;
    flex-shrink: 0;
}
.ct-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.ct-square {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}
.ct-triangle {
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid currentColor;
    background: transparent !important;
}
.ct-star {
    width: 34px;
    height: 34px;
    background: transparent !important;
    color: inherit;
    clip-path: polygon(
        50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
    );
    background-color: currentColor !important;
}

.bingo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 280px;
    margin: 0 auto;
}
.bingo-cell {
    min-height: 56px;
    font-weight: 800;
    border-radius: 12px;
    background: #fff;
    border: 2px solid rgba(84, 160, 255, 0.35);
}
.bingo-cell.marked {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    color: #fff;
    border-color: transparent;
}

.sudoku4-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    max-width: 220px;
    margin: 0 auto 10px;
    padding: 6px;
    border: 3px solid #2d3436;
    border-radius: 10px;
    background: #fff;
}
.sudoku4-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 6px;
    background: #f8f9fa;
}
.sudoku4-cell.active {
    outline: 3px solid #54a0ff;
    background: #e3f2fd;
}

.magic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 200px;
    margin: 0 auto 10px;
}
.magic-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 10px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.08);
}

.puzzle15-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-width: 280px;
    margin: 0 auto;
}
.puzzle15-cell {
    aspect-ratio: 1;
    font-weight: 800;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: #fff;
}
.puzzle15-cell.empty {
    background: transparent;
    border: 2px dashed rgba(0, 0, 0, 0.12);
}

.numcards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 360px;
    margin: 0 auto;
}
.numcard {
    min-height: 52px;
    font-weight: 700;
    border-radius: 10px;
}
.numcard.open, .numcard.done {
    background: linear-gradient(135deg, #feca57, #ff9f43);
    color: #2d3436;
}

/* ---------- Math XO (tic-tac-toe) ---------- */
.mxo-stage {
    display: grid;
    gap: 18px;
    margin: 0 auto;
    max-width: 640px;
}
@media (min-width: 560px) {
    .mxo-stage {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }
}
.mxo-board-wrap {
    padding: 14px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #fff5f5 0%, #f0f7ff 55%, #fff9f0 100%);
    border: 3px solid rgba(238, 82, 83, 0.22);
    box-shadow: var(--shadow-md);
}
.mxo-turn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--muted);
}
.mxo-turn-you { color: #ee5253; }
.mxo-turn-ai { color: #0984e3; }
.mxo-turn-vs { opacity: 0.7; font-size: 0.8rem; }
.mxo-mark {
    display: inline-grid;
    place-items: center;
    width: 1.35em;
    height: 1.35em;
    border-radius: 8px;
    font-weight: 900;
    line-height: 1;
}
.mxo-mark--x {
    color: #fff;
    background: linear-gradient(145deg, #ff6b6b, #ee5253);
    box-shadow: 0 2px 8px rgba(238, 82, 83, 0.4);
}
.mxo-mark--o {
    color: #fff;
    background: linear-gradient(145deg, #54a0ff, #2e86de);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(46, 134, 222, 0.4);
}
.mxo-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 280px;
    margin: 0 auto 10px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
}
.mxo-win-svg {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.mxo-win-svg--show {
    opacity: 1;
}
.mxo-win-stroke {
    stroke-width: 6;
}
.mxo-win-svg--show .mxo-win-stroke {
    animation: mxo-line-draw 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mxo-win-svg--x .mxo-win-stroke {
    stroke: #ee5253;
    filter: drop-shadow(0 1px 3px rgba(238, 82, 83, 0.55));
}
.mxo-win-svg--o .mxo-win-stroke {
    stroke: #2e86de;
    filter: drop-shadow(0 1px 3px rgba(46, 134, 222, 0.55));
}
@keyframes mxo-line-draw {
    to { stroke-dashoffset: 0; }
}
.mxo-cell {
    position: relative;
    z-index: 1;
    aspect-ratio: 1;
    min-height: 72px;
    border-radius: 14px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: grid;
    place-items: center;
}
.mxo-cell--empty {
    background: linear-gradient(145deg, #fafafa, #f0f4f8);
}
.mxo-cell--pick {
    cursor: pointer;
    border-color: rgba(16, 172, 132, 0.55);
    box-shadow: 0 0 0 3px rgba(29, 209, 161, 0.25);
    animation: mxo-pick-pulse 1s ease infinite;
}
.mxo-cell--pick:hover:not(:disabled) {
    transform: scale(1.05);
    border-color: #1dd1a1;
}
.mxo-cell--x {
    background: linear-gradient(145deg, #fff0f0, #ffe8e8);
    border-color: rgba(238, 82, 83, 0.35);
}
.mxo-cell--o {
    background: linear-gradient(145deg, #eef6ff, #e3f0ff);
    border-color: rgba(46, 134, 222, 0.35);
}
.mxo-cell--win {
    z-index: 2;
    animation: mxo-win-flash 0.55s ease 2;
}
.mxo-cell--win-x {
    box-shadow: 0 0 0 3px rgba(238, 82, 83, 0.45);
    border-color: #ee5253 !important;
}
.mxo-cell--win-o {
    box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.45);
    border-color: #2e86de !important;
}
.mxo-turn--won-you .mxo-turn-you {
    transform: scale(1.06);
    text-shadow: 0 0 12px rgba(238, 82, 83, 0.35);
}
.mxo-turn--won-ai .mxo-turn-ai {
    transform: scale(1.06);
    text-shadow: 0 0 12px rgba(46, 134, 222, 0.35);
}
.mxo-turn-you,
.mxo-turn-ai {
    transition: transform 0.25s ease, text-shadow 0.25s ease;
}
.mxo-cell .mxo-mark {
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
}
.mxo-cell:disabled {
    opacity: 1;
    cursor: default;
}
@keyframes mxo-pick-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(29, 209, 161, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(29, 209, 161, 0.35); }
}
@keyframes mxo-win-flash {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.mxo-status {
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--muted);
    min-height: 1.4em;
    margin: 0;
}
.mxo-status--pick { color: #00b894; }
.mxo-status--ai { color: #0984e3; }
.mxo-status--win { color: #e17055; font-size: 1rem; }
.mxo-status--win-you { color: #ee5253; font-size: 1rem; font-weight: 800; }
.mxo-status--win-ai { color: #0984e3; font-size: 1rem; font-weight: 800; }
.mxo-status--draw { color: #636e72; }
.mxo-play-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
}
.mxo-prompt {
    text-align: center;
    font-weight: 700;
    color: var(--muted);
    margin: 0;
    font-size: 0.92rem;
}
.mxo-expr {
    font-size: clamp(1.8rem, 6vw, 2.6rem) !important;
    margin: 4px auto 6px !important;
}
.mxo-play-zone .clk-options {
    margin-top: 4px;
    max-width: 100%;
}

.mathxo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 240px;
    margin: 0 auto 10px;
}
.mathxo-cell {
    aspect-ratio: 1;
    font-size: 1.6rem;
    font-weight: 900;
    border-radius: 12px;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.frac-bar {
    display: flex;
    gap: 4px;
    max-width: 280px;
    margin: 12px auto;
    height: 36px;
}
.frac-seg {
    flex: 1;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.08);
}
.frac-seg.on {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
}

.measure-row {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 12px auto;
}
.measure-col {
    text-align: center;
    font-weight: 700;
}
.measure-bar {
    width: 28px;
    margin: 6px auto;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #54a0ff, #2e86de);
}

.geo-seq-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px auto;
}
.geo-seq-shape {
    width: 36px;
    height: 36px;
    display: inline-block;
}
.geo-circle { border-radius: 50%; background: #ff6b6b; }
.geo-square { border-radius: 6px; background: #54a0ff; }
.geo-triangle {
    width: 0; height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid #1dd1a1;
    background: transparent;
}

/* ---------- Tangram (authentic 7-piece build) ---------- */
.tg-intro,
.tg-rules,
.tg-progress,
.tg-target-title,
.tg-board-title,
.tg-tray-label,
.tg-rule-q {
    text-align: center;
    margin: 0 0 8px;
}
.tg-intro {
    font-weight: 700;
    color: #444;
    font-size: 0.95rem;
}
.tg-rules {
    font-size: 0.82rem;
    color: #666;
    background: rgba(254, 202, 87, 0.25);
    padding: 8px 10px;
    border-radius: var(--radius-md);
}
.tg-progress {
    font-weight: 800;
    color: var(--primary);
}
.tg-play { max-width: 640px; margin: 0 auto; }
.tg-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}
.tg-target-col,
.tg-board-col { text-align: center; }
.tg-target-title,
.tg-board-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: #555;
}
.tangram-sil {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    background: #2d3436;
    border: 3px dashed rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.15);
}
.tangram-sil--square {
    background: #2d3436;
    clip-path: none;
    border-radius: 8px;
}
.tangram-sil--house {
    clip-path: polygon(50% 0%, 100% 38%, 100% 100%, 0 100%, 0 38%);
}
.tangram-sil--cat {
    clip-path: polygon(18% 82%, 14% 58%, 28% 42%, 38% 38%, 48% 22%, 62% 18%, 76% 26%, 82% 40%, 92% 44%, 86% 58%, 72% 72%, 48% 78%);
}
.tangram-sil--boat {
    clip-path: polygon(8% 62%, 92% 62%, 100% 88%, 0 88%);
}
.tangram-sil--bird {
    clip-path: polygon(28% 72%, 22% 48%, 38% 36%, 56% 32%, 72% 38%, 78% 52%, 94% 48%, 92% 62%, 74% 66%, 58% 78%, 38% 76%);
}
.tangram-sil--heart {
    clip-path: polygon(50% 88%, 12% 46%, 24% 18%, 50% 34%, 76% 18%, 88% 46%);
}
.tg-board {
    position: relative;
    margin: 0 auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08);
    touch-action: none;
    overflow: hidden;
}
.tg-ghost-layer,
.tg-piece-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.tg-piece-layer { z-index: 2; }
.tg-ghost-host {
    position: absolute;
    inset: 0;
}
.tg-ghost-host .tg-piece-svg--ghost .tg-tan-path {
    fill-opacity: 0.22;
    stroke-width: 1;
}
.tg-piece-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.tg-piece {
    position: absolute;
    width: 34%;
    height: 34%;
    cursor: grab;
    touch-action: none;
    z-index: 5;
    pointer-events: auto;
    transition: filter 0.15s;
}
.tg-piece--dragging {
    cursor: grabbing;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
    z-index: 20;
}
.tg-piece--placed {
    cursor: default;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}
.tg-tray {
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.75);
    border: 2px dashed rgba(255, 159, 67, 0.45);
}
.tg-tray-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: #555;
}
.tg-tray-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}
.tg-tray-slot {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    position: relative;
}
.tg-tray-slot--done { opacity: 0.4; }
.tg-tray-slot--done .tg-piece { visibility: hidden; }
.tg-tray-slot--demo {
    grid-template-rows: 1fr auto;
}
.tg-tray-grid--demo {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.tg-tan-cap {
    font-size: 0.65rem;
    font-weight: 700;
    color: #666;
    text-align: center;
    line-height: 1.1;
}
.tg-rule-opts { margin-top: 10px; }
.tg-rule-q {
    font-weight: 800;
    font-size: 1rem;
    color: var(--primary);
    margin: 12px 0;
}
.tg-tan-path { stroke: rgba(0, 0, 0, 0.12); stroke-width: 0.5; }
@media (max-width: 560px) {
    .tg-main { flex-direction: column; align-items: center; }
    .tg-tray-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tangram-sil { width: 120px; height: 120px; }
}

.rubik-intro {
    text-align: center;
    color: #555;
    margin: 0 0 12px;
    font-weight: 600;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.rubik-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.rubik-stats b { color: var(--primary); }
.rubik-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #666;
}
.rubik-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rubik-legend-chip i,
.rubik-sticker {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.rubik-sticker {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.rubik-c-w { background: linear-gradient(145deg, #fff 0%, #e8eaef 100%); }
.rubik-c-y { background: linear-gradient(145deg, #ffe066 0%, #feca57 100%); }
.rubik-c-g { background: linear-gradient(145deg, #1dd1a1 0%, #10ac84 100%); }
.rubik-c-b { background: linear-gradient(145deg, #74b9ff 0%, #54a0ff 100%); }
.rubik-c-r { background: linear-gradient(145deg, #ff7675 0%, #ee5253 100%); }
.rubik-c-o { background: linear-gradient(145deg, #ffb142 0%, #ff9f43 100%); }

.rubik-viewport {
    max-width: 420px;
    margin: 0 auto 14px;
}
.rubik-drag-hint {
    text-align: center;
    font-size: 0.78rem;
    color: #888;
    margin: 0 0 6px;
}
.rubik-scene {
    position: relative;
    height: 260px;
    perspective: 920px;
    perspective-origin: 50% 42%;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.rubik-scene--dragging { cursor: grabbing; }
.rubik-cube-wrap {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
}
.rubik-cube {
    --rubik-size: 112px;
    --rubik-half: calc(var(--rubik-size) / 2);
    position: absolute;
    left: calc(var(--rubik-half) * -1);
    top: calc(var(--rubik-half) * -1);
    width: var(--rubik-size);
    height: var(--rubik-size);
    transform-style: preserve-3d;
    transition: transform 0.08s ease-out;
}
.rubik-cube-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #1a1a22;
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
    backface-visibility: hidden;
    transition: filter 0.2s ease;
}
.rubik-cube-face--pulse {
    filter: brightness(1.18);
}
.rubik-cube-face-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    width: 100%;
    height: 100%;
    padding: 5px;
    box-sizing: border-box;
}
.rubik-cube-face--U { transform: rotateX(90deg) translateZ(var(--rubik-half)); }
.rubik-cube-face--D { transform: rotateX(-90deg) translateZ(var(--rubik-half)); }
.rubik-cube-face--F { transform: translateZ(var(--rubik-half)); }
.rubik-cube-face--B { transform: rotateY(180deg) translateZ(var(--rubik-half)); }
.rubik-cube-face--R { transform: rotateY(90deg) translateZ(var(--rubik-half)); }
.rubik-cube-face--L { transform: rotateY(-90deg) translateZ(var(--rubik-half)); }
.rubik-cube-shadow {
    position: absolute;
    left: 50%;
    bottom: 18px;
    width: 140px;
    height: 28px;
    margin-left: -70px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22) 0%, transparent 72%);
    pointer-events: none;
    transform: translateZ(-1px);
}
.rubik-sticker {
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -3px 0 rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.15);
}
.rubik-moves {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 360px;
    margin: 0 auto 10px;
}
.rubik-move-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 6px;
    min-height: 52px;
}
.rubik-move-key {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.9;
}
.rubik-move-label {
    font-size: 0.78rem;
    font-weight: 700;
}
.rubik-tools {
    text-align: center;
    margin-top: 8px;
}
@media (max-width: 520px) {
    .rubik-scene { height: 230px; perspective: 720px; }
    .rubik-cube { --rubik-size: 96px; }
    .rubik-cube-shadow { width: 118px; margin-left: -59px; }
    .rubik-moves { max-width: 100%; }
}

/* ---------- Numcode (Mastermind) ---------- */
.nc-stage {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nc-vault {
    text-align: center;
    padding: 16px 14px 12px;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, #2d3436 0%, #576574 55%, #222f3e 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.35s;
}
.nc-vault--open {
    box-shadow: 0 0 0 3px rgba(29, 209, 161, 0.45), var(--shadow-md);
}
.nc-vault-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 6px;
}
.nc-vault-slots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}
.nc-vault-dot {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.12);
    border: 2px dashed rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.7);
}
.nc-vault-dot--open {
    background: linear-gradient(145deg, #55efc4, #00b894);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #2d3436;
    animation: nc-pop 0.45s ease;
}
@keyframes nc-pop {
    0% { transform: scale(0.7); }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.nc-vault-title {
    margin: 0;
    font-weight: 700;
    font-size: 0.92rem;
    opacity: 0.9;
}
.nc-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}
.nc-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nc-peg {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}
.nc-peg--exact {
    background: linear-gradient(145deg, #00b894, #55efc4);
    box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.25);
}
.nc-peg--near {
    background: linear-gradient(145deg, #fdcb6e, #feca57);
    box-shadow: 0 0 0 2px rgba(253, 203, 110, 0.35);
}
.nc-peg--none {
    background: #dfe6e9;
    width: 10px;
    height: 10px;
}
.nc-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.nc-slots {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.nc-slot {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    font-size: 1.5rem;
    font-weight: 900;
    border: 3px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    color: #2d3436;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.nc-slot--active {
    border-color: #54a0ff;
    box-shadow: 0 0 0 3px rgba(84, 160, 255, 0.28);
    transform: scale(1.05);
}
.nc-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 280px;
    width: 100%;
}
.nc-pad-btn {
    min-height: 42px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    background: linear-gradient(145deg, #f8f9fa, #eef2f7);
    border: 2px solid rgba(0, 0, 0, 0.08);
    color: #2d3436;
}
.nc-pad-btn:hover:not(:disabled) {
    border-color: #54a0ff;
    transform: translateY(-2px);
}
.nc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.nc-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}
.nc-clear {
    background: rgba(0, 0, 0, 0.06);
    color: var(--muted);
    font-weight: 700;
}
.nc-status {
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0;
    min-height: 1.4em;
}
.nc-status--hint { color: #0984e3; }
.nc-status--miss { color: #636e72; }
.nc-status--win { color: #00b894; font-size: 1rem; }
.nc-status--lose { color: #d63031; }
.nc-history-wrap {
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 12px;
}
.nc-history-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}
.nc-history {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nc-history-empty {
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    padding: 8px 4px;
}
.nc-history-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
}
.nc-history-num {
    font-weight: 800;
    color: #b2bec3;
    min-width: 1.2em;
}
.nc-history-guess {
    font-weight: 900;
    letter-spacing: 0.12em;
    font-size: 1rem;
}
.nc-history-pegs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.nc-history-hint {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: left;
}
@media (max-width: 400px) {
    .nc-history-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .nc-history-pegs { grid-column: 2; }
    .nc-history-hint { grid-column: 1 / -1; }
}

.numcode-input {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
}
.numcode-digit {
    min-width: 56px;
    padding: 8px;
    border-radius: 10px;
    font-weight: 800;
}

.tf-q-timer-wrap {
    max-width: 420px;
    margin: 0 auto 12px;
}
.tf-q-timer-wrap .progress-card .bar > span {
    transition: width 0.35s linear;
}

/* Number bonds tiles */
.bonds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 420px;
    margin: 16px auto 0;
}
@media (max-width: 480px) { .bonds-grid { grid-template-columns: repeat(2, 1fr); } }
.bond-tile {
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 10px;
    min-height: 48px;
    font-size: clamp(1.15rem, 4.2vw, 1.45rem);
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    direction: ltr;
}
.bond-tile:hover    { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.bond-tile.selected { background: linear-gradient(135deg, var(--primary), var(--yellow)); transform: translateY(-3px) scale(1.04); }
.bond-tile.correct  { background: linear-gradient(135deg, var(--green), var(--accent)); }
.bond-tile.wrong    { background: linear-gradient(135deg, #ee5253, #ff6b6b); }
.bond-tile:disabled { cursor: not-allowed; }
.bond-target {
    font-size: clamp(2.4rem, 7vw, 3.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Money games — ریال (جمع / تفریق) */
.money-question { position: relative; }
.money-rial-note {
    font-size: 0.92rem;
    color: #666;
    text-align: center;
    margin: -4px auto 14px;
    max-width: 520px;
    line-height: 1.5;
}
.money-rial-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.money-rial-explainer {
    font-size: 0.85rem;
    color: #555;
    background: rgba(254,202,87,0.18);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 0 auto 14px;
    max-width: 540px;
    scroll-margin-top: 88px;
}

/* متن‌های کمکی پول — زیر باکس بازی تا وسط صفحه شلوغ نشود */
.money-game-meta {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    max-width: 640px;
    margin-inline: auto;
}
.money-game-meta .money-rial-note {
    margin: 0 auto 12px;
}
.money-game-meta .money-rial-explainer {
    margin: 0 auto 12px;
}
.money-game-meta .money-banknotes-hint,
.money-game-meta .ms-shelf-hint {
    margin: 12px auto 0;
    text-align: center;
}

.money-rial-chip {
    display: inline;
    font-size: 0.78em;
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dashed;
}

.money-price-tag {
    text-align: center;
    padding: 16px;
    margin: 0 auto 14px;
    max-width: 420px;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff9ec, #fff);
    border: 2px solid rgba(252,74,26,0.25);
    box-shadow: var(--shadow-sm);
}
.money-price-label { display: block; font-size: 0.92rem; color: #776; margin-bottom: 6px; }
.money-price-val {
    font-size: clamp(1.85rem, 5vw, 2.65rem);
    font-weight: 900;
    color: var(--purple);
}
.money-price-unit {
    margin-inline-start: 6px;
    font-size: 1rem;
    font-weight: 700;
}

.money-sum-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin: 14px auto;
}
.money-sum-label { color: #666; font-weight: 600; }
.money-sum-val {
    font-size: clamp(1.5rem, 4.5vw, 2rem);
    font-weight: 900;
    color: var(--green);
}
.money-sum-bump { animation: moneySumBump 0.35s cubic-bezier(.34,1.56,.64,1); }
@keyframes moneySumBump {
    0% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

.money-clear-btn {
    font-size: 0.78rem !important;
    padding: 5px 10px !important;
    border-radius: 999px;
    border: 1px solid #ccc !important;
    background: white !important;
    color: #555 !important;
    cursor: pointer;
}
.money-clear-btn:hover { filter: brightness(0.96); }

.money-denom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 10px;
    max-width: 520px;
    margin: 14px auto 0;
}
.money-coin-btn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 10px;
    cursor: pointer;
    color: white;
    font-weight: 800;
    direction: rtl;
    background: linear-gradient(145deg, #f7b733 0%, #e48a09 48%, #c97800 100%);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.money-coin-btn:nth-child(2) { background: linear-gradient(145deg, #ffe259, #ffa751); }
.money-coin-btn:nth-child(3) { background: linear-gradient(145deg, #43cea2, #185a9d); }
.money-coin-btn:nth-child(4) { background: linear-gradient(145deg, #904e95, #e96443); }
.money-coin-btn:nth-child(5) { background: linear-gradient(145deg, #56ccf2, #2f80ed); }
.money-coin-btn:hover { transform: translateY(-3px) rotate(-0.8deg); box-shadow: var(--shadow-md); }
.money-coin-bump { animation: moneyCoinBump 0.28s cubic-bezier(.34,1.56,.64,1); }
@keyframes moneyCoinBump {
    50% { transform: scale(1.08); }
}

.money-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.money-pay-btn { min-height: var(--btn-min-h); animation: moneyPayGlow 3s ease-in-out infinite; }
@keyframes moneyPayGlow {
    0%, 100% { box-shadow: 0 6px 0 rgba(0,0,0,0.04); filter: saturate(1); }
    50% { box-shadow: 0 10px 24px rgba(255,154,71,0.35); filter: saturate(1.06); }
}

.money-pop-in { animation: moneyPopIn 0.42s cubic-bezier(.34,1.56,.64,1); }
@keyframes moneyPopIn {
    from { opacity: 0; transform: scale(0.88) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.money-wallet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    max-width: 520px;
    margin: 0 auto 14px;
}
.money-wcard {
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    background: linear-gradient(160deg, #f5fff8, white);
    border: 2px solid rgba(17,153,142,0.22);
    box-shadow: var(--shadow-sm);
}
.money-wcard-minus { background: linear-gradient(160deg, #fff9f9, white); border-color: rgba(238,82,115,0.22); }
.money-wcard-pay { background: linear-gradient(160deg, #eef6ff, white); border-color: rgba(47,128,237,0.24); }
.money-wcard-lbl { font-size: 0.82rem; color: #666; display: block; margin-bottom: 4px; font-weight: 600; }
.money-wcard-val {
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 900;
    color: var(--accent);
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

.money-prompt { text-align: center; color: #555; margin: 4px auto 14px; max-width: 440px; }
.money-banknotes-hint {
    text-align: center;
    font-size: 0.84rem;
    color: #5a6270;
    margin: -4px auto 14px;
    max-width: 520px;
    line-height: 1.55;
}
.money-input-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}
.money-answer-input {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* ---------- فروشگاه سوپر کوچولو (بازی پول) ---------- */
.ms-page { overflow-x: clip; }

.ms-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,252,246,0.98));
}

.ms-store {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    border: 2px solid rgba(255,138,128,0.35);
    box-shadow: 0 14px 40px rgba(161, 140, 209, 0.18);
    background:
        radial-gradient(ellipse 90% 60% at 50% -20%, rgba(255, 183, 197, 0.45), transparent 55%),
        linear-gradient(175deg, #fff9fb 0%, #fff4e6 38%, #e8fff6 100%);
}

.ms-store--celebrate {
    animation: msCelebrate 0.75s ease-out;
}
@keyframes msCelebrate {
    0% { box-shadow: 0 14px 40px rgba(161, 140, 209, 0.18); filter: saturate(1); }
    40% { box-shadow: 0 18px 56px rgba(56, 239, 125, 0.45); filter: saturate(1.12); }
    100% { box-shadow: 0 14px 40px rgba(161, 140, 209, 0.18); filter: saturate(1); }
}

.ms-awning {
    display: flex;
    height: 22px;
    transform: translateY(1px);
    background: linear-gradient(90deg, #e84a5f, #ff6b6b, #e84a5f);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.08);
}
.ms-awning-stripe {
    flex: 1;
    min-width: 12px;
    background: repeating-linear-gradient(
        90deg,
        #fff6 0 8px,
        transparent 8px 16px
    );
    opacity: 0.75;
}

.ms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 16px 20px;
}
@media (min-width: 920px) {
    .ms-grid {
        grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 0.95fr);
        gap: 22px;
        padding: 22px 22px 24px;
    }
}

.ms-shelf-card {
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, #fffef8 0%, #faf5ff 100%);
    border: 2px dashed rgba(165, 94, 234, 0.28);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.ms-shelf-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.ms-shelf-ico { display: inline-flex; align-items: center; justify-content: center; }
.ms-shelf-ico .icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--primary);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}
.ms-shelf-title {
    margin: 0;
    font-size: 1.14rem;
    font-weight: 800;
    color: #553c7b;
}
.ms-shelf-hint {
    margin: 0 0 12px;
    font-size: 0.86rem;
    color: #666;
    line-height: 1.55;
}

.ms-shelf-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    min-height: 120px;
}
.ms-shelf-board--nine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 520px) {
    .ms-shelf-board--nine {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ms-wait-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 12px;
    margin: 0;
    color: #888;
    font-weight: 600;
    font-size: 0.98rem;
}
.ms-wait-emoji { display: block; font-size: 2.4rem; margin-bottom: 8px; animation: msFloaty 2.4s ease-in-out infinite; }
.ms-wait-ico {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    animation: msFloaty 2.4s ease-in-out infinite;
}
.ms-wait-ico .icon,
.ms-wait-svg {
    width: 2.4rem;
    height: 2.4rem;
    color: var(--purple);
}
@keyframes msFloaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.ms-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f4f8ff);
    border: 2px solid rgba(84, 160, 255, 0.18);
    box-shadow: 0 6px 16px rgba(84, 160, 255, 0.08);
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s;
}
.ms-product:hover {
    transform: translateY(-4px) rotate(-0.5deg);
    box-shadow: 0 12px 28px rgba(255, 107, 107, 0.15);
}
.ms-product--active {
    border-color: rgba(29, 209, 161, 0.55);
    background: linear-gradient(180deg, #f4fff9, #eefeff);
    box-shadow:
        0 0 0 3px rgba(29, 209, 161, 0.25),
        0 10px 26px rgba(29, 209, 161, 0.18);
}
.ms-product-fizz { animation: msFizzRing 4s ease-in-out infinite; }
@keyframes msFizzRing {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(29, 209, 161, 0.25),
            0 10px 26px rgba(29, 209, 161, 0.18);
        transform: translateY(-2px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.025);
        box-shadow:
            0 0 0 5px rgba(255, 214, 98, 0.42),
            0 16px 36px rgba(29, 209, 161, 0.22);
    }
}

.ms-product-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    margin-bottom: 6px;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.12));
    animation: msEmojiWiggle 3.2s ease-in-out infinite;
}
.ms-product-emoji .icon {
    width: clamp(2rem, 5.5vw, 2.85rem);
    height: clamp(2rem, 5.5vw, 2.85rem);
}
.ms-product--active .ms-product-emoji { animation-duration: 2s; }
@keyframes msEmojiWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-4deg); }
    75% { transform: rotate(4deg); }
}

.ms-product-body { width: 100%; }
.ms-product-name {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 4px;
    line-height: 1.3;
}
.ms-product-price {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--purple);
    background: rgba(165, 94, 234, 0.1);
    padding: 2px 8px;
    border-radius: 999px;
}
.ms-product-badge {
    display: block;
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 700;
}
.ms-product-badge-on {
    color: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.ms-product-badge-on .ms-badge-ico {
    width: 0.98rem;
    height: 0.98rem;
    flex-shrink: 0;
}
.ms-badge-txt { line-height: 1.25; }
.ms-product-badge-tap {
    display: block;
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--purple);
}
.ms-product-badge-qty {
    display: block;
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--green);
}
.ms-product--pickable {
    cursor: pointer;
    font: inherit;
    width: 100%;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
}
.ms-product--pickable:focus-visible {
    outline: 3px solid rgba(165, 94, 234, 0.45);
    outline-offset: 2px;
}
.ms-panel--free-mode .ms-timed-only { display: none !important; }
.ms-free-only { display: none; }
.ms-panel--free-mode .ms-free-only { display: block; }
.ms-receipt-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 10px;
}
.ms-receipt-actions .btn-game {
    flex: 0 0 auto;
    min-width: 9rem;
    font-size: 0.84rem;
    padding: 9px 16px;
}
/* تم رنگی قفسه — نزدیک به رنگ واقعی هر خوراکی */
.ms-product.ms-th-snack-gold {
    background: linear-gradient(165deg, #fffbeb 0%, #ffe566 48%, #f5b942 100%);
    border-color: rgba(245, 166, 35, 0.45);
}
.ms-product.ms-th-snack-gold .ms-product-price { color: #9a6b12; background: rgba(245, 166, 35, 0.18); }
.ms-product.ms-th-snack-orange {
    background: linear-gradient(165deg, #fff6ee 0%, #ffc9a3 50%, #ff9f68 100%);
    border-color: rgba(255, 140, 66, 0.4);
}
.ms-product.ms-th-snack-orange .ms-product-price { color: #b85a1f; background: rgba(255, 140, 66, 0.16); }
.ms-product.ms-th-snack-yellow {
    background: linear-gradient(165deg, #fffef0 0%, #fff59d 55%, #ffd54f 100%);
    border-color: rgba(255, 193, 7, 0.42);
}
.ms-product.ms-th-snack-yellow .ms-product-price { color: #9a7b0a; background: rgba(255, 193, 7, 0.2); }
.ms-product.ms-th-pretzel-amber {
    background: linear-gradient(165deg, #fff8ef 0%, #e8c9a0 55%, #c9956b 100%);
    border-color: rgba(180, 120, 70, 0.38);
}
.ms-product.ms-th-pretzel-amber .ms-product-price { color: #7a4f28; background: rgba(180, 120, 70, 0.15); }
.ms-product.ms-th-choco-brown {
    background: linear-gradient(165deg, #f5ebe3 0%, #c9a07a 50%, #6f4e37 100%);
    border-color: rgba(111, 78, 55, 0.45);
}
.ms-product.ms-th-choco-brown .ms-product-price { color: #4a3224; background: rgba(111, 78, 55, 0.14); }
.ms-product.ms-th-choco-cocoa {
    background: linear-gradient(165deg, #efe6df 0%, #a67c52 48%, #5d4037 100%);
    border-color: rgba(93, 64, 55, 0.42);
}
.ms-product.ms-th-choco-cocoa .ms-product-price { color: #3e2723; background: rgba(93, 64, 55, 0.14); }
.ms-product.ms-th-candy-pink {
    background: linear-gradient(165deg, #fff0f8 0%, #ffb3e6 52%, #ff6ec7 100%);
    border-color: rgba(255, 110, 199, 0.4);
}
.ms-product.ms-th-candy-pink .ms-product-price { color: #ad2f7d; background: rgba(255, 110, 199, 0.16); }
.ms-product.ms-th-candy-rose {
    background: linear-gradient(165deg, #fff5f8 0%, #ffc2d4 55%, #ff8fab 100%);
    border-color: rgba(255, 143, 171, 0.42);
}
.ms-product.ms-th-candy-rose .ms-product-price { color: #b23a5c; background: rgba(255, 143, 171, 0.16); }
.ms-product.ms-th-juice-orange {
    background: linear-gradient(165deg, #fff8f0 0%, #ffc285 50%, #ff8c42 100%);
    border-color: rgba(255, 140, 66, 0.4);
}
.ms-product.ms-th-juice-orange .ms-product-price { color: #c45f12; background: rgba(255, 140, 66, 0.16); }
.ms-product.ms-th-juice-apple {
    background: linear-gradient(165deg, #f4fff0 0%, #c8f0a8 52%, #7cb342 100%);
    border-color: rgba(124, 179, 66, 0.42);
}
.ms-product.ms-th-juice-apple .ms-product-price { color: #4a7a22; background: rgba(124, 179, 66, 0.16); }
.ms-product.ms-th-soda-red {
    background: linear-gradient(165deg, #fff0f0 0%, #ff8a8a 48%, #e53935 100%);
    border-color: rgba(229, 57, 53, 0.42);
}
.ms-product.ms-th-soda-red .ms-product-price { color: #b71c1c; background: rgba(229, 57, 53, 0.14); }
.ms-product.ms-th-soda-lime {
    background: linear-gradient(165deg, #f3fff5 0%, #b9f6ca 50%, #66bb6a 100%);
    border-color: rgba(102, 187, 106, 0.42);
}
.ms-product.ms-th-soda-lime .ms-product-price { color: #2e7d32; background: rgba(102, 187, 106, 0.16); }
.ms-product.ms-th-cookie-tan {
    background: linear-gradient(165deg, #fffaf3 0%, #e8d4b8 55%, #c9a66b 100%);
    border-color: rgba(180, 140, 90, 0.4);
}
.ms-product.ms-th-cookie-tan .ms-product-price { color: #7a5a2a; background: rgba(180, 140, 90, 0.16); }
.ms-product.ms-th-cookie-cream {
    background: linear-gradient(165deg, #fffdf8 0%, #fff3e0 52%, #ffe0b2 100%);
    border-color: rgba(255, 183, 77, 0.38);
}
.ms-product.ms-th-cookie-cream .ms-product-price { color: #a66b12; background: rgba(255, 183, 77, 0.18); }
.ms-product.ms-th-milk-sky {
    background: linear-gradient(165deg, #ffffff 0%, #e3f4ff 55%, #90caf9 100%);
    border-color: rgba(144, 202, 249, 0.45);
}
.ms-product.ms-th-milk-sky .ms-product-price { color: #1565c0; background: rgba(144, 202, 249, 0.2); }
.ms-product.ms-th-milk-blue {
    background: linear-gradient(165deg, #f8fcff 0%, #bbdefb 52%, #64b5f6 100%);
    border-color: rgba(100, 181, 246, 0.42);
}
.ms-product.ms-th-milk-blue .ms-product-price { color: #0d47a1; background: rgba(100, 181, 246, 0.18); }
.ms-product.ms-th-bread-wheat {
    background: linear-gradient(165deg, #fffaf0 0%, #f0d9a8 55%, #d4a574 100%);
    border-color: rgba(180, 130, 80, 0.4);
}
.ms-product.ms-th-bread-wheat .ms-product-price { color: #7a5228; background: rgba(180, 130, 80, 0.15); }
.ms-product.ms-th-bread-golden {
    background: linear-gradient(165deg, #fff8e8 0%, #ffd180 50%, #ffb300 100%);
    border-color: rgba(255, 179, 0, 0.42);
}
.ms-product.ms-th-bread-golden .ms-product-price { color: #9a6f00; background: rgba(255, 179, 0, 0.18); }
.ms-product.ms-th-cake-pink {
    background: linear-gradient(165deg, #fff5fa 0%, #ffcce7 52%, #f48fb1 100%);
    border-color: rgba(244, 143, 177, 0.42);
}
.ms-product.ms-th-cake-pink .ms-product-price { color: #ad1457; background: rgba(244, 143, 177, 0.16); }
.ms-product.ms-th-cake-peach {
    background: linear-gradient(165deg, #fff8f5 0%, #ffccbc 55%, #ffab91 100%);
    border-color: rgba(255, 171, 145, 0.42);
}
.ms-product.ms-th-cake-peach .ms-product-price { color: #bf360c; background: rgba(255, 171, 145, 0.16); }
.ms-product.ms-th-ice-vanilla {
    background: linear-gradient(165deg, #fffffe 0%, #fff9e6 52%, #ffe082 100%);
    border-color: rgba(255, 224, 130, 0.45);
}
.ms-product.ms-th-ice-vanilla .ms-product-price { color: #9a7b0a; background: rgba(255, 224, 130, 0.2); }
.ms-product.ms-th-ice-berry {
    background: linear-gradient(165deg, #fff0f6 0%, #f8bbd0 50%, #ec407a 100%);
    border-color: rgba(236, 64, 122, 0.4);
}
.ms-product.ms-th-ice-berry .ms-product-price { color: #880e4f; background: rgba(236, 64, 122, 0.14); }
.ms-product.ms-th-jelly-purple {
    background: linear-gradient(165deg, #f8f0ff 0%, #d1b3ff 52%, #9c6ade 100%);
    border-color: rgba(156, 106, 222, 0.42);
}
.ms-product.ms-th-jelly-purple .ms-product-price { color: #5e35b1; background: rgba(156, 106, 222, 0.16); }
.ms-product.ms-th-jelly-lime {
    background: linear-gradient(165deg, #f4fff0 0%, #c5e1a5 52%, #8bc34a 100%);
    border-color: rgba(139, 195, 74, 0.42);
}
.ms-product.ms-th-jelly-lime .ms-product-price { color: #558b2f; background: rgba(139, 195, 74, 0.16); }
.ms-product.ms-th-nuts-brown {
    background: linear-gradient(165deg, #f5ebe0 0%, #c8a882 55%, #8d6e63 100%);
    border-color: rgba(141, 110, 99, 0.42);
}
.ms-product.ms-th-nuts-brown .ms-product-price { color: #4e342e; background: rgba(141, 110, 99, 0.14); }
.ms-product.ms-th-nuts-sun {
    background: linear-gradient(165deg, #fffde7 0%, #fff176 52%, #fbc02d 100%);
    border-color: rgba(251, 192, 45, 0.45);
}
.ms-product.ms-th-nuts-sun .ms-product-price { color: #9a7b0a; background: rgba(251, 192, 45, 0.18); }
.ms-product.ms-th-donut-pink {
    background: linear-gradient(165deg, #fff5f9 0%, #ffb8d9 50%, #ff80ab 100%);
    border-color: rgba(255, 128, 171, 0.42);
}
.ms-product.ms-th-donut-pink .ms-product-price { color: #c2185b; background: rgba(255, 128, 171, 0.16); }
.ms-product.ms-th-donut-choco {
    background: linear-gradient(165deg, #efe2d6 0%, #bcaaa4 48%, #6d4c41 100%);
    border-color: rgba(109, 76, 65, 0.42);
}
.ms-product.ms-th-donut-choco .ms-product-price { color: #3e2723; background: rgba(109, 76, 65, 0.14); }
.ms-product.ms-th-samosa-gold {
    background: linear-gradient(165deg, #fffaf0 0%, #ffe082 52%, #ffb300 100%);
    border-color: rgba(255, 179, 0, 0.4);
}
.ms-product.ms-th-samosa-gold .ms-product-price { color: #9a6f00; background: rgba(255, 179, 0, 0.18); }
.ms-product.ms-th-butter-yellow {
    background: linear-gradient(165deg, #fffff5 0%, #fff9c4 55%, #ffee58 100%);
    border-color: rgba(255, 238, 88, 0.5);
}
.ms-product.ms-th-butter-yellow .ms-product-price { color: #9a8f00; background: rgba(255, 238, 88, 0.22); }
.ms-product.ms-th-egg-cream {
    background: linear-gradient(165deg, #fffef8 0%, #fff9c4 52%, #fff176 100%);
    border-color: rgba(255, 241, 118, 0.45);
}
.ms-product.ms-th-egg-cream .ms-product-price { color: #9a8f00; background: rgba(255, 241, 118, 0.2); }
.ms-product.ms-th-honey-amber {
    background: linear-gradient(165deg, #fffaf0 0%, #ffcc80 52%, #ff9800 100%);
    border-color: rgba(255, 152, 0, 0.42);
}
.ms-product.ms-th-honey-amber .ms-product-price { color: #e65100; background: rgba(255, 152, 0, 0.16); }
.ms-product.ms-th-jam-red {
    background: linear-gradient(165deg, #fff0f2 0%, #ef9a9a 50%, #e53935 100%);
    border-color: rgba(229, 57, 53, 0.4);
}
.ms-product.ms-th-jam-red .ms-product-price { color: #b71c1c; background: rgba(229, 57, 53, 0.14); }
.ms-product.ms-th-apple-red {
    background: linear-gradient(165deg, #fff5f5 0%, #ef9a9a 48%, #e53935 100%);
    border-color: rgba(229, 57, 53, 0.4);
}
.ms-product.ms-th-apple-red .ms-product-price { color: #c62828; background: rgba(229, 57, 53, 0.14); }
.ms-product.ms-th-banana-yellow {
    background: linear-gradient(165deg, #fffef5 0%, #fff59d 52%, #ffeb3b 100%);
    border-color: rgba(255, 235, 59, 0.48);
}
.ms-product.ms-th-banana-yellow .ms-product-price { color: #9a8f00; background: rgba(255, 235, 59, 0.22); }
.ms-product.ms-th-citrus-orange {
    background: linear-gradient(165deg, #fff8f0 0%, #ffcc80 52%, #ff9800 100%);
    border-color: rgba(255, 152, 0, 0.42);
}
.ms-product.ms-th-citrus-orange .ms-product-price { color: #e65100; background: rgba(255, 152, 0, 0.16); }
.ms-product.ms-th-cuke-green {
    background: linear-gradient(165deg, #f4fff6 0%, #a5d6a7 52%, #43a047 100%);
    border-color: rgba(67, 160, 71, 0.42);
}
.ms-product.ms-th-cuke-green .ms-product-price { color: #2e7d32; background: rgba(67, 160, 71, 0.16); }
.ms-product.ms-th-tomato-red {
    background: linear-gradient(165deg, #fff0f0 0%, #ef9a9a 50%, #d32f2f 100%);
    border-color: rgba(211, 47, 47, 0.42);
}
.ms-product.ms-th-tomato-red .ms-product-price { color: #b71c1c; background: rgba(211, 47, 47, 0.14); }
.ms-product.ms-th-carrot-orange {
    background: linear-gradient(165deg, #fff8f0 0%, #ffab91 52%, #ff7043 100%);
    border-color: rgba(255, 112, 67, 0.42);
}
.ms-product.ms-th-carrot-orange .ms-product-price { color: #d84315; background: rgba(255, 112, 67, 0.16); }
.ms-product.ms-th-onion-lilac {
    background: linear-gradient(165deg, #faf8ff 0%, #e1d5f0 52%, #b39ddb 100%);
    border-color: rgba(179, 157, 219, 0.42);
}
.ms-product.ms-th-onion-lilac .ms-product-price { color: #5e35b1; background: rgba(179, 157, 219, 0.16); }
.ms-product.ms-th-potato-earth {
    background: linear-gradient(165deg, #f5f0ea 0%, #d7ccc8 52%, #8d6e63 100%);
    border-color: rgba(141, 110, 99, 0.4);
}
.ms-product.ms-th-potato-earth .ms-product-price { color: #4e342e; background: rgba(141, 110, 99, 0.14); }

/* خوانایی متن روی پس‌زمینهٔ روشن یا تیرهٔ هر کارت */
.ms-product--tone-light .ms-product-name,
.ms-product--tone-light .ms-product-price,
.ms-product--tone-light .ms-product-badge-tap {
    color: #1a1a1a;
}
.ms-product--tone-light .ms-product-price {
    background: rgba(0, 0, 0, 0.09);
}
.ms-product--tone-light .ms-product-emoji .icon {
    color: #2d2d2d;
}
.ms-product--tone-light .ms-product-badge-qty {
    color: #0d6b4f;
}

.ms-product--tone-dark .ms-product-name,
.ms-product--tone-dark .ms-product-price,
.ms-product--tone-dark .ms-product-badge-tap {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.ms-product--tone-dark .ms-product-price {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}
.ms-product--tone-dark .ms-product-emoji .icon {
    color: #ffffff;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.ms-product--tone-dark .ms-product-badge-qty {
    color: #b8ffe8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.ms-product--tone-dark.ms-product--active .ms-product-badge-on {
    color: #e8fff5;
}

.ms-shelf-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 10px;
}
.ms-shelf-toolbar .btn-game {
    flex: 0 0 auto;
    min-width: 9rem;
    font-size: 0.84rem;
    padding: 9px 16px;
}

.ms-desk-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ms-receipt-card {
    position: relative;
    border-radius: var(--radius-md);
    padding: 16px 16px 14px;
    background: repeating-linear-gradient(
        -2deg,
        #fffdf7,
        #fffdf7 10px,
        #fffaf0 10px,
        #fffaf0 20px
    );
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.95),
        0 8px 24px rgba(0,0,0,0.07);
}

.ms-receipt-pin {
    position: absolute;
    top: -6px;
    right: calc(50% - 10px);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff8b94, #c03960);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.ms-receipt-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.92rem;
    color: #5c4866;
    margin-bottom: 10px;
}
.ms-receipt-hdr .icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    color: var(--purple);
}

.ms-receipt-lines {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ms-line {
    display: grid;
    grid-template-columns: 32px 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}
.ms-line-remove {
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: rgba(229, 57, 53, 0.12);
    color: #c62828;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
    justify-self: end;
}
.ms-line-remove:hover { background: rgba(229, 57, 53, 0.22); }
.ms-line:last-of-type { border-bottom: none; }

.ms-line-ico {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ms-line-ico .icon {
    width: 22px;
    height: 22px;
    color: var(--primary-dark);
}
.ms-line-name { font-size: 0.86rem; font-weight: 600; color: #444; text-align: right; }
.ms-line-sum {
    font-weight: 800;
    color: var(--purple);
    font-size: 0.88rem;
    direction: ltr;
}

.ms-receipt-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    font-weight: 800;
}
.ms-total-num {
    font-size: clamp(1.35rem, 4vw, 1.95rem);
    color: var(--green);
}

.ms-receipt-ring {
    animation: msReceiptNudge 0.55s cubic-bezier(.34,1.56,.64,1);
}
@keyframes msReceiptNudge {
    from { transform: translateY(4px); opacity: 0.94; }
    to { transform: translateY(0); opacity: 1; }
}

.ms-counter {
    position: relative;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(148,219,253,0.5), rgba(255,188,237,0.45));
}

.ms-counter-glass {
    position: absolute;
    inset: 0;
    border-radius: 17px;
    background: linear-gradient(125deg, rgba(255,255,255,0.65), transparent 40%);
    pointer-events: none;
}

.ms-counter-inner {
    position: relative;
    text-align: center;
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f6fcff);
    border: 1px solid rgba(84, 160, 255, 0.15);
}

.ms-counter-lbl {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 4px;
}

.ms-counter-val {
    display: block;
    font-size: clamp(1.45rem, 4.5vw, 2.1rem);
    font-weight: 900;
    color: #1a936f;
    text-shadow: 0 2px 0 rgba(255,255,255,0.8);
}

.ms-counter-clear {
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: var(--transition);
}
.ms-counter-clear:hover { background: #fff5f5; border-color: #f0a0a0; }

.ms-wallet-card {
    border-radius: var(--radius-md);
    padding: 14px 12px 12px;
    background: linear-gradient(145deg, #fef9ff, #f0fff7);
    border: 2px solid rgba(255, 193, 7, 0.25);
    box-shadow: var(--shadow-sm);
}

.ms-wallet-hdr {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
    font-weight: 800;
    color: #5a4a6d;
    font-size: 0.95rem;
}
.ms-wallet-hdr-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ms-wallet-hdr-main .icon {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    color: var(--yellow-dark);
}
.ms-wallet-sub {
    font-size: 0.72rem;
    font-weight: 600;
    color: #888;
}

.ms-wallet-rows {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.ms-banknote {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 98px;
    padding: 10px 6px 8px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 6px 0 rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.12);
    transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s;
    overflow: hidden;
}
.ms-banknote::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(255,255,255,0.45) 0%, transparent 42%);
    pointer-events: none;
}
.ms-banknote:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 0 rgba(0,0,0,0.1), 0 16px 28px rgba(0,0,0,0.18);
}
.ms-banknote:active { transform: translateY(1px) scale(0.99); }

.ms-bn-amount { font-size: 0.95rem; line-height: 1.2; }
.ms-bn-unit { font-size: 0.68rem; opacity: 0.95; margin-top: 2px; }
.ms-bn-tip {
    margin-top: 6px;
    font-size: 0.62rem;
    font-weight: 600;
    opacity: 0.92;
    line-height: 1.25;
    text-align: center;
    max-width: 100%;
}
.ms-note-bump { animation: msNoteBump 0.32s cubic-bezier(.34,1.56,.64,1); }
@keyframes msNoteBump {
    50% { transform: scale(1.06); }
}

/* رنگ‌های الهام‌گرفته از اسکناس‌های رایج (تقریبی، برای تمرین بچه‌ها) */
.ms-banknote.bn-10k   { background: linear-gradient(145deg, #9e9e9e, #6d4c41); }
.ms-banknote.bn-20k   { background: linear-gradient(145deg, #78909c, #455a64); }
.ms-banknote.bn-50k   { background: linear-gradient(145deg, #66bb6a, #2e7d32); }
.ms-banknote.bn-100k  { background: linear-gradient(145deg, #ab47bc, #6a1b9a); }
.ms-banknote.bn-500k  { background: linear-gradient(145deg, #ffd54f, #f9a825); color: #3e2723; text-shadow: none; }
.ms-banknote.bn-500k .ms-bn-tip,
.ms-banknote.bn-500k .ms-bn-unit { color: #5d4037; opacity: 0.92; text-shadow: none; }
.ms-banknote.bn-1m    { background: linear-gradient(145deg, #26c6da, #00838f); }

.ms-actions-footer {
    margin-top: 12px;
    justify-content: center;
}

.ms-pay-btn {
    position: relative;
    overflow: hidden;
    border-radius: 999px !important;
    padding-inline: 22px !important;
}
.ms-pay-ring {
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: msPaySpin 4s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}
@keyframes msPaySpin {
    to { transform: rotate(360deg); }
}

/* ---------- Leaderboard ---------- */
.tabs {
    display: inline-flex;
    background: white;
    padding: 6px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tabs a {
    padding: 9px 16px;
    border-radius: 999px;
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tabs a .icon { width: 16px; height: 16px; }
.tabs a.active {
    background: linear-gradient(135deg, var(--primary), var(--yellow));
    color: white;
}

.lb-table {
    width: 100%;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}
.lb-table th, .lb-table td {
    padding: 14px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.lb-table th { background: var(--soft); font-weight: 700; }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr.me { background: rgba(255,107,107,0.06); }
.lb-table tr.lb-ellipsis td {
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding: 10px 8px;
  text-align: center;
  color: var(--muted, #888);
  font-size: 1.35rem;
  line-height: 1;
  user-select: none;
}
.lb-ellipsis-dots { letter-spacing: 0.2em; }
.lb-me-tail td:first-child .lb-rank { min-width: 2rem; justify-content: center; }

.lb-table tr.lb-top td:nth-child(2),
.lb-table tr.lb-top td:nth-child(4) {
  font-weight: 800;
  color: #1a1a1a;
}
.lb-table tr.lb-top td:nth-child(4) b { font-weight: 900; }
.lb-table tr.lb-top .lb-rank { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }

.lb-table tr.lb-top-1 {
  background: linear-gradient(90deg, rgba(255, 214, 102, 0.22), rgba(255, 255, 255, 0) 62%);
  box-shadow: inset 3px 0 0 #e6a800;
}
.lb-table tr.lb-top-2 {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.45), rgba(255, 255, 255, 0) 62%);
  box-shadow: inset 3px 0 0 #94a3b8;
}
.lb-table tr.lb-top-3 {
  background: linear-gradient(90deg, rgba(251, 191, 136, 0.35), rgba(255, 255, 255, 0) 62%);
  box-shadow: inset 3px 0 0 #c2410c;
}
.lb-table tr.me.lb-top-1 {
  background: linear-gradient(90deg, rgba(255, 214, 102, 0.2), rgba(255, 107, 107, 0.08) 75%);
}
.lb-table tr.me.lb-top-2 {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.42), rgba(255, 107, 107, 0.07) 75%);
}
.lb-table tr.me.lb-top-3 {
  background: linear-gradient(90deg, rgba(251, 191, 136, 0.32), rgba(255, 107, 107, 0.07) 75%);
}

.lb-rank {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: white;
    font-weight: 800;
}
.lb-rank .icon { width: 22px; height: 22px; color: white; }
.lb-rank.r1 { background: linear-gradient(135deg, #ffd700, #ffa502); }
.lb-rank.r2 { background: linear-gradient(135deg, #b2bec3, #636e72); }
.lb-rank.r3 { background: linear-gradient(135deg, #cd7f32, #8a4b08); }
.lb-rank.r4 { background: linear-gradient(135deg, var(--accent), var(--blue)); }

/* ---------- Auth pages ---------- */
.auth-wrap {
    min-height: calc(100vh - 80px);
    display: grid;
    place-items: center;
    padding-block: 30px;
    padding-inline-start: max(env(safe-area-inset-start, 0px), var(--layout-inline-pad));
    padding-inline-end: max(env(safe-area-inset-end, 0px), var(--layout-inline-pad));
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--yellow), var(--accent), var(--purple), var(--blue));
}
.auth-card .auth-icon {
    width: var(--icon-card-sm); height: var(--icon-card-sm);
    margin: 4px auto 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--yellow));
    color: white;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-md);
}
.auth-card .auth-icon .icon { width: var(--icon-in-card); height: var(--icon-in-card); color: white; }
.auth-card h2 {
    text-align: center;
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
}
.auth-card .lead { text-align: center; color: #666; margin: 0 0 22px; }
.auth-card label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}
.auth-card label .icon { width: 16px; height: 16px; color: var(--primary); }
.auth-card input[type="text"],
.auth-card input[type="number"],
.auth-card input[type="tel"],
.auth-card input[type="password"],
.auth-card textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 2px solid rgba(0,0,0,0.06);
    background: var(--soft);
    font: inherit;
    margin-bottom: 14px;
    transition: var(--transition);
}
.auth-card textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.55;
}
.auth-card input:focus,
.auth-card textarea:focus { outline: none; border-color: var(--accent); background: white; }
.auth-card .alt {
    text-align: center;
    margin-top: 14px;
    color: #777;
}
.auth-card .alt a { color: var(--primary-dark); font-weight: 700; }
.auth-card .hint { color: #888; font-size: 0.85rem; margin: -8px 0 12px; }

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.feature {
    background: white;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature .ico {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    display: grid;
    place-items: center;
    color: white;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}
.feature .ico .icon { width: 30px; height: 30px; color: white; }
.feature h3 { margin: 0 0 6px; }
.feature p  { color: #666; margin: 0; }
.feature.c2 .ico { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.feature.c3 .ico { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.feature.c4 .ico { background: linear-gradient(135deg, var(--green), var(--accent)); }
.feature.c5 .ico { background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.feature.c6 .ico { background: linear-gradient(135deg, var(--blue), var(--purple)); }

.cta-card {
    margin-top: 30px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.cta-card h3 { margin: 0 0 8px; display: inline-flex; align-items: center; gap: 8px; }
.cta-card h3 .icon { color: white; }

/* ---------- Footer (kid-friendly) ---------- */
.footer {
    margin-top: 80px;
    background: linear-gradient(180deg, #fff8f0 0%, #fff1e0 80%, #ffe6cf 100%);
    position: relative;
    padding: 70px 0 22px;
    color: #555;
    overflow: hidden;
}
.footer::before {
    content: "";
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 50px;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 50' preserveAspectRatio='none'><path d='M0,50 C150,5 350,55 600,25 C850,-5 1050,55 1200,25 L1200,50 Z' fill='%23fff8f0'/></svg>");
    background-size: 100% 50px;
    background-repeat: no-repeat;
    transform: translateY(-49px);
    pointer-events: none;
}
.footer .deco-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(2px);
    pointer-events: none;
}
.footer .deco-shape.s1 { width: 120px; height: 120px; bottom: -30px; right: 4%;  background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.footer .deco-shape.s2 { width: 80px;  height: 80px;  top: 30px;     left: 8%;   background: linear-gradient(135deg, var(--accent), var(--blue)); opacity: 0.35; }
.footer .deco-shape.s3 { width: 50px;  height: 50px;  bottom: 80px;  left: 30%;  background: linear-gradient(135deg, var(--purple), var(--primary)); opacity: 0.35; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    position: relative;
    z-index: 2;
}
.footer-brand .fbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--dark);
}
.footer-brand .fbox .brand-logo { width: 44px; height: 44px; }
.footer-brand .fbox small { display: block; color: #888; font-size: 0.72rem; font-weight: 500; }
.footer-brand p {
    margin: 14px 0 0;
    color: #666;
    line-height: 1.85;
    max-width: 320px;
}
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: white;
    display: grid;
    place-items: center;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.footer-social a .icon { width: 20px; height: 20px; }
.footer-social a:hover {
    transform: translateY(-3px);
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--yellow));
}

.footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--dark);
    transition: var(--transition);
}
.footer-phone .icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}
.footer-phone:hover {
    color: var(--primary);
}

.footer-col h4 {
    margin: 0 0 14px;
    font-size: 1rem;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-col h4 .icon { color: var(--primary); width: 16px; height: 16px; }
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    transition: var(--transition);
    font-size: 0.95rem;
}
.footer-col a .icon { color: var(--primary); width: 14px; height: 14px; opacity: 0.7; }
.footer-col a:hover { color: var(--primary-dark); transform: translateX(-2px); }
.footer-col a:hover .icon { opacity: 1; }

.footer-bottom {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px dashed rgba(0,0,0,0.10);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.92rem;
    color: #666;
    position: relative;
    z-index: 2;
}
.footer-bottom .made-with {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-bottom .made-with .icon { color: var(--primary); width: 16px; height: 16px; }
.footer-bottom .copyright {
    flex: 1 1 auto;
    text-align: end;
    line-height: 1.5;
    margin: 0;
}
.footer-bottom a,
.footer-bottom .company-link { color: var(--primary-dark); font-weight: 700; }
.footer-bottom .company-link:hover { text-decoration: underline; }

@media (max-width: 880px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer { padding-top: 56px; }
}
@media (max-width: 540px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { justify-content: center; text-align: center; }
    .footer-bottom .copyright { text-align: center; }
}

.mhfa-footer {
    margin-top: 28px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.65);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    color: #444;
    font-size: 0.92rem;
    position: relative;
    z-index: 2;
}
.mhfa-footer strong { display: block; margin-bottom: 4px; color: var(--dark); }
.mhfa-footer-body { color: #555; }
.mhfa-footer a { color: var(--accent-dark); font-weight: 700; }

/* ---------- Toasts ---------- */
.toast {
    position: fixed;
    inset: auto auto 30px 30px;
    z-index: 60;
    background: white;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(50px);
    opacity: 0;
    transition: var(--transition);
    border-right: 5px solid var(--primary);
    max-width: calc(100vw - 60px);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--primary); }

/* ---------- پیشنهاد معرفی به دوستان (هر چند دور بازی) ---------- */
.hk-share-invite-bar {
    position: fixed;
    z-index: 62;
    left: max(var(--layout-inline-pad), env(safe-area-inset-start, 0px));
    right: max(var(--layout-inline-pad), env(safe-area-inset-end, 0px));
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    max-width: min(560px, calc(100vw - 2 * var(--layout-inline-pad)));
    margin-inline: auto;
    transform: translateY(calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(.2,.8,.2,1), opacity 0.35s ease;
}
.hk-share-invite-bar.hk-share-invite-bar--visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.hk-share-invite-bar[hidden] {
    display: none !important;
}
.hk-share-invite-inner {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,248,240,0.98));
    border: 1px solid rgba(255, 107, 107, 0.28);
    box-shadow: var(--shadow-lg);
}
.hk-share-invite-copy {
    flex: 1;
    min-width: 180px;
    text-align: right;
}
.hk-share-invite-copy strong {
    display: block;
    font-size: 0.98rem;
    color: var(--dark);
    margin-bottom: 4px;
}
.hk-share-invite-sub {
    font-size: 0.84rem;
    line-height: 1.45;
    color: #555;
}
.hk-share-invite-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dark);
    display: grid;
    place-items: center;
    transition: var(--transition);
}
.hk-share-invite-close:hover {
    background: rgba(255, 107, 107, 0.18);
    color: var(--primary-dark);
}
.hk-share-invite-action {
    flex-shrink: 0;
    white-space: nowrap;
    padding-inline: 16px;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hk-share-invite-action .icon {
    width: 18px;
    height: 18px;
}

/* ورق انتخاب شبکه (موبایل) — اشتراک دعوت */
.hk-share-sheet {
    align-items: flex-end;
    padding: 0;
    z-index: 190;
}
.hk-share-sheet .hk-share-sheet-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    padding: 22px 18px max(20px, env(safe-area-inset-bottom));
    animation: hkShareSheetIn 0.32s cubic-bezier(0.22, 0.82, 0.24, 1);
    text-align: center;
}
@keyframes hkShareSheetIn {
    from { transform: translateY(104%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.hk-share-sheet-hint {
    margin: 0 0 16px;
    font-size: 0.89rem;
    line-height: 1.55;
    color: #575757;
}
.hk-share-sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.hk-share-sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    background: rgba(247, 248, 250, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: inherit;
    text-decoration: none;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.hk-share-sheet-item .hk-share-sheet-label {
    line-height: 1.2;
}
.hk-share-sheet-item:hover {
    border-color: rgba(255, 107, 107, 0.35);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.hk-share-sheet-item:active {
    transform: scale(0.97);
}
.hk-share-sheet-item--btn {
    appearance: none;
    width: 100%;
    text-align: center;
}
.hk-share-sheet-sublbl {
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
}
.hk-share-sheet-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}
.hk-share-sheet-icon .icon {
    width: 24px;
    height: 24px;
    color: #fff;
}
.hk-share-sheet-icon--wa {
    background: linear-gradient(145deg, #25d366, #128c43);
}
.hk-share-sheet-icon--tg {
    background: linear-gradient(145deg, #2aabee, #1d7dbf);
}
.hk-share-sheet-icon--sms {
    background: linear-gradient(145deg, #ff9770, var(--primary));
}
.hk-share-sheet-icon--mail {
    background: linear-gradient(145deg, #ea6969, var(--yellow-dark));
}
.hk-share-sheet-icon--eitaa {
    background: linear-gradient(145deg, #00b87a, #008f5e);
}
.hk-share-sheet-icon--bale {
    background: linear-gradient(145deg, #2bb3f0, #0d7bb8);
}
.hk-share-sheet-icon--more {
    background: linear-gradient(145deg, #6366f1, #8b5cf6);
}
.hk-share-sheet-icon--copy {
    background: linear-gradient(145deg, #4ecdc4, #2d9edb);
}

body.hk-share-sheet-open {
    overflow: hidden;
}

@media (max-width: 520px) {
    .hk-share-invite-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .hk-share-invite-copy {
        text-align: center;
    }
    .hk-share-invite-close {
        position: absolute;
        top: 8px;
        left: 8px;
    }
    .hk-share-invite-inner {
        position: relative;
        padding-top: 40px;
    }
}

/* ---------- PWA install bar ---------- */
.pwa-install-bar {
    position: fixed;
    z-index: 66;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: max(var(--layout-inline-pad), env(safe-area-inset-start, 0px));
    right: max(var(--layout-inline-pad), env(safe-area-inset-end, 0px));
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 107, 107, 0.22);
    max-width: min(520px, calc(100vw - 2 * var(--layout-inline-pad) - env(safe-area-inset-start, 0px) - env(safe-area-inset-end, 0px)));
    margin-inline: auto;
}
.pwa-install-bar[hidden] {
    display: none !important;
}
.pwa-install-bar__icon {
    flex-shrink: 0;
    border-radius: 11px;
    border: 2px solid rgba(78, 205, 196, 0.35);
}
.pwa-install-bar__copy {
    flex: 1;
    min-width: 160px;
}
.pwa-install-bar__copy strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}
.pwa-install-bar__copy span {
    display: block;
    font-size: 0.875rem;
    opacity: 0.85;
    line-height: 1.45;
}
.pwa-install-bar__action {
    flex-shrink: 0;
    white-space: nowrap;
}
.pwa-install-bar__dismiss {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pwa-install-bar__dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
}
.pwa-install-bar--ios .pwa-install-bar__action {
    display: none;
}

/* ---------- Animations ---------- */
@keyframes pop {
    0%   { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.pop { animation: pop 180ms ease forwards; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-6px); }
    40%     { transform: translateX(6px); }
    60%     { transform: translateX(-4px); }
    80%     { transform: translateX(4px); }
}
.shake { animation: shake 350ms ease; }

@keyframes confetti {
    0%   { transform: translateY(0) rotate(0); opacity: 1; }
    100% { transform: translateY(360px) rotate(720deg); opacity: 0; }
}

/* ---------- Forms ---------- */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    font-family: inherit;
}
input[type="text"], input[type="number"], input[type="password"], input[type="tel"], select, textarea {
    font: inherit;
}

/* ---------- Error pages ---------- */
.error-stage {
    min-height: 70vh;
    display: grid;
    place-items: center;
    text-align: center;
}
.error-stage .big {
    font-size: clamp(5rem, 18vw, 11rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

/* ---------- Schools / partnership ---------- */
/* ---------- Grade picker (schools index) ---------- */
.grade-picker {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    box-shadow: none;
}
.grade-row {
    padding: 22px 24px 20px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    box-shadow: 0 2px 14px rgba(31, 38, 135, 0.06);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.grade-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(31, 38, 135, 0.1);
    border-color: rgba(78, 205, 196, 0.22);
}
@media (prefers-reduced-motion: reduce) {
    .grade-row { transition: none; }
    .grade-row:hover { transform: none; }
}
.grade-row:last-child { margin-bottom: 0; }
.grade-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.grade-row-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}
.grade-row-title:hover .grade-meta strong { color: var(--primary); }
.grade-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--yellow));
}
.grade-row.g1 .grade-num { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.grade-row.g2 .grade-num { background: linear-gradient(135deg, var(--accent), var(--blue)); }
.grade-row.g3 .grade-num { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.grade-row.g4 .grade-num { background: linear-gradient(135deg, var(--green), var(--accent)); }
.grade-row.g5 .grade-num { background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.grade-row.g6 .grade-num { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.grade-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.grade-meta strong {
    font-size: 1.02rem;
    transition: color 0.2s ease;
}
.grade-meta-sub {
    font-size: 0.82rem;
    color: #888;
    line-height: 1.45;
}
.grade-row-all {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #999;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--soft);
    transition: var(--transition);
}
.grade-row-all:hover {
    color: var(--primary);
    background: rgba(255, 107, 107, 0.1);
}
.grade-row-all .icon { width: 14px; height: 14px; }
.grade-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-inline-start: 54px;
}
.grade-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 5px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
    font-size: 0.76rem;
    font-weight: 600;
    color: #555;
    line-height: 1.2;
    max-width: 100%;
}
.grade-chip-ico {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: white;
}
.grade-chip-ico .icon { width: 13px; height: 13px; }
.grade-chip-ico.color-1 { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.grade-chip-ico.color-2 { background: linear-gradient(135deg, var(--accent), var(--blue)); }
.grade-chip-ico.color-3 { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.grade-chip-ico.color-4 { background: linear-gradient(135deg, var(--green), var(--accent)); }
.grade-chip-ico.color-5 { background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.grade-chip-ico.color-6 { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.grade-chip-ico.color-7 { background: linear-gradient(135deg, var(--primary), var(--purple)); }
.grade-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.grade-chip.free {
    cursor: pointer;
    transition: var(--transition);
}
.grade-chip.free:hover {
    border-color: rgba(46, 213, 115, 0.35);
    background: rgba(46, 213, 115, 0.08);
    color: #128f72;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 213, 115, 0.12);
}
.grade-chip.locked {
    opacity: 0.52;
    cursor: default;
    background: transparent;
    border-style: dashed;
}
.grade-chip-lock {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    opacity: 0.7;
}
@media (max-width: 640px) {
    .grade-row-head { flex-direction: column; gap: 10px; }
    .grade-row-all { align-self: flex-start; }
    .grade-chips { padding-inline-start: 0; }
}

.grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.grade-card {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.grade-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--yellow));
}
.grade-card.g1::before { background: linear-gradient(90deg, var(--primary), var(--yellow)); }
.grade-card.g2::before { background: linear-gradient(90deg, var(--accent), var(--blue)); }
.grade-card.g3::before { background: linear-gradient(90deg, var(--purple), var(--primary)); }
.grade-card.g4::before { background: linear-gradient(90deg, var(--green), var(--accent)); }
.grade-card.g5::before { background: linear-gradient(90deg, var(--yellow), var(--primary)); }
.grade-card.g6::before { background: linear-gradient(90deg, var(--blue), var(--purple)); }
.grade-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.grade-card .num {
    width: var(--icon-card-md);
    height: var(--icon-card-md);
    border-radius: 18px;
    color: white;
    display: grid;
    place-items: center;
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 900;
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, var(--primary), var(--yellow));
}
.grade-card.g1 .num { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.grade-card.g2 .num { background: linear-gradient(135deg, var(--accent), var(--blue)); }
.grade-card.g3 .num { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.grade-card.g4 .num { background: linear-gradient(135deg, var(--green), var(--accent)); }
.grade-card.g5 .num { background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.grade-card.g6 .num { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.grade-card h3 { margin: 0; }
.grade-card p  { color: #666; flex: 1; margin: 0; }
.grade-card .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
}
.grade-card .stats .badge {
    background: var(--soft);
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.grade-card .stats .badge.free   { background: rgba(46,213,115,0.12); color: #1dd1a1; }
.grade-card .stats .badge.locked { background: rgba(254,202,87,0.18); color: #cc8400; }
.grade-card .open {
    margin-top: auto;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 14px;
    background: var(--soft);
    font-weight: 700;
    transition: var(--transition);
}
.grade-card:hover .open { background: var(--primary); color: white; }

.lesson-card {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.04);
}
.lesson-card .tile {
    width: var(--icon-card-md);
    height: var(--icon-card-md);
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: white;
    box-shadow: var(--shadow-sm);
}
.lesson-card .tile .icon { width: 28px; height: 28px; color: white; }
.lesson-card.color-1 .tile { background: linear-gradient(135deg, var(--primary), var(--yellow)); }
.lesson-card.color-2 .tile { background: linear-gradient(135deg, var(--accent), var(--blue)); }
.lesson-card.color-3 .tile { background: linear-gradient(135deg, var(--purple), var(--primary)); }
.lesson-card.color-4 .tile { background: linear-gradient(135deg, var(--green), var(--accent)); }
.lesson-card.color-5 .tile { background: linear-gradient(135deg, var(--yellow), var(--primary)); }
.lesson-card.color-6 .tile { background: linear-gradient(135deg, var(--blue), var(--purple)); }
.lesson-card.color-7 .tile { background: linear-gradient(135deg, var(--primary), var(--purple)); }
.lesson-card h3 { margin: 0; font-size: 1.08rem; }
.lesson-card p  { color: #666; flex: 1; margin: 0; font-size: 0.92rem; }
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.lesson-card .badge-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.lesson-card .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}
.lesson-card .badge.free    { background: rgba(46,213,115,0.14); color: #128f72; }
.lesson-card .badge.premium { background: linear-gradient(135deg, var(--yellow), var(--primary)); color: white; }

.lesson-card .open {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--soft);
    font-weight: 700;
    transition: var(--transition);
}
.lesson-card.locked .open {
    background: linear-gradient(135deg, var(--yellow), var(--primary));
    color: white;
}
.lesson-card:not(.locked):hover .open { background: var(--primary); color: white; }

.lesson-card.locked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 30%, rgba(254,202,87,0.10) 100%);
    pointer-events: none;
}
.lesson-card .lock-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--yellow), var(--primary));
    color: white;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}
.lesson-card .lock-badge .icon { width: 18px; height: 18px; color: white; }

.lesson-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.lesson-skills-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #888;
    width: 100%;
}
.lesson-skill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(78, 205, 196, 0.14);
    color: #128f72;
    border: 1px solid rgba(78, 205, 196, 0.25);
}
.lesson-modern-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.lesson-modern {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(165, 94, 234, 0.1);
    color: #7c3aed;
}

.grade-age {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}
.grade-age-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-weight: 700;
    font-size: 0.92rem;
}
.grade-age-badge .icon { width: 16px; height: 16px; }

.schools-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 4px;
}
.schools-stats-inline { margin-top: 10px; }
.schools-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.9rem;
}
.schools-stat b { font-size: 1.1rem; }
.schools-stat.premium { background: rgba(254, 202, 87, 0.22); }

.schools-seo-block {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.04), rgba(78, 205, 196, 0.06));
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* On-page SEO block below each play/* game panel */
.game-seo {
    margin-top: 32px;
    margin-bottom: 8px;
    padding: 0 4px 8px;
    max-width: 960px;
    margin-inline: auto;
}
.game-seo__header {
    text-align: center;
    margin-bottom: 20px;
}
.game-seo__eyebrow {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary, #e17055);
    text-transform: none;
}
.game-seo__header h2 {
    margin: 0 0 12px;
    font-size: clamp(1.2rem, 3.5vw, 1.55rem);
    line-height: 1.45;
    color: var(--dark);
    font-weight: 800;
}
.game-seo__lead {
    margin: 0 auto;
    max-width: 42rem;
    font-size: 1.02rem;
    line-height: 1.85;
    color: #4a4a4a;
}
.game-seo__intro.card-surface {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
}
.game-seo__intro p {
    margin: 0;
    line-height: 1.9;
    color: #444;
    font-size: 0.97rem;
}
.game-seo__tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(78, 205, 196, 0.12);
    border: 1px solid rgba(78, 205, 196, 0.25);
    font-size: 0.92rem;
    line-height: 1.75;
    color: #2d5a56;
}
.game-seo__tip .icon {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 2px;
    color: #3d9a92;
}
.game-seo__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.game-seo-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 18px 18px 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.game-seo-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.4;
}
.game-seo-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(78, 205, 196, 0.18));
    flex-shrink: 0;
}
.game-seo-card__icon .icon {
    width: 1.1rem;
    height: 1.1rem;
    color: #c45c4a;
}
.game-seo-card__list {
    margin: 0;
    padding-inline-start: 1.15rem;
    list-style: disc;
}
.game-seo-card__list li {
    margin-bottom: 7px;
    line-height: 1.75;
    color: #555;
    font-size: 0.9rem;
}
.game-seo-card__list li:last-child {
    margin-bottom: 0;
}
.game-seo__section-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
}
.game-seo__grades {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08), rgba(255, 255, 255, 0.9));
    border-radius: var(--radius-md);
    border: 1px solid rgba(78, 205, 196, 0.2);
}
.game-seo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.game-seo-chips li {
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.86rem;
    color: #444;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.game-seo-callouts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.game-seo-callout {
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.game-seo-callout--family {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.06), #fff);
}
.game-seo-callout--school {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), #fff);
}
.game-seo-callout__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}
.game-seo-callout__title .icon {
    width: 1rem;
    height: 1rem;
}
.game-seo-callout p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #555;
}
.game-seo-faq {
    margin-bottom: 20px;
    padding: 20px 22px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
}
.game-seo-faq__list {
    margin: 0;
}
.game-seo-faq__item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.game-seo-faq__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.game-seo-faq__item:first-child {
    padding-top: 4px;
}
.game-seo-faq__item dt {
    margin: 0 0 6px;
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--dark);
    line-height: 1.5;
}
.game-seo-faq__item dd {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #555;
}
.game-seo__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    padding-top: 8px;
}
.game-seo__nav-link {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--primary, #e17055);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.game-seo__nav-link:hover {
    background: rgba(225, 112, 85, 0.08);
    border-color: rgba(225, 112, 85, 0.35);
    text-decoration: none;
}
@media (max-width: 768px) {
    .game-seo__grid,
    .game-seo-callouts {
        grid-template-columns: 1fr;
    }
    .game-seo {
        margin-top: 24px;
        padding: 0 2px;
    }
    .game-seo__intro.card-surface,
    .game-seo-faq {
        padding: 16px;
    }
}
@media (max-width: 480px) {
    .game-seo__nav {
        flex-direction: column;
        align-items: stretch;
    }
    .game-seo__nav-link {
        text-align: center;
    }
}
.schools-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.schools-feature {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.schools-feature h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--dark);
}
.schools-feature p {
    margin: 0;
    color: #666;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* Schools hero */
.schools-hero {
    background: linear-gradient(135deg, #2f3542 0%, #4ecdc4 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    align-items: center;
    box-shadow: var(--shadow-md);
}
.schools-hero::after {
    content: "";
    position: absolute;
    width: 360px; height: 360px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -160px; left: -90px;
}
.schools-hero h1 { margin: 0 0 12px; font-size: clamp(1.6rem, 3.2vw, 2.6rem); display: inline-flex; align-items: center; gap: 10px; }
.schools-hero p  { margin: 0; opacity: 0.92; max-width: 560px; }
.schools-hero .ico-big {
    width: 96px; height: 96px;
    border-radius: 26px;
    background: rgba(255,255,255,0.18);
    display: grid;
    place-items: center;
    margin: 0 auto;
    backdrop-filter: blur(6px);
}
.schools-hero .ico-big .icon { width: 52px; height: 52px; color: white; }
@media (max-width: 880px) {
    .schools-hero { grid-template-columns: 1fr; text-align: center; padding: 32px 22px; }
    .schools-hero .ico-big { width: 80px; height: 80px; }
    .schools-hero .ico-big .icon { width: 44px; height: 44px; }
}

/* Phone CTA card — shown wherever the user must call to unlock */
.phone-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-md);
    border: 2px solid rgba(255, 107, 107, 0.14);
    color: var(--dark);
    margin: 18px 0;
    transition: var(--transition);
}
.phone-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.phone-cta .pc-icon {
    width: var(--icon-card-sm); height: var(--icon-card-sm);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--yellow));
    display: grid; place-items: center;
    color: white;
    flex-shrink: 0;
}
.phone-cta .pc-icon .icon { width: 28px; height: 28px; color: white; }
.phone-cta .pc-body { flex: 1; }
.phone-cta .pc-body .lbl {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 4px;
}
.phone-cta .pc-body .num {
    font-size: clamp(1.3rem, 3vw, 1.7rem);
    font-weight: 900;
    direction: ltr;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1px;
}

.phone-cta.big {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 28px;
}
.phone-cta.big .pc-icon { width: 68px; height: 68px; }
.phone-cta.big .pc-icon .icon { width: 36px; height: 36px; }

/* Unlock / upsell page */
.unlock-stage {
    min-height: 60vh;
    display: grid;
    place-items: center;
    padding-block: 30px;
}
.unlock-card {
    max-width: 520px;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.unlock-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: linear-gradient(90deg, var(--yellow), var(--primary), var(--purple));
}
.unlock-card .unlock-icon {
    width: var(--icon-card-sm); height: var(--icon-card-sm);
    margin: 4px auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--yellow), var(--primary));
    display: grid; place-items: center;
    color: white;
    box-shadow: var(--shadow-md);
}
.unlock-card .unlock-icon .icon { width: var(--icon-in-card); height: var(--icon-in-card); color: white; }
.unlock-card h1,
.unlock-card h2 {
    margin: 0 0 6px;
    font-size: clamp(1.05rem, 3.5vw, 1.35rem);
    font-weight: 800;
    line-height: 1.35;
}
.unlock-card p  { color: #555; margin: 6px 0; font-size: 0.94rem; line-height: 1.65; }

.unlock-card .unlock-article {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
}
.unlock-card .unlock-article-title {
    font-size: 1.05rem;
    margin: 0 0 12px;
    font-weight: 800;
    color: #444;
}
.unlock-card .unlock-article p {
    color: #4a4a4a;
    margin: 0 0 12px;
    font-size: 0.92rem;
    line-height: 1.85;
}
.unlock-card .unlock-article p:last-child { margin-bottom: 0; }

/* Partner trial play — same long-form copy as unlock (visible for SEO + parents) */
.partner-page .partner-teach-article {
    margin: 0 0 22px;
    padding: 22px 22px 20px;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-sm);
    text-align: right;
}
.partner-page .partner-teach-article-title {
    font-size: 1.05rem;
    margin: 0 0 12px;
    font-weight: 800;
    color: #444;
}
.partner-page .partner-teach-article p {
    color: #4a4a4a;
    margin: 0 0 12px;
    font-size: 0.92rem;
    line-height: 1.85;
}
.partner-page .partner-teach-article p:last-child { margin-bottom: 0; }

/* Partnership plans */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.plan {
    background: white;
    border-radius: var(--radius-lg);
    padding: 26px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.plan h3 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.plan .lead { color: #666; font-size: 0.95rem; margin: 0; }
.plan ul { padding: 0; margin: 4px 0 0; list-style: none; display: grid; gap: 8px; }
.plan ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.96rem;
    color: #444;
}
.plan ul li .icon { color: var(--green); width: 18px; height: 18px; flex-shrink: 0; }
.plan .price {
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--primary-dark);
}
.plan .price small { color: #888; font-size: 0.78rem; font-weight: 500; }
.plan.featured {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary), var(--purple)) border-box;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.plan.featured .ribbon {
    position: absolute;
    top: 14px;
    left: -36px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 40px;
    transform: rotate(-45deg);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 880px) {
    .navbar nav {
        position: fixed;
        top: calc(var(--navbar-height) + env(safe-area-inset-top, 0px) + 6px);
        right: 12px;
        left: 12px;
        max-height: calc(100vh - var(--navbar-height) - env(safe-area-inset-top, 0px) - 20px);
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        background: white;
        padding: 12px;
        border-radius: var(--radius-md);
        border: 1px solid rgba(0,0,0,0.06);
        box-shadow: var(--shadow-lg);
        z-index: 110;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: var(--transition);
    }
    .navbar nav a { font-size: 1rem; padding: 12px 14px; justify-content: flex-start; }
    .navbar nav a.user-pill {
        max-width: 100%;
        overflow: hidden;
    }
    .navbar nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .mobile-toggle { display: grid; place-items: center; }
    body.nav-open { overflow: hidden; }
    .float-score { top: auto; bottom: 16px; left: 12px; z-index: 25; font-size: 0.88rem; padding: 7px 14px; }
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 95;
    backdrop-filter: blur(2px);
}
.nav-backdrop[hidden] { display: none !important; }

.brand-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(255,107,107,0.25));
}
.navbar .nav-logout {
    padding: 7px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Kid-friendly hero ---------- */
.hero-kids { padding-top: 40px; }
.hero-kicker {
    display: inline-block;
    margin: 0 0 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 107, 107, 0.12);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.88rem;
}
.hero-kicker--ico {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero-kicker--ico .icon {
    width: 1.05em;
    height: 1.05em;
    flex-shrink: 0;
    color: var(--primary);
}
.hero-title-sm {
    font-size: clamp(1.55rem, 4vw, 2.35rem) !important;
    line-height: 1.25 !important;
}
.hero-lead { font-size: 1.02rem !important; max-width: 520px; }
.stat-card .lbl { font-size: 0.86rem; }
.stat-pop {
    border: 2px solid rgba(255, 107, 107, 0.18);
    background: linear-gradient(180deg, #fff, #fff8f8);
}

.games-hub-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255,107,107,0.08), rgba(78,205,196,0.12));
    box-shadow: var(--shadow-sm);
}
.games-hub-hero h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
.games-hub-hero .lead { margin: 0; color: #555; max-width: 620px; }
.gh-emoji img { border-radius: 18px; box-shadow: var(--shadow-md); }

.games-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 22px;
}
.games-hub-search {
    flex: 1 1 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    min-height: 52px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.games-hub-search:focus-within {
    border-color: rgba(255, 107, 107, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}
.games-hub-search .icon { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.games-hub-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    min-width: 0;
    outline: none;
    padding: 12px 0;
}
.games-hub-search-input::placeholder { color: #999; }
.games-hub-search-clear {
    border: none;
    background: var(--soft);
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.games-hub-search-clear .icon { width: 16px; height: 16px; }
.games-hub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.games-hub-filter {
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    color: #444;
}
.games-hub-filter:hover { border-color: rgba(255, 107, 107, 0.35); color: var(--primary); }
.games-hub-filter.is-active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.games-hub-list-head { margin-bottom: 8px; }
.games-hub-empty[hidden] {
    display: none !important;
}
.games-hub-empty:not([hidden]) {
    display: flex;
    text-align: center;
    padding: 28px 16px;
    color: #666;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    font-weight: 600;
}
.games-hub-empty .icon { width: 22px; height: 22px; color: var(--primary); }
.game-card.game-card--hidden,
.game-card[hidden] { display: none !important; }
.game-grid--empty { min-height: 0; }
.games-hub-section-title {
    grid-column: 1 / -1;
    margin: 18px 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.games-hub-section-title:first-child { margin-top: 0; }
.games-hub-section-title[hidden] { display: none !important; }
.section-sub--ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.section-sub--ico .icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    color: var(--primary);
}

/* ---------- About page ---------- */
.about-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 36px;
    align-items: center;
    padding: 20px 0 10px;
}
.about-special-head,
.about-grid-centered { text-align: center; }
.about-grid-centered {
    justify-items: center;
    max-width: 980px;
    margin-inline: auto;
}
.about-grid-centered .feature { text-align: center; }
.about-grid-centered .feature .ico { margin-inline: auto; }

.story-timeline {
    position: relative;
    max-width: 900px;
    margin: 32px auto 0;
    padding: 8px 0;
}
.story-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 50%;
    width: 4px;
    transform: translateX(50%);
    background: linear-gradient(180deg, var(--primary), var(--accent), var(--purple));
    border-radius: 4px;
    opacity: 0.35;
}
.story-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
    align-items: center;
}
.story-item.left .story-card { grid-column: 1; }
.story-item.left .story-dot { grid-column: 2; justify-self: start; }
.story-item.right .story-card { grid-column: 2; }
.story-item.right .story-dot { grid-column: 1; justify-self: end; }
.story-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--primary);
    box-shadow: 0 0 0 6px rgba(255,107,107,0.15);
    z-index: 1;
}
.story-dot--coral { border-color: var(--primary); box-shadow: 0 0 0 6px rgba(255,107,107,0.15); }
.story-dot--teal { border-color: var(--accent); box-shadow: 0 0 0 6px rgba(78,205,196,0.18); }
.story-dot--gold { border-color: var(--yellow-dark); box-shadow: 0 0 0 6px rgba(254,202,87,0.25); }
.story-dot--spark {
    border-color: var(--purple);
    box-shadow: 0 0 0 6px rgba(165,94,234,0.2), 0 0 14px rgba(255,107,107,0.35);
    animation: story-pulse 2.4s ease-in-out infinite;
}
@keyframes story-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
.story-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    text-align: right;
    border: 1px solid transparent;
    transition: transform var(--transition), box-shadow var(--transition);
}
.story-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.story-card--coral { background: linear-gradient(135deg, #fff, #fff5f5); border-color: rgba(255,107,107,0.12); }
.story-card--teal { background: linear-gradient(135deg, #fff, #f0fffe); border-color: rgba(78,205,196,0.15); }
.story-card--gold { background: linear-gradient(135deg, #fff, #fffbeb); border-color: rgba(254,202,87,0.2); }
.story-card.featured,
.story-card--featured {
    border: 2px solid rgba(165,94,234,0.25);
    background: linear-gradient(135deg, #fff8f0 0%, #fff 40%, #f3eeff 100%);
    box-shadow: 0 8px 28px rgba(165,94,234,0.12);
}
.story-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.story-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
}
.story-icon .icon { width: 22px; height: 22px; }
.story-icon--coral { background: rgba(255,107,107,0.15); color: var(--primary-dark); }
.story-icon--teal { background: rgba(78,205,196,0.18); color: var(--accent-dark); }
.story-icon--gold { background: rgba(254,202,87,0.25); color: #c97a00; }
.story-icon--spark {
    background: linear-gradient(135deg, rgba(255,107,107,0.2), rgba(165,94,234,0.2));
    color: var(--purple);
}
.story-year {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-dark);
    background: rgba(255,107,107,0.1);
    padding: 4px 10px;
    border-radius: 999px;
}
.story-year--now {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    box-shadow: 0 4px 14px rgba(165,94,234,0.3);
    padding: 5px 14px;
    font-size: 0.88rem;
}
.story-year-inline {
    display: inline-block;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    padding: 2px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(165,94,234,0.25);
    vertical-align: baseline;
}
.story-tag {
    display: inline;
    font-weight: 700;
    color: var(--accent-dark);
    background: rgba(78,205,196,0.12);
    padding: 1px 6px;
    border-radius: 6px;
}
.story-badge {
    display: inline-block;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--yellow-dark), #ff9f43);
    padding: 2px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(240,165,0,0.3);
}
.story-num {
    font-weight: 800;
    color: var(--primary-dark);
    background: rgba(255,107,107,0.12);
    padding: 1px 8px;
    border-radius: 6px;
}
.story-em {
    font-style: normal;
    font-weight: 700;
    color: var(--purple);
}
.story-celebrate {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-inline-start: 4px;
}
.story-celebrate .icon {
    width: 1.15em;
    height: 1.15em;
    color: var(--yellow-dark);
}
.story-emoji { font-size: 1.1em; margin-inline-start: 2px; }
.story-card h3 { margin: 0 0 10px; font-size: 1.1rem; }
.story-card p { margin: 0; color: #555; line-height: 1.75; }
.story-card p:not(.story-sign) {
    text-align: justify;
    text-justify: inter-word;
}
.story-sign {
    margin-top: 14px !important;
    font-weight: 400;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}
.story-sign .icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
}
.story-sign strong {
    font-weight: 700;
}

/* ---------- Leaderboard ---------- */
.lb-page .lb-hero { text-align: center; margin-bottom: 8px; }
.lb-page .lb-hero .lead { color: #666; margin: 0 0 16px; }
.lb-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin-bottom: 20px;
}
.lb-hero-bar .lb-hero-main-tabs.tabs {
  margin-bottom: 0;
  justify-content: center;
}

.lb-kind-open-btn.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #444;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.lb-kind-open-btn.btn:hover {
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--primary-dark);
}
.lb-kind-open-btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.lb-kind-open-label {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .lb-kind-open-label { max-width: 6.5rem; }
}

.lb-kind-dialog {
  border: none;
  border-radius: var(--radius-md);
  padding: 0;
  max-width: 400px;
  width: min(400px, calc(100vw - 32px));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}
.lb-kind-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.lb-kind-dialog-sheet {
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 540px);
}
.lb-kind-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--soft);
  flex-shrink: 0;
}
.lb-kind-dialog-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}
.lb-kind-dialog-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: #64748b;
  border-radius: 8px;
}
.lb-kind-dialog-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0f172a;
}
.lb-kind-dialog-list {
  padding: 12px 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lb-kind-dialog-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  text-align: start;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lb-kind-dialog-link:hover {
  border-color: rgba(0, 0, 0, 0.14);
  background: #fafafa;
}
.lb-kind-dialog-link.is-active {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #fff;
  border-color: transparent;
}

.lb-table-wrap { overflow-x: auto; border-radius: var(--radius-md); }
.lb-empty { padding: 30px !important; text-align: center; }

/* ---------- User avatars & profile popup ---------- */
.hk-avatar {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
    flex-shrink: 0;
}
.hk-avatar--sm { width: 32px; height: 32px; border: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); }
.hk-avatar--lg { width: 80px; height: 80px; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.hk-avatar--profile { border: 3px solid var(--primary); box-shadow: var(--shadow-sm); }

.lb-name-cell { min-width: 140px; }
.lb-table tbody tr.lb-profile-row {
    cursor: pointer;
    transition: background var(--transition);
}
.lb-table tbody tr.lb-profile-row:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}
.lb-table tbody tr.lb-profile-row:hover td {
    background: rgba(255, 107, 107, 0.05);
}
.lb-table tbody tr.lb-profile-row.me:hover td {
    background: rgba(255, 107, 107, 0.09);
}
.lb-user-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px;
    margin: -4px -6px;
    font: inherit;
    color: inherit;
    text-align: right;
    max-width: 100%;
}
.lb-user-name { font-weight: 600; }

.avatar-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
@media (max-width: 520px) {
    .avatar-picker { grid-template-columns: repeat(3, 1fr); }
}
.avatar-pick { text-align: center; cursor: pointer; }
.avatar-pick input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-pick-img {
    display: block;
    padding: 6px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    background: var(--soft);
    transition: var(--transition);
}
.avatar-pick-img img { display: block; margin: 0 auto; border-radius: 50%; }
.avatar-pick-label { display: block; font-size: 0.75rem; color: #666; margin-top: 4px; }
.avatar-pick input:checked + .avatar-pick-img {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.08);
    box-shadow: var(--shadow-sm);
}
.avatar-pick input:focus-visible + .avatar-pick-img { outline: 2px solid var(--accent); outline-offset: 2px; }

.auth-wrap--profile { align-items: flex-start; }
.auth-card--profile { max-width: 440px; }

.auth-profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 8px;
}
.auth-profile-hero h2 { margin: 12px 0 4px; }
.auth-profile-hero .lead { margin: 0; color: #666; }

.auth-avatar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}
.auth-avatar-btn-ring {
    display: block;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.auth-avatar-btn:hover .auth-avatar-btn-ring,
.auth-avatar-btn:focus-visible .auth-avatar-btn-ring {
    transform: scale(1.04);
    box-shadow: var(--shadow-lg);
}
.auth-avatar-btn-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--primary-dark);
    font-weight: 600;
}
.auth-avatar-btn-hint .icon { width: 14px; height: 14px; }

.avatar-picker--hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

.hk-avatar-modal-card { max-width: 400px; text-align: center; }
.hk-avatar-modal-lead { margin: 0 0 14px; font-size: 0.9rem; }
.avatar-picker--modal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
@media (min-width: 400px) {
    .avatar-picker--modal { grid-template-columns: repeat(5, 1fr); }
}
.avatar-picker--modal .avatar-pick-img img { width: 56px; height: 56px; }
.avatar-pick.is-picked .avatar-pick-img,
.avatar-picker--modal .avatar-pick input:checked + .avatar-pick-img {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.05);
}

.hk-profile-card { max-width: 420px; text-align: right; }
.hk-profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.hk-profile-head h3 { margin: 0 0 4px; font-size: 1.2rem; }
.hk-profile-age { margin: 0; color: #666; font-size: 0.9rem; }
.hk-profile-total { margin: 6px 0 0; font-size: 0.9rem; }
.hk-profile-games-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #555;
}
.hk-profile-games {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
}
.hk-profile-games li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--soft);
    margin-bottom: 6px;
}
.hk-profile-game-label {
    flex: 1;
    min-width: 0;
    text-align: right;
}
.hk-profile-game-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.hk-profile-game-score { color: var(--primary-dark); min-width: 2.5em; text-align: left; }
.hk-profile-game-play {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--blue));
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hk-profile-game-play .icon { width: 18px; height: 18px; }
.hk-profile-game-play:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-md);
    color: #fff;
}
.hk-profile-empty,
.hk-profile-loading {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin: 8px 0 0;
}
.btn-sm { padding: 7px 14px; font-size: 0.875rem; min-height: 40px; }

/* ---------- Schools / partnership merge ---------- */
.hamkari-section {
    padding: 40px 0 20px;
    border-top: 1px dashed rgba(0,0,0,0.08);
}
.hamkari-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.hamkari-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 3vw, 2rem);
}
.hamkari-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: start;
}
.hamkari-col {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.hamkari-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.hamkari-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
}
.hamkari-list .icon { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.hamkari-faq {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}
.hamkari-faq-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    text-align: center;
}
.hamkari-faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}
.hamkari-faq-item {
    background: #fdfdfd;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    text-align: right;
}
.hamkari-faq-q { margin: 0 0 8px; font-size: 1rem; color: var(--dark); }
.hamkari-faq-a { margin: 0; color: #555; line-height: 1.75; font-size: 0.95rem; }
.plan-grid-tight { grid-template-columns: 1fr; gap: 12px; }
.plan-grid-tight .plan { padding: 16px; }
.plan-grid-tight h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-size: 1rem; }
.num-inline {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* ---------- Phone CTA LTR fix ---------- */
.phone-cta .pc-body .num {
    display: block;
    text-align: left;
    direction: ltr;
    unicode-bidi: embed;
    width: fit-content;
    margin-inline: auto;
}

/* ---------- Auth / form buttons font ---------- */
.auth-card .btn,
.auth-wrap .btn,
.auth-card button,
.auth-wrap button[type="submit"],
.hk-modal .btn {
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
}

/* ---------- Game UI: countdown + buttons ---------- */
.btn-game {
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    font-weight: 800;
    letter-spacing: 0.2px;
    animation: btnPulse 2.4s ease-in-out infinite;
}
.btn-game:not([disabled]):hover { animation: none; }
.game-panel .btn {
    font-family: "IRANSans", "Vazirmatn", "Tahoma", sans-serif;
    font-weight: 800;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: 0 8px 24px rgba(255, 107, 107, 0.35); }
}

.hk-count-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    color: white;
    font-size: clamp(4rem, 18vw, 8rem);
    font-weight: 900;
    text-shadow: 0 8px 30px rgba(0,0,0,0.35);
    animation: countPop 0.45s ease;
    pointer-events: none;
}
@keyframes countPop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.hk-modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(3px);
}
.hk-modal[hidden] { display: none !important; }
.hk-modal-card {
    position: relative;
    width: min(440px, 100%);
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.35s ease;
}
@keyframes modalIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.hk-modal-close {
    position: absolute;
    top: 10px;
    left: 12px;
    border: none;
    background: var(--soft);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
}
.hk-modal-emoji {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}
.hk-modal-emoji .hk-modal-emoji-svg,
.hk-modal-emoji > .icon {
    width: clamp(2.5rem, 11vw, 3.75rem);
    height: clamp(2.5rem, 11vw, 3.75rem);
    color: var(--yellow-dark);
}
.hk-modal-card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.hk-modal-card p { margin: 0 0 18px; color: #555; }
.hk-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ---------- Contact page + success modal ---------- */
.contact-card { max-width: 620px; }
.contact-card-head { margin-bottom: 4px; }
.contact-card-head .auth-icon { margin-bottom: 12px; }
.contact-card-head .lead { margin-bottom: 18px; }
.contact-required { color: var(--primary); font-weight: 800; }
.contact-optional { color: #999; font-weight: 500; font-size: 0.82rem; }
.contact-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: right;
}
.contact-alert strong { display: block; margin-bottom: 4px; }
.contact-alert p { margin: 0; color: #555; font-size: 0.95rem; }
.contact-alert--error {
    background: linear-gradient(135deg, rgba(238, 82, 83, 0.12), rgba(255, 107, 107, 0.08));
    border: 1px solid rgba(238, 82, 83, 0.25);
}
.contact-alert--error .icon { color: var(--primary); flex-shrink: 0; }

.hk-contact-success-modal {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}
.hk-contact-success-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(165deg, #f0fff8 0%, #ffffff 55%);
    border: 2px solid rgba(29, 209, 161, 0.35);
    box-shadow:
        0 24px 60px rgba(29, 209, 161, 0.22),
        var(--shadow-lg);
    animation: contactSuccessIn 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}
@keyframes contactSuccessIn {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.hk-contact-success-glow {
    position: absolute;
    inset: -40% auto auto 50%;
    width: 280px;
    height: 280px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(29, 209, 161, 0.28) 0%, transparent 70%);
    pointer-events: none;
}
.hk-contact-success-icon {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1dd1a1, #38ef7d);
    box-shadow: 0 10px 28px rgba(29, 209, 161, 0.4);
    animation: contactSuccessPop 0.55s cubic-bezier(0.2, 0.9, 0.2, 1) 0.1s both;
}
@keyframes contactSuccessPop {
    0% { transform: scale(0.4); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
.hk-contact-success-icon .icon {
    width: 40px;
    height: 40px;
    color: white;
}
.hk-contact-success-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: #0f5132;
}
.hk-contact-success-lead {
    position: relative;
    z-index: 1;
    margin: 0 0 6px;
    font-weight: 700;
    color: #1a7f5a;
    font-size: 1.05rem;
}
.hk-contact-success-note {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    color: #4b6b5c;
    font-size: 0.95rem;
    line-height: 1.65;
}
.hk-contact-success-card .btn-primary {
    background: linear-gradient(135deg, #1dd1a1, #38ef7d);
    border: none;
    min-width: 160px;
}
.hk-contact-success-card .btn-primary:hover {
    filter: brightness(1.05);
}

/* ---------- Streak bonus + time reward animation ---------- */
.hk-streak-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(78, 205, 196, 0.1);
    border: 1px dashed rgba(78, 205, 196, 0.35);
    opacity: 0.75;
    transition: var(--transition);
}
.hk-streak-bar.active {
    opacity: 1;
    background: rgba(255, 107, 107, 0.08);
    border-color: rgba(255, 107, 107, 0.25);
}
.hk-streak-bar.ready {
    animation: streakPulse 0.9s ease-in-out infinite;
    border-color: var(--primary);
}
.hk-streak-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #666;
}
.hk-streak-dots {
    display: inline-flex;
    gap: 6px;
}
.hk-streak-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    transition: transform 0.25s ease, background 0.25s ease;
}
.hk-streak-dot.filled {
    background: linear-gradient(135deg, var(--primary), var(--yellow));
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(255,107,107,0.35);
}
/* Streak nested inside زمان باقی‌مانده card */
.hk-streak-bar--inline {
    margin: 8px 0 0;
    padding: 6px 8px;
    gap: 6px;
    border-radius: 10px;
    flex-wrap: nowrap;
    justify-content: space-between;
}
.hk-streak-bar--inline .hk-streak-label {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    flex: 1;
    min-width: 0;
}
.hk-streak-bar--inline .hk-streak-dots {
    gap: 4px;
    flex-shrink: 0;
}
.hk-streak-bar--inline .hk-streak-dot {
    width: 9px;
    height: 9px;
}
@keyframes streakPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.2); }
    50% { box-shadow: 0 0 0 8px rgba(255,107,107,0); }
}

.hk-time-bonus-pop {
    position: fixed;
    z-index: 190;
    transform: translate(-50%, -50%);
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 900;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    color: white;
    background: linear-gradient(135deg, var(--green), var(--accent));
    box-shadow: 0 12px 32px rgba(29, 209, 161, 0.45);
    pointer-events: none;
    animation: timeBonusFly 1.35s ease forwards;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hk-time-bonus-pop .hk-pop-clock {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    opacity: 0.98;
}
@keyframes timeBonusFly {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    15% { opacity: 1; transform: translate(-50%, -70%) scale(1.1); }
    70% { opacity: 1; transform: translate(-50%, -120%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -160%) scale(0.9); }
}

.time-bonus-flash {
    animation: timeFlash 0.9s ease;
    color: var(--green) !important;
}
@keyframes timeFlash {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.25); color: var(--green); }
    50% { transform: scale(1.1); }
}

/* ---------- Score goal + game result modals ---------- */
.hk-score-goal {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(254,202,87,0.12), rgba(255,107,107,0.08));
    border: 1px solid rgba(255,107,107,0.15);
    text-align: center;
}
.hk-score-goal-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.hk-score-goal-head strong { color: var(--primary-dark); font-size: 1.05rem; }
.hk-score-goal-lbl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.hk-score-goal .hk-inline-goal-ico {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--primary);
}
.hk-score-goal-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 6px;
}
.hk-score-goal-track span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transition: width 0.35s ease;
}
.hk-score-goal.reached .hk-score-goal-track span {
    background: linear-gradient(90deg, var(--green), var(--accent));
    animation: goalPulse 1s ease infinite;
}
.hk-score-goal-cur { font-size: 0.85rem; color: #666; font-weight: 600; }
/* Goal + progress bar inside small score progress-card */
.hk-score-goal--compact {
    margin: 8px 0 0;
    padding: 8px 10px;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(254,202,87,0.1), rgba(255,107,107,0.06));
    border: 1px solid rgba(255,107,107,0.12);
}
.hk-score-goal--compact .hk-score-goal-head {
    margin-bottom: 6px;
    font-size: 0.72rem;
    gap: 6px;
}
.hk-score-goal--compact .hk-score-goal-head strong {
    font-size: 0.82rem;
}
.hk-score-goal--compact .hk-inline-goal-ico {
    width: 12px;
    height: 12px;
}
.hk-score-goal--compact .hk-score-goal-track {
    height: 7px;
    margin-bottom: 4px;
}
.hk-score-goal--compact .hk-score-goal-cur {
    font-size: 0.72rem;
}
@keyframes goalPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}

.hk-result-card.win {
    border: 2px solid rgba(29, 209, 161, 0.35);
    background: linear-gradient(180deg, #fff, #f0fff9);
}
.hk-result-card.lose {
    border: 2px solid rgba(255, 107, 107, 0.25);
    background: linear-gradient(180deg, #fff, #fff8f8);
}
.hk-result-emoji {
    line-height: 0;
    margin-bottom: 8px;
    animation: resultPop 0.5s ease;
    display: flex;
    justify-content: center;
}
.hk-result-emoji .hk-result-emoji-svg,
.hk-result-emoji svg.icon {
    width: clamp(2.5rem, 12vw, 3.5rem);
    height: clamp(2.5rem, 12vw, 3.5rem);
    color: var(--primary);
}
.hk-result-card.lose .hk-result-emoji .hk-result-emoji-svg,
.hk-result-card.lose .hk-result-emoji svg.icon {
    color: var(--yellow-dark);
}
@keyframes resultPop {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.hk-result-card h3 { margin: 0 0 10px; font-size: 1.35rem; }
.hk-result-card p { margin: 0 0 16px; color: #555; line-height: 1.7; }
.hk-result-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
}
.hk-stat {
    min-width: 90px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--soft);
    text-align: center;
}
.hk-stat span { display: block; font-size: 0.78rem; color: #888; margin-bottom: 4px; }
.hk-stat b { font-size: 1.2rem; color: var(--dark); }

@media (max-width: 880px) {
    .about-hero { grid-template-columns: 1fr; text-align: center; }
    .about-hero .cta { justify-content: center; }
    .games-hub-hero { flex-direction: column; text-align: center; }
    .hamkari-split { grid-template-columns: 1fr; }
    .story-timeline::before { right: 14px; transform: none; }
    .story-item {
        grid-template-columns: 28px 1fr;
        gap: 14px;
        padding-right: 8px;
    }
    .story-item.left .story-card,
    .story-item.right .story-card { grid-column: 2; }
    .story-item.left .story-dot,
    .story-item.right .story-dot { grid-column: 1; justify-self: center; }
}

/* ---------- موبایل: کارت‌ها و دکمه‌ها هم‌تراز و قابل لمس ---------- */
@media (max-width: 600px) {
    .section { padding: 36px 0; }
    .hero { padding: 44px 0 24px; }
    .hero p { font-size: 1.02rem; }
    .game-panel { padding: 20px 14px; }
    .game-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 18px 16px;
        gap: 12px;
        margin: 14px 0 10px;
    }
    .game-header .ghdr-icon {
        width: var(--icon-card-sm);
        height: var(--icon-card-sm);
        flex: 0 0 var(--icon-card-sm);
        border-radius: 16px;
    }
    .game-header .ghdr-icon .icon {
        width: var(--icon-in-card);
        height: var(--icon-in-card);
    }
    .unlock-stage { padding-block: 20px; min-height: 50vh; }
    .unlock-card { padding: 22px 18px; }
    .unlock-card .cta {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-width: 320px;
        margin-inline: auto;
    }
    .unlock-card .cta .btn {
        width: 100%;
        justify-content: center;
    }
    .auth-card { padding: 28px 20px; }
    .phone-cta:not(.big) {
        flex-direction: column;
        text-align: center;
        padding: 16px 18px;
        gap: 12px;
    }
    .question-box { padding: 20px 12px; }
    .question-box .row-flex {
        flex-direction: column;
        align-items: stretch;
        max-width: min(300px, 100%);
        margin-inline: auto;
        gap: 8px;
    }
    .question-box .row-flex .btn {
        width: 100%;
        justify-content: center;
    }
    .hk-modal-card { padding: 22px 18px; width: min(400px, 100%); }
    .hk-modal-actions { flex-direction: column; }
    .hk-modal-actions .btn { width: 100%; }
    .plan { padding: 20px 18px; }
    .game-card,
    .grade-card,
    .lesson-card { padding: 18px; }
    .games-hub-hero { padding: 20px 16px; }
    .hero .cta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .hero .cta .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .about-hero .cta {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .about-hero .cta .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .schools-hero .cta {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .schools-hero .cta .btn {
        width: 100%;
        max-width: 320px;
        margin-inline: auto;
        justify-content: center;
    }
}

/* ---------- Partner trial play (schools catalog) ---------- */
.partner-page .partner-game-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 24px;
}
.partner-crumb {
    font-size: 0.9rem;
    color: #777;
    margin: 0 0 12px;
}
.partner-crumb a { color: var(--primary-dark); font-weight: 600; }
.partner-game-head h1 {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
}
.partner-game-head .lead {
    margin: 0 0 18px;
    color: #555;
    line-height: 1.75;
}
.partner-quota-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.14), rgba(165, 94, 234, 0.1));
    border: 1px solid rgba(78, 205, 196, 0.35);
    font-size: 0.95rem;
    color: #444;
}
.partner-quota-banner .icon {
    width: 22px;
    height: 22px;
    color: var(--accent-dark);
    flex-shrink: 0;
}
.partner-quota-banner.partner-quota-empty {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(254, 202, 87, 0.12));
    border-color: rgba(255, 107, 107, 0.28);
}
.partner-wall {
    max-width: 520px;
    margin: 0 auto 28px;
}
.partner-wall-card { text-align: center; }
.partner-wall-card > p { color: #555; line-height: 1.75; margin-bottom: 18px; }
.partner-shell {
    max-width: 640px;
    margin: 0 auto;
}
.partner-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}
.partner-round-lbl,
.partner-score-lbl {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
}
.partner-question {
    min-height: 120px;
    padding: 22px 18px;
    border-radius: var(--radius-md);
    background: var(--soft);
    border: 1px dashed rgba(0, 0, 0, 0.08);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 14px;
}
.partner-feedback {
    min-height: 1.5em;
    text-align: center;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--dark);
    margin-top: 8px;
}
.lesson-card.trial-play-card {
    border-color: rgba(78, 205, 196, 0.45);
    box-shadow: 0 6px 22px rgba(78, 205, 196, 0.12);
}
.badge.trial-tag {
    background: rgba(78, 205, 196, 0.18);
    color: #0d6f66;
    border: 1px solid rgba(78, 205, 196, 0.35);
}
.unlock-trial-callout {
    margin: 24px 0;
    padding: 20px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f8fffe, #fdfdfd);
    border: 1px solid rgba(78, 205, 196, 0.28);
    text-align: center;
}
.unlock-trial-callout h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.unlock-trial-callout p { margin: 0 0 16px; color: #555; line-height: 1.75; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.row-flex { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hidden { display: none !important; }
.inline-icon { display: inline-flex; align-items: center; gap: 6px; }
