/* [ref-v2 2026-10-15] Новая страница игрока /referral/ (includes/page_v2.php).
   Переменные темы NEO: --card, --input-form, --button, --span (зелёный акцент), --money (золото).
   Префикс rf- — чтобы не пересекаться со старыми ref-* и с админкой ra-*. */

.rf {
    --rf-r: 18px;
    --rf-gap: 14px;
    --rf-line: rgba(255, 255, 255, 0.06);
    --rf-glass: rgba(255, 255, 255, 0.03);
    --rf-accent: var(--span, #76ab29);
    --rf-gold: var(--money, #f4ca80);
    display: flex;
    flex-direction: column;
    gap: var(--rf-gap);
    padding-bottom: 32px;
    color: var(--text-default);
    /* [ref-v2e] шрифты: по умолчанию сайтовые, data-font — выбранная пара */
    --rf-head: var(--font-family-1, "Unbounded"), sans-serif;
    --rf-body: inherit;
    --rf-head-style: italic;
    --rf-head-track: -0.01em;
    font-family: var(--rf-body);
}
.rf button, .rf input, .rf select, .rf textarea { font-family: inherit; }
.rf[data-font="oswald"] { --rf-head: "Oswald", sans-serif; --rf-body: "Onest", sans-serif; --rf-head-track: 0.01em; }
.rf[data-font="tektur"] { --rf-head: "Tektur", sans-serif; --rf-body: "Manrope", sans-serif; --rf-head-style: normal; }
.rf[data-font="exo"]    { --rf-head: "Exo 2", sans-serif; --rf-body: "Golos Text", sans-serif; }
.rf[data-font="dela"]   { --rf-head: "Dela Gothic One", sans-serif; --rf-body: "Geologica", sans-serif; --rf-head-style: normal; --rf-head-track: 0; }
.rf[data-font="russo"]  { --rf-head: "Russo One", sans-serif; --rf-body: "Rubik", sans-serif; --rf-head-style: normal; --rf-head-track: 0.01em; }
.rf svg { flex: 0 0 auto; width: 18px; height: 18px; fill: currentColor; }

/* ── общие ─────────────────────────────────────────────── */
.rf-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--rf-accent); font-size: 12px; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
}
.rf-kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.rf-title {
    margin: 10px 0 0;
    font-family: var(--rf-head);
    font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; font-style: var(--rf-head-style);
    line-height: 1.05; text-transform: uppercase; letter-spacing: var(--rf-head-track);
}
.rf-title span { color: var(--rf-accent); }
.rf-h2 { margin: 4px 0 0; font-family: var(--rf-head); font-size: clamp(18px, 2vw, 24px); font-weight: 800; font-style: var(--rf-head-style); text-transform: uppercase; line-height: 1.1; }
.rf-lead { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.5; }
.rf-lead b { color: var(--text-default); }
.rf-muted { color: var(--text-custom); font-size: 13px; line-height: 1.45; margin: 0; }
.rf-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.rf-row > .rf-input { flex: 1 1 180px; }

.rf-input {
    height: 48px; min-width: 0; padding: 0 16px;
    border: 1px solid var(--rf-line); border-radius: 12px;
    background: var(--input-form); color: var(--text-default);
    font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.rf-input:focus { border-color: var(--rf-accent); box-shadow: 0 0 0 3px rgba(118, 171, 41, .18); }
.rf-input::placeholder { color: var(--text-custom); }
.rf-select { cursor: pointer; }

.rf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 20px; border: 0; border-radius: 12px;
    background: var(--button); color: var(--text-default);
    font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: transform .15s, filter .15s, background .15s;
}
.rf-btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.rf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.rf-btn--main { background: var(--rf-accent); color: #0d1205; box-shadow: 0 8px 24px rgba(118, 171, 41, .25); }
.rf-btn--wide { width: 100%; }
.rf-btn--xl { height: 56px; font-size: 16px; padding: 0 26px; }
.rf-icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--rf-glass); color: var(--text-secondary); cursor: pointer; }
.rf-icon-btn:hover { background: var(--button); color: var(--text-default); }

