/* Стили приложения. Цвета и размеры только из tokens/tokens.css. Светлая система: тёмных поверхностей нет. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; background: var(--rh-bg); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--rh-bg); color: var(--rh-graphite);
  font: 400 var(--rh-fs-body)/1.55 var(--rh-font-text); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
body.has-sheet { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
p { margin: 0 0 12px; }
:focus-visible { outline: 2px solid var(--rh-teal); outline-offset: 2px; }
.rh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rh-icon { flex-shrink: 0; }
[hidden] { display: none !important; }

/* Логотип */
.rh-logo { display: inline-flex; align-items: center; font-family: var(--rh-font-display); line-height: 1; white-space: nowrap; letter-spacing: -.01em; }
.rh-logo__pulse { margin: 0 .06em; }
.rh-logo__covery { font-style: italic; }
.rh-logo__hub { font-family: var(--rh-font-text); font-weight: 700; font-size: .92em; margin-left: .22em; letter-spacing: -.02em; }

/* Шапка */
.rh-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  min-height: calc(var(--rh-header-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0;
  background: var(--rh-header-bg); color: var(--rh-header-fg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rh-header-line); }
.rh-header__logo { padding-left: 8px; }
.rh-header__title { flex: 1; margin: 0; font: 600 17px/1.2 var(--rh-font-text); color: var(--rh-header-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-header__pad { width: 8px; }
.rh-header__logo ~ .rh-header__action { margin-left: auto; }
.rh-header__action { display: flex; align-items: center; }
.rh-header__btn { display: inline-flex; align-items: center; justify-content: center; width: var(--rh-tap); height: var(--rh-tap); border: 0; border-radius: 12px;
  background: none; color: var(--rh-header-fg); text-decoration: none; cursor: pointer; }
.rh-header__btn:active { background: var(--rh-mint-soft); }
.rh-header__login { padding: 10px 12px; font-weight: 600; }

/* Нижнее меню */
.rh-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 4px env(safe-area-inset-bottom); background: var(--rh-white); border-top: 1px solid var(--rh-line); }
.rh-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 0;
  color: var(--rh-muted); text-decoration: none; font-size: 10.5px; font-weight: 500; border-radius: 12px; }
.rh-tab.is-active { color: var(--rh-teal-deep); font-weight: 700; }
.rh-tab.is-active .rh-icon { stroke-width: 2.1; }
.rh-tab { position: relative; }
.rh-tab__cnt { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; box-sizing: border-box;
  background: var(--rh-mint); color: var(--rh-green); font-size: 10px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--rh-white), inset 0 0 0 1.5px var(--rh-teal); }
.rh-tab__ava { display: flex; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px var(--rh-white), 0 0 0 3.5px var(--rh-line); }
.rh-tab.is-active .rh-tab__ava { box-shadow: 0 0 0 2px var(--rh-white), 0 0 0 3.5px var(--rh-teal); }
.rh-tab__ava .rh-avatar { width: 28px !important; height: 28px !important; margin: 0 !important; font-size: 12px !important; font-weight: 400; }

/* Содержимое */
.rh-main { display: block; max-width: 640px; margin: 0 auto; padding: 16px var(--rh-gutter) 32px; outline: none; }
.rh-main.has-tabbar { padding-bottom: calc(var(--rh-tabbar-h) + env(safe-area-inset-bottom) + 28px); }
.rh-page-title { margin: 4px 0 16px; }
.rh-hero { font: 400 38px/1.08 var(--rh-font-display); color: var(--rh-green); letter-spacing: -.02em; margin: 16px 0 16px; }
.rh-hero em { color: var(--rh-teal); }
.rh-h1 { font: 400 var(--rh-fs-h1)/1.15 var(--rh-font-display); color: var(--rh-green); margin: 0 0 8px; letter-spacing: -.01em; }
.rh-h2 { font: 600 17px/1.3 var(--rh-font-text); color: var(--rh-green); margin: 0; }
.rh-lead { font-size: var(--rh-fs-body); line-height: 1.6; color: var(--rh-graphite); }
.rh-muted { color: var(--rh-muted); }
.rh-small { font-size: var(--rh-fs-small); }
.rh-meta { font-size: var(--rh-fs-small); color: var(--rh-muted); }
.rh-link { color: var(--rh-teal-deep); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: var(--rh-tap); }
.rh-link--muted { color: var(--rh-muted); font-weight: 500; }
.rh-req { color: var(--rh-teal-deep); }
.rh-label { display: inline-block; font-size: var(--rh-fs-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rh-green); background: var(--rh-label-bg); border-radius: var(--rh-radius-pill); padding: 6px 12px; }
.rh-badge-s { display: inline-block; font-size: 11px; font-weight: 700; color: var(--rh-green); background: var(--rh-label-bg); border-radius: var(--rh-radius-pill); padding: 4px 10px; }
.rh-section { margin: 24px 0; }
.rh-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rh-section__title { margin: 24px 0 10px; }

