.yf-welcome-modal__icon {
    margin-right: 0;
    margin-left: 0;
}

.yf-task-section__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    color: var(--yf-reward-ink, #182a25);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.yf-task-section__toggle span {
    font-size: 14px;
    font-weight: 800;
}

.yf-task-section__toggle i {
    font-size: 13px;
    transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.yf-task-section__toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.yf-task-list-collapse {
    height: auto;
    overflow: hidden;
    opacity: 1;
    transition: height .46s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
    will-change: height, opacity;
}

.yf-task-list-collapse > .yf-task-list {
    min-height: 1px;
}

.yf-task-list-collapse.is-collapsed {
    height: 0;
    opacity: 0;
}

html {
    scroll-behavior: smooth;
}

body.yf-dashboard-auth .yf-dashboard-shell .card,
body.yf-dashboard-auth .yf-dashboard-shell .nav-element,
body.yf-dashboard-auth .yf-dashboard-shell .btn,
body.yf-dashboard-auth .yf-dashboard-shell .dropdown-item {
    transition-duration: .24s;
    transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}

body.yf-dashboard-auth .yf-dashboard-shell .card.highlight,
body.yf-dashboard-auth .yf-dashboard-shell .card.highlight-leaving {
    transition: border-color 180ms ease,
                box-shadow 180ms ease,
                transform 220ms cubic-bezier(.22, 1, .36, 1),
                opacity 180ms ease,
                filter 180ms ease;
}

body.yf-dashboard-auth .yf-dashboard-shell .card.highlight-leaving {
    opacity: .2;
    filter: saturate(.55) brightness(.68);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    body.yf-dashboard-auth:not(.yf-reduced-motion) #overlay {
        transition-duration: 240ms !important;
    }

    body.yf-dashboard-auth:not(.yf-reduced-motion) .tooltipTutorial {
        transition-duration: 220ms, 320ms !important;
    }

    body.yf-dashboard-auth:not(.yf-reduced-motion) .tooltipTutorial__content {
        transition-duration: 190ms, 270ms !important;
    }

    body.yf-dashboard-auth:not(.yf-reduced-motion) .yf-dashboard-shell .card.highlight,
    body.yf-dashboard-auth:not(.yf-reduced-motion) .yf-dashboard-shell .card.highlight-leaving {
        transition-duration: 180ms, 180ms, 220ms, 180ms, 180ms !important;
    }
}

body.yf-dashboard-auth.yf-reduced-motion .yf-task-list-collapse,
body.yf-dashboard-auth.yf-reduced-motion .yf-task-section__toggle i {
    transition-duration: .01ms;
}

@media (prefers-reduced-motion: reduce) {
    body.yf-dashboard-auth.yf-reduced-motion .yf-task-list-collapse,
    body.yf-dashboard-auth.yf-reduced-motion .yf-task-section__toggle i {
        transition-duration: .01ms;
    }
}

