/* Личный кабинет ФИНОМИКА — нежно-фиолетовая тема */

.fin-cabinet-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(43, 35, 67, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.fin-cabinet-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fin-cabinet-modal {
  width: min(920px, 100%);
  max-height: min(90vh, 880px);
  background: var(--surface, #fff);
  border-radius: 28px;
  border: 1px solid var(--border, #e8dff5);
  box-shadow: var(--shadow-soft, 0 16px 48px rgba(151, 77, 194, 0.18));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fin-cabinet-overlay.is-open .fin-cabinet-modal {
  transform: translateY(0);
}

.fin-cabinet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border, #e8dff5);
  background: linear-gradient(180deg, var(--primary-soft, #f4eef9) 0%, var(--surface, #fff) 100%);
}

.fin-cabinet-title {
  font-family: var(--font-text, 'Manrope', sans-serif);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main, #2b2343);
  margin: 0;
}

.fin-cabinet-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border, #e8dff5);
  background: var(--surface, #fff);
  color: var(--text-muted, #7b7694);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.fin-cabinet-close:hover {
  border-color: var(--primary, #974dc2);
  color: var(--primary, #974dc2);
}

.fin-cabinet-tabs {
  display: flex;
  gap: 10px;
  padding: 0;
  border-bottom: none;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
  flex: 1 1 auto;
}

.fin-cabinet-nav {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--border, #e8dff5);
}

.fin-finkoins-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin: 0 4px 10px 0;
  padding: 2px 8px 2px 4px;
  border: 0;
  background: transparent;
  max-width: none;
}
.fin-finkoins-chip::before,
.fin-finkoins-chip::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  background: #f0c14a;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  opacity: 0.95;
  pointer-events: none;
  will-change: transform, opacity;
}
.fin-finkoins-chip::before {
  left: -4px;
  top: 2px;
  animation: finStarFloatA 3.2s ease-in-out infinite;
}
.fin-finkoins-chip::after {
  right: 0;
  top: 4px;
  width: 8px;
  height: 8px;
  opacity: 0.85;
  animation: finStarFloatB 3.8s ease-in-out infinite;
}
.fin-finkoins-chip__coin {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(196, 140, 40, 0.28));
  transform-origin: center center;
  animation: finCoinPulse 2.4s ease-in-out infinite;
}
.fin-finkoins-chip__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fin-finkoins-chip__label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #8a82a7;
  white-space: nowrap;
  line-height: 1.15;
}
.fin-finkoins-chip__value {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.45rem;
  font-weight: 800;
  color: #2b2343;
  letter-spacing: -0.03em;
  line-height: 1;
}
.fin-finkoins-chip__value::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -4px;
  width: 9px;
  height: 9px;
  background: #f0c14a;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  opacity: 0.9;
  pointer-events: none;
  animation: finStarFloatC 4.2s ease-in-out infinite;
}
.fin-finkoins-chip__phi {
  display: none !important;
}

@keyframes finCoinPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 10px rgba(196, 140, 40, 0.28)); }
  50% { transform: scale(1.07); filter: drop-shadow(0 6px 14px rgba(196, 140, 40, 0.42)); }
}
@keyframes finStarFloatA {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.85; }
  50% { transform: translate(3px, -5px) rotate(18deg) scale(1.12); opacity: 1; }
}
@keyframes finStarFloatB {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.75; }
  50% { transform: translate(-4px, 4px) rotate(-22deg) scale(1.15); opacity: 1; }
}
@keyframes finStarFloatC {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0.8; }
  50% { transform: translate(2px, -6px) rotate(12deg) scale(1.18); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .fin-finkoins-chip__coin,
  .fin-finkoins-chip::before,
  .fin-finkoins-chip::after,
  .fin-finkoins-chip__value::after,
  .fin-char-editor__coins-coin,
  .fin-char-editor__coins-star {
    animation: none !important;
  }
}

