@font-face {
    font-family: Vazirmatn;
    src: url('../fonts/vazirmatn-regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url('../fonts/vazirmatn-medium.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: Vazirmatn;
    src: url('../fonts/vazirmatn-bold.ttf') format('truetype');
    font-weight: 800;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #0a0b0f;
    --surface: #101218;
    --surface-raised: #181b23;
    --surface-soft: #13161d;
    --text: #f7f7f8;
    --text-soft: #d7d8de;
    --muted: #8c909d;
    --border: rgba(255, 255, 255, .075);
    --border-strong: rgba(255, 255, 255, .14);
    --brand: #ff4c12;
    --brand-light: #ff7447;
    --brand-soft: rgba(255, 76, 18, .12);
    --success: #3ddc97;
    --blue: #63a5ff;
    --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 82% 2%, rgba(255, 76, 18, .08), transparent 27rem),
        var(--background);
    color: var(--text);
    font-family: Vazirmatn, system-ui, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 60%, white);
    outline-offset: 3px;
}

h1, h2, h3, p { margin-top: 0; }

/* FocusOnNavigate تیتر صفحه را برای صفحه‌خوان فوکوس می‌کند؛ حلقه‌ی پیش‌فرض
   مرورگر روی تیتر غیرتعاملی شبیه باگ گرافیکی دیده می‌شود. */
h1[tabindex="-1"]:focus { outline: none; }

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