/* Кнопки */
.rh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; border: 0; border-radius: var(--rh-radius-field);
  background: var(--rh-btn-bg); color: var(--rh-white); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .1s, opacity .1s; }
.rh-btn:active { transform: scale(.98); }
.rh-btn:disabled { opacity: .5; cursor: default; }
.rh-btn--ghost { background: var(--rh-white); color: var(--rh-green); box-shadow: inset 0 0 0 1px var(--rh-btn-line); }
.rh-btn--block { display: flex; width: 100%; margin: 10px 0; }

/* Карточки и списки */
.rh-card { display: block; background: var(--rh-surface); border-radius: var(--rh-radius-card); padding: 16px; margin: 0 0 12px; box-shadow: var(--rh-shadow-card); color: inherit; text-decoration: none; }
.rh-card--link { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; cursor: pointer; box-shadow: var(--rh-frame-soft), var(--rh-shadow-card); }
.rh-card--link:active { transform: scale(.99); }
.rh-card.is-selected, .rh-card.is-key { box-shadow: var(--rh-frame), var(--rh-shadow-card); }
/* Правило рамок (docs/APP_V0.md): рамка — у выбранного чипа, поля в фокусе, нажимаемой и ключевой карточки.
   Не рамим: каждый блок подряд, карточку в карточке, текст и пустые состояния. */
.rh-card .rh-card, .rh-card .rh-card--link { box-shadow: none; }
.rh-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.rh-list { padding: 0 16px; }
.rh-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; text-decoration: none; color: var(--rh-green); border-bottom: 1px solid var(--rh-divider); }
.rh-row:last-child { border-bottom: 0; }
.rh-row__icon { color: var(--rh-teal-deep); display: flex; }
.rh-row__title { flex: 1; font-weight: 600; }
.rh-row__meta { font-size: var(--rh-fs-small); color: var(--rh-muted); }
.rh-row .rh-icon:last-child { color: var(--rh-muted); }
.rh-row.is-static { color: var(--rh-graphite); }
.rh-row.is-static .rh-row__title { font-weight: 500; }
.rh-tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--rh-green); background: var(--rh-mint-soft); border-radius: var(--rh-radius-pill); padding: 5px 12px; }
.rh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; justify-content: center; }
.rh-note { background: var(--rh-hint-bg); color: var(--rh-green); border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-size: 14px; }

/* Чипы */
.rh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.rh-chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--rh-gutter)); padding: 2px var(--rh-gutter) 4px; }
.rh-chips--scroll::-webkit-scrollbar { display: none; }
.rh-chip { flex-shrink: 0; min-height: var(--rh-tap); padding: 8px 16px; border: 0; border-radius: var(--rh-radius-pill); background: var(--rh-white); color: var(--rh-green);
  font-size: 14px; font-weight: 500; cursor: pointer; }
.rh-card .rh-chip, .rh-sheet .rh-chip { background: var(--rh-cream); box-shadow: none; }
.rh-chip.is-on, .rh-card .rh-chip.is-on, .rh-sheet .rh-chip.is-on { background: var(--rh-mint-soft); color: var(--rh-green); font-weight: 700; box-shadow: var(--rh-frame); }
.rh-filter { display: flex; align-items: center; gap: 6px; color: var(--rh-teal-deep); margin: 0 0 12px; }
.rh-filter .rh-chips--scroll { margin-left: 0; padding-left: 0; }