.fin-cabinet-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-text, 'Manrope', sans-serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted, #8a82a7);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.fin-cabinet-tab img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.fin-cabinet-nav.has-parent-tab {
  gap: 8px;
  padding: 8px 10px 0;
}
.has-parent-tab .fin-cabinet-tabs {
  gap: 2px;
  overflow-x: hidden;
}
.has-parent-tab .fin-cabinet-tab {
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 4px 10px;
  font-size: 0.82rem;
}
.has-parent-tab .fin-cabinet-tab img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 auto;
}
.fin-cabinet-tab.is-active {
  color: var(--text-main, #2b2343);
  border-bottom-color: var(--primary, #974dc2);
}

.fin-cabinet-body {
  padding: 20px 22px 24px;
  overflow: auto;
  flex: 1;
}

.fin-cabinet-tab[hidden],
.fin-cabinet-panel[hidden] {
  display: none !important;
}

/* Ваши данные — дизайн по макету ЛК */
.fin-profile-layout {
  display: grid;
  grid-template-columns: minmax(168px, 210px) minmax(0, 1fr);
  gap: 14px 22px;
  align-items: start;
}
.fin-profile-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.fin-stats-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 0;
  padding: 6px 4px;
  border-radius: 22px;
  border: 1px solid #ebe4f5;
  background: #f5f2f9;
}
@media (max-width: 720px) {
  .fin-profile-layout { grid-template-columns: 1fr; gap: 14px; }
}

.fin-character-col { display: flex; flex-direction: column; min-width: 0; }

.fin-character-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.15;
  max-height: 286px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(216, 198, 240, 0.9);
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 18%, rgba(186, 140, 230, 0.55) 0 1.5px, transparent 3px),
    radial-gradient(circle at 86% 42%, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 3px),
    radial-gradient(circle at 22% 68%, rgba(186, 140, 230, 0.4) 0 1.5px, transparent 3px),
    radial-gradient(ellipse 90% 70% at 50% 35%, #ffffff 0%, transparent 58%),
    linear-gradient(165deg, #f4ecfb 0%, #ebe1f7 48%, #e4d7f4 100%);
  box-shadow:
    0 10px 28px rgba(151, 77, 194, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
.fin-character-card img.fin-character-card__bg,
.fin-character-card__bg {
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  transform: none;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.fin-character-card__bg[hidden] { display: none !important; }
.fin-character-card img.fin-character-card__char,
.fin-character-card__char {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 58px; /* место под кнопку, чтобы не перекрывала лицо */
  width: 112%;
  height: auto;
  max-height: calc(100% - 52px);
  max-width: none;
  transform: translateX(-50%);
  object-fit: cover;
  object-position: center top;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.fin-character-edit-btn {
  appearance: none;
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(151, 77, 194, 0.55);
  background: rgba(255, 255, 255, 0.96);
  color: #8f4adf;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    0 0 0 3px rgba(151, 77, 194, 0.08),
    0 8px 18px rgba(151, 77, 194, 0.16);
  animation: fin-character-btn-pulse 2.6s ease-in-out infinite;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.fin-character-edit-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.fin-character-edit-btn:hover { border-color: rgba(151, 77, 194, 0.85); background: #fff; }
@keyframes fin-character-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(151, 77, 194, 0.07), 0 8px 16px rgba(151, 77, 194, 0.12); transform: scale(1); }
  50% { box-shadow: 0 0 0 7px rgba(151, 77, 194, 0.1), 0 10px 22px rgba(151, 77, 194, 0.2); transform: scale(1.012); }
}
@media (prefers-reduced-motion: reduce) {
  .fin-character-edit-btn { animation: none; }
}

.fin-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
@media (max-width: 600px) {
  .fin-fields { grid-template-columns: 1fr; }
}

.fin-field { display: flex; flex-direction: column; gap: 6px; }
.fin-field label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #7a6f9a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fin-field-row { display: flex; align-items: stretch; gap: 8px; }
.fin-field input {
  flex: 1;
  border-radius: 16px;
  border: 1px solid #e6def3;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  background: #f4f1f8;
  color: #2b2343;
  min-width: 0;
}
.fin-field input:focus {
  outline: none;
  border-color: #b48ae0;
  box-shadow: 0 0 0 3px rgba(143, 74, 223, 0.12);
  background: #fff;
}
.fin-field input.is-readonly,
.fin-field input[readonly] {
  background: #f4f1f8;
  color: #6f6688;
  border-color: #e6def3;
}

.fin-finkoins-card {
  display: none;
}
.fin-finkoins-card__coin,
.fin-finkoins-card__meta,
.fin-finkoins-card__label,
.fin-finkoins-card__info,
.fin-finkoins-card__value,
.fin-finkoins-card__phi {
  /* legacy classes kept for safety */
}

.fin-stats-card {
  /* base styles defined above near .fin-profile-layout */
}
.fin-stat {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  position: relative;
}
.fin-stat + .fin-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 1px;
  background: #e2d9ef;
}
.fin-stat__icon {
  grid-row: 1 / span 3;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #8f4adf;
  align-self: center;
  overflow: visible;
  padding: 4px;
  box-sizing: border-box;
}
.fin-stat__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.fin-stat__icon svg { width: 22px; height: 22px; }
.fin-stat__label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2b2343;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
}
.fin-stat__value {
  font-size: 1.7rem;
  font-weight: 800;
  color: #2b2343;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.fin-stat__hint {
  font-size: 0.86rem;
  font-weight: 700;
  color: #8f4adf;
}

/* legacy avatar styles kept for safety */
.fin-profile-grid {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 22px;
  align-items: start;
}
.fin-avatar-box {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  border-radius: 24px;
  border: 4px solid var(--primary, #974dc2);
  overflow: hidden;
  background: var(--primary-soft, #f4eef9);
  margin: 0 auto;
}
.fin-avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.fin-field-note { margin-top: 2px; font-size: 0.76rem; font-weight: 600; color: #9a8fb8; }
.fin-field-edit {
  width: 44px; border-radius: 12px; border: 1px solid var(--primary, #974dc2);
  background: #fff; color: var(--primary, #974dc2); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fin-field-edit svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.fin-field input[readonly] + .fin-field-edit { opacity: 0.7; }

/* Понравилось */
.fin-liked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.fin-liked-card {
  border-radius: 20px;
  overflow: clip;
  border: 1px solid var(--border, #e8dff5);
  background: #fff;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 26px rgba(56, 34, 98, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.fin-liked-card:hover {
  transform: translateY(-2px);
  border-color: #d7c5ef;
  box-shadow: 0 14px 30px rgba(56, 34, 98, 0.12);
}
.fin-liked-card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--primary-soft, #f4eef9);
}
.fin-liked-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fin-liked-heart {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(151, 77, 194, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.fin-liked-meta {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
}
.fin-liked-meta h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main, #2b2343);
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fin-liked-meta p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted, #7b7694);
  line-height: 1.35;
}

.fin-history-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.fin-history-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
}
.fin-history-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent, #fd7124);
  transition: width 0.3s;
}
.fin-history-caption {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: #8f56d6;
}

.fin-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted, #7b7694);
  font-weight: 600;
}

/* Лайки на карточках контента */
.fin-like-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, background 0.15s ease;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}
.fin-like-btn:hover {
  transform: scale(1.06);
  background: #fff;
}

.cartoon-home-thumb-wrap > .fin-like-btn {
  z-index: 6;
}
.fin-like-btn.is-liked {
  background: rgba(151, 77, 194, 0.95);
}

/* Строка подкаста: лайк без белого круга, широкая зона нажатия */
.fin-like-btn.fin-like-btn--podcast-inline {
  position: static;
  width: auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  margin: -4px -6px;
  border-radius: 12px;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(58, 45, 103, 0.72);
  font-size: 19px;
  line-height: 1;
  justify-self: center;
  align-self: center;
}
.fin-like-btn.fin-like-btn--podcast-inline:hover {
  transform: none;
  background: rgba(151, 77, 194, 0.1) !important;
}
.fin-like-btn.fin-like-btn--podcast-inline.is-liked {
  background: transparent !important;
  color: #7a3df0;
}

/* Карточки статей: сердечко на тёмном градиенте */
.fin-like-btn.fin-like-btn--article-inline {
  position: static;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}
.fin-like-btn.fin-like-btn--article-inline:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.22) !important;
}
.fin-like-btn.fin-like-btn--article-inline.is-liked {
  background: rgba(151, 77, 194, 0.95) !important;
  border-color: transparent;
  color: #fff;
}

.item-cover,
.playlist-thumb-wrap,
.cartoon-home-thumb-wrap,
.fin-liked-card-cover,
#cartoons .card-image,
#podcasts .card-image,
#comics #comics-main .comic-book-face {
  position: relative;
}

.progress-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px;
  width: 0;
  background: #FF8C00;
  z-index: 100;
  transition: width 0.3s ease;
  pointer-events: none;
}

/* Прогресс на превью */
.fin-progress-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  pointer-events: none;
  z-index: 10;
}
.fin-progress-bar {
  height: 100%;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.fin-progress-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent, #fd7124);
  border-radius: 0;
  transition: width 0.3s;
}