.button {
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    font-size: .88rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { background: var(--brand); color: white; box-shadow: 0 12px 30px rgba(255, 76, 18, .23); }
.button-primary:hover { background: #ff632f; }
.button-secondary { background: var(--surface-raised); color: var(--text); border-color: var(--border-strong); }
.button-ghost { background: transparent; color: var(--text-soft); border-color: var(--border); }

.hero {
    min-height: 470px;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    gap: clamp(26px, 5vw, 76px);
    padding: 24px 0 45px;
}

.pill {
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: .76rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pill i {
    width: 7px;
    height: 7px;
    background: var(--brand);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--brand-soft);
}

.hero h1 {
    margin: 22px 0 17px;
    font-size: clamp(2.5rem, 5.4vw, 5rem);
    line-height: 1.13;
    letter-spacing: -2.7px;
}

.hero h1 em { color: var(--brand-light); font-style: normal; }
.hero-copy > p { max-width: 540px; color: var(--muted); font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-visual {
    position: relative;
    min-height: 400px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 34px;
    background: linear-gradient(145deg, #151821, #0d0f14);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.court-lines {
    position: absolute;
    inset: 13%;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50% 50% 8px 8px;
    transform: perspective(420px) rotateX(61deg) translateY(45px);
}

.court-lines::before,
.court-lines::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(255,255,255,.07);
}

.court-lines::before { inset: 36% 24% 0; border-bottom: 0; }
.court-lines::after { width: 46%; aspect-ratio: 1; border-radius: 50%; right: 27%; bottom: -31%; }

.hero-visual > img {
    width: min(68%, 330px);
    filter: drop-shadow(0 34px 30px rgba(0,0,0,.5));
    animation: ball-float 4.5s ease-in-out infinite;
    z-index: 2;
}

.float-stat {
    position: absolute;
    z-index: 3;
    min-width: 130px;
    padding: 10px 13px;
    border-radius: 14px;
    background: rgba(20, 23, 31, .82);
    border: 1px solid var(--border-strong);
    backdrop-filter: blur(15px);
    color: var(--muted);
    font-size: .7rem;
    display: grid;
}

.float-stat strong { color: var(--text); font-size: 1rem; }
.stat-top { top: 28px; left: 24px; }
.stat-bottom { bottom: 28px; right: 24px; }

@keyframes ball-float {
    0%, 100% { transform: translateY(5px) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.dashboard-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
}

.dashboard-strip article {
    padding: 19px 22px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-left: 1px solid var(--border);
}

.dashboard-strip article:last-child { border-left: 0; }
.dashboard-strip div { display: grid; }
.dashboard-strip strong { font-size: .94rem; }
.dashboard-strip small { color: var(--muted); font-size: .7rem; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-weight: 800; }
.metric-icon.orange { color: var(--brand-light); background: var(--brand-soft); }
.metric-icon.blue { color: var(--blue); background: rgba(99, 165, 255, .1); }
.metric-icon.mint { color: var(--success); background: rgba(61, 220, 151, .1); }

.section-block { padding: 88px 0 40px; scroll-margin-top: 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading span, .eyebrow { color: var(--brand-light); font-size: .74rem; font-weight: 800; }
.section-heading h2 { margin: 5px 0 0; font-size: clamp(1.6rem, 3vw, 2.25rem); }
.section-heading > a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text-soft); text-decoration: none; font-size: .82rem; }

.feature-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; }
.feature-card {
    min-height: 285px;
    padding: 24px;
    color: var(--text);
    text-decoration: none;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    position: relative;
}
.feature-card-wide { display: flex; align-items: flex-end; }
.feature-card-wide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; transition: transform .35s ease; }
.feature-card-wide:hover img { transform: scale(1.035); }
.feature-card-wide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #0d0f14 4%, transparent 88%); }
.feature-card-wide div { position: relative; z-index: 2; max-width: 420px; }
.feature-card span { color: var(--brand-light); font-size: .72rem; font-weight: 800; }
.feature-card h3 { margin: 6px 0; font-size: 1.25rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.compact-card { display: flex; flex-direction: column; justify-content: flex-end; }
.large-mark { position: absolute; top: 22px; right: 22px; font-size: 2.5rem !important; opacity: .85; }
.accent-card { background: linear-gradient(145deg, #2a120c, #111318 75%); }

.install-card {
    margin-top: 48px;
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--border));
    border-radius: 22px;
    background: linear-gradient(100deg, var(--brand-soft), var(--surface) 55%);
}
.install-icon { width: 54px; height: 54px; display: grid; place-items: center; background: var(--brand); border-radius: 16px; }
.install-icon svg { width: 27px; fill: none; stroke: white; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.install-card h2 { margin: 2px 0 3px; font-size: 1.15rem; }
.install-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.install-card .eyebrow { color: var(--brand-light); }
.install-help { margin-top: 10px; padding: 13px 17px; border-radius: 13px; background: var(--surface-raised); color: var(--text-soft); font-size: .78rem; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 14px 0 30px; }
.page-heading h1 { margin: 4px 0 5px; font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -1.5px; }
.page-heading p { margin: 0; color: var(--muted); font-size: .88rem; }
.count-badge { padding: 8px 13px; border-radius: 999px; background: var(--surface-raised); color: var(--text-soft); border: 1px solid var(--border); font-size: .76rem; white-space: nowrap; }

.library-toolbar { position: sticky; top: 82px; z-index: 10; padding: 12px; margin: 0 -12px 22px; display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; background: color-mix(in srgb, var(--background) 88%, transparent); backdrop-filter: blur(18px); }
.search-box { flex: 0 0 min(310px, 34%); min-height: 47px; padding: 0 14px; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.search-box:focus-within { border-color: color-mix(in srgb, var(--brand) 65%, transparent); }
.search-box svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.search-box input { width: 100%; min-height: 44px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: .82rem; }
.search-box input::placeholder { color: var(--muted); }
.library-selects { display: flex; align-items: center; gap: 7px; }
.library-selects select { min-height: 44px; max-width: 180px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; outline: 0; background: var(--surface); color: var(--text-soft); font-size: .73rem; font-weight: 700; }
.library-selects select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.clear-filters { min-height: 44px; padding: 0 11px; border: 0; background: transparent; color: var(--brand-light); font-size: .7rem; font-weight: 800; cursor: pointer; }
.filter-chips { flex: 1 1 100%; min-width: 0; max-width: 100%; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { white-space: nowrap; min-height: 44px; padding: 0 15px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: .76rem; font-weight: 700; }
.filter-chip.active { color: white; background: var(--brand); border-color: var(--brand); }

.drill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.drill-card { display: block; padding: 0; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--surface); color: var(--text); text-align: right; text-decoration: none; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.drill-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.drill-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.drill-cover { height: 170px; display: block; position: relative; overflow: hidden; background: #101218; }
.drill-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,9,12,.72), transparent 52%); }
.drill-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.drill-card:hover .drill-cover img { transform: scale(1.035); }
.play-button { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; padding-right: 3px; border-radius: 50%; font-style: normal; color: white; background: rgba(255,76,18,.9); box-shadow: 0 10px 24px rgba(0,0,0,.32); }
.drill-cover > small { position: absolute; bottom: 11px; left: 11px; z-index: 2; padding: 3px 8px; border-radius: 7px; background: rgba(7,8,11,.76); color: white; font-size: .66rem; }
.drill-body { min-height: 122px; padding: 15px 16px 17px; display: grid; align-content: start; }
.drill-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.drill-meta i { font-style: normal; color: var(--brand-light); font-size: .68rem; }
.drill-meta b { padding: 2px 7px; border-radius: 999px; font-size: .58rem; letter-spacing: .4px; }
.drill-meta b.free { color: var(--success); background: rgba(61,220,151,.09); }
.drill-meta b.pro { color: #ffd36a; background: rgba(255,211,106,.09); }
.drill-body > strong { font-size: .94rem; line-height: 1.5; }
.drill-body > small { color: var(--muted); font-size: .7rem; margin-top: 5px; }

.skeleton-card { height: 292px; padding: 15px; cursor: default; }
.skeleton-card > * { display: block; background: linear-gradient(90deg, var(--surface-raised), #252934, var(--surface-raised)); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; border-radius: 12px; }
.skeleton-card span { height: 160px; }
.skeleton-card i { height: 14px; margin-top: 16px; width: 80%; }
.skeleton-card i:last-child { width: 48%; }
@keyframes shimmer { to { background-position: -220% 0; } }

.empty-panel, .coming-panel { min-height: 430px; max-width: 720px; margin: 20px auto; padding: 42px 24px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-panel > span { width: 58px; height: 58px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 18px; background: var(--brand-soft); color: var(--brand-light); font-size: 1.7rem; }
.empty-panel h2, .coming-panel h1 { margin-bottom: 8px; }
.empty-panel p, .coming-panel p { max-width: 520px; color: var(--muted); font-size: .85rem; }
.coming-panel img { width: min(260px, 62vw); height: 190px; object-fit: contain; margin-bottom: 18px; }
.coming-panel .button { margin-top: 12px; }
.guest-panel { min-height: 560px; max-width: 920px; margin: 20px auto; padding: clamp(22px, 4vw, 46px); display: grid; grid-template-columns: minmax(250px, .85fr) minmax(300px, 1.15fr); gap: clamp(24px, 5vw, 58px); align-items: center; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--brand) 7%, var(--surface))); overflow: hidden; }
.guest-visual { min-height: 350px; position: relative; display: grid; place-items: center; border-radius: 24px; background: radial-gradient(circle at 55% 38%, rgba(255,76,18,.24), transparent 56%), #0d0f14; }
.guest-visual img { width: min(330px, 95%); max-height: 340px; object-fit: contain; }
.guest-visual span { position: absolute; right: 18px; bottom: 16px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 99px; color: var(--brand-light); background: rgba(10,11,15,.8); font-size: .65rem; font-weight: 800; letter-spacing: 1px; }
.guest-copy h1 { margin: 8px 0 12px; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.25; }
.guest-copy > p { margin: 0; color: var(--muted); font-size: .86rem; }
.guest-copy ul { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.guest-copy li { min-height: 80px; padding: 12px 8px; display: grid; place-items: center; align-content: center; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.018); text-align: center; }
.guest-copy li b { color: var(--brand-light); font-size: 1.25rem; }
.guest-copy li span { color: var(--muted); font-size: .67rem; }
.guest-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.guest-actions .button { flex: 1 1 180px; }
.guest-actions button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.guest-copy > small { display: block; margin-top: 10px; color: var(--muted); font-size: .68rem; }
.login-field { display: grid; gap: 7px; margin: 20px 0 14px; }
.login-field > span, .profile-form label > span, .avatar-picker legend { color: var(--text-soft); font-size: .75rem; font-weight: 700; }
.login-field input,
.profile-form input,
.profile-form select {
    width: 100%;
    min-height: 49px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(7, 8, 12, .62);
    border: 1px solid var(--border-strong);
    border-radius: 13px;
    outline: 0;
}
.login-field input:focus,
.profile-form input:focus,
.profile-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-field input::placeholder { color: #666b77; }
.otp-input { text-align: center; letter-spacing: .45rem; font-size: 1.2rem; }
.form-message { margin: 17px 0; padding: 11px 13px; border-radius: 12px; font-size: .76rem; }
.form-message.error { color: #ffb7a7; background: rgba(255, 76, 18, .1); border: 1px solid rgba(255, 76, 18, .2); }
.form-message.success { color: #8af0c0; background: rgba(61, 220, 151, .08); border: 1px solid rgba(61, 220, 151, .17); }

.profile-loading { min-height: 420px; display: grid; place-items: center; align-content: center; color: var(--muted); }
.profile-spinner { width: 38px; height: 38px; border: 3px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; animation: profile-spin .75s linear infinite; }
.profile-loading p { margin: 12px 0 0; font-size: .8rem; }
@keyframes profile-spin { to { transform: rotate(360deg); } }

.account-panel { max-width: 900px; margin: 20px auto; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--border); border-radius: 28px; background: var(--surface); }
.account-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.account-heading h1 { margin: 6px 0; font-size: clamp(1.9rem, 4vw, 3rem); }
.account-heading p { max-width: 620px; margin: 0; color: var(--muted); font-size: .8rem; }
.account-heading-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.profile-form label { display: grid; gap: 7px; }
.profile-form select { appearance: auto; }
.avatar-picker { margin: 26px 0 0; padding: 0; border: 0; }
.avatar-picker legend { margin-bottom: 10px; }
.avatar-picker > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-option { min-height: 118px; padding: 12px 8px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); background: rgba(255,255,255,.018); border: 1px solid var(--border); border-radius: 16px; cursor: pointer; }
.avatar-option.selected { color: var(--text); border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.avatar-option > span { width: 58px; height: 58px; display: block; position: relative; border-radius: 50%; background: linear-gradient(145deg, var(--avatar-a), var(--avatar-b)); overflow: hidden; }
.avatar-option > span::before { content: ''; position: absolute; width: 21px; height: 21px; border-radius: 50%; background: #f0b18d; top: 11px; left: 18px; }
.avatar-option > span::after { content: ''; position: absolute; width: 39px; height: 29px; border-radius: 50% 50% 12px 12px; background: rgba(7,8,12,.72); bottom: -9px; left: 9px; }
.avatar-option > span i { position: absolute; z-index: 2; width: 24px; height: 8px; border-radius: 8px 8px 3px 3px; background: #282b33; top: 8px; left: 17px; transform: rotate(-4deg); }
.avatar-option small { font-size: .65rem; }
.avatar-orange { --avatar-a: #ff6a24; --avatar-b: #7d2108; }
.avatar-blue { --avatar-a: #63a5ff; --avatar-b: #173d72; }
.avatar-purple { --avatar-a: #b178ff; --avatar-b: #45217a; }
.avatar-gold { --avatar-a: #ffd36a; --avatar-b: #7a5412; }
.save-profile { width: 100%; margin-top: 24px; }
.error-code { color: var(--brand-light); font-size: 4rem; font-weight: 800; line-height: 1; }

.subscription-heading { align-items: center; }
.subscription-notice,
.subscription-login-note,
.payment-security-note {
    margin-bottom: 20px;
    padding: 17px 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(255, 211, 106, .18);
    border-radius: 17px;
    background: rgba(255, 211, 106, .055);
}
.subscription-notice > strong { flex: 0 0 auto; color: #ffd36a; font-size: .82rem; }
.subscription-notice > span,
.subscription-login-note span,
.payment-security-note p { color: var(--muted); font-size: .73rem; }
.current-subscription { margin-bottom: 20px; padding: 21px 24px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(61,220,151,.2); border-radius: 20px; background: linear-gradient(120deg, rgba(61,220,151,.1), var(--surface)); }
.current-subscription h2 { margin: 3px 0; }
.current-subscription p { margin: 0; color: var(--muted); font-size: .74rem; }
.current-subscription > strong { min-width: 82px; display: grid; text-align: center; color: var(--success); font-size: 1.55rem; }
.current-subscription > strong small { color: var(--muted); font-size: .58rem; }

.subscription-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.subscription-tier { padding: clamp(20px, 3vw, 29px); position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 25px; background: var(--surface); }
.subscription-tier::before { content: ''; position: absolute; width: 190px; height: 190px; top: -110px; left: -80px; border-radius: 50%; background: color-mix(in srgb, var(--tier-color) 20%, transparent); filter: blur(3px); }
.subscription-tier.pro { --tier-color: #63a5ff; }
.subscription-tier.elite { --tier-color: #b178ff; }
.subscription-tier > header { min-height: 112px; display: flex; justify-content: space-between; gap: 16px; position: relative; }
.subscription-tier > header span { color: var(--tier-color); font-size: .65rem; font-weight: 800; letter-spacing: 1.5px; }
.subscription-tier > header h2 { margin: 4px 0; font-size: 1.55rem; }
.subscription-tier > header p { margin: 0; color: var(--muted); font-size: .72rem; }
.subscription-tier > header i { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; color: var(--tier-color); font-style: normal; font-size: 1.35rem; border: 1px solid color-mix(in srgb, var(--tier-color) 30%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--tier-color) 9%, transparent); }
.subscription-features { margin: 4px 0 20px; padding: 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; list-style: none; border-block: 1px solid var(--border); }
.subscription-features li { display: flex; align-items: start; gap: 7px; color: var(--text-soft); font-size: .67rem; }
.subscription-features li span { color: var(--tier-color); font-weight: 800; }
.plan-options { display: grid; gap: 8px; }
.plan-option { min-height: 84px; padding: 11px 12px; display: grid; grid-template-columns: minmax(90px, .7fr) minmax(120px, 1fr) minmax(112px, .8fr); align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 15px; background: rgba(7,8,12,.35); }
.plan-title, .plan-price { display: grid; align-content: center; }
.plan-title strong { font-size: .76rem; }
.plan-title small { width: fit-content; margin-top: 3px; padding: 2px 6px; color: var(--success); border-radius: 99px; background: rgba(61,220,151,.08); font-size: .52rem; }
.plan-price { direction: rtl; text-align: right; }
.plan-price strong { font-size: .86rem; }
.plan-price > span { color: var(--muted); font-size: .55rem; }
.plan-price > small { color: var(--muted); font-size: .53rem; }
.plan-price .price-pending { color: var(--muted); font-size: .67rem; }
.plan-option .button { min-height: 43px; padding-inline: 10px; font-size: .65rem; }
.subscription-login-note { margin-top: 20px; border-color: var(--border); background: var(--surface-soft); }
.subscription-login-note > div { display: grid; gap: 2px; }
.subscription-login-note strong { font-size: .8rem; }
.payment-security-note { margin-top: 20px; margin-bottom: 0; align-items: start; justify-content: start; border-color: rgba(99,165,255,.16); background: rgba(99,165,255,.055); }
.payment-security-note > strong { flex: 0 0 auto; color: var(--blue); font-size: .75rem; }
.payment-security-note p { margin: 0; }

.purchase-history { margin-top: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.purchase-history > header { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.purchase-history h2 { margin: 3px 0 0; font-size: 1.1rem; }
.purchase-history > header small { color: var(--muted); font-size: .6rem; }
.purchase-history article { min-height: 67px; padding: 9px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); }
.purchase-history article > div { display: grid; gap: 2px; }
.purchase-history article > div:last-child { text-align: left; }
.purchase-history article strong { font-size: .72rem; }
.purchase-history article span,
.purchase-history article small { color: var(--muted); font-size: .57rem; }
.purchase-status { font-size: .62rem; }
.purchase-status.succeeded { color: var(--success); }
.purchase-status.failed, .purchase-status.cancelled { color: #ff9a82; }
.purchase-status.pending, .purchase-status.verifying { color: #ffd36a; }

.payment-result { min-height: 570px; max-width: 720px; margin: 18px auto; padding: clamp(28px, 6vw, 58px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--border); border-radius: 28px; background: radial-gradient(circle at 50% 15%, color-mix(in srgb, var(--result-color) 12%, transparent), transparent 18rem), var(--surface); }
.payment-result { --result-color: #ffd36a; }
.payment-result.success { --result-color: var(--success); }
.payment-result.failed, .payment-result.invalid { --result-color: var(--brand); }
.payment-result.unavailable { --result-color: var(--muted); }
.result-mark { width: 78px; height: 78px; margin-bottom: 22px; display: grid; place-items: center; color: var(--result-color); border: 1px solid color-mix(in srgb, var(--result-color) 30%, transparent); border-radius: 24px; background: color-mix(in srgb, var(--result-color) 10%, transparent); font-size: 2.2rem; font-weight: 800; }
.payment-result h1 { margin: 7px 0 10px; font-size: clamp(1.8rem, 5vw, 3rem); }
.payment-result > p { max-width: 510px; color: var(--muted); font-size: .82rem; }
.verified-subscription { min-width: min(360px, 100%); margin: 18px 0; padding: 14px; display: grid; border: 1px solid rgba(61,220,151,.18); border-radius: 15px; background: rgba(61,220,151,.07); }
.verified-subscription span { color: var(--success); font-size: .62rem; }
.verified-subscription strong { font-size: 1rem; }
.verified-subscription small { color: var(--muted); font-size: .64rem; }
.result-warning { max-width: 520px; margin: 14px 0; padding: 10px 12px; color: #ffd36a; border-radius: 12px; background: rgba(255,211,106,.07); font-size: .68rem; }
.result-actions { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.video-dialog-backdrop { position: fixed; inset: 0; z-index: 100; padding: 24px; display: grid; place-items: center; background: rgba(3,4,6,.78); backdrop-filter: blur(12px); }
.video-dialog { width: min(880px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 24px; background: #0e1015; box-shadow: 0 30px 100px rgba(0,0,0,.62); position: relative; }
.video-dialog video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; background: black; border-radius: 24px 24px 0 0; }
.dialog-close { position: absolute; top: 12px; left: 12px; z-index: 3; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(8,9,12,.78); color: white; font-size: 1.45rem; cursor: pointer; }
.video-info { padding: 22px 24px 26px; }
.video-info span { color: var(--brand-light); font-size: .72rem; }
.video-info h2 { margin: 5px 0 8px; font-size: 1.35rem; }
.video-info p { margin: 0; color: var(--muted); font-size: .8rem; }

.drill-detail { max-width: 1050px; margin: 0 auto; }
.back-link, .text-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--text-soft); font-size: .76rem; font-weight: 800; text-decoration: none; }
.back-link:hover, .text-link:hover { color: var(--brand-light); }
.text-link { margin-top: 10px; }
.drill-player-card { position: relative; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 26px; background: #000; box-shadow: 0 28px 75px rgba(0,0,0,.32); }
.drill-player-card video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; }
/* پیام‌ها در جریان عادی زیر ویدیو هستند؛ هیچ بخشی از کنترل‌های بومی را نمی‌پوشانند. */
.video-error, .resume-note { position: static; margin: 0; padding: 10px 14px; font-size: .72rem; line-height: 1.8; overflow-wrap: anywhere; }
.video-error { color: #ffd0c5; background: #7e2314; border-top: 1px solid rgba(255,183,167,.22); }
.resume-note { color: white; background: #141414; border-top: 1px solid rgba(255,255,255,.12); }
.offline-media-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-raised); }
.offline-media-panel>div { display: grid; gap: 4px; min-width: 0; }
.offline-media-panel strong { font-size: .88rem; }
.offline-media-panel span { color: var(--text-secondary); font-size: .76rem; line-height: 1.8; }
.offline-media-panel .button { flex: 0 0 auto; }
.offline-media-message { margin-top: 8px; padding: 10px 14px; border-radius: 12px; font-size: .76rem; line-height: 1.8; }
.offline-media-message.success { color: #b7f3ce; background: #123d29; }
.offline-media-message.error { color: #ffd0c5; background: #7e2314; }
.drill-detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 22px; padding: 30px 0 48px; }
.drill-detail-copy, .drill-facts { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--border); border-radius: 22px; background: var(--surface); }
.drill-detail-kicker { display: flex; align-items: center; gap: 9px; }
.drill-detail-kicker span { color: var(--brand-light); font-size: .73rem; font-weight: 800; }
.drill-detail-kicker b { padding: 3px 8px; border-radius: 999px; font-size: .61rem; letter-spacing: .4px; }
.drill-detail-kicker b.free { color: var(--success); background: rgba(61,220,151,.09); }
.drill-detail-kicker b.pro { color: #ffd36a; background: rgba(255,211,106,.09); }
.drill-detail-copy h1 { margin: 9px 0 12px; font-size: clamp(1.65rem, 4vw, 2.7rem); line-height: 1.32; }
.drill-detail-copy p { max-width: 680px; margin: 0; color: var(--muted); font-size: .82rem; line-height: 2; }
.drill-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0; overflow: hidden; background: var(--border); }
.drill-facts div { min-height: 105px; padding: 18px; display: grid; align-content: center; gap: 5px; background: var(--surface); }
.drill-facts span { color: var(--muted); font-size: .67rem; }
.drill-facts strong { color: var(--text-soft); font-size: .78rem; line-height: 1.6; }
.drill-detail-loading { min-height: 540px; display: grid; place-items: center; align-content: center; color: var(--muted); }
.drill-detail-loading p { margin: 12px 0 0; font-size: .8rem; }
.error-code-small { width: auto !important; height: auto !important; background: transparent !important; font-size: 2.6rem !important; font-weight: 900; }

/* ── فاز ۳: هدف روز، جلسه تمرین و آمار آفلاین ─────────────────── */
.today-board {
    margin-bottom: 28px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--border));
    border-radius: 26px;
    background: linear-gradient(125deg, color-mix(in srgb, var(--brand) 8%, var(--surface)), var(--surface) 58%);
    box-shadow: 0 22px 65px rgba(0,0,0,.18);
}
.today-board > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.today-board h1 { margin: 4px 0 5px; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.today-board header p { margin: 0; color: var(--muted); font-size: .78rem; }
.text-action { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--brand-light); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.text-action:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.today-goals { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.today-goals article { min-height: 112px; padding: 15px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--border); border-radius: 18px; background: rgba(7,8,12,.45); }
.today-goals article > div:last-child { display: grid; gap: 4px; }
.today-goals article > div:last-child strong { font-size: .83rem; }
.today-goals article > div:last-child span { color: var(--muted); font-size: .67rem; }
.goal-ring { --ring-color: var(--brand); --progress: 0; width: 70px; height: 70px; flex: 0 0 70px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--progress) * 1%), var(--surface-raised) 0); }
.goal-ring::after { content: ''; position: absolute; inset: 7px; border-radius: inherit; background: #111318; }
.goal-ring strong { position: relative; z-index: 1; font-size: 1.05rem; }
.goal-ring.blue { --ring-color: var(--blue); }
.goal-ring.mint { --ring-color: var(--success); }
.today-actions { margin-top: 18px; display: flex; gap: 10px; }
.today-actions .button { flex: 1; }
.home-plan-strip { margin-top: 13px; padding: 13px 15px; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid rgba(99,165,255,.14); border-radius: 15px; background: rgba(99,165,255,.055); }
.home-plan-strip > div { display: grid; gap: 3px; }
.home-plan-strip strong { color: var(--text-soft); font-size: .76rem; }
.home-plan-strip span { color: var(--muted); font-size: .66rem; }
.home-plan-strip .text-action { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.goal-editor { margin-top: 20px; padding: 14px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; align-items: end; border: 1px solid var(--border); border-radius: 16px; background: rgba(7,8,12,.58); }
.goal-editor label { display: grid; gap: 6px; }
.goal-editor label span { color: var(--text-soft); font-size: .67rem; font-weight: 700; }
.goal-editor input { width: 100%; min-height: 44px; padding: 0 12px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; outline: 0; }
.goal-editor input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.session-start-panel { min-height: 620px; max-width: 780px; margin: 0 auto; padding: clamp(28px, 5vw, 58px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--border); border-radius: 28px; background: radial-gradient(circle at 50% 28%, rgba(255,76,18,.16), transparent 38%), var(--surface); }
.session-start-panel::before { content: '⚡'; width: 82px; height: 82px; margin-bottom: 20px; display: grid; place-items: center; border-radius: 25px; color: white; background: var(--brand); box-shadow: 0 18px 45px rgba(255,76,18,.28); font-size: 2rem; }
.session-start-panel h1 { margin: 7px 0 10px; font-size: clamp(2rem, 5vw, 3.4rem); }
.session-start-panel > p { max-width: 590px; margin: 0; color: var(--muted); font-size: .84rem; line-height: 2; }
.session-start-panel > small { max-width: 570px; margin-top: 14px; color: var(--muted); font-size: .66rem; line-height: 1.8; }
.session-main-action { width: min(380px, 100%); margin-top: 18px; }
.session-main-action + .session-main-action { margin-top: 9px; }
.completed-session-stats { width: min(520px, 100%); margin: 18px 0 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.completed-session-stats div { padding: 15px 8px; display: grid; gap: 3px; border: 1px solid var(--border); border-radius: 15px; background: rgba(7,8,12,.5); }
.completed-session-stats strong { font-size: 1.35rem; }
.completed-session-stats span { color: var(--muted); font-size: .68rem; }

.session-live-heading { margin: 4px 0 20px; min-height: 64px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid rgba(61,220,151,.2); border-radius: 18px; background: rgba(61,220,151,.055); }
.session-live-heading div { display: flex; align-items: center; gap: 9px; color: #8af0c0; font-size: .78rem; font-weight: 800; }
.session-live-heading > strong { direction: ltr; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 6px rgba(61,220,151,.1); animation: live-pulse 1.8s ease infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 10px rgba(61,220,151,0); } }
.session-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr); gap: 18px; align-items: start; }
.session-court-card, .session-side-card, .stats-map-card, .history-card { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.session-side-card { position: sticky; top: 92px; }
.session-section-heading { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.session-section-heading h1, .session-section-heading h2 { margin: 4px 0 0; font-size: clamp(1.3rem, 3vw, 1.8rem); }

.shot-court { width: min(100%, 580px); margin: 0 auto; }
.shot-court svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 20px 38px rgba(0,0,0,.2)); }
.court-floor { fill: #151923; stroke: rgba(255,255,255,.06); stroke-width: .55; }
.court-line { fill: none; stroke: rgba(255,255,255,.32); stroke-width: .62; vector-effect: non-scaling-stroke; }
.court-dash { stroke-dasharray: 2 2; opacity: .55; }
.court-rim { fill: none; stroke: var(--brand-light); stroke-width: 1; vector-effect: non-scaling-stroke; }
.shot-dot { stroke: #08090c; stroke-width: .7; vector-effect: non-scaling-stroke; }
.shot-dot.made { fill: var(--success); }
.shot-dot.miss { fill: #ff6675; }
.court-legend { padding-top: 10px; display: flex; justify-content: center; gap: 18px; color: var(--muted); font-size: .67rem; }
.court-legend span { display: inline-flex; align-items: center; gap: 6px; }
.court-legend i { width: 9px; height: 9px; border-radius: 50%; }
.court-legend i.made { background: var(--success); }
.court-legend i.miss { background: #ff6675; }

.zone-picker { margin: 22px 0 0; padding: 0; border: 0; }
.zone-picker legend { margin-bottom: 9px; color: var(--text-soft); font-size: .72rem; font-weight: 800; }
.zone-picker > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.zone-button { min-height: 44px; padding: 6px; border: 1px solid var(--border); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.018); font: inherit; font-size: .66rem; font-weight: 700; cursor: pointer; }
.zone-button.selected { color: white; border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.shot-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.shot-result { min-height: 56px; border-radius: 14px; font: inherit; font-size: .82rem; font-weight: 900; cursor: pointer; }
.shot-result span { margin-left: 5px; font-size: 1.15rem; }
.shot-result.made { color: #07140e; border: 0; background: var(--success); }
.shot-result.miss { color: #ffd5da; border: 1px solid rgba(255,102,117,.3); background: rgba(255,102,117,.1); }
.session-feedback { min-height: 25px; margin: 10px 0 0; color: var(--text-soft); text-align: center; font-size: .7rem; }
.camera-tracker { margin-top: 22px; padding: 18px; border: 1px solid var(--border); border-radius: 19px; background: rgba(255,255,255,.025); }
.camera-tracker > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.camera-tracker h2 { margin: 4px 0 0; font-size: 1rem; }
.camera-tracker > p { margin: 13px 0; color: var(--muted); font-size: .7rem; line-height: 1.9; }
.camera-tracker > small { display: block; margin-top: 12px; color: var(--muted); font-size: .61rem; line-height: 1.8; }
.camera-status { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .58rem; white-space: nowrap; }
.camera-status.active { border-color: rgba(61,220,151,.28); color: #8af0c0; background: rgba(61,220,151,.07); }
.camera-stage { margin-top: 15px; position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #030406; aspect-ratio: 16/9; }
.camera-stage video, .camera-stage canvas { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.camera-stage canvas { z-index: 2; cursor: crosshair; touch-action: manipulation; }
.camera-calibration { padding: 8px 12px; position: absolute; z-index: 3; right: 50%; bottom: 14px; transform: translateX(50%); border-radius: 999px; background: rgba(6,7,10,.82); color: white; font-size: .67rem; pointer-events: none; }
.camera-controls { margin-top: 12px; display: grid; grid-template-columns: auto minmax(100px,1fr) auto; align-items: center; gap: 10px; }
.camera-controls label { color: var(--muted); font-size: .63rem; }
.camera-controls input { accent-color: var(--brand); }
.live-stat-grid { margin: 15px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.live-stat-grid div { min-height: 92px; padding: 13px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--border); border-radius: 14px; background: rgba(7,8,12,.45); }
.live-stat-grid strong { font-size: 1.35rem; }
.live-stat-grid span { color: var(--muted); font-size: .66rem; }
.complete-drill, .finish-session { width: 100%; margin-top: 8px; }
.finish-confirm { margin-top: 12px; padding: 15px; border: 1px solid rgba(255,76,18,.24); border-radius: 15px; background: var(--brand-soft); }
.finish-confirm > strong { font-size: .83rem; }
.finish-confirm p { margin: 5px 0 12px; color: var(--text-soft); font-size: .68rem; line-height: 1.7; }
.finish-confirm > div { display: grid; gap: 7px; }

.stats-heading { align-items: center; }
.period-switch { padding: 4px; display: flex; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.period-switch button { min-width: 72px; min-height: 38px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.period-switch button.active { color: white; background: var(--brand); }
.stats-empty img { width: min(240px, 60vw); height: 170px; object-fit: contain; margin-bottom: 12px; }
.stats-cards { margin-bottom: 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stats-cards article { min-height: 130px; padding: 17px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.stats-cards article.accent { border-color: rgba(255,76,18,.28); background: linear-gradient(145deg, var(--brand-soft), var(--surface)); }
.stats-cards span, .stats-cards small { color: var(--muted); font-size: .66rem; }
.stats-cards strong { margin: 3px 0; font-size: 1.55rem; }
.stats-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .65fr); gap: 18px; align-items: start; }
.history-card { display: grid; gap: 8px; }
.history-row { padding: 12px 0; display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.history-row > div { display: grid; gap: 3px; }
.history-row > div:last-child { text-align: left; }
.history-row strong { font-size: .75rem; }
.history-row span { color: var(--muted); font-size: .64rem; }
.local-data-note { margin: 10px 0; padding: 12px; color: var(--text-soft); background: rgba(99,165,255,.07); border: 1px solid rgba(99,165,255,.13); border-radius: 12px; font-size: .65rem; line-height: 1.75; }
.history-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-empty-note { margin: 0 0 14px; padding: 12px 15px; color: #ffd09e; border: 1px solid rgba(255,170,76,.18); border-radius: 13px; background: rgba(255,170,76,.065); font-size: .7rem; }

/* برنامه هفتگی آفلاین */
.plan-heading { align-items: center; }
.plan-builder { max-width: 850px; margin: 20px auto 0; padding: clamp(24px, 4vw, 42px); border: 1px solid rgba(255,76,18,.22); border-radius: 26px; background: radial-gradient(circle at 85% 0, rgba(255,76,18,.13), transparent 32%), var(--surface); }
.plan-builder h2 { margin: 5px 0 9px; font-size: clamp(1.55rem, 4vw, 2.35rem); }
.plan-builder p { max-width: 680px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.95; }
.plan-builder > small { display: block; margin-top: 17px; color: var(--muted); font-size: .63rem; }
.plan-builder-fields { margin-top: 25px; display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 10px; align-items: end; }
.plan-builder-fields label { display: grid; gap: 7px; }
.plan-builder-fields label > span { color: var(--text-soft); font-size: .68rem; font-weight: 800; }
.plan-builder-fields select { min-height: 46px; padding: 0 13px; color: var(--text); background: #101218; border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; font-size: .72rem; outline: 0; }
.plan-builder-fields select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.plan-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.plan-summary article { min-height: 112px; padding: 16px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.plan-summary article.accent { border-color: rgba(61,220,151,.22); background: rgba(61,220,151,.055); }
.plan-summary span, .plan-summary small { color: var(--muted); font-size: .65rem; }
.plan-summary strong { margin: 3px 0; font-size: 1.1rem; }
.today-plan-card { margin-bottom: 18px; padding: clamp(20px, 3vw, 28px); display: flex; align-items: center; justify-content: space-between; gap: 22px; border: 1px solid rgba(255,76,18,.24); border-radius: 22px; background: linear-gradient(120deg, rgba(255,76,18,.11), var(--surface) 65%); }
.today-plan-card.rest { border-color: rgba(99,165,255,.2); background: linear-gradient(120deg, rgba(99,165,255,.08), var(--surface) 65%); }
.today-plan-card h2 { margin: 5px 0 7px; font-size: clamp(1.35rem, 3vw, 2rem); }
.today-plan-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.8; }
.today-plan-actions { min-width: 265px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.today-plan-card.rest .today-plan-actions { min-width: 185px; grid-template-columns: 1fr; }
.plan-week { padding: clamp(18px, 3vw, 27px); border: 1px solid var(--border); border-radius: 24px; background: var(--surface); overflow: hidden; }
.plan-week-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.plan-day { min-height: 205px; padding: 13px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; background: rgba(7,8,12,.45); }
.plan-day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px rgba(255,76,18,.35); }
.plan-day.completed { border-color: rgba(61,220,151,.24); }
.plan-day.in-progress { border-color: rgba(99,165,255,.34); }
.plan-day.missed { opacity: .72; }
.plan-day > header { min-height: 54px; display: flex; justify-content: space-between; gap: 7px; border-bottom: 1px solid var(--border); }
.plan-day > header div { display: grid; align-content: start; gap: 2px; }
.plan-day > header strong { font-size: .72rem; }
.plan-day > header span { color: var(--muted); font-size: .57rem; }
.plan-day > header i { height: fit-content; padding: 3px 6px; color: var(--muted); background: var(--surface-raised); border-radius: 99px; font-size: .51rem; font-style: normal; white-space: nowrap; }
.plan-day.completed > header i { color: #8af0c0; background: rgba(61,220,151,.08); }
.plan-day.in-progress > header i { color: #a9ccff; background: rgba(99,165,255,.09); }
.plan-day.missed > header i { color: #ffb0b8; background: rgba(255,102,117,.08); }
.plan-day-body { flex: 1; padding-top: 15px; display: flex; flex-direction: column; gap: 6px; }
.plan-day-body b { font-size: .8rem; line-height: 1.6; }
.plan-day-body span, .plan-day-body small { color: var(--muted); font-size: .59rem; line-height: 1.65; }
.plan-day-body small { margin-top: auto; color: var(--text-soft); }
.rest-body { justify-content: center; text-align: center; }
.rest-body b { color: #a9ccff; }
.plan-privacy-note { margin-top: 13px; padding: 13px 16px; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--border); border-radius: 15px; }
.plan-privacy-note > div:first-child { display: grid; gap: 3px; }
.plan-privacy-note strong { color: var(--text-soft); font-size: .7rem; }
.plan-privacy-note span { color: var(--muted); font-size: .62rem; line-height: 1.6; }
.danger-text { color: #ff8994; }
.plan-delete-confirm { display: flex; align-items: center; gap: 8px; }
.plan-delete-confirm button { min-height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--text-soft); background: var(--surface); font: inherit; font-size: .61rem; cursor: pointer; }
.plan-delete-confirm button:first-of-type { color: #ffc1c7; border-color: rgba(255,102,117,.28); background: rgba(255,102,117,.08); }

/* تحلیل پیشرفته */
.trend-section { margin-bottom: 18px; padding: clamp(18px, 3vw, 27px); border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.trend-heading { align-items: center; }
.comparison-grid { margin-bottom: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.comparison-grid article { min-height: 91px; padding: 13px; display: grid; align-content: center; gap: 3px; border: 1px solid var(--border); border-radius: 14px; background: rgba(7,8,12,.42); }
.comparison-grid span, .comparison-grid small { color: var(--muted); font-size: .59rem; }
.comparison-grid strong { margin: 2px 0; color: var(--text-soft); font-size: .85rem; }
.trend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trend-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 17px; background: rgba(7,8,12,.45); }
.trend-card > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.trend-card > header div { display: grid; gap: 3px; }
.trend-card > header strong { font-size: .76rem; }
.trend-card > header span { color: var(--muted); font-size: .58rem; }
.trend-card > header b { color: var(--text-soft); font-size: .67rem; white-space: nowrap; }
.trend-scroll { margin-top: 15px; overflow-x: auto; scrollbar-width: thin; }
.trend-bars { height: 190px; display: grid; grid-template-columns: repeat(7, minmax(34px, 1fr)); align-items: end; gap: 6px; border-bottom: 1px solid var(--border); }
.trend-bars.wide { min-width: 850px; grid-template-columns: repeat(28, minmax(24px, 1fr)); gap: 4px; }
.trend-column { height: 100%; min-width: 0; display: grid; grid-template-rows: 25px 1fr 23px; align-items: end; text-align: center; }
.trend-column > span { overflow: hidden; color: var(--muted); font-size: .54rem; white-space: nowrap; text-overflow: ellipsis; }
.trend-column > i { width: min(24px, 70%); min-height: 3px; height: max(3px, calc(var(--bar) * 1%)); margin: 0 auto; display: block; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--brand-light), var(--brand)); transition: height .2s ease; }
.trend-column > i.shots { background: linear-gradient(180deg, #8abaff, var(--blue)); }
.trend-column > small { padding-top: 6px; color: var(--muted); font-size: .55rem; }

/* سبک زندگی */
.lifestyle-heading .button { min-height: 44px; }
.privacy-banner, .audio-notice { margin: 0 0 18px; padding: 14px 17px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(61,220,151,.16); border-radius: 15px; background: rgba(61,220,151,.055); }
.privacy-banner strong, .audio-notice strong { flex: 0 0 auto; color: #8af0c0; font-size: .72rem; }
.privacy-banner span, .audio-notice span { color: var(--muted); font-size: .65rem; }
.lifestyle-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lifestyle-card { min-height: 390px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.lifestyle-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.lifestyle-card > img { position: absolute; inset: 0; width: 100%; height: 58%; object-fit: cover; opacity: .58; mask-image: linear-gradient(#000 65%, transparent); }
.lifestyle-card > div:not(.lifestyle-card-art):not(.audio-bars) { position: relative; z-index: 2; }
.lifestyle-card h2 { margin: 6px 0; font-size: 1.2rem; }
.lifestyle-card p { margin: 0; color: var(--muted); font-size: .72rem; }
.lifestyle-card > b { position: relative; z-index: 2; margin-top: 20px; color: var(--brand-light); font-size: .7rem; }
.lifestyle-card-art { position: absolute; inset: 0 0 auto; height: 58%; display: grid; place-items: center; background: radial-gradient(circle, rgba(255,76,18,.28), transparent 56%), linear-gradient(145deg,#1c120f,#0c0e13); mask-image: linear-gradient(#000 70%, transparent); }
.lifestyle-card-art span { width: 130px; height: 130px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-light); border: 2px solid rgba(255,116,71,.5); font-size: 3rem; box-shadow: 0 0 50px rgba(255,76,18,.18); }
.audio-bars { position: absolute; inset: 0 0 auto; height: 58%; display: flex; align-items: center; justify-content: center; gap: 9px; background: radial-gradient(circle, rgba(99,165,255,.14), transparent 54%); mask-image: linear-gradient(#000 70%, transparent); }
.audio-bars i { width: 8px; height: 46px; border-radius: 99px; background: var(--blue); box-shadow: 0 0 18px rgba(99,165,255,.35); animation: audio-wave 1.1s ease-in-out infinite alternate; }
.audio-bars i:nth-child(2) { height: 92px; animation-delay: -.45s; }
.audio-bars i:nth-child(3) { height: 66px; animation-delay: -.2s; }
.audio-bars i:nth-child(4) { height: 112px; animation-delay: -.7s; }
@keyframes audio-wave { to { transform: scaleY(.46); opacity: .55; } }

/* تغذیه */
.nutrition-profile-card, .meal-builder, .meal-history { margin-bottom: 18px; padding: clamp(19px,3vw,28px); border: 1px solid var(--border); border-radius: 23px; background: var(--surface); }
.section-title { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-title h2 { margin: 4px 0 0; font-size: 1.22rem; }
.section-title small { color: var(--muted); font-size: .62rem; text-align: left; }
.nutrition-profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.nutrition-profile-grid label, .meal-fields label { display: grid; gap: 6px; }
.nutrition-profile-grid label.wide { grid-column: span 2; }
.nutrition-profile-grid label > span, .meal-fields label > span, .mood-field > span, .mind-note > span { color: var(--text-soft); font-size: .69rem; font-weight: 700; }
.nutrition-profile-grid input, .nutrition-profile-grid select, .meal-fields input, .meal-fields select, .mood-field select, .mind-note textarea { width: 100%; min-height: 48px; padding: 0 13px; color: var(--text); border: 1px solid var(--border-strong); border-radius: 12px; outline: 0; background: rgba(7,8,12,.58); }
.nutrition-profile-grid input:focus, .nutrition-profile-grid select:focus, .meal-fields input:focus, .meal-fields select:focus, .mood-field select:focus, .mind-note textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-actions { margin-top: 18px; display: flex; gap: 9px; flex-wrap: wrap; }
.nutrition-dashboard { margin-bottom: 15px; display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 10px; }
.calorie-card, .macro-card { min-height: 150px; padding: 17px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.calorie-card { display: flex; align-items: center; gap: 18px; }
.calorie-card h2 { margin: 4px 0; font-size: 1.25rem; }
.calorie-card p { margin: 0; color: var(--muted); font-size: .61rem; }
.nutrition-ring { --progress: 0; flex: 0 0 112px; width: 112px; height: 112px; padding: 9px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--progress) * 1%), var(--surface-raised) 0); }
.nutrition-ring::before { content: ''; grid-area: 1/1; width: 100%; height: 100%; border-radius: inherit; background: #0f1117; }
.nutrition-ring div { grid-area: 1/1; z-index: 1; display: grid; text-align: center; }
.nutrition-ring strong { font-size: 1.05rem; }
.nutrition-ring span { color: var(--muted); font-size: .53rem; }
.macro-card { display: grid; align-content: center; gap: 7px; }
.macro-card strong { font-size: .76rem; }
.macro-card span { color: var(--muted); font-size: .62rem; }
.macro-card progress { width: 100%; height: 7px; accent-color: var(--brand); }
.water-card { margin-bottom: 18px; min-height: 130px; padding: 18px 21px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 1px solid rgba(99,165,255,.18); border-radius: 21px; background: linear-gradient(105deg, rgba(99,165,255,.07), var(--surface) 60%); }
.water-visual { width: 76px; height: 92px; display: grid; place-items: center; position: relative; overflow: hidden; color: white; border: 2px solid rgba(99,165,255,.55); border-radius: 16px 16px 25px 25px; }
.water-visual::before { content: ''; position: absolute; inset: auto 0 0; height: var(--water); max-height: 100%; background: linear-gradient(#63a5ff,#2769c5); transition: height .25s ease; }
.water-visual span { z-index: 1; font-size: 1.7rem; }
.water-card h2 { margin: 4px 0; font-size: 1.2rem; }
.water-card p { margin: 0; color: var(--muted); font-size: .62rem; }
.water-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.water-actions button { min-height: 42px; padding: 0 12px; color: #bed8ff; border: 1px solid rgba(99,165,255,.2); border-radius: 11px; background: rgba(99,165,255,.08); cursor: pointer; font-size: .67rem; font-weight: 800; }
.water-actions .undo { grid-column: 1/-1; color: var(--muted); border-color: var(--border); background: transparent; }
.water-actions button:disabled { opacity: .4; cursor: not-allowed; }
.food-search { min-height: 49px; padding: 0 8px 0 14px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border-strong); border-radius: 13px; background: rgba(7,8,12,.58); }
.food-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.food-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.food-search button { min-height: 36px; border: 0; color: var(--brand-light); background: transparent; cursor: pointer; font-size: .63rem; }
.food-results { max-height: 270px; margin-top: 10px; padding: 5px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; overflow-y: auto; border: 1px solid var(--border); border-radius: 15px; background: rgba(7,8,12,.35); }
.food-results button { min-height: 68px; padding: 10px 12px; display: grid; align-content: center; gap: 2px; text-align: right; color: var(--text); border: 1px solid transparent; border-radius: 11px; background: transparent; cursor: pointer; }
.food-results button:hover { background: var(--surface-raised); }
.food-results button.selected { border-color: var(--brand); background: var(--brand-soft); }
.food-results strong { font-size: .71rem; }
.food-results span { color: var(--muted); font-size: .56rem; }
.meal-fields { margin-top: 12px; padding: 14px; display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr auto; align-items: end; gap: 9px; border-radius: 15px; background: var(--surface-soft); }
.meal-preview { min-height: 48px; display: grid; align-content: center; }
.meal-preview span { color: var(--muted); font-size: .57rem; }
.meal-preview strong { font-size: .68rem; }
.meal-fields .button { padding-inline: 14px; }
.inline-empty { min-height: 100px; display: grid; place-items: center; color: var(--muted); font-size: .72rem; border: 1px dashed var(--border-strong); border-radius: 14px; }
.meal-history article { min-height: 65px; padding: 10px 13px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--border); }
.meal-history article:last-child { border-bottom: 0; }
.meal-history article > div { display: grid; }
.meal-history article strong { font-size: .74rem; }
.meal-history article span { color: var(--muted); font-size: .58rem; }
.meal-history article b { color: var(--text-soft); font-size: .67rem; }
.meal-history article button { min-height: 38px; padding: 0 9px; color: #ff9d91; border: 1px solid rgba(255,76,18,.18); border-radius: 9px; background: rgba(255,76,18,.06); cursor: pointer; font-size: .58rem; }

/* آرامش ذهنی */
.mind-summary { margin-bottom: 17px; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.mind-summary article { min-height: 94px; padding: 15px; display: grid; align-content: center; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.mind-summary strong { font-size: 1rem; }
.mind-summary span { color: var(--muted); font-size: .62rem; }
.mind-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; }
.mind-card { min-height: 335px; position: relative; overflow: hidden; display: flex; align-items: flex-end; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); transition: transform .2s ease, border-color .2s ease; }
.mind-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.mind-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: transform .3s ease; }
.mind-card:hover > img { transform: scale(1.025); }
.mind-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,#0c0e13 10%,rgba(12,14,19,.1) 88%); }
.mind-card > div { position: relative; z-index: 2; padding: 18px; }
.mind-card > div > span { color: #a9ccff; font-size: .63rem; font-weight: 800; }
.mind-card h2 { margin: 4px 0 5px; font-size: 1.05rem; }
.mind-card p { height: 42px; margin: 0; overflow: hidden; color: var(--text-soft); font-size: .62rem; }
.mind-card footer { margin-top: 11px; display: flex; justify-content: space-between; gap: 9px; color: var(--muted); }
.mind-card footer b, .mind-card footer small { font-size: .56rem; }
.mind-grid + .privacy-banner { margin-top: 18px; }
.mind-session { min-height: calc(100dvh - 112px); margin: -18px -24px -40px; padding: 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; background: #090a0e; }
.mind-session::before { content: ''; position: absolute; inset: 0; background-image: var(--mind-image); background-size: cover; background-position: center; opacity: .62; transform: scale(1.02); }
.mind-session-overlay { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(6,7,10,.7),rgba(6,7,10,.42) 38%,#090a0e 100%); }
.mind-session > header { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.mind-session > header a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text-soft); text-decoration: none; font-size: .7rem; }
.mind-session > header span { padding: 6px 10px; color: #bed8ff; border: 1px solid rgba(99,165,255,.2); border-radius: 99px; background: rgba(10,11,15,.56); font-size: .61rem; }
.mind-session-content { width: min(620px,100%); margin: auto; padding: 38px 0; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mind-session-content h1 { margin: 7px 0 10px; font-size: clamp(2rem,5vw,3.4rem); }
.mind-session-content > p { max-width: 560px; margin: 0; color: var(--text-soft); font-size: .8rem; }
.mind-session-content > small { margin-top: 12px; color: var(--muted); font-size: .6rem; }
.pattern-pill { margin-top: 16px; padding: 7px 11px; color: #bed8ff; border-radius: 99px; background: rgba(99,165,255,.1); font-size: .66rem; }
.mood-field, .mind-note { width: min(390px,100%); margin-top: 20px; display: grid; gap: 6px; text-align: right; }
.mind-start { width: min(390px,100%); margin-top: 12px; }
.mind-note textarea { min-height: 92px; padding-block: 10px; resize: vertical; }
.breathing-orb { --phase-progress: 0%; width: min(260px,64vw); aspect-ratio: 1; margin-bottom: 14px; padding: 13px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(#63a5ff var(--phase-progress),rgba(255,255,255,.08) 0); filter: drop-shadow(0 20px 45px rgba(0,0,0,.35)); }
.breathing-orb::before { content: ''; position: absolute; inset: 13px; border-radius: inherit; background: radial-gradient(circle at 40% 35%,rgba(99,165,255,.35),rgba(13,17,25,.95) 67%); animation: breathe 4s ease-in-out infinite alternate; }
.breathing-orb.exhale::before { animation-direction: alternate-reverse; }
.breathing-orb.hold::before, .breathing-orb.pause::before, .breathing-orb.steady::before { animation: none; }
.breathing-orb div { z-index: 1; display: grid; text-align: center; }
.breathing-orb strong { font-size: 1rem; }
.breathing-orb span { color: white; font-size: 2.3rem; line-height: 1.2; }
@keyframes breathe { to { transform: scale(.83); opacity: .76; } }
.session-clock { display: grid; margin-top: 17px; }
.session-clock strong { font-size: 1.45rem; direction: ltr; }
.session-clock span { color: var(--muted); font-size: .59rem; }
.mind-controls { width: min(390px,100%); margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.completion-mark { width: 78px; height: 78px; display: grid; place-items: center; color: #07150e; background: var(--success); border-radius: 50%; font-size: 2rem; font-weight: 800; box-shadow: 0 0 45px rgba(61,220,151,.25); }

/* صوت */
.audio-player-card { margin-bottom: 12px; padding: 17px; display: grid; grid-template-columns: auto 1fr minmax(250px,390px); align-items: center; gap: 17px; border: 1px solid rgba(99,165,255,.2); border-radius: 22px; background: linear-gradient(110deg,rgba(99,165,255,.075),var(--surface) 60%); }
.player-cover { width: 76px; height: 76px; overflow: hidden; border-radius: 15px; }
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-info h2 { margin: 3px 0; font-size: 1rem; }
.player-info p { margin: 0; color: var(--muted); font-size: .61rem; }
.audio-player-card audio { width: 100%; height: 48px; color-scheme: dark; }
.audio-notice { border-color: var(--border); background: var(--surface-soft); }
.audio-notice strong { color: var(--text-soft); }
.audio-group { margin-top: 18px; padding: 19px; border: 1px solid var(--border); border-radius: 21px; background: var(--surface); }
.audio-group > header { margin-bottom: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; }
.audio-group > header img { width: 58px; height: 58px; object-fit: cover; border-radius: 13px; }
.audio-group > header h2 { margin: 3px 0; font-size: .9rem; }
.audio-group > header small { color: var(--muted); font-size: .61rem; }
.track-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.track-list button { min-height: 64px; padding: 8px 11px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; color: var(--text); text-align: right; border: 1px solid var(--border); border-radius: 13px; background: rgba(7,8,12,.34); cursor: pointer; }
.track-list button:hover { background: var(--surface-raised); }
.track-list button.current { border-color: rgba(99,165,255,.45); background: rgba(99,165,255,.08); }
.track-play { width: 36px; height: 36px; display: grid; place-items: center; padding-right: 2px; color: white; border-radius: 50%; background: var(--brand); font-size: .68rem; }
.track-list button > div { display: grid; }
.track-list strong { font-size: .7rem; direction: ltr; text-align: left; }
.track-list small { color: var(--muted); font-size: .55rem; }
.track-list b { color: var(--muted); font-size: .53rem; font-weight: 600; }

.boot-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0a0b0f; }
.boot-screen img { width: 112px; height: 112px; object-fit: contain; }
.boot-screen strong { margin-top: 12px; font-size: 1.25rem; letter-spacing: -.4px; }
.boot-screen span { color: var(--text-soft); font-size: .72rem; }
.boot-track { width: 150px; height: 4px; margin: 20px 0 10px; border-radius: 99px; background: #20232c; overflow: hidden; }
.boot-track i { display: block; width: 45%; height: 100%; background: #ff4c12; border-radius: inherit; animation: boot 1.15s ease-in-out infinite alternate; }
@keyframes boot { from { transform: translateX(110%); } to { transform: translateX(-120%); } }

#blazor-error-ui { display: none; position: fixed; z-index: 1000; right: 14px; bottom: 14px; left: 14px; padding: 14px 18px; border-radius: 14px; background: #7e2314; color: white; box-shadow: var(--shadow); }
#blazor-error-ui a { color: white; font-weight: 800; margin-right: 8px; }
#blazor-error-ui .dismiss { float: left; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; }
.blazor-error-boundary { padding: 18px; border-radius: 14px; background: #7e2314; }
.blazor-error-boundary::after { content: 'مشکلی در نمایش این بخش پیش آمد.'; }

@media (max-width: 1050px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .feature-card-wide { grid-column: 1 / -1; }
    .drill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-cards { grid-template-columns: repeat(3, 1fr); }
    .stats-layout { grid-template-columns: 1fr; }
    .plan-summary { grid-template-columns: repeat(2, 1fr); }
    .trend-grid { grid-template-columns: 1fr; }
    .lifestyle-overview { grid-template-columns: 1fr 1fr; }
    .lifestyle-card.audio { grid-column: 1/-1; min-height: 300px; }
    .nutrition-profile-grid { grid-template-columns: 1fr 1fr; }
    .nutrition-dashboard { grid-template-columns: 1fr 1fr 1fr; }
    .calorie-card { grid-column: 1/-1; }
    .meal-fields { grid-template-columns: 1fr 1fr 1fr; }
    .meal-preview { grid-column: span 2; }
    .mind-grid { grid-template-columns: 1fr 1fr; }
    .subscription-tiers { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .today-board { margin-inline: -4px; padding: 18px; border-radius: 20px; }
    .today-board > header { align-items: start; }
    .today-board header p { display: none; }
    .today-goals { grid-template-columns: 1fr; gap: 8px; }
    .today-goals article { min-height: 88px; padding: 10px 12px; }
    .goal-ring { width: 62px; height: 62px; flex-basis: 62px; }
    .goal-editor { grid-template-columns: 1fr 1fr; }
    .goal-editor .button { grid-column: 1 / -1; }
    .today-actions { flex-direction: column; }
    .home-plan-strip { align-items: start; }
    .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 4px; }
    .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); letter-spacing: -2px; }
    .hero-visual { min-height: 325px; order: -1; }
    .hero-visual > img { width: 53%; }
    .dashboard-strip { grid-template-columns: 1fr; }
    .dashboard-strip article { border-left: 0; border-bottom: 1px solid var(--border); }
    .dashboard-strip article:last-child { border-bottom: 0; }
    .section-block { padding-top: 64px; }
    .section-heading { align-items: start; flex-direction: column; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card-wide { grid-column: auto; }
    .install-card { grid-template-columns: auto 1fr; }
    .install-card .button { grid-column: 1 / -1; width: 100%; }
    .page-heading { align-items: start; }
    .library-toolbar { top: 66px; flex-direction: column; align-items: stretch; }
    .search-box { flex-basis: auto; width: 100%; }
    .library-selects { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
    .library-selects label { min-width: 0; }
    .library-selects select { width: 100%; max-width: none; }
    .filter-chips { width: 100%; }
    .drill-grid { grid-template-columns: 1fr; }
    .drill-cover { height: 190px; }
    .video-dialog-backdrop { padding: 0; align-items: end; }
    .video-dialog { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; border-bottom: 0; }
    .video-dialog video { border-radius: 24px 24px 0 0; }
    .guest-panel { grid-template-columns: 1fr; min-height: auto; }
    .guest-visual { min-height: 215px; }
    .guest-copy ul { grid-template-columns: 1fr; }
    .guest-actions .button { flex-basis: 130px; padding-inline: 10px; }
    .account-heading { flex-direction: column; }
    .account-heading .button { width: 100%; }
    .account-heading-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .profile-form { grid-template-columns: 1fr; }
    .avatar-picker > div { grid-template-columns: 1fr 1fr; }
    .drill-player-card { margin-inline: -16px; border-radius: 0; border-inline: 0; }
    .offline-media-panel { align-items: stretch; flex-direction: column; }
    .offline-media-panel .button { width: 100%; }
    .drill-detail-grid { grid-template-columns: 1fr; padding-top: 18px; }
    .drill-detail-copy, .drill-facts { border-radius: 18px; }
    .session-start-panel { min-height: 560px; padding: 28px 18px; border-radius: 22px; }
    .session-layout { grid-template-columns: 1fr; }
    .session-court-card, .session-side-card, .stats-map-card, .history-card { padding: 17px; border-radius: 19px; }
    .session-side-card { position: static; }
    .camera-controls { grid-template-columns: 1fr; }
    .zone-picker > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .zone-button { font-size: .61rem; }
    .stats-heading { align-items: start; flex-direction: column; }
    .period-switch { width: 100%; }
    .period-switch button { min-width: 0; padding-inline: 4px; flex: 1; }
    .stats-cards { grid-template-columns: 1fr 1fr; }
    .stats-cards article { min-height: 105px; }
    .stats-cards article:last-child { grid-column: 1 / -1; }
    .plan-heading { align-items: start; flex-direction: column; }
    .plan-heading .button { width: 100%; }
    .plan-builder { padding: 22px 17px; border-radius: 20px; }
    .plan-builder-fields { grid-template-columns: 1fr 1fr; }
    .plan-builder-fields .button { grid-column: 1 / -1; }
    .plan-summary { grid-template-columns: 1fr 1fr; }
    .plan-summary article { min-height: 96px; }
    .today-plan-card { align-items: stretch; flex-direction: column; }
    .today-plan-actions, .today-plan-card.rest .today-plan-actions { min-width: 0; }
    .plan-week { margin-inline: -4px; padding: 17px 12px; border-radius: 19px; }
    .plan-week-grid { margin-inline: -12px; padding-inline: 12px; }
    .plan-day { min-width: 132px; }
    .plan-privacy-note { align-items: start; flex-direction: column; }
    .plan-delete-confirm { width: 100%; align-items: stretch; flex-wrap: wrap; }
    .plan-delete-confirm span { flex-basis: 100%; }
    .comparison-grid { grid-template-columns: 1fr 1fr; }
    .trend-section { margin-inline: -4px; padding: 17px 12px; border-radius: 19px; }
    .trend-heading { align-items: start; }
    .privacy-banner, .audio-notice { align-items: start; flex-direction: column; gap: 4px; }
    .lifestyle-overview { grid-template-columns: 1fr; }
    .lifestyle-card, .lifestyle-card.audio { grid-column: auto; min-height: 330px; }
    .nutrition-profile-card, .meal-builder, .meal-history { margin-inline: -4px; padding: 17px 13px; border-radius: 19px; }
    .section-title { align-items: start; }
    .nutrition-profile-grid { grid-template-columns: 1fr 1fr; }
    .nutrition-dashboard { grid-template-columns: 1fr; }
    .calorie-card { grid-column: auto; }
    .macro-card { min-height: 106px; }
    .water-card { grid-template-columns: auto 1fr; padding: 15px; }
    .water-actions { grid-column: 1/-1; grid-template-columns: 1fr 1fr 1fr; }
    .water-actions .undo { grid-column: auto; }
    .food-results { grid-template-columns: 1fr 1fr; }
    .meal-fields { grid-template-columns: 1fr 1fr; }
    .meal-preview { grid-column: 1/-1; }
    .meal-fields .button { grid-column: 1/-1; }
    .meal-history article { grid-template-columns: 1fr auto; gap: 8px; }
    .meal-history article button { grid-column: 1/-1; }
    .mind-summary { grid-template-columns: 1fr 1fr; }
    .mind-summary article:last-child { grid-column: 1/-1; }
    .mind-grid { grid-template-columns: 1fr; }
    .mind-card { min-height: 310px; }
    .mind-session { min-height: calc(100dvh - 66px); margin: -14px -16px -90px; padding: 17px; padding-bottom: 92px; }
    .audio-player-card { grid-template-columns: auto 1fr; }
    .audio-player-card audio { grid-column: 1/-1; }
    .track-list { grid-template-columns: 1fr; }
    .subscription-heading { align-items: start; }
    .subscription-notice, .subscription-login-note, .payment-security-note { align-items: stretch; flex-direction: column; gap: 7px; }
    .subscription-tier { margin-inline: -4px; padding: 19px 13px; border-radius: 20px; }
    .subscription-features { grid-template-columns: 1fr; }
    .plan-option { grid-template-columns: 1fr 1fr; }
    .plan-option .button { grid-column: 1/-1; }
    .subscription-login-note .button { width: 100%; }
    .payment-result { min-height: 510px; margin-inline: -4px; padding-inline: 18px; border-radius: 22px; }
}

@media (max-width: 360px) {
    .guest-actions .button { flex-basis: 100%; }
    .library-selects { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .clear-filters { grid-column: 1 / -1; }
    .goal-editor { grid-template-columns: 1fr; }
    .goal-editor .button { grid-column: auto; }
    .zone-picker > div { grid-template-columns: 1fr 1fr; }
    .home-plan-strip { flex-direction: column; }
    .plan-builder-fields { grid-template-columns: 1fr; }
    .plan-builder-fields .button { grid-column: auto; }
    .plan-summary { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
    .history-actions { grid-template-columns: 1fr; }
    .nutrition-profile-grid { grid-template-columns: 1fr; }
    .nutrition-profile-grid label.wide { grid-column: auto; }
    .calorie-card { align-items: start; flex-direction: column; }
    .food-results { grid-template-columns: 1fr; }
    .meal-fields { grid-template-columns: 1fr; }
    .meal-preview, .meal-fields .button { grid-column: auto; }
    .water-card { grid-template-columns: 1fr; }
    .water-visual { margin: auto; }
    .water-actions { grid-template-columns: 1fr; }
    .mind-summary { grid-template-columns: 1fr; }
    .mind-summary article:last-child { grid-column: auto; }
    .mind-controls { grid-template-columns: 1fr; }
    .audio-player-card { grid-template-columns: 1fr; text-align: center; }
    .player-cover { margin: auto; }
    .audio-player-card audio { grid-column: auto; }
    .account-heading-actions { grid-template-columns: 1fr; }
    .plan-option { grid-template-columns: 1fr; }
    .plan-option .button { grid-column: auto; }
    .purchase-history article { align-items: start; flex-direction: column; }
    .purchase-history article > div:last-child { text-align: right; }
    .result-actions { width: 100%; }
    .result-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* تیم: اطلاعات عضویت روشن، کد دعوت کوتاه‌عمر و فرم‌های خوانا در روز/شب. */
.team-heading { align-items: center; }
.team-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.team-card { min-width: 0; padding: clamp(20px, 3vw, 29px); border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.team-card h2 { margin: 6px 0 8px; font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
.team-card p { color: var(--muted); font-size: .82rem; }
.team-card label { display: grid; gap: 7px; margin: 24px 0 16px; color: var(--text-soft); font-size: .78rem; font-weight: 700; }
.team-card input { width: 100%; min-width: 0; min-height: 48px; padding: 0 14px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border-strong); border-radius: 12px; outline: 0; }
.team-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.team-card input[dir="ltr"] { text-align: left; font-family: ui-monospace, SFMono-Regular, monospace; }
.team-overview, .team-invite { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.team-invite { align-items: start; flex-direction: column; }
.team-invite code { max-width: 100%; padding: 12px 15px; overflow-wrap: anywhere; color: var(--brand-light); font-size: clamp(.7rem, 2.4vw, 1.05rem); letter-spacing: .08em; background: var(--surface-soft); border: 1px dashed var(--border-strong); border-radius: 12px; }
.team-roster ol { margin: 17px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.team-roster li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.team-roster li strong { min-width: 0; overflow-wrap: anywhere; font-size: .82rem; }
.team-member-info { min-width: 0; flex: 1 1 100px; display: grid; gap: 3px; }
.team-roster li small { color: var(--muted); font-size: .7rem; }
.team-role-action { min-height: 40px; margin-inline-start: auto; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .73rem; font-weight: 700; cursor: pointer; }
.team-role-action:hover, .team-role-action:focus-visible { border-color: var(--brand); color: var(--brand); }
.team-role-action:disabled { opacity: .55; cursor: wait; }
.team-coach-panel { margin-bottom: 18px; }
.team-drills { margin-bottom: 18px; }
.team-drill-list { display: grid; gap: 9px; padding: 0; margin: 16px 0; list-style: none; }
.team-drill-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.team-drill-list a { font-weight: 750; color: var(--text); overflow-wrap: anywhere; }
.team-drill-list a:hover { color: var(--brand); }
.team-drill-list small { color: var(--muted); }
.team-drill-day { padding: 5px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand) !important; font-weight: 700; white-space: nowrap; }
.team-drill-weekday { margin: 0 !important; min-width: 116px; flex: 0 1 130px; }
.team-drill-weekday select { width: 100%; min-height: 40px; padding: 0 8px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; }
.team-drill-weekday select:focus-visible { outline: 3px solid var(--brand-soft); border-color: var(--brand); }
.team-drill-list button { margin-inline-start: auto; }
.team-drill-add { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.team-drill-add label { flex: 1 1 230px; margin: 0; }
.team-drill-add select { width: 100%; min-height: 48px; padding: 0 12px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; }
.team-drill-add select:focus-visible { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.team-roster-overview { margin-bottom: 18px; }
.team-roster-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 12px; }
.team-roster-metrics > div { min-width: 0; padding: 14px; display: grid; gap: 3px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.team-roster-metrics strong { color: var(--brand); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; }
.team-roster-metrics span { color: var(--muted); font-size: .75rem; }
.team-roster-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr); gap: 12px; align-items: end; margin-top: 14px; }
.team-roster .team-roster-filters label { margin: 0; }
.team-roster select { width: 100%; min-height: 48px; padding: 0 12px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border-strong); border-radius: 12px; font: inherit; }
.team-roster select:focus-visible { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.team-roster-result { margin: 13px 0 0; }
.team-roster-empty { padding: 18px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.team-avatar { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--avatar-a), var(--avatar-b)); border-radius: 50%; }

@media (max-width: 720px) {
    .team-entry-grid { grid-template-columns: 1fr; }
    .team-overview { align-items: start; flex-direction: column; }
    .team-roster-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
    .team-card { margin-inline: -4px; padding: 19px 14px; border-radius: 20px; }
    .team-overview .button, .team-entry-grid .button { width: 100%; }
    .team-roster-metrics > div { padding: 10px 7px; }
    .team-roster-filters { grid-template-columns: 1fr; }
}