/* Формы */
.rh-form { display: block; }
.rh-field { margin: 0 0 16px; }
.rh-fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.rh-card.rh-fieldset { padding: 14px 16px; }
.rh-field__label { display: block; font-size: 14px; font-weight: 600; color: var(--rh-green); margin: 0 0 6px; padding: 0; }
.rh-field__hint { font-size: 12.5px; color: var(--rh-muted); margin-top: 6px; }
.rh-input { display: block; width: 100%; min-height: 50px; padding: 12px 14px; font-size: 16px; /* 16px: Safari не приближает */
  background: var(--rh-white); border: 1px solid rgba(26, 61, 36, .18); border-radius: var(--rh-radius-field); color: var(--rh-graphite); -webkit-appearance: none; appearance: none; }
.rh-card .rh-input, .rh-sheet .rh-input { background: var(--rh-cream); }
.rh-input:focus { border-color: var(--rh-teal); outline: none; box-shadow: 0 0 0 3px rgba(79, 168, 130, .25); }
.rh-input--area { resize: vertical; min-height: 96px; line-height: 1.5; }
select.rh-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231A3D24' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.rh-check { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; font-size: 13.5px; line-height: 1.5; }
.rh-check input { position: absolute; left: 0; top: 10px; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.rh-check__box { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; background: var(--rh-white);
  box-shadow: inset 0 0 0 1.5px rgba(26, 61, 36, .3); color: transparent; }
.rh-card .rh-check__box { background: var(--rh-cream); }
.rh-check input:checked + .rh-check__box { background: var(--rh-teal-deep); box-shadow: none; color: var(--rh-white); }
.rh-check input:focus-visible + .rh-check__box { outline: 2px solid var(--rh-teal); outline-offset: 2px; }
.rh-check input:disabled + .rh-check__box { opacity: .6; }
.rh-check .rh-link { min-height: 0; display: inline; }
.rh-consents { margin: 8px 0 12px; }
.rh-counter { text-align: right; font-size: 12.5px; color: var(--rh-muted); margin: -10px 0 10px; }
.rh-alert { background: #F6E3DF; color: var(--rh-error); border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: 14px; font-weight: 500; }

/* Состояния */
.rh-empty { text-align: center; padding: 20px 12px; }
.rh-empty__icon, .rh-state__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--rh-info-bg); color: var(--rh-teal-deep); margin-bottom: 10px; }
.rh-empty__title { font: 400 21px/1.2 var(--rh-font-display); color: var(--rh-green); margin-bottom: 6px; }
.rh-empty__text { color: var(--rh-muted); font-size: 14px; max-width: 320px; margin: 0 auto 12px; }
.rh-state { text-align: center; padding: 16px 0; }
.rh-loading { display: flex; align-items: center; gap: 10px; color: var(--rh-muted); font-size: 14px; padding: 12px 0; }
.rh-loading__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rh-teal); animation: rh-pulse 1s infinite alternate; }
@keyframes rh-pulse { from { opacity: .25; } to { opacity: 1; } }

/* Приветствие */
.rh-welcome { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: calc(env(safe-area-inset-top) + 24px); padding-bottom: calc(env(safe-area-inset-bottom) + 20px); }
.rh-welcome__hero { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 24px 0; }
.rh-welcome__actions { text-align: center; }
.rh-welcome__actions .rh-link { justify-content: center; width: 100%; }
.rh-welcome__login { color: var(--rh-graphite); font-weight: 500; }
.rh-welcome__login strong { color: var(--rh-teal-deep); }