/* Кнопка открытия ЛК в попапе профиля */
.fin-open-cabinet-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: none;
  background: var(--primary, #974dc2);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.fin-open-cabinet-btn:hover {
  filter: brightness(1.05);
}

.fin-hidden-file {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.fin-cabinet-foot {
  flex-shrink: 0;
  padding: 12px 22px 18px;
  border-top: 1px solid var(--border, #e8dff5);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--surface, #fff);
}
.fin-cabinet-logout-btn {
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid var(--border, #e8dff5);
  background: var(--surface-2, #f4eef9);
  color: var(--text-muted, #7b7694);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.fin-cabinet-logout-btn:hover {
  border-color: var(--primary, #974dc2);
  color: var(--primary, #974dc2);
}

/* ===== Мобильный ЛК (вертикальный макет как на экране) ===== */
@media (max-width: 720px) {
  .fin-cabinet-overlay {
    padding: 10px;
    align-items: stretch;
  }
  .fin-cabinet-modal {
    width: 100%;
    max-height: none;
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 24px;
  }
  .fin-cabinet-head {
    padding: 14px 16px 10px;
  }
  .fin-cabinet-title {
    font-size: 1.15rem;
  }

  .fin-cabinet-nav {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0 16px 0;
    border-bottom: none;
  }
  .fin-cabinet-tabs {
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 2px;
    border-bottom: 1px solid var(--border, #e8dff5);
    overflow: visible;
  }
  .fin-cabinet-tab {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 5px;
    padding: 10px 2px 12px;
    font-size: 0.72rem;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }
  .fin-cabinet-tab img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex: 0 0 auto;
  }
  .fin-cabinet-nav.has-parent-tab {
    gap: 0;
    padding: 0 16px 0;
  }
  .has-parent-tab .fin-cabinet-tabs {
    gap: 0;
    overflow-x: hidden;
  }
  .has-parent-tab .fin-cabinet-tab {
    flex-direction: column;
    gap: 4px;
    padding: 8px 2px 10px;
    font-size: 0.68rem;
  }
  .has-parent-tab .fin-cabinet-tab img {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  /* финКоины — отдельная карточка под вкладками */
  .fin-finkoins-chip {
    width: 100%;
    max-width: none;
    margin: 12px 0 2px;
    padding: 10px 14px;
    border-radius: 18px;
    border: 1px solid #ebe4f5;
    background: #fff;
    box-sizing: border-box;
    gap: 12px;
  }
  .fin-finkoins-chip::before {
    left: 52px;
    top: 8px;
  }
  .fin-finkoins-chip::after {
    right: 10px;
    top: 10px;
  }
  .fin-finkoins-chip__coin {
    width: 52px;
    height: 52px;
  }
  .fin-finkoins-chip__label {
    font-size: 0.82rem;
  }
  .fin-finkoins-chip__value {
    font-size: 1.5rem;
  }
  .fin-finkoins-chip__phi {
    display: none !important;
  }
  .fin-finkoins-chip__value::after {
    right: -10px;
    bottom: -2px;
  }

  .fin-cabinet-body {
    padding: 12px 16px 16px;
  }

  .fin-profile-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fin-character-col {
    max-width: none;
    width: 100%;
    margin: 0;
  }
  .fin-character-card {
    aspect-ratio: 1 / 1;
    max-height: min(340px, 78vw);
    border-radius: 22px;
  }
  .fin-character-card img.fin-character-card__bg,
  .fin-character-card__bg {
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    max-width: none;
    transform: none;
    object-fit: cover;
    object-position: center;
  }
  .fin-character-card img.fin-character-card__char,
  .fin-character-card__char {
    left: 50%;
    top: 4%;
    bottom: auto;
    width: auto;
    height: calc(100% - 62px);
    max-height: calc(100% - 62px);
    max-width: 92%;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center center;
  }
  .fin-character-edit-btn {
    left: 14px;
    right: 14px;
    bottom: 12px;
    min-height: 44px;
    font-size: 0.9rem;
  }

  .fin-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .fin-field label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #8a82a7;
  }
  .fin-field input {
    padding: 13px 14px;
    border-radius: 14px;
  }

  /* статистика остаётся в 2 колонки, как на макете */
  .fin-stats-card {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 4px 2px;
    border-radius: 20px;
  }
  .fin-stat {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 2px 8px;
    padding: 12px 10px;
    background: transparent;
    border-radius: 0;
  }
  .fin-stat + .fin-stat::before {
    display: block;
    top: 12px;
    bottom: 12px;
  }
  .fin-stat__icon {
    width: 36px;
    height: 36px;
    padding: 0;
  }
  .fin-stat__label {
    font-size: 0.78rem;
  }
  .fin-stat__value {
    font-size: 1.35rem;
  }
  .fin-stat__hint {
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .fin-cabinet-foot {
    justify-content: center;
    padding: 12px 16px 16px;
  }
  .fin-cabinet-logout-btn {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    border-radius: 16px;
    color: #8f4adf;
    background: #f4eef9;
    border-color: transparent;
    font-size: 0.95rem;
  }
}

/* Промежуточное меню профиля отключено: иконка открывает модалку ЛК */
#profilePopover.profile-menu-popover {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* =============================================================================
   Контент главной: обложки без «фиолетовой подложки» / рамки / тени у превью
   (подкасты, мультики, комиксы). Перекрывает устаревшие правила из index.html.
   ============================================================================= */
.podcast-row-thumb,
.podcast-track-row .podcast-row-thumb,
#podcasts .podcast-track-row .podcast-row-thumb,
.podcast-track-grid .podcast-row-thumb {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.podcast-track-row.episode-card:hover .podcast-row-thumb,
#podcasts .podcast-track-row.episode-card:hover .podcast-row-thumb {
  box-shadow: none !important;
}

.cartoon-home-media,
.cartoon-home-thumb-wrap,
.cartoon-home-thumb,
#cartoons .cartoon-home-media,
#cartoons .cartoon-home-thumb-wrap {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.cartoon-home-thumb {
  background: transparent !important;
}

.cartoon-home-card:hover .cartoon-home-media {
  box-shadow: none !important;
}

#comics #comics-main .comic-book-face,
#comics #comics-main .comic-book-3d {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

#comics #comics-main .comic-book-face img {
  box-shadow: none !important;
}

/* Карточки сетки (сезоны и т.п.): только картинка в обрезке, без обводки блока превью */
.content-item .item-cover,
.tab-content .item-cover {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Мобилка: верх обложки совпадает с верхом заголовка */
@media (max-width: 768px) {
  .podcast-track-row.episode-card,
  #podcasts .podcast-track-row.episode-card,
  .podcast-track-grid .podcast-track-row.episode-card {
    align-items: flex-start !important;
  }

  .podcast-row-thumb,
  #podcasts .podcast-track-row .podcast-row-thumb,
  .podcast-track-grid .podcast-track-row .podcast-row-thumb {
    align-self: flex-start !important;
  }

  #comics #comics-main .comic-book-item {
    align-items: stretch !important;
  }

  #comics #comics-main .comic-book-pedestal,
  #comics #comics-main .comic-mockup-stack {
    align-items: center !important;
    justify-content: flex-start !important;
  }

  #comics #comics-main .comic-book-meta {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }
}

/* ===== Редактор персонажа ===== */
.fin-char-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 21050;
  background: rgba(43, 35, 67, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.fin-char-editor-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fin-char-editor {
  position: relative;
  width: min(960px, 100%);
  height: min(86vh, 720px);
  max-height: min(86vh, 720px);
  background: #fff;
  border-radius: 28px;
  border: 1px solid #e8dff5;
  box-shadow: 0 20px 56px rgba(151, 77, 194, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(10px);
  transition: transform 0.26s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fin-char-editor-overlay.is-open .fin-char-editor {
  transform: translateY(0);
}

.fin-char-editor__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #eee6f7;
  flex: 0 0 auto;
}
.fin-char-editor__title {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--font-text, 'Manrope', sans-serif);
  font-weight: 800;
  font-size: 1.28rem;
  color: #2b2343;
}
.fin-char-editor__coins {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 2px 10px 2px 2px;
}
.fin-char-editor__coins-coin {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
  transform-origin: center center;
  animation: finCoinPulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(196, 140, 40, 0.28));
}
.fin-char-editor__coins-star {
  position: absolute;
  background: #f0c14a;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  pointer-events: none;
}
.fin-char-editor__coins-star--a {
  width: 10px;
  height: 10px;
  left: -2px;
  top: 0;
  animation: finStarFloatA 3.2s ease-in-out infinite;
}
.fin-char-editor__coins-star--b {
  width: 8px;
  height: 8px;
  left: 38px;
  top: -2px;
  animation: finStarFloatB 3.8s ease-in-out infinite;
}
.fin-char-editor__coins-star--c {
  width: 9px;
  height: 9px;
  right: 2px;
  bottom: 2px;
  animation: finStarFloatC 4.2s ease-in-out infinite;
}
.fin-char-editor__coins-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}
.fin-char-editor__coins-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a82a7;
}
.fin-char-editor__coins-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2b2343;
  letter-spacing: -0.02em;
}
.fin-char-editor__close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e8dff5;
  background: #fff;
  color: #7b7694;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.fin-char-editor__close:hover {
  border-color: #974dc2;
  color: #974dc2;
}

.fin-char-editor__body {
  display: grid;
  grid-template-columns: 32% minmax(0, 1fr);
  gap: 16px;
  padding: 14px 20px 10px;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}
@media (max-width: 760px) {
  .fin-char-editor {
    height: min(92vh, 860px);
    max-height: min(92vh, 860px);
  }
  .fin-char-editor__body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 38%) minmax(0, 1fr);
  }
}