.rf-note {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(59, 130, 246, .1); color: #a9c8ff; font-size: 14px; line-height: 1.45;
}
.rf-note svg { margin-top: 1px; }
.rf-note--ok   { background: rgba(100, 206, 130, .12); color: var(--green); }
.rf-note--warn { background: rgba(245, 166, 35, .12); color: #f5b84a; }
.rf-note--bad  { background: rgba(255, 73, 64, .12); color: #ff8a84; }

.rf-code-chip { padding: 2px 8px; border-radius: 6px; background: var(--input-form); color: var(--rf-gold); font-family: "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }

/* ── шапка ─────────────────────────────────────────────── */
.rf-hero {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); gap: 28px; align-items: center;
    padding: 34px; border-radius: 24px;
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(118, 171, 41, .16) 0%, transparent 46%),
        linear-gradient(180deg, #1c1d26 0%, var(--card) 100%);
    border: 1px solid var(--rf-line);
}
.rf-hero__glow { position: absolute; inset: auto -10% -60% 30%; height: 120%; z-index: -1; background: radial-gradient(closest-side, rgba(244, 202, 128, .1), transparent); pointer-events: none; }
.rf-hero__art { position: absolute; right: 30%; bottom: -12px; height: 112%; max-height: 360px; opacity: .09; z-index: -1; pointer-events: none; filter: grayscale(.2); }
.rf-hero__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.rf-gifts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rf-gift {
    position: relative; display: flex; flex-direction: column; gap: 4px;
    padding: 16px 18px; border-radius: 16px; background: var(--rf-glass); border: 1px solid var(--rf-line);
}
.rf-gift--you { background: linear-gradient(135deg, rgba(118, 171, 41, .18), rgba(118, 171, 41, .04)); border-color: rgba(118, 171, 41, .35); }
.rf-gift__who { color: var(--text-custom); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rf-gift__val { font-family: var(--rf-head); font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; font-style: var(--rf-head-style); line-height: 1.1; color: var(--rf-gold); }
.rf-gift__val small { font-size: .5em; color: var(--text-secondary); font-style: normal; }
.rf-gift--you .rf-gift__val { color: #b6e36a; }
.rf-gift__plus { color: var(--text-secondary); font-size: 13px; }

.rf-share {
    display: flex; flex-direction: column; gap: 12px;
    padding: 22px; border-radius: 18px;
    background: rgba(10, 10, 14, .55); border: 1px solid var(--rf-line);
    backdrop-filter: blur(6px);
}
.rf-share__label { color: var(--text-custom); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.rf-share__empty { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.45; }
.rf-share__empty b { color: var(--text-default); font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.rf-share__code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 14px; background: var(--input-form); border: 1px dashed rgba(244, 202, 128, .35); }
.rf-share__code b { font-family: var(--rf-head); font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; letter-spacing: .08em; color: var(--rf-gold); overflow: hidden; text-overflow: ellipsis; }
.rf-share__link { display: flex; gap: 8px; }
.rf-share__link .rf-input { flex: 1; font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: var(--text-secondary); }
.rf-share__nets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rf-net {
    height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
    border: 0; border-radius: 10px; background: var(--button); color: #fff;
    font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; transition: filter .15s, transform .15s;
}
.rf-net:hover { filter: brightness(1.15); transform: translateY(-1px); }
.rf .rf-net { width: 100%; min-width: 0; margin: 0; } /* тема задаёт <button> свою ширину */
.rf-net--tg { background: #229ed9; }
.rf-net--vk { background: #0077ff; }
.rf-net--wa { background: #1fae54; }
.rf-net--ds { background: #5865f2; }
.rf-qr { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: #fff; }
.rf-qr[hidden] { display: none; }
.rf-qr svg { width: 132px; height: 132px; }
.rf-qr span { color: #1b1c24; font-size: 13px; }

/* шапка-приглашение */
.rf-hero--invite { grid-template-columns: 1fr; gap: 20px; }
.rf-invite { display: flex; align-items: center; gap: 22px; }
.rf-invite__ava { width: 92px; height: 92px; border-radius: 22px; object-fit: cover; box-shadow: 0 0 0 3px var(--rf-accent), 0 12px 32px rgba(0, 0, 0, .4); }
.rf-invite__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rf-hero--invite .rf-gifts { max-width: 640px; }
.rf-hero--invite .rf-row { max-width: 520px; }
.rf-hero--invite > .rf-btn { justify-self: start; }

/* ── карточка приглашённого ─────────────────────────────── */
.rf-mine {
    display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
    padding: 24px 28px; border-radius: var(--rf-r);
    background: linear-gradient(135deg, rgba(118, 171, 41, .1), transparent 60%), var(--card);
    border: 1px solid rgba(118, 171, 41, .3);
}
.rf-mine__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rf-ring { position: relative; width: 132px; height: 132px; }
.rf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rf-ring circle { fill: none; stroke-width: 10; }
.rf-ring__bg { stroke: var(--input-form); }
.rf-ring__fg { stroke: var(--rf-accent); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.rf-ring__val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rf-ring__val b { font-family: var(--rf-head); font-size: 26px; font-weight: 800; font-style: var(--rf-head-style); }
.rf-ring__val b small { font-size: 13px; margin-left: 2px; color: var(--text-secondary); font-style: normal; }
.rf-ring__val i { font-style: normal; color: var(--text-custom); font-size: 12px; }
.rf-timer { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--input-form); width: max-content; }
.rf-timer span { color: var(--text-custom); font-size: 13px; }
.rf-timer b { font-size: 16px; color: var(--rf-gold); }

/* активация кода */
.rf-activate {
    display: grid; grid-template-columns: auto 1fr minmax(260px, 420px); gap: 16px; align-items: center;
    padding: 18px 20px; border-radius: var(--rf-r); background: var(--card); border: 1px solid var(--rf-line);
}
.rf-activate__icon { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: rgba(244, 202, 128, .12); color: var(--rf-gold); }
.rf-activate__icon svg { width: 22px; height: 22px; }
.rf-activate__text { display: flex; flex-direction: column; gap: 2px; }
.rf-activate__text b { font-size: 16px; }
.rf-activate__text span { color: var(--text-secondary); font-size: 13px; }

/* ── цифры ─────────────────────────────────────────────── */
.rf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rf-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--rf-line); }
.rf-stat span { color: var(--text-custom); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rf-stat b { font-family: var(--rf-head); font-size: clamp(22px, 2.3vw, 30px); font-weight: 800; font-style: var(--rf-head-style); line-height: 1.15; }
.rf-stat i { font-style: normal; color: var(--text-custom); font-size: 12px; }
.rf-stat--ok b { color: var(--green); }
.rf-stat--money b { color: var(--rf-gold); }

/* ── вкладки ───────────────────────────────────────────── */
.rf-tabs { display: flex; flex-direction: row; gap: 6px; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--rf-line); overflow-x: auto; scrollbar-width: none; }
.rf-tab {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
    border: 0; border-radius: 12px; background: transparent; color: var(--text-secondary);
    font-size: 14px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s;
}
.rf-tab:hover { color: var(--text-default); background: var(--rf-glass); }
.rf-tab.is-on { background: var(--button); color: var(--text-default); box-shadow: inset 0 -2px 0 var(--rf-accent); }
.rf-tab b { min-width: 22px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--input-form); font-size: 11px; }
.rf-pane { display: flex; flex-direction: column; gap: 12px; }
.rf-pane[hidden] { display: none; }

/* друзья */
.rf-filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
.rf-chip { height: 34px; padding: 0 12px; border: 1px solid var(--rf-line); border-radius: 999px; background: transparent; color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.rf-chip b { margin-left: 4px; color: var(--text-default); }
.rf-chip.is-on { background: var(--button); border-color: transparent; color: var(--text-default); }
.rf-list { display: flex; flex-direction: column; gap: 6px; }
.rf-friend {
    display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) 130px; gap: 16px; align-items: center;
    padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--rf-line);
}
.rf-friend[hidden] { display: none; }
.rf-friend__who { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.rf-friend__who img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; flex: 0 0 38px; }
.rf-friend__who span { display: flex; flex-direction: column; min-width: 0; }
.rf-friend__who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-friend__who i { font-style: normal; color: var(--text-custom); font-size: 12px; }
.rf-friend__prog { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rf-friend__hint { color: var(--text-custom); font-size: 12px; }
.rf-friend--paid .rf-friend__hint { color: var(--rf-gold); font-weight: 700; }
.rf-bar { height: 6px; border-radius: 6px; background: var(--input-form); overflow: hidden; }
.rf-bar i { display: block; height: 100%; border-radius: 6px; background: var(--rf-accent); }
.rf-friend--expired .rf-bar i, .rf-friend--rejected .rf-bar i { background: var(--text-custom); }
.rf-st { justify-self: end; padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.rf-st--active   { background: rgba(59, 130, 246, .14); color: #8ab4ff; }
.rf-st--ready    { background: rgba(118, 171, 41, .18); color: #b6e36a; }
.rf-st--review   { background: rgba(245, 166, 35, .15); color: #f5b84a; }
.rf-st--paid     { background: rgba(100, 206, 130, .14); color: var(--green); }
.rf-st--expired  { background: var(--input-form); color: var(--text-custom); }
.rf-st--rejected { background: rgba(255, 73, 64, .14); color: #ff8a84; }

.rf-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; border-radius: var(--rf-r); background: var(--card); border: 1px dashed var(--rf-line); text-align: center; }
.rf-empty svg { width: 32px; height: 32px; color: var(--text-custom); }
.rf-empty span { color: var(--text-custom); font-size: 14px; max-width: 420px; }

/* награды */
.rf-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--rf-r); background: var(--card); border: 1px solid var(--rf-line); }
.rf-card__title { font-size: 15px; }
.rf-track { padding: 18px 20px 36px; border-radius: var(--rf-r); background: var(--card); border: 1px solid var(--rf-line); }
.rf-track__head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.rf-track__head span { color: var(--text-custom); font-size: 13px; }
.rf-track__line { position: relative; height: 8px; margin: 0 14px; border-radius: 8px; background: var(--input-form); }
.rf-track__line > i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; background: linear-gradient(90deg, var(--rf-accent), #b6e36a); }
.rf-track__pt { position: absolute; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.rf-track__pt em { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--button); border: 2px solid var(--card); font-style: normal; font-size: 12px; font-weight: 800; }
.rf-track__pt.is-done em { background: var(--rf-accent); color: #0d1205; }
.rf-track__pt small { position: absolute; top: 34px; white-space: nowrap; color: var(--rf-gold); font-size: 12px; font-weight: 700; }
.rf-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rf-history li { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rf-line); font-size: 13px; }
.rf-history li:last-child { border-bottom: 0; }
.rf-history i { font-style: normal; color: var(--text-custom); }
.rf-history span { color: var(--text-secondary); }
.rf-history b { color: var(--rf-gold); }

/* топ */
.rf-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--rf-line); width: max-content; }
.rf-seg__btn { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font-weight: 700; font-size: 13px; cursor: pointer; }
.rf-seg__btn.is-on { background: var(--button); color: var(--text-default); }
.rf-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rf-top[hidden] { display: none; }
.rf-top .rf-empty { grid-column: 1 / -1; }
.rf-top__row { display: grid; grid-template-columns: 34px 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--rf-line); color: inherit; text-decoration: none; transition: transform .15s; }
.rf-top__row:hover { transform: translateY(-1px); }
.rf-top__row img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.rf-top__row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rf-top__place { font-family: var(--rf-head); font-weight: 800; font-style: var(--rf-head-style); font-size: 18px; color: var(--text-custom); text-align: center; }
.rf-top__n { font-weight: 800; color: var(--rf-gold); }
.rf-top__n i { font-style: normal; font-weight: 400; color: var(--text-custom); font-size: 12px; }
.rf-top__row--1 { border-color: rgba(255, 219, 92, .45); background: linear-gradient(90deg, rgba(255, 219, 92, .1), var(--card) 60%); }
.rf-top__row--1 .rf-top__place { color: var(--top-one, #ffdb5c); }
.rf-top__row--2 .rf-top__place { color: var(--top-two, #bfe0ff); }
.rf-top__row--3 .rf-top__place { color: var(--top-three, #f8a785); }

/* как это работает */
.rf-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: none; }
.rf-steps li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--rf-r); background: var(--card); border: 1px solid var(--rf-line); }
.rf-steps span { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--button); font-family: var(--rf-head); font-weight: 800; font-style: var(--rf-head-style); margin-bottom: 4px; }
.rf-steps li:last-child span { background: var(--rf-accent); color: #0d1205; }
.rf-steps b { font-size: 15px; }
.rf-steps i { font-style: normal; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.rf-faq { display: flex; flex-direction: column; gap: 6px; }
.rf-faq details { border-radius: 14px; background: var(--card); border: 1px solid var(--rf-line); padding: 14px 18px; }
.rf-faq summary { cursor: pointer; font-weight: 800; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.rf-faq summary::-webkit-details-marker { display: none; }
.rf-faq summary::after { content: "+"; color: var(--rf-accent); font-size: 18px; line-height: 1; }
.rf-faq details[open] summary::after { content: "−"; }
.rf-faq p { margin: 10px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }

.rf-admin { position: fixed; right: 18px; bottom: 140px; z-index: 50; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--button); color: var(--text-default); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }

/* ── адаптив ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .rf-hero { grid-template-columns: 1fr; padding: 26px; }
    .rf-hero__art { right: -40px; opacity: .1; }
    .rf-activate { grid-template-columns: auto 1fr; }
    .rf-activate .rf-row { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .rf-hero { padding: 20px; border-radius: 20px; }
    .rf-gifts { grid-template-columns: 1fr; }
    .rf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rf-mine { grid-template-columns: 1fr; justify-items: start; padding: 20px; }
    .rf-friend { grid-template-columns: 1fr auto; gap: 8px 12px; }
    .rf-friend__prog { grid-column: 1 / -1; grid-row: 2; }
    .rf-top { grid-template-columns: 1fr; }
    .rf-steps { grid-template-columns: 1fr; }
    .rf-share__nets { grid-template-columns: repeat(3, 1fr); }
    .rf-history li { grid-template-columns: 1fr auto; }
    .rf-history li i { grid-column: 1 / -1; }
    .rf-invite { flex-direction: column; align-items: flex-start; }
    .rf-tab { padding: 0 12px; }
}

/* [ref-v2e] постраничная навигация и панель выбора шрифтов */
.rf-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.rf-pager:empty { display: none; }
.rf-pager button {
    min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--rf-line); border-radius: 10px;
    background: var(--card); color: var(--text-secondary); font-weight: 700; font-size: 14px; cursor: pointer;
}
.rf-pager button:hover:not(:disabled) { color: var(--text-default); background: var(--button); }
.rf-pager button.is-on { background: var(--rf-accent); border-color: transparent; color: #0d1205; }
.rf-pager button:disabled { opacity: .35; cursor: default; }
.rf-pager span { align-self: center; color: var(--text-custom); padding: 0 2px; }
.rf-fontbar { position: sticky; top: 8px; z-index: 40; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border-radius: 14px; background: rgba(12, 12, 16, .92); border: 1px solid var(--rf-accent); backdrop-filter: blur(6px); }
.rf-fontbar span { color: var(--text-custom); font-size: 13px; padding: 0 6px; }
.rf-fontbar a { padding: 7px 12px; border-radius: 9px; background: var(--card); color: var(--text-secondary); font-size: 13px; font-weight: 700; text-decoration: none; }
.rf-fontbar a.is-on { background: var(--rf-accent); color: #0d1205; }

/* [ref-stages] этапы наград, прогресс приглашённого, ранги, титул */
.rf-flow-wrap { display: flex; flex-direction: column; gap: 12px; }
.rf-flow-head { display: flex; flex-direction: column; gap: 4px; }
.rf-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: none; }
.rf-flow__card { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--rf-r); background: var(--card); border: 1px solid var(--rf-line); }
.rf-flow__ghost { position: absolute; right: 10px; top: -8px; font-family: var(--rf-head); font-size: 64px; font-weight: 800; font-style: var(--rf-head-style); color: rgba(255, 255, 255, .04); line-height: 1; pointer-events: none; }
.rf-flow__icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(118, 171, 41, .14); color: var(--rf-accent); margin-bottom: 4px; }
.rf-flow__label { font-family: var(--rf-head); font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--rf-head-track); }
.rf-flow__hint { color: var(--text-custom); font-size: 12px; min-height: 30px; }
.rf-flow__rows { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--rf-line); }
.rf-flow__rows div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.rf-flow__rows span { color: var(--text-custom); }
.rf-flow__rows i { font-style: normal; color: var(--text-custom); }
.rf-flow__me { color: var(--rf-gold); text-align: right; }
.rf-flow__fr { color: #b6e36a; text-align: right; }

.rf-myst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rf-myst li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.rf-myst li span { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--input-form); font-size: 12px; font-weight: 800; color: var(--text-custom); }
.rf-myst li.is-done { color: var(--text-default); }
.rf-myst li.is-done span { background: var(--rf-accent); color: #0d1205; }
.rf-myst li em { margin-left: auto; font-style: normal; color: #b6e36a; font-size: 12px; font-weight: 700; }

.rf-friend { grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) auto; }
.rf-friend__tags { justify-self: end; display: inline-flex; gap: 6px; align-items: center; }
.rf-stg { padding: 5px 8px; border-radius: 8px; background: var(--input-form); color: var(--text-secondary); font-size: 12px; font-weight: 800; }

.rf-ranks { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: var(--rf-r); background: var(--card); border: 1px solid var(--rf-line); }
.rf-ranks .rf-track__head { margin-bottom: 0; }
.rf-ranks__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.rf-rank { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--input-form); border: 1px solid transparent; }
.rf-rank.is-done { border-color: rgba(118, 171, 41, .45); background: linear-gradient(135deg, rgba(118, 171, 41, .12), var(--input-form)); }
.rf-rank__n { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--button); font-family: var(--rf-head); font-weight: 800; font-size: 16px; }
.rf-rank.is-done .rf-rank__n { background: var(--rf-accent); color: #0d1205; }
.rf-rank__title { font-family: var(--rf-head); font-size: 17px; text-transform: uppercase; }
.rf-rank__reward { color: var(--rf-gold); font-size: 13px; font-weight: 700; }
.rf-rank__state { color: var(--text-custom); font-size: 12px; }
.rf-rank__state.is-ok { color: var(--green); font-weight: 700; }
.rf-rank__claim .rf-select { flex: 1 1 120px; height: 40px; }
.rf-rank__claim .rf-btn { height: 40px; }
.rf-badge { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: linear-gradient(90deg, #f4ca80, #ffdb5c); color: #2a1d00; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }

@media (max-width: 1100px) { .rf-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .rf-flow { grid-template-columns: 1fr; }
    .rf-friend { grid-template-columns: 1fr auto; }
}

.rf-rank .rf-bar { background: var(--button); } /* [ref-stb] иначе пустая полоса сливается с карточкой */