/* Главная */
.rh-index__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rh-index__value { font: 400 52px/1 var(--rh-font-display); color: var(--rh-green); padding-bottom: 8px; border-bottom: 3px solid var(--rh-amber); }
.rh-index__value span { font-size: 20px; color: var(--rh-muted); margin-left: 2px; }
.rh-index__trend { display: flex; align-items: center; gap: 6px; color: var(--rh-teal-deep); font-weight: 600; font-size: 14px; }
.rh-index__note { margin: 12px 0 4px; font-size: 14px; }
.rh-event { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.rh-card > .rh-event + .rh-event { border-top: 1px solid var(--rh-divider); }
.rh-event__date { flex-shrink: 0; width: 52px; height: 56px; border-radius: 14px; background: var(--rh-info-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--rh-green); }
.rh-event__date b { font: 400 22px/1 var(--rh-font-display); }
.rh-event__date span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.rh-event__title { font-weight: 600; color: var(--rh-green); line-height: 1.35; overflow-wrap: anywhere; }
.rh-event-card__desc { margin: 8px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.rh-event-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rh-eco-card { background: var(--rh-mint); box-shadow: none; color: var(--rh-green); }
.rh-eco-card p { margin: 2px 0 0; font-size: 14px; }
.rh-eco-card__mark { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .55); flex-shrink: 0; }
.rh-eco-card__title { font: 400 22px/1 var(--rh-font-display); }
.rh-eco-card .rh-re { color: var(--rh-green); font-weight: 700; }
.rh-eco-card > div:nth-child(2), .rh-invite > div { flex: 1; }
.rh-invite { box-shadow: var(--rh-frame-soft), var(--rh-shadow-card); }
.rh-invite--plain { display: flex; align-items: center; gap: 12px; }
.rh-invite--plain .rh-btn { flex-shrink: 0; }
.rh-invite__title { font: 400 20px/1.2 var(--rh-font-display); color: var(--rh-green); margin-bottom: 4px; }
.rh-invite p { margin: 0; font-size: 14px; color: var(--rh-graphite); }
.rh-invite > .rh-icon { color: var(--rh-teal-deep); }

/* Группа и записи */
.rh-post { display: flex; flex-direction: column; gap: 6px; }
.rh-post__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rh-post__type { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rh-teal-deep); }
.rh-post--auto .rh-post__type { color: var(--rh-green); }

.rh-post__meta { font-size: 12.5px; color: var(--rh-muted); }
.rh-post__text { display: block; font-size: 15.5px; line-height: 1.5; color: var(--rh-graphite); overflow-wrap: anywhere; }
.rh-post__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.rh-post__counts { display: flex; gap: 10px; color: var(--rh-teal-deep); font-size: 13px; font-weight: 600; }
.rh-post__counts span { display: inline-flex; align-items: center; gap: 5px; }
.rh-question__text { font: 400 22px/1.3 var(--rh-font-display); color: var(--rh-green); margin: 8px 0 0; overflow-wrap: anywhere; }
.rh-answers { list-style: none; margin: 0 0 12px; padding: 0; }
.rh-answer { background: var(--rh-surface); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--rh-shadow-card); }
.rh-answer__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rh-answer__name { font-weight: 700; color: var(--rh-green); font-size: 14px; }
.rh-answer__text { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.rh-avatar--s { width: 28px !important; height: 28px !important; margin: 0 !important; font-size: 14px !important; }
.rh-tips { background: var(--rh-hint-bg); color: var(--rh-green); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 12px; }
.rh-counter.is-near { color: var(--rh-teal-deep); font-weight: 700; }
.rh-notif { align-items: flex-start; padding: 12px 0; }
.rh-notif__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rh-notif__text { color: var(--rh-graphite); font-weight: 500; }
.rh-notif.is-unread .rh-notif__text { color: var(--rh-green); font-weight: 700; }
.rh-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rh-teal); margin-top: 6px; }

/* Партнёры */
.rh-partner__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rh-partner__name { font-weight: 700; color: var(--rh-green); overflow-wrap: anywhere; }
.rh-partner__discount { font-weight: 700; color: var(--rh-green); background: var(--rh-mint-soft); border-radius: var(--rh-radius-pill); padding: 4px 10px; font-size: 13px; }
.rh-partner .rh-icon { color: var(--rh-muted); }
.rh-partner-sheet p { overflow-wrap: anywhere; margin-top: 12px; }

/* Профиль */
.rh-profile { text-align: center; padding: 24px 16px 16px; }
.rh-avatar { width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%; background: var(--rh-mint); color: var(--rh-green); display: flex; align-items: center; justify-content: center;
  font: 400 30px/1 var(--rh-font-display); }
.rh-profile .rh-h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.rh-profile__bio { text-align: left; margin-top: 8px; font-size: 14.5px; overflow-wrap: anywhere; }
.rh-profile__bio .rh-link { display: flex; justify-content: center; text-align: center; }

/* RE:eco */
.rh-eco-hero { padding: 8px 0 8px; }
.rh-eco-hero__title { font: 400 48px/1 var(--rh-font-display); color: var(--rh-green); margin: 8px 0 12px; }
.rh-re { color: var(--rh-mint); }
.rh-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.rh-progress span { height: 4px; border-radius: 2px; background: var(--rh-cream); }
.rh-progress span.is-on { background: var(--rh-teal); }
.rh-poll .rh-h2 { margin-bottom: 6px; font-size: 18px; }
.rh-poll__nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 12px; }