.fin-char-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.fin-char-preview__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 24%, rgba(255,255,255,0.75) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 62% 12%, rgba(255,255,255,0.7) 0 1px, transparent 2px),
    linear-gradient(180deg, #efe6fb 0%, #e4d6f6 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.fin-char-preview__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  border: 0;
}
.fin-char-preview__bg[hidden] { display: none !important; }
/* Фиксированная система координат аватара */
.fin-char-avatar {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  height: 100%;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  overflow: visible;
  flex: 0 1 auto;
}
.fin-char-avatar__base,
.fin-char-avatar__hair {
  position: absolute;
  display: block;
  pointer-events: none;
  user-select: none;
  border: 0;
}
.fin-char-avatar__base {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(90, 40, 140, 0.18));
  opacity: 1;
  transition: opacity 0.14s ease;
}
.fin-char-avatar__base.is-fading {
  opacity: 0;
}
.fin-char-avatar__hair {
  z-index: 2;
  height: auto;
  max-width: none;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 4px 10px rgba(90, 40, 140, 0.12));
  /* top/left/width/transform задаются из JS-конфига */
}
.fin-char-preview__stage[data-gender="girl"] .fin-char-avatar__base {
  filter: drop-shadow(0 10px 18px rgba(90, 40, 140, 0.18));
}
.fin-char-preview__tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f3ebfb;
  color: #5b4578;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  flex: 0 0 auto;
}
.fin-char-preview__tip-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #974dc2;
}
.fin-char-preview__tip-icon svg { width: 16px; height: 16px; }

