/* Каркас приложения: слева меню, по центру контент, справа панель (на главной). Для авторизованных. */
.rc-shell { display: flex; align-items: flex-start; min-height: calc(100vh - 100px); }
.rc-main { flex: 1 1 auto; min-width: 0; }
.rc-sidebar {
  position: sticky; top: 0; flex: 0 0 240px; align-self: stretch; padding: 20px 12px;
  border-right: 2px solid var(--rc-gray); display: flex; flex-direction: column; gap: 4px; height: calc(100vh - 100px); overflow-y: auto;
}
.rc-sidebar a {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 14px; border: 2px solid transparent;
  color: #6B7080; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; text-decoration: none;
}
.rc-sidebar a i { font-size: 1.4rem; width: 28px; text-align: center; color: var(--rc-teal); }
.rc-sidebar a:hover { background: #F1F2F5; color: var(--rc-ink); }
.rc-sidebar a.active { background: #DDF1F3; border-color: var(--rc-teal); color: var(--rc-teal-ink); }
.rc-aside { flex: 0 0 340px; padding: 20px 16px 20px 8px; display: none; flex-direction: column; gap: 16px; }
@media (min-width: 1200px) { .rc-aside { display: flex; } }
.rc-card { border: 2px solid var(--rc-gray); border-radius: 18px; padding: 16px 18px; background: #fff; }
.rc-card h3 { font-size: 1.1rem; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.rc-card h3 a { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; text-decoration: none; }
.rc-progress { height: 14px; background: var(--rc-gray); border-radius: 8px; overflow: hidden; }
.rc-progress > span { display: block; height: 100%; background: var(--rc-orange); border-radius: 8px; transition: width .6s ease; }
.rc-progress.teal > span { background: var(--rc-teal); }
.rc-stat { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.rc-stat span:last-child { color: #6B7080; }
.rc-statbar { display: flex; gap: 22px; justify-content: flex-end; padding: 14px 4px; font-weight: 800; }
.rc-statbar .flag { font-size: 1.5rem; line-height: 1; }
.rc-hero { text-align: center; padding: 24px 12px 40px; }
.rc-banner { background: var(--rc-teal); color: #fff; border-radius: 18px; padding: 16px 22px; text-align: left; margin-bottom: 28px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rc-banner small { color: #fff !important; display: block; opacity: .9; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rc-banner b { font-size: 1.4rem; font-weight: 800; }
.rc-cta { display: inline-block; padding: 14px 56px; border-radius: 16px; background: var(--rc-orange); color: #fff !important; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none; box-shadow: 0 4px 0 #E58E00; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rc-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #E58E00; }
.rc-cta.teal { background: var(--rc-teal); box-shadow: 0 4px 0 #17757D; }
.rc-cta.ghost { background: #fff; color: var(--rc-teal-ink) !important; border: 2px solid var(--rc-gray); box-shadow: 0 3px 0 var(--rc-gray); text-shadow: none; padding: 12px 28px; }
.rc-count { font-size: 4.5rem; font-weight: 800; color: var(--rc-teal-ink); line-height: 1; }
.rc-tabbar { display: none; }
@media (max-width: 991.98px) {
  .rc-sidebar { display: none; }
  .rc-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; border-top: 2px solid var(--rc-gray); }
  .rc-tabbar a { flex: 1; text-align: center; padding: 8px 0; color: #6B7080; font-size: .7rem; font-weight: 800; text-decoration: none; text-transform: uppercase; }
  .rc-tabbar a i { display: block; font-size: 1.4rem; color: var(--rc-teal); }
  .rc-tabbar a.active { color: var(--rc-teal-ink); background: #DDF1F3; }
  .rc-shell { padding-bottom: 70px; }
}

/* Режим фокуса (тренировка): без меню, крестик, прогресс, нижняя панель с кнопкой «Проверить». */
body:has(.rc-focus) > nav.navbar, body:has(.rc-focus) > hr, body:has(.rc-focus) .rc-sidebar, body:has(.rc-focus) .rc-tabbar { display: none !important; }
body:has(.rc-focus) .rc-shell { padding-bottom: 110px; }
.train-top { display: flex; align-items: center; gap: 16px; margin: 24px 0 36px; }
.train-top .train-progress { flex: 1; margin: 0; }
.train-close { font-size: 2.2rem; line-height: 1; color: #9AA0AE; text-decoration: none; }
.train-close:hover { color: var(--rc-ink); }
.train-title { font-size: 1.8rem; margin-bottom: 12px; }
.train-top .train-count { font-weight: 800; color: #6B7080; }
body:has(.rc-focus) #training-form button[type=submit] { position: fixed; right: max(24px, 12vw); bottom: 28px; z-index: 1041; min-width: 180px; text-transform: uppercase; letter-spacing: .05em; }
body:has(.rc-focus)::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 100px; background: #fff; border-top: 2px solid var(--rc-gray); z-index: 1040; }

/* Практика: крупная карточка и коллекции */
.rc-feature { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 28px; border-radius: 20px;
  background: linear-gradient(135deg, #17757D, #229EA7); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rc-feature h3 { color: #fff; font-size: 1.5rem; }
.rc-feature p { color: #fff; margin-bottom: 16px; }
.rc-collection { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; margin-bottom: 16px;
  border: 2px solid var(--rc-gray); border-bottom-width: 4px; border-radius: 20px; background: #fff; color: var(--rc-ink); text-decoration: none; }
.rc-collection:hover { background: #F9F9F9; color: var(--rc-ink); }
.rc-collection h3 { font-size: 1.25rem; margin-bottom: 6px; }
.rc-collection p { margin: 0; color: #6B7080; }
.rc-collection-icon { font-size: 3rem; color: var(--rc-teal); }
.rc-collection-icon.orange { color: var(--rc-orange); }
.rc-badge { position: absolute; top: -12px; right: -6px; background: var(--rc-orange); color: #fff; font-weight: 800; border-radius: 999px; padding: 2px 10px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rc-badge.teal { background: var(--rc-teal); }
.rc-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rc-tabs a { padding: 8px 18px; border-radius: 999px; border: 2px solid var(--rc-gray); font-weight: 800; text-decoration: none; color: #6B7080; }
.rc-tabs a.active { background: #DDF1F3; border-color: var(--rc-teal); color: var(--rc-teal-ink); }

/* Профиль: баннер, плитки статистики */
.rc-profile-banner { position: relative; height: 220px; border-radius: 22px; background: var(--rc-gray); display: flex; align-items: center; justify-content: center; gap: 28px; overflow: hidden; }
.rc-avatar { width: 120px; height: 120px; border-radius: 50%; background: var(--rc-teal); color: #fff; font-size: 3.4rem; font-weight: 800; display: flex; align-items: center; justify-content: center; text-shadow: 0 2px 3px rgba(0,0,0,.3); box-shadow: 0 5px 0 var(--rc-teal-ink); }
.rc-profile-mascot img { height: 160px; width: auto; }
.rc-edit { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 2px solid #C9CBD3; box-shadow: 0 3px 0 #C9CBD3; display: flex; align-items: center; justify-content: center; color: var(--rc-ink); text-decoration: none; }
.rc-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rc-tile { border: 2px solid var(--rc-gray); border-radius: 16px; padding: 14px 18px; background: #fff; display: flex; flex-direction: column; }
.rc-tile b { font-size: 1.6rem; font-weight: 800; }
.rc-tile span { color: #6B7080; font-weight: 700; }
.rc-tile.hot { background: linear-gradient(135deg, #FFA61D, #FFC15A); border-color: #FFA61D; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rc-tile.hot span { color: #fff; }
@media (max-width: 575.98px) { .rc-profile-mascot { display: none; } .rc-tiles { grid-template-columns: 1fr 1fr; } }

/* «Не помню»: подсказка без перезагрузки; в режиме фокуса кнопка слева внизу, как «Пропустить» */
.train-banner.hint { background: #FFF1D6; color: #7A4B00; border: 2px solid #FFD58A; }
.train-forgot { margin-top: 14px; border: 2px solid var(--rc-gray); cursor: pointer; }
.train-forgot:disabled { opacity: .5; cursor: default; }
body:has(.rc-focus) .train-forgot { position: fixed; left: max(24px, 12vw); bottom: 28px; margin: 0; z-index: 1041; }
/* Анимация с transform ломает position: fixed у вложенной кнопки «Проверить» */
body:has(.rc-focus) .train-card { animation: none !important; transform: none !important; }
body:has(.rc-focus) #training-form button[type=submit] { width: auto !important; padding: 12px 44px !important; margin: 0 !important; }

/* Лидерборд группы */
.rc-lb-row { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 2px solid var(--rc-gray); font-weight: 700; }
.rc-lb-row:last-child { border-bottom: 0; }
.rc-lb-row.me { background: #DDF1F3; }
.rc-lb-place { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #6B7080; font-weight: 800; }
.rc-lb-place.top { background: var(--rc-orange); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rc-lb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rc-lb-xp { color: var(--rc-teal-ink); font-weight: 800; }
.rc-lb-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--rc-teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.3); }

/* Список слов: шапка, панель фильтров, карточка, пустое состояние */
.rc-words-head h1 { font-size: 1.9rem; margin-bottom: 4px; }
.rc-words-head p { color: #6B7080; margin-bottom: 20px; }
.rc-words-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.rc-sort { display: flex; align-items: center; gap: 10px; margin: 0; }
.rc-sort label { color: #6B7080; font-weight: 700; font-size: .9rem; margin: 0; white-space: nowrap; }
.rc-sort select { appearance: none; -webkit-appearance: none; border: 2px solid var(--rc-gray); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2317757D' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border-radius: 999px; padding: 8px 38px 8px 16px; font-weight: 800; color: var(--rc-teal-ink); cursor: pointer; }
.rc-sort select:focus { outline: 0; border-color: var(--rc-teal); box-shadow: 0 0 0 3px rgba(34,158,167,.2); }
.rc-words-card { background: #fff; border: 1px solid var(--rc-gray); border-radius: 20px; box-shadow: 0 4px 16px rgba(47,42,51,.07); overflow: hidden; }
.rc-words-table { margin: 0; }
.rc-words-table thead th { background: #F4FAFA; color: var(--rc-teal-ink); text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; font-weight: 800; border-bottom: 1px solid var(--rc-gray); padding: 14px 12px; }
.rc-words-table tbody td { vertical-align: middle; padding: 12px; border-color: #EEF0F3; }
.rc-words-table tbody tr:hover { background: #FAFDFD; }
.rc-words-empty { text-align: center; padding: 36px 20px 40px; }
.rc-words-empty .home-mascot { margin-bottom: 8px; }
.rc-words-empty h3 { font-size: 1.4rem; margin-bottom: 6px; }
.rc-words-empty p { color: #6B7080; max-width: 420px; margin: 0 auto 20px; }

/* Единый стиль страниц-списков: наборы, организации, FAQ, админ-панель */
.rc-list-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; margin-bottom: 12px; text-decoration: none;
  background: #fff; border: 1px solid var(--rc-gray); border-radius: 18px; box-shadow: 0 4px 16px rgba(47,42,51,.07); transition: transform .15s, box-shadow .15s, border-color .15s; }
.rc-list-card:hover { transform: translateY(-2px); border-color: var(--rc-teal); box-shadow: 0 8px 22px rgba(34,158,167,.18); }
.rc-list-card h3 { font-size: 1.15rem; margin: 0 0 4px; }
.rc-list-card p { margin: 0; color: #6B7080; }
.rc-list-card > i { color: var(--rc-teal); font-size: 1.1rem; }
.rc-section-title { font-size: 1.15rem; margin: 28px 0 12px; }
.rc-org .card { border: 1px solid var(--rc-gray); border-radius: 18px; box-shadow: 0 4px 16px rgba(47,42,51,.07); }
.rc-org .alert { border-radius: 14px; }
.rc-faq { background: #fff; border: 1px solid var(--rc-gray); border-radius: 16px; box-shadow: 0 4px 16px rgba(47,42,51,.06); margin-bottom: 12px; overflow: hidden; }
.rc-faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; font-weight: 800; color: var(--rc-ink); position: relative; }
.rc-faq summary::-webkit-details-marker { display: none; }
.rc-faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--rc-teal); border-bottom: 2px solid var(--rc-teal); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.rc-faq[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.rc-faq[open] summary { color: var(--rc-teal-ink); border-bottom: 1px solid #EEF0F3; }
.rc-faq p { margin: 0; padding: 14px 20px 18px; color: #3d3a44; line-height: 1.6; }
.rc-sidenav { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--rc-gray); border-radius: 20px; box-shadow: 0 4px 16px rgba(47,42,51,.07); padding: 12px; }
.rc-sidenav-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; text-decoration: none; font-weight: 700; color: #4b4955; transition: background .15s, color .15s; }
.rc-sidenav-link i { color: var(--rc-teal); font-size: 1.05rem; }
.rc-sidenav-link:hover { background: #F1F8F9; color: var(--rc-teal-ink); }
.rc-sidenav-link.active { background: #DDF1F3; color: var(--rc-teal-ink); box-shadow: inset 3px 0 0 var(--rc-teal); }
.rc-note { background: #F1F8F9 !important; border: 1px solid #CFE8EB !important; border-radius: 14px !important; color: #2f5f64; }

/* Профиль: карточки «Подписка», «Данные» и др. в общем стиле */
.rc-profile .card { border: 1px solid var(--rc-gray) !important; border-radius: 20px !important; box-shadow: 0 4px 16px rgba(47,42,51,.07) !important; min-height: 0 !important; overflow: hidden; }
.rc-profile .card-header { background: #F4FAFA !important; border-bottom: 1px solid var(--rc-gray) !important; padding: 14px 20px; }
.rc-profile .card-header h4, .rc-profile .card-header h5 { color: var(--rc-teal-ink) !important; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.rc-profile .alert { border-radius: 16px; box-shadow: 0 4px 16px rgba(34,158,167,.25) !important; }
.rc-profile h2 { font-size: 1.3rem; }