/* Нижняя шторка */
.rh-sheet { position: fixed; inset: 0; z-index: 50; }
.rh-sheet__backdrop { position: absolute; inset: 0; background: var(--rh-veil); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.rh-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; box-shadow: 0 -8px 32px rgba(26, 61, 36, .12); max-height: 90vh; max-height: 90dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--rh-white);
  border-radius: 24px 24px 0 0; padding: 8px var(--rh-gutter) calc(env(safe-area-inset-bottom) + 20px); transform: translateY(100%); transition: transform .22s ease-out; max-width: 640px; margin: 0 auto; }
.rh-sheet.is-open .rh-sheet__backdrop { opacity: 1; }
.rh-sheet.is-open .rh-sheet__panel { transform: none; }
.rh-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: rgba(26, 61, 36, .15); margin: 0 auto 4px; }
.rh-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rh-sheet__title { font: 400 22px/1.2 var(--rh-font-display); color: var(--rh-green); margin: 0; overflow-wrap: anywhere; }

.rh-toast { position: fixed; left: 50%; bottom: calc(var(--rh-tabbar-h) + env(safe-area-inset-bottom) + 16px); z-index: 60; transform: translate(-50%, 20px); opacity: 0;
  background: var(--rh-white); color: var(--rh-green); font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: 14px; box-shadow: 0 8px 28px rgba(26, 61, 36, .16);
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); pointer-events: none; }
.rh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }


@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Роли цветов в блоках (варианты оформления) */
.rh-index, .rh-profile { background: var(--rh-hero-bg); }
.rh-empty { box-shadow: none; }
.rh-section { position: relative; }
.rh-tag { background: var(--rh-tag-bg); }
.rh-invite { background: var(--rh-accent-block); }

/* Роли и партнёр */
.rh-role { min-height: 84px; }
.rh-role__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--rh-info-bg); color: var(--rh-teal-deep); flex-shrink: 0; }
.rh-role__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rh-role__title { font: 400 21px/1.2 var(--rh-font-display); color: var(--rh-green); }
.rh-role > .rh-icon:last-child { color: var(--rh-muted); }
.rh-verified { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; font-size: 11.5px; font-weight: 700; color: var(--rh-green); background: var(--rh-mint-soft); border-radius: var(--rh-radius-pill); padding: 2px 8px 2px 6px; }
.rh-legend { padding: 0; margin-bottom: 10px; }
.rh-card.rh-fieldset > legend { float: left; width: 100%; padding: 0; }
.rh-card.rh-fieldset > legend + * { clear: both; }
.rh-input--code { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-weight: 700; color: var(--rh-green); }

/* Индекс */
.rh-scale .rh-chips { flex-wrap: nowrap; gap: 6px; }
.rh-scale .rh-chip { flex: 1; padding: 8px 0; }
.rh-scale__ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--rh-muted); margin-top: 2px; }
.rh-chart { width: 100%; height: auto; display: block; }
.rh-bar { fill: var(--rh-teal); }
.rh-bar.is-empty { fill: var(--rh-line); }
.rh-bar__v { font: 600 11px var(--rh-font-text); fill: var(--rh-green); text-anchor: middle; }
.rh-bar__d { font: 500 11px var(--rh-font-text); fill: var(--rh-muted); text-anchor: middle; }
.rh-norm { stroke: var(--rh-green); stroke-width: 1.2; stroke-dasharray: 4 4; }
.rh-chart__legend { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--rh-muted); margin-top: 6px; }
.rh-chart__norm { width: 18px; border-top: 1.5px dashed var(--rh-green); }
.rh-btn--s { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.rh-block { display: block; font-weight: 400; }
.rh-how summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.rh-how p { margin-top: 8px; font-size: 14px; }
.rh-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; width: 100%; justify-content: center; }