.fin-char-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.fin-char-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #eee6f7;
  flex: 0 0 auto;
}
.fin-char-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 750;
  font-size: 0.92rem;
  color: #8a82a7;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.fin-char-tab svg,
.fin-char-tab__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
}
.fin-char-tab__icon {
  width: 22px;
  height: 22px;
}
.fin-char-tab.is-active {
  color: #7a3db8;
  border-bottom-color: #974dc2;
}

.fin-char-sections {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fin-char-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.fin-char-section[hidden] {
  display: none !important;
}
.fin-char-section-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #2b2343;
  flex: 0 0 auto;
}
.fin-char-section__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.fin-char-section__scroll--hair {
  overscroll-behavior: contain;
}
.fin-char-section__scroll--hair .fin-char-grid {
  padding-bottom: 8px;
}

.fin-char-gender {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 0 0 auto;
  padding: 4px;
  border-radius: 16px;
  background: #f4eefb;
}
.fin-char-gender__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: #8a7a9e;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}
.fin-char-gender__btn.is-selected {
  border-color: #974dc2;
  background: #fff;
  color: #974dc2;
  box-shadow: 0 2px 10px rgba(151, 77, 194, 0.12);
}
.fin-char-gender__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fin-char-gender__icon svg,
.fin-char-gender__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.fin-char-gender__label {
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

.fin-char-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}
@media (max-width: 560px) {
  .fin-char-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.fin-char-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.fin-char-item__thumb {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  border-radius: 16px;
  border: 2px solid #ebe3f4;
  background: #f7f3fb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fin-char-item.is-selected .fin-char-item__thumb {
  border-color: #974dc2;
  box-shadow: 0 0 0 3px rgba(151, 77, 194, 0.14);
}
.fin-char-item__thumb img,
.fin-char-item__hair-thumb {
  width: 78%;
  height: 78%;
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  object-position: center center;
  display: block;
  margin: 0 auto;
  pointer-events: none;
}
.fin-char-item__bg-thumb {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.fin-char-item__thumb-empty {
  width: 42%;
  height: 42%;
  border-radius: 10px;
  background: rgba(151, 77, 194, 0.12);
}
.fin-char-item__check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #974dc2;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(120, 50, 180, 0.35);
  z-index: 2;
}
.fin-char-item.is-selected .fin-char-item__check { display: inline-flex; }
.fin-char-item__check svg { width: 12px; height: 12px; }
.fin-char-item__lock {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(43, 35, 67, 0.72);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.fin-char-item.is-selected .fin-char-item__lock,
.fin-char-item.is-owned:not(.is-locked) .fin-char-item__lock { display: none; }
.fin-char-item__lock svg { width: 11px; height: 11px; }
.fin-char-item.is-secret .fin-char-item__thumb img {
  filter: brightness(0);
  opacity: 0.92;
}
.fin-char-item.is-secret {
  cursor: default;
}
.fin-char-item.is-secret .fin-char-item__lock { display: inline-flex; }
.fin-char-item__price.is-secret-label {
  color: #8a7a9c;
  font-weight: 700;
}
.fin-char-item__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 18px;
  font-size: 0.78rem;
  font-weight: 750;
  color: #6b6288;
}
.fin-char-item__price.is-free { color: #7a3db8; }
.fin-char-item__price img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.fin-char-item__price .fin-char-trophy {
  width: 14px;
  height: 14px;
  color: #e0a824;
}

/* Bonus characters: condition + progress cards */
.fin-char-grid--bonus {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .fin-char-grid--bonus { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .fin-char-grid--bonus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.fin-char-item.fin-char-bonus {
  gap: 0;
  padding: 0;
  border: 1.5px solid #ebe3f4;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  min-height: 0;
}
.fin-char-item.fin-char-bonus.is-selected {
  border-color: #974dc2;
  box-shadow: 0 0 0 3px rgba(151, 77, 194, 0.14);
}
.fin-char-item.fin-char-bonus.is-locked {
  cursor: pointer;
}
.fin-char-item.fin-char-bonus .fin-char-item__thumb {
  aspect-ratio: 1;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #f7f3fb;
  box-shadow: none;
}
.fin-char-item.fin-char-bonus.is-selected .fin-char-item__thumb {
  border: 0;
  box-shadow: none;
}
.fin-char-item.fin-char-bonus .fin-char-item__thumb img,
.fin-char-item.fin-char-bonus .fin-char-item__hair-thumb {
  width: 82%;
  height: 82%;
  max-width: 82%;
  max-height: 82%;
}
.fin-char-bonus__media {
  position: relative;
  display: block;
  flex: 0 0 auto;
}
.fin-char-bonus__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 9px 10px;
  min-width: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
}
.fin-char-bonus__cond {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 6px;
  align-items: start;
  min-height: 3.9em;
  flex: 0 0 auto;
}
.fin-char-bonus__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 0.05em;
  color: #7a3db8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fin-char-bonus__icon svg,
.fin-char-bonus__icon-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.fin-char-bonus__cond-text {
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.3;
  color: #3d3358;
  min-width: 0;
  min-height: 3.9em;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
  white-space: normal;
}
.fin-char-bonus__progress,
.fin-char-bonus__received,
.fin-char-bonus__meta .fin-char-item__price {
  margin-top: auto;
}
.fin-char-bonus__meta .fin-char-item__price {
  justify-content: flex-start;
}
.fin-char-bonus__progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.4em;
  align-items: center;
  column-gap: 6px;
  min-height: 16px;
}
.fin-char-bonus__bar {
  height: 5px;
  border-radius: 999px;
  background: #ece6f4;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}
.fin-char-bonus__bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a463d4 0%, #974dc2 100%);
}
.fin-char-bonus__frac {
  font-size: 0.7rem;
  font-weight: 800;
  color: #7a7198;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1;
  white-space: nowrap;
}
.fin-char-bonus__received {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #f0e6fb;
  color: #7a3db8;
  font-size: 0.72rem;
  font-weight: 800;
  box-sizing: border-box;
}

/* Seasonal autumn card */
.fin-char-item.fin-char-bonus.is-autumn {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 186, 120, 0.35) 0 10%, transparent 11%),
    radial-gradient(circle at 88% 22%, rgba(232, 120, 64, 0.22) 0 8%, transparent 9%),
    radial-gradient(circle at 70% 80%, rgba(255, 170, 90, 0.28) 0 12%, transparent 13%),
    linear-gradient(160deg, #fff4e8 0%, #ffe3c8 55%, #ffd7b0 100%);
  border-color: #f0c59a;
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-item__thumb {
  background: rgba(255, 248, 238, 0.55);
}
.fin-char-item.fin-char-bonus.is-autumn.is-locked .fin-char-item__thumb img {
  filter: brightness(0) sepia(0.55) saturate(3.2) hue-rotate(-15deg);
  opacity: 0.78;
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-bonus__icon {
  color: #c45a1a;
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-bonus__cond-text {
  color: #6a3a1c;
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-bonus__bar {
  background: rgba(196, 120, 60, 0.18);
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-bonus__bar-fill {
  background: linear-gradient(90deg, #f0a04b 0%, #d96a2b 100%);
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-bonus__frac {
  color: #a05a2a;
}
.fin-char-item.fin-char-bonus.is-autumn .fin-char-bonus__received {
  background: rgba(255, 236, 214, 0.95);
  color: #b85a18;
}
.fin-char-bonus__season-label {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 30px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 800;
  color: #8a4a1c;
  line-height: 1.2;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.fin-char-bonus__season-banner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 5px 6px;
  background: rgba(184, 90, 24, 0.92);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  pointer-events: none;
}
.fin-char-item.fin-char-bonus.is-autumn.is-owned .fin-char-bonus__season-banner {
  opacity: 0.88;
}

.fin-char-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  flex: 0 0 auto;
}
.fin-char-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #d7cee6;
  cursor: pointer;
}
.fin-char-dot.is-active { background: #974dc2; }

.fin-char-editor__foot {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px 16px;
  border-top: 1px solid #eee6f7;
  background: #fff;
  flex: 0 0 auto;
}
.fin-char-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 160px;
  padding: 14px 22px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.98rem;
}
.fin-char-btn--ghost {
  background: #efe8f7;
  color: #4d3f6a;
}
.fin-char-btn--ghost:hover { background: #e5daf3; }
.fin-char-btn--primary {
  background: #974dc2;
  color: #fff;
  box-shadow: 0 8px 20px rgba(151, 77, 194, 0.28);
}
.fin-char-btn--primary:hover { background: #863db3; }
.fin-char-btn--primary svg { width: 18px; height: 18px; }

.fin-char-toast {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(43, 35, 67, 0.92);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  max-width: 90%;
  text-align: center;
}
.fin-char-toast.is-show { opacity: 1; }

.fin-char-buy {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: inherit;
  background: rgba(120, 80, 160, 0.12);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.fin-char-buy[hidden] { display: none !important; }

.fin-char-buy__panel {
  width: min(100%, 270px);
  padding: 26px 18px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 10px 34px rgba(74, 36, 112, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-align: center;
  color: #fff;
}

.fin-char-buy__lock {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.fin-char-buy__lock svg {
  width: 22px;
  height: 22px;
  display: block;
}

.fin-char-buy__title {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 10px rgba(58, 28, 92, 0.28);
}

.fin-char-buy__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 1px 8px rgba(58, 28, 92, 0.22);
}
.fin-char-buy__price[hidden] { display: none !important; }
.fin-char-buy__coin {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.fin-char-buy__text {
  margin: 0 0 18px;
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 8px rgba(58, 28, 92, 0.22);
}
.fin-char-buy__text[hidden] { display: none !important; }

.fin-char-buy__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fin-char-buy__actions .fin-char-buy__btn--yes[hidden] {
  display: none !important;
}
.fin-char-buy__actions:has(.fin-char-buy__btn--yes[hidden]) {
  grid-template-columns: 1fr;
}

.fin-char-buy__btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.fin-char-buy__btn:active { transform: scale(0.98); }

.fin-char-buy__btn--no {
  background: rgba(255, 255, 255, 0.38);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.fin-char-buy__btn--no:hover { filter: brightness(1.04); }

.fin-char-buy__btn--yes {
  background: #974dc2;
  color: #fff;
  box-shadow: 0 6px 16px rgba(151, 77, 194, 0.35);
}
.fin-char-buy__btn--yes:hover { background: #863db3; }

@media (max-width: 760px) {
  .fin-char-editor__foot { flex-wrap: wrap; }
  .fin-char-btn { flex: 1 1 140px; }
}


/* ===== DEV: настройка причёски (плавающий overlay, вне layout) ===== */
.fin-hair-tune {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 22050;
  width: min(300px, calc(100vw - 32px));
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(151, 77, 194, 0.55);
  background: rgba(251, 248, 255, 0.98);
  box-shadow: 0 12px 32px rgba(43, 35, 67, 0.22);
  pointer-events: auto;
}
.fin-hair-tune[hidden] { display: none !important; }
.fin-hair-tune__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #6b528f;
}
.fin-hair-tune__head code {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: #efe6fb;
  color: #7a3db8;
}
.fin-hair-tune__meta {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3ecfb;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #4d3a6e;
}
.fin-hair-tune__meta code,
.fin-hair-tune__meta strong {
  font-weight: 800;
  color: #7a3db8;
}
.fin-hair-tune__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  align-items: center;
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #5b4578;
}
.fin-hair-tune__row span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.fin-hair-tune__row strong {
  font-variant-numeric: tabular-nums;
  color: #2b2343;
  min-width: 2.2em;
}
.fin-hair-tune__row input[type="range"] {
  width: 100%;
  accent-color: #974dc2;
  cursor: pointer;
}
.fin-hair-tune__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.fin-hair-tune__btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  background: #974dc2;
  color: #fff;
}
.fin-hair-tune__btn--ghost {
  background: #efe8f7;
  color: #5b4578;
}
.fin-hair-tune__btn:hover { filter: brightness(1.05); }

.fin-parent-teaser { display: flex; flex-direction: column; gap: 12px; padding: 8px 4px 16px; }
.fin-parent-teaser__title { margin: 0; font-weight: 800; color: #2b2343; }
.fin-parent-teaser__text { margin: 0; color: #7b7694; }
.fin-parent-teaser__card { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.fin-parent-teaser__card img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #f4eef9; }
.fin-parent-teaser__btn {
  align-self: flex-start;
  display: inline-flex;
  text-decoration: none;
  background: #974dc2;
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 16px;
}