/* «Получить +N YOUFI»: one calm row — coin icon, action, reward — plain white text, no nested chip (both designs) */
.yf-task-action.yf-task-action--claim {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 42px;
    padding: 0 11px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #168166 !important;
    color: #fff !important;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 18px -12px rgba(22, 129, 102, .9) !important;
    transition: background-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.yf-task-action.yf-task-action--claim:hover:not(:disabled) { background: #127157 !important; filter: none; }
.yf-task-action.yf-task-action--claim:active:not(:disabled) { transform: scale(.97); }
.yf-task-action--claim > i { font-size: 15px; opacity: .9; }
.yf-task-action--claim .yf-claim__label { font-size: 12.5px; }
.yf-task-action--claim .yf-claim__reward { font-size: 12.5px; letter-spacing: -.01em; font-weight: 800; font-variant-numeric: tabular-nums; }
.yf-task-action--claim .yf-claim__reward::before { content: "·"; margin-right: 5px; opacity: .6; font-weight: 700; }
.dark-theme .yf-task-action.yf-task-action--claim { background: #1a9474 !important; }
.dark-theme .yf-task-action.yf-task-action--claim:hover:not(:disabled) { background: #1fa580 !important; }

/* ── First-login welcome (both designs; «Эфир» finish in css/redesign-web/account.css) ── */
.yf-welcome {
    --wl-ink: #13302a;
    --wl-muted: #5f746d;
    --wl-card: #f4f8f6;
    --wl-line: rgba(25, 92, 73, .12);
    --wl-accent: #168166;
    --wl-accent-soft: rgba(22, 129, 102, .1);
    --wl-hero: radial-gradient(120% 140% at 0% 0%, #1f9b73 0%, transparent 55%), radial-gradient(120% 140% at 100% 0%, #0f5d4a 0%, transparent 60%), linear-gradient(160deg, #0d4a3b, #0b2e26);
}
.dark-theme .yf-welcome {
    --wl-ink: #eef6f3;
    --wl-muted: #a3b5af;
    --wl-card: rgba(255, 255, 255, .04);
    --wl-line: rgba(211, 225, 230, .1);
    --wl-accent: #6fd3ad;
    --wl-accent-soft: rgba(111, 211, 173, .12);
}
.yf-welcome .modal-dialog { max-width: 580px; }
.yf-welcome .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 40px 90px -30px rgba(5, 30, 24, .55), 0 0 0 1px rgba(255, 255, 255, .06);
    animation: yf-welcome-in .6s cubic-bezier(.2, .9, .3, 1.05) both;
}
@keyframes yf-welcome-in {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to { opacity: 1; transform: none; }
}
.yf-welcome__hero {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 6px;
    padding: 30px 30px 26px;
    overflow: hidden;
    background: var(--wl-hero);
    color: #fff;
    isolation: isolate;
}
.yf-welcome__glow {
    position: absolute;
    z-index: -1;
    inset: -40% -10% auto auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(111, 231, 183, .45), transparent 65%);
    animation: yf-welcome-glow 6s ease-in-out infinite alternate;
}
@keyframes yf-welcome-glow { to { transform: translate(-30px, 24px) scale(1.12); } }
/* Brand mark: large and translucent, a watermark on the right of the hero (vertically centred, not clipped at the bottom) */
.yf-welcome__mark {
    position: absolute;
    z-index: -1;
    top: 50%;
    right: -18px;
    width: 250px;
    height: auto;
    opacity: .15;
    transform: translateY(-46%);
    pointer-events: none;
}
.yf-welcome__hero .btn-close { position: absolute; top: 18px; right: 18px; opacity: .8; }
.yf-welcome__hero .btn-close:hover { opacity: 1; }
.yf-welcome .yf-welcome__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #e3fdf1;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.yf-welcome .yf-welcome__eyebrow i { color: #8ff0c6; font-size: 14px; }
/* !important: the legacy .yf-welcome-modal h2 colours (light and dark) would paint it black on green */
.yf-welcome .yf-welcome__hero > h2 { margin: 12px 0 0; color: #fff !important; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
/* !important: generic modal paragraph rules of both designs would turn it grey on the green hero */
.yf-welcome .yf-welcome__hero > .yf-welcome__lead { max-width: 380px; margin: 6px 0 0; color: rgba(236, 253, 245, .9) !important; font-size: 14.5px; line-height: 1.55; }
.yf-welcome .modal-body { display: grid; gap: 14px; padding: 22px 26px 6px; color: var(--wl-ink); }
.yf-welcome__features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.yf-welcome__features li {
    display: grid;
    gap: 10px;
    padding: 14px 12px;
    border: 1px solid var(--wl-line);
    border-radius: 16px;
    background: var(--wl-card);
    animation: yf-welcome-in .6s cubic-bezier(.2, .9, .3, 1.05) both;
}
.yf-welcome__features li:nth-child(2) { animation-delay: .06s; }
.yf-welcome__features li:nth-child(3) { animation-delay: .12s; }
.yf-welcome__features li > span {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: var(--wl-accent-soft);
    color: var(--wl-accent);
    font-size: 18px;
}
.yf-welcome__features strong { display: block; color: var(--wl-ink); font-size: 13.5px; }
.yf-welcome__features small { display: block; margin-top: 2px; color: var(--wl-muted); font-size: 12px; line-height: 1.35; }
.yf-welcome__tour {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--wl-line);
    border-radius: 18px;
    background: linear-gradient(135deg, var(--wl-accent-soft), transparent 72%), var(--wl-card);
    animation: yf-welcome-in .6s .18s cubic-bezier(.2, .9, .3, 1.05) both;
}
.yf-welcome__tour-icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(160deg, #1f9b73, #0f5d4a);
    color: #fff;
    font-size: 21px;
    box-shadow: 0 10px 20px -12px rgba(15, 93, 74, .9);
}
.yf-welcome__tour-text { display: grid; gap: 3px; min-width: 0; }
.yf-welcome__tour-text strong { color: var(--wl-ink); font-size: 14.5px; font-weight: 750; }
.yf-welcome__tour-text span { color: var(--wl-muted); font-size: 12.5px; line-height: 1.5; }
.yf-welcome__tour-progress { display: flex; grid-column: 2; align-items: center; gap: 12px; }
.yf-welcome__tour-track { display: grid; flex: 1 1 auto; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 240px; }
.yf-welcome__tour-track b { display: block; height: 5px; border-radius: 999px; background: var(--wl-line); }
.yf-welcome__tour-track b:first-child { background: var(--wl-accent); }
.yf-welcome__tour-reward {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 7px;
    border-radius: 999px;
    background: var(--wl-accent-soft);
    color: var(--wl-accent);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .03em;
}
.yf-welcome__tour-reward i { font-size: 14px; }
.yf-welcome .modal-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; padding: 16px 26px 24px; }
.yf-welcome .modal-footer > * { margin: 0; }
.yf-welcome .modal-footer .btn { min-height: 48px; border-radius: 14px; font-weight: 700; }
.yf-welcome .yf-welcome-modal__primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.yf-welcome .yf-welcome-modal__primary i { transition: transform .25s ease; }
.yf-welcome .yf-welcome-modal__primary:hover i { transform: translateX(3px); }
@media (max-width: 575.98px) {
    .yf-welcome__hero { padding: 26px 20px 22px; }
    .yf-welcome__hero h2 { font-size: 25px; }
    .yf-welcome__mark { right: -36px; width: 190px; opacity: .12; }
    .yf-welcome__tour { grid-template-columns: minmax(0, 1fr); }
    .yf-welcome__tour-progress { grid-column: 1; }
    .yf-welcome .modal-body { padding: 18px 18px 4px; }
    .yf-welcome__features { grid-template-columns: minmax(0, 1fr); }
    .yf-welcome__features li { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 11px 12px; }
    .yf-welcome .modal-footer { padding: 14px 18px 20px; }
}

/* ── YouFiHub structural skeleton: real hub classes, text replaced by shimmering bars ── */
.yf-hub-skeleton { --sk-base: rgba(25, 92, 73, .07); --sk-glow: rgba(25, 92, 73, .13); pointer-events: none; }
.dark-theme .yf-hub-skeleton { --sk-base: rgba(255, 255, 255, .05); --sk-glow: rgba(255, 255, 255, .1); }
.yf-hub-skeleton .yf-sk {
    display: block;
    max-width: 100%;
    height: 10px;
    margin: 4px 0;
    border-radius: 999px;
    background: linear-gradient(100deg, var(--sk-base) 20%, var(--sk-glow) 40%, var(--sk-base) 60%);
    background-size: 220% 100%;
    animation: yf-hub-shimmer 1.4s ease-in-out infinite;
}
.yf-hub-skeleton .yf-sk--strong { height: 14px; margin: 6px 0; }
.yf-hub-skeleton .yf-sk--pill { height: 26px; border-radius: 999px; }
.yf-hub-skeleton .yf-sk--icon { width: 100%; height: 100%; margin: 0; border-radius: inherit; }
.yf-hub-skeleton .yf-sk--avatar { width: 100%; height: 100%; margin: 0; border-radius: 50%; }
.yf-hub-skeleton .yf-sk--button { width: 100%; min-width: 120px; height: 38px; margin: 0; border-radius: 11px; }
.yf-hub-skeleton :is(.yf-task-card__icon, .yf-leader-avatar, .yf-shop-pass > i) { overflow: hidden; background: transparent !important; color: transparent !important; }
.yf-hub-skeleton .yf-task-progress__track { background: var(--sk-base) !important; }
.yf-hub-skeleton .yf-shop-pass > .yf-sk--icon { width: 40px; height: 40px; flex: none; border-radius: 12px; }
.yf-hub-skeleton .yf-referral-actions { display: flex; gap: 8px; min-width: 240px; }
@keyframes yf-hub-shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* ── Onboarding motion (both designs) ─────────────────────────────────────
   The guide overlay is toggled with [hidden]: fade it in and out instead of popping
   (display transitions with allow-discrete; older browsers simply switch instantly). */
.yf-onboarding-focus {
    opacity: 1;
    transition: opacity .28s ease, display .28s allow-discrete, overlay .28s allow-discrete;
}
.yf-onboarding-focus[hidden] { opacity: 0; }
.yf-onboarding-focus[hidden] * { pointer-events: none !important; }
@starting-style {
    .yf-onboarding-focus:not([hidden]) { opacity: 0; }
}
.yf-onboarding-focus__spotlight,
.yf-onboarding-focus__shade { transition-property: top, left, width, height, opacity; transition-duration: .32s; transition-timing-function: cubic-bezier(.22, 1, .36, 1); }
/* Consecutive hints: the text fades up softly when the guide switches step */
.yf-onboarding-focus__panel.is-guide-swap > * { animation: yf-guide-swap .32s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes yf-guide-swap { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* YouFiHub button eases into and out of the spotlight */
#tasks-btn { transition: background-color .3s ease, box-shadow .3s ease, color .3s ease; }

/* Claim: success beat on the button and card, then the new snapshot rises in */
.yf-task-action.yf-task-action--claim.is-claimed {
    animation: yf-claim-pop .42s cubic-bezier(.2, .9, .3, 1.25) both !important;
    pointer-events: none;
}
.yf-task-card.is-claimed { transition: opacity .35s ease .18s, transform .35s ease .18s; opacity: .55; transform: scale(.99); }
@keyframes yf-claim-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
.yf-task-card--enter { animation: yf-task-card-enter .42s cubic-bezier(.22, 1, .36, 1) backwards; animation-delay: calc(var(--yf-task-enter, 0) * 45ms); }
@keyframes yf-task-card-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.yf-balance-bump { animation: yf-balance-bump .6s ease; }
.yf-balance-loading { display: inline-block; min-width: 64px; min-height: 18px; border-radius: 6px; background: linear-gradient(100deg, rgba(130,150,143,.12) 20%, rgba(130,150,143,.3) 40%, rgba(130,150,143,.12) 60%); background-size: 220% 100%; animation: yf-hub-shimmer 1.4s ease-in-out infinite; }
@keyframes yf-balance-bump { 0%, 100% { transform: none; } 35% { transform: scale(1.06); } }

body.yf-reduced-motion :is(.yf-onboarding-focus, .yf-onboarding-focus__spotlight, .yf-onboarding-focus__shade, #tasks-btn) { transition: none; }
body.yf-reduced-motion :is(.yf-onboarding-focus__panel.is-guide-swap > *, .yf-task-card--enter, .yf-balance-bump, .yf-task-action--claim.is-claimed) { animation: none !important; }

/* Hint hand-over (rewardsHub.js ghostGuidePanel): the real panel waits invisibly for its new place */
.yf-onboarding-focus.is-guide-swapping .yf-onboarding-focus__panel { opacity: 0 !important; transition: none !important; }
.yf-onboarding-focus.is-guide-ready:not(.is-guide-swapping) .yf-onboarding-focus__panel { transition: top .28s cubic-bezier(.22, 1, .36, 1), left .28s cubic-bezier(.22, 1, .36, 1), opacity .24s ease; }
.yf-onboarding-ghost { will-change: opacity, transform; }
/* While the overlay fades out ([hidden] + display transition) its panel is already reset to the default
   place: keep it invisible, the ghost copy carries the fade where the hint really was. */
.yf-onboarding-focus[hidden] .yf-onboarding-focus__panel { opacity: 0 !important; transition: none !important; }

/* YouFiHub task groups: soft header plates instead of hairline separators (both designs) */
.yf-task-section + .yf-task-section { margin-top: 18px !important; padding-top: 0 !important; border-top: 0 !important; }
.yf-task-section > .yf-task-section__title,
.yf-task-disclosure > summary.yf-task-section__title {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title chevron" "hint chevron";
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
    margin: 0 0 12px !important;
    padding: 12px 14px 12px 16px !important;
    border: 0 !important;
    border-radius: 14px;
    background: rgba(22, 129, 102, .06);
    box-shadow: inset 0 0 0 1px rgba(22, 129, 102, .1);
    transition: background-color .2s ease;
}
.yf-task-section > .yf-task-section__title > span,
.yf-task-section > .yf-task-section__title > .yf-task-section__toggle,
.yf-task-disclosure > summary > span { grid-area: title; font-size: 14.5px; font-weight: 750; color: #14332b; }
.yf-task-section > .yf-task-section__title > small,
.yf-task-disclosure > summary > small { grid-area: hint; margin: 0 !important; color: #6a7f78; font-size: 12px; font-weight: 500; }
.yf-task-disclosure > summary.yf-task-section__title { cursor: pointer; }
.yf-task-disclosure > summary.yf-task-section__title:hover { background: rgba(22, 129, 102, .1); }
.yf-task-disclosure > summary.yf-task-section__title::after {
    grid-area: chevron;
    position: static !important;
    width: 28px !important; height: 28px !important;
    border: 0 !important; border-radius: 50%;
    background: rgba(22, 129, 102, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23168265' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat !important;
    transform: none !important;
    transition: transform .28s cubic-bezier(.25, .8, .25, 1);
}
.yf-task-disclosure[open]:not(.is-closing) > summary.yf-task-section__title::after { transform: rotate(180deg) !important; }
.yf-task-section > .yf-task-section__title > .yf-task-section__toggle { display: contents; }
.yf-task-section > .yf-task-section__title > .yf-task-section__toggle > span { grid-area: title; }
.yf-task-section > .yf-task-section__title > .yf-task-section__toggle > i { grid-area: chevron; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(22, 129, 102, .12); color: #168265; }
.yf-task-period-title { margin: 16px 2px 10px !important; font-size: 11.5px !important; font-weight: 750 !important; letter-spacing: .06em; text-transform: uppercase; opacity: 1 !important; color: #7a8e88; }
.dark-theme .yf-task-section > .yf-task-section__title,
.dark-theme .yf-task-disclosure > summary.yf-task-section__title { background: rgba(120, 220, 180, .06); box-shadow: inset 0 0 0 1px rgba(120, 220, 180, .1); }
.dark-theme .yf-task-section > .yf-task-section__title > span,
.dark-theme .yf-task-disclosure > summary > span { color: #eaf4f0; }
.dark-theme .yf-task-period-title, .dark-theme .yf-task-section__title small { color: #93a8a1 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-task-section { margin-top: 18px; }
:root body.yf-redesign.yf-dashboard-auth .yf-task-section > .yf-task-section__title,
:root body.yf-redesign.yf-dashboard-auth .yf-task-disclosure > summary.yf-task-section__title { background: var(--rd-surface-grouped); box-shadow: inset 0 0 0 1px var(--rd-line-soft); border-bottom: 0 !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-task-disclosure > summary.yf-task-section__title:hover { background: var(--rd-fill-soft); }
:root body.yf-redesign.yf-dashboard-auth .yf-task-section > .yf-task-section__title > span,
:root body.yf-redesign.yf-dashboard-auth .yf-task-disclosure > summary > span { color: var(--rd-ink) !important; }
:root body.yf-redesign.yf-dashboard-auth .yf-task-disclosure { color: inherit !important; }
body.yf-reduced-motion .yf-task-disclosure > summary.yf-task-section__title::after { transition: none; }
.yf-task-disclosure:not([open]) > summary.yf-task-section__title,
.yf-task-disclosure.is-closing > summary.yf-task-section__title { margin-bottom: 0 !important; }