/* Профиль */
img.rh-avatar { object-fit: cover; object-position: 50% 30%; border-radius: 50%; }
.rh-profile__actions { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.rh-profile__actions .rh-btn { flex: 1; min-width: 140px; padding: 10px 12px; font-size: 14px; }
.rh-tag--accent { display: inline-flex; align-items: center; gap: 5px; background: var(--rh-label-bg); }
.rh-hiddenblock { display: flex; align-items: center; gap: 8px; color: var(--rh-muted); font-size: 14px; }
.rh-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.rh-footnote { font-size: 11.5px; color: var(--rh-muted); margin: 6px 0 0; }
.rh-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 16px; overflow: hidden; }
.rh-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.rh-gallery-empty { display: flex; align-items: center; gap: 10px; color: var(--rh-muted); font-size: 14px; }
.rh-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rh-divider); font-size: 14px; }
.rh-kv:last-child { border-bottom: 0; }
.rh-kv span { color: var(--rh-muted); }
.rh-kv b { color: var(--rh-green); text-align: right; overflow-wrap: anywhere; }
.rh-private { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--rh-muted); }
.rh-card--plain { display: block; text-decoration: none; }
.rh-psec { margin: 20px 0; }
.rh-theme { flex-direction: row; align-items: center; }
.rh-theme b { font: 400 26px/1 var(--rh-font-display); color: var(--rh-green); width: 32px; }
.rh-theme span { flex: 1; font-size: 14px; }

/* ---------- Раунд 3 ---------- */
.rh-badge-s { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; font-size: 11.5px; font-weight: 700; color: var(--rh-teal-deep); background: var(--rh-label-bg); border-radius: var(--rh-radius-pill); padding: 3px 9px; }
.rh-avatar--m { width: 44px !important; height: 44px !important; margin: 0 !important; font-size: 18px !important; flex-shrink: 0; }
.rh-rec { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--rh-divider); text-decoration: none; color: inherit; }
.rh-rec:last-child { border-bottom: 0; }
.rh-rec__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; color: inherit; min-height: 54px; }
.rh-rec__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rh-rec__title { font-weight: 700; color: var(--rh-green); overflow-wrap: anywhere; }
.rh-rec > .rh-icon, .rh-rec__main > .rh-icon:last-child { color: var(--rh-muted); }
.rh-rec .rh-event { padding: 0; flex: 1; }
.rh-why { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--rh-teal-deep); }
.rh-rec__hide { color: var(--rh-muted); flex-shrink: 0; }
.rh-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--rh-green); background: var(--rh-info-bg); border-radius: var(--rh-radius-pill); padding: 6px 12px; margin: 8px 0 4px; font-size: 14px; }
.rh-status-card { margin-bottom: 4px; }
.rh-status-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 16px; }
.rh-status-opt { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--rh-white); color: var(--rh-green); font-weight: 600; font-size: 14px; text-align: left; cursor: pointer; }
.rh-status-opt .rh-icon { color: var(--rh-teal-deep); }
.rh-status-opt.is-on { background: var(--rh-mint-soft); box-shadow: var(--rh-frame); }
.rh-acc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0; }
.rh-acc { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 10px; border-radius: var(--rh-radius-pill); background: var(--rh-info-bg); color: var(--rh-green); font-size: 13px; font-weight: 600; text-decoration: none; }
.rh-acc.is-off { background: transparent; color: var(--rh-muted); box-shadow: var(--rh-frame-soft); }
.rh-connected { padding-top: 12px; }
.rh-connected__head { margin-bottom: 0; }
.rh-row__meta.is-on { color: var(--rh-teal-deep); font-weight: 700; }
.rh-profile__about { margin: 10px 0 0; font-size: 14.5px; color: var(--rh-graphite); overflow-wrap: anywhere; }
.rh-follow-counts { margin-top: 10px; font-size: 13.5px; color: var(--rh-muted); }
.rh-follow-counts a { color: var(--rh-teal-deep); font-weight: 600; text-decoration: none; display: inline-block; padding: 12px 2px; }
.rh-profile--card { text-align: left; }
.rh-vc { display: flex; gap: 14px; align-items: center; }
.rh-vc .rh-avatar { margin: 0; width: 76px; height: 76px; flex-shrink: 0; }
.rh-vc__body { min-width: 0; }
.rh-vc__goal { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; color: var(--rh-green); font-size: 14px; }
.rh-vc__flag { font-size: 16px; line-height: 1; }
.rh-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 6px; text-align: center; }
.rh-stats--3 { grid-template-columns: repeat(3, 1fr); }
.rh-stats > * { display: flex; flex-direction: column; gap: 2px; padding: 10px 2px; border-radius: 14px; background: var(--rh-info-bg); color: var(--rh-green); text-decoration: none; min-height: 44px; }
.rh-stats b { font: 400 22px/1 var(--rh-font-display); }
.rh-stats span { font-size: 11px; color: var(--rh-muted); }
.rh-gallery__item { position: relative; }
.rh-gallery__del { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--rh-green); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rh-upload { cursor: pointer; }
.rh-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--rh-white); border-radius: 16px; padding: 4px; margin-bottom: 12px; }
.rh-tabs__item { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border-radius: 12px; text-decoration: none; color: var(--rh-muted); font-weight: 600; font-size: 14px; }
.rh-tabs__item.is-on { background: var(--rh-mint-soft); color: var(--rh-green); box-shadow: var(--rh-frame); }
.rh-tabs__item b { font-weight: 700; }
.rh-search { position: relative; margin-bottom: 12px; color: var(--rh-muted); }
.rh-search .rh-icon { position: absolute; left: 14px; top: 16px; }
.rh-search .rh-input { padding-left: 40px; }
.rh-share { text-align: center; }
.rh-qr-wrap { display: inline-block; padding: 8px; background: var(--rh-white); border-radius: 16px; color: var(--rh-green); margin: 8px 0; box-shadow: var(--rh-frame-soft); }
.rh-qr { display: block; }
.rh-share__url { font-weight: 700; color: var(--rh-green); margin: 4px 0; overflow-wrap: anywhere; }
.rh-bell { position: relative; }
.rh-bell .rh-dot { position: absolute; top: 10px; right: 10px; margin: 0; }
.rh-strava .rh-stats { margin-top: 4px; }
.rh-acc-icons { display: flex; justify-content: center; gap: 8px; margin: 10px 0 4px; }
.rh-vc .rh-acc-icons { justify-content: flex-start; }
.rh-acc-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--rh-white); box-shadow: inset 0 0 0 1px var(--rh-btn-line); }
.rh-acc-icon__mark { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: var(--rh-white); }
.rh-acc-icon__mark--strava { background: var(--rh-brand-strava); }
.rh-acc-icon__mark--telegram { background: var(--rh-brand-telegram); }
.rh-acc-icon__mark--vk { background: var(--rh-brand-vk); }
.rh-acc-icon__vk { font: 800 11px/1 var(--rh-font-text); letter-spacing: -.02em; }
.rh-tags--left { justify-content: flex-start; }

/* Значки: кружок с линейной иконкой и подпись; редкие — с янтарной обводкой (одна деталь), неполученные — серые */
.rh-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
.rh-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.rh-badge__mark { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--rh-info-bg); color: var(--rh-green); }
.rh-badge.is-rare .rh-badge__mark { box-shadow: inset 0 0 0 2px var(--rh-amber); }
.rh-badge__title { font-size: 12.5px; font-weight: 600; color: var(--rh-green); line-height: 1.25; overflow-wrap: anywhere; }
.rh-badge__how { font-size: 11.5px; color: var(--rh-muted); line-height: 1.3; }
.rh-badge.is-locked .rh-badge__mark { background: var(--rh-bg); color: var(--rh-muted); box-shadow: inset 0 0 0 1px var(--rh-line); }
.rh-badge.is-locked .rh-badge__title { color: var(--rh-muted); }
.rh-linkbtn.rh-answer__report { width: auto; justify-content: flex-start; min-height: 36px; font-size: 12.5px; margin-top: 2px; }

/* Фото профиля: кнопка с камерой на своём аватаре и блок в «Редактировать» */
.rh-ava-edit { position: relative; display: block; width: 80px; margin: 0 auto 12px; cursor: pointer; }
.rh-ava-edit .rh-avatar { margin: 0; }
.rh-vc .rh-ava-edit { margin: 0; width: 76px; flex-shrink: 0; }
.rh-ava-edit__badge { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--rh-white); color: var(--rh-green);
  box-shadow: inset 0 0 0 1px var(--rh-btn-line); display: flex; align-items: center; justify-content: center; }
.rh-avatar-block { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.rh-avatar-block__pic .rh-avatar { margin: 0; width: 88px; height: 88px; }
.rh-avatar-block__btns { flex: 1; min-width: 0; }
.rh-avatar-block .rh-upload { margin: 4px 0 0; }
.rh-avatar-block .rh-linkbtn { justify-content: flex-start; min-height: 40px; }

/* длинная подпись в чипе переносится, а не выходит за край экрана */
.rh-chips:not(.rh-chips--scroll) .rh-chip { max-width: 100%; white-space: normal; text-align: left; height: auto; }
