/* ═══════════════════════════════════════════════════════════════════════════
   Trainer Card + Tooltip + Avatar Constructor + Status Pills
   Light-grey theme, clean & modern.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Trainer Card ─────────────────────────────────────────────────────── */

.tc {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(145deg, var(--card) 0%, rgba(37,99,235,.02) 100%);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(2,6,23,.06);
  border: 1px solid var(--border);
}

.tc-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  margin-top: 8px;
}

@media (max-width: 860px) {
  .tc {
    padding: 16px;
  }
  .tc-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tc-avatar {
    width: 160px;
    height: 200px;
  }
  .tc-avatar-wrap {
    padding: 12px;
  }
}

/* ── Left column: avatar ── */

.tc-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tc-avatar-wrap {
  position: relative;
  background: linear-gradient(165deg, rgba(37,99,235,.08), rgba(124,58,237,.05));
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 24px rgba(37,99,235,.08);
}

.tc-avatar {
  position: relative;
  width: 200px;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(2,6,23,.03), transparent);
  border: 1px solid rgba(37,99,235,.1);
  box-shadow: 0 4px 16px rgba(2,6,23,.08);
}

.tc-avatar-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.tc-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.tc-avatar-icon {
  font-size: 80px;
  opacity: .4;
}

.tc-avatar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Status pills ── */

.tc-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(2,6,23,.10);
  background: rgba(2,6,23,.03);
  white-space: nowrap;
}

.pill--online {
  background: rgba(22,163,74,.12);
  border-color: rgba(22,163,74,.25);
  color: #16a34a;
}
.pill--online::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse-dot 2s ease infinite;
}

.pill--offline {
  background: rgba(100,116,139,.08);
  border-color: rgba(100,116,139,.18);
  color: var(--muted);
}

.pill--idle {
  background: rgba(234,179,8,.10);
  border-color: rgba(234,179,8,.22);
  color: #854d0e;
}

.pill--in_battle {
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.22);
  color: #dc2626;
}
.pill--in_battle::before {
  content: '⚔️';
  font-size: 11px;
}

.pill--in_search,
.pill--search {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.18);
  color: #2563eb;
}

.pill--in_trade {
  background: rgba(124,58,237,.08);
  border-color: rgba(124,58,237,.18);
  color: #7c3aed;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Right column ── */

.tc-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.tc-header-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-nick {
  margin: 0;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -.4px;
  text-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.tc-id {
  font-size: 12px;
  opacity: .85;
}

.tc-header-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tc-level {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--soft);
  font-weight: 800;
}

.tc-rating-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(124,58,237,.06));
  border: 1px solid rgba(37,99,235,.2);
  box-shadow: 0 2px 12px rgba(37,99,235,.1);
}

.tc-rating-value {
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.2px;
  color: var(--primary);
  line-height: 1.1;
}

.tc-rating-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  margin-top: 2px;
  opacity: .9;
}

/* ── Clan + Faction row ── */

.tc-section {
  margin-top: 16px;
}
.tc-section__label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.tc-section__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}
.tc-section--social {
  margin-top: 12px;
}
.tc-social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tc-clan-badge {
  font-size: 13px;
}

.tc-faction-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid;
  height: 24px;
}

/* ── Userpic ── */

.tc-userpic-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tc-userpic-wrap {
  flex-shrink: 0;
}

.tc-userpic {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.tc-userpic--default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(124,58,237,.10));
  color: var(--primary);
  font-weight: 900;
  font-size: 20px;
}

.tc-userpic-form {
  display: inline-flex;
}

.tc-userpic-btn {
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
}

/* ── Bio ── */

.tc-bio {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

/* ── Stats grid ── */

.tc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .tc-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tc-stat {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}

.tc-stat:hover {
  border-color: rgba(37,99,235,.2);
  box-shadow: 0 2px 12px rgba(37,99,235,.06);
}

.tc-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 800;
}

.tc-stat-value {
  font-size: 15px;
  font-weight: 900;
  margin-top: 6px;
  line-height: 1.3;
}

/* ── Badges ── */

.tc-badges-section h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.tc-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card), rgba(37,99,235,.02));
  cursor: default;
  transition: transform .12s, border-color .15s, box-shadow .15s;
  min-width: 72px;
  text-align: center;
}

.tc-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(37,99,235,.35);
  box-shadow: 0 6px 20px rgba(37,99,235,.12);
}

.tc-badge img {
  border-radius: 6px;
}

.tc-badge-icon {
  font-size: 24px;
}

.tc-badge-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-badges-more {
  font-size: 12px;
  padding: 8px 14px;
}

/* ── Team compact (pokeball display) ── */

.tc-team-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0);
  background: linear-gradient(135deg, var(--card, #fff), rgba(37,99,235,.02));
  box-shadow: 0 2px 8px rgba(2,6,23,.04);
}
.tc-team-compact__label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tc-team-compact__balls {
  display: flex;
  gap: 4px;
}
.tc-pokeball {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform .1s;
}
.tc-pokeball img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.tc-pokeball--filled { cursor: pointer; text-decoration: none; }
.tc-pokeball--filled:hover { transform: scale(1.15); }
.tc-pokeball--empty { opacity: .3; }
.tc-team-compact__count {
  font-size: 13px;
  font-weight: 800;
  color: var(--text, #1e293b);
  margin-left: auto;
}

/* ── Team showcase (legacy) ── */

.tc-team-section h2 {
  margin: 0 0 8px;
  font-size: 15px;
}

.tc-team {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-team-mon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  transition: border-color .15s;
  min-width: 72px;
}

.tc-team-mon:hover {
  border-color: rgba(37,99,235,.3);
  text-decoration: none;
}

.tc-team-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  padding: 4px;
}

.tc-team-name {
  font-size: 11px;
  font-weight: 700;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-team-level {
  font-size: 10px;
}

.tc-shiny {
  font-size: 12px;
}

/* ── Actions ── */

.tc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════════════════
   Player Tooltip
   ═══════════════════════════════════════════════════════════════════════════ */

.player-tooltip {
  position: fixed;
  z-index: 2000;
  width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(2,6,23,.14);
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  transform: translateY(4px);
}

.player-tooltip.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pt-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.pt-header-avatar {
  flex-shrink: 0;
}

.pt-userpic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
}

.tc-avatar-frame .pt-userpic {
  border: none;
}

.pt-userpic--default {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37,99,235,.15), rgba(124,58,237,.10));
  color: var(--primary);
  font-weight: 900;
  font-size: 16px;
}

.pt-info {
  flex: 1;
  min-width: 0;
}

.pt-nick {
  font-weight: 900;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-nick a {
  text-decoration: none;
  color: inherit;
}
.pt-nick a:hover {
  text-decoration: underline;
  color: var(--primary);
}

.pt-status {
  font-size: 11px;
  margin-top: 2px;
}

.pt-data {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 12px;
}

.pt-datum {
  display: flex;
  flex-direction: column;
}

.pt-datum-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 800;
}

.pt-datum-value {
  font-weight: 900;
  font-size: 14px;
}

.pt-datum-value--link{
  padding:0;
  border:none;
  background:none;
  color:#2563eb;
  font:inherit;
  cursor:pointer;
  text-align:left;
}
.pt-datum-value--link:hover{
  text-decoration:underline;
}

.pt-faction {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid;
  height: 18px;
}

.pt-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pt-actions .btn {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 10px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Avatar Constructor
   ═══════════════════════════════════════════════════════════════════════════ */

.ac {
  max-width: 1060px;
  margin: 0 auto;
}

.ac-hint {
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.ac-hint a {
  color: var(--primary, #7c3aed);
  font-weight: 600;
}

.ac-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  margin-top: 14px;
}

@media (max-width: 860px) {
  .ac-grid {
    grid-template-columns: 1fr;
  }
}

.ac-preview-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ac-preview {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(37,99,235,.05), rgba(124,58,237,.03));
  border: 1px solid rgba(37,99,235,.12);
  overflow: hidden;
  isolation: isolate;
}

.ac-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  mix-blend-mode: normal;
}

.ac-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 64px;
  gap: 8px;
}

.ac-quick-actions {
  display: flex;
  gap: 8px;
}

.ac-quick-actions .btn {
  flex: 1;
}

/* ── Tabs ── */

.ac-items-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ac-gender-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
}

.ac-gender-label {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  min-width: 36px;
}

.ac-gender-value {
  font-weight: 600;
  color: var(--text);
}

.ac-gender-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.ac-gender-link:hover {
  text-decoration: underline;
}

.ac-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ac-tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: all .12s;
}

.ac-tab:hover {
  border-color: rgba(37,99,235,.25);
  color: var(--text);
}

.ac-tab.active {
  background: var(--primary-weak);
  border-color: rgba(37,99,235,.3);
  color: var(--primary);
}

/* ── Panels ── */

.ac-panel {
  display: none;
}

.ac-panel.active {
  display: block;
}

.ac-equipped-hint {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ok-weak);
  border: 1px solid rgba(22,163,74,.15);
  margin-bottom: 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.ac-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color .12s;
}

.ac-item:hover {
  border-color: rgba(37,99,235,.25);
}

.ac-item.equipped {
  border-color: rgba(22,163,74,.4);
  background: var(--ok-weak);
}

.ac-item-img {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ac-item-img img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.ac-item-icon {
  font-size: 32px;
}

.ac-item-name {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-item-rarity {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rarity--common { color: var(--muted); }
.rarity--uncommon { color: #16a34a; }
.rarity--rare { color: #2563eb; }
.rarity--epic { color: #7c3aed; }
.rarity--legendary { color: #eab308; }

.ac-empty {
  padding: 40px 20px;
  text-align: center;
}

/* ── Small button variant ── */

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 8px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Userpic (everywhere in the game: chats, lists, etc.)
   ═══════════════════════════════════════════════════════════════════════════ */

.userpic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: border-color .12s;
}

.userpic:hover {
  border-color: rgba(37,99,235,.35);
}

.userpic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.userpic--32 { width: 32px; height: 32px; border-radius: 8px; }
.userpic--40 { width: 40px; height: 40px; border-radius: 10px; }
.userpic--48 { width: 48px; height: 48px; border-radius: 12px; }

.userpic--default {
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.08));
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Avatar frames (trainer card, tooltips, lists) — PNG-only overlays
   ═══════════════════════════════════════════════════════════════════════════ */

.tc-avatar-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* значения по умолчанию — аккуратная рамка вокруг небольших аватаров (листы, чат) */
  --tc-frame-inset: -4px;
  --tc-frame-size: 120%;
}

.tc-avatar-frame img {
  position: relative;
  z-index: 1;
}

/* PNG frames — рисуем поверх аватара через ::before */
.tc-avatar-frame::before {
  content: '';
  position: absolute;
  inset: var(--tc-frame-inset);
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--tc-frame-size);
  pointer-events: none;
  z-index: 2;
}

.tc-avatar-frame--aurora::before {
  background-image: url('/assets/cosmetics/frames/avatar_frame_aurora.png');
}

.tc-avatar-frame--starlight::before {
  background-image: url('/assets/cosmetics/frames/avatar_frame_starlight.png');
}

.tc-avatar-frame--champion::before {
  background-image: url('/assets/cosmetics/frames/avatar_frame_champion.png');
}

.tc-avatar-frame--legendary_s1::before {
  background-image: url('/assets/cosmetics/frames/frame-vault-s1-legendary.png');
}

/* Тонкая рамка в списке тренеров (36px) */
.trainer-row__avatar.tc-avatar-frame{
  --tc-frame-inset:-4px;
  --tc-frame-size:130%;
}

/* Тонкая рамка в рейтингах (32px) */
.rating-player__avatar-wrap.tc-avatar-frame{
  --tc-frame-inset:-4px;
  --tc-frame-size:135%;
}

/* Рамка в списке клана (зависит от конкретного размера в разметке, ориентируемся на ~32px) */
.clan-member-avatar.tc-avatar-frame{
  --tc-frame-inset:-4px;
  --tc-frame-size:135%;
}

/* Рамка аватара в левой боковой панели (dock) */
.dock-profile__avatar.tc-avatar-frame{
  --tc-frame-inset:-6px;
  --tc-frame-size:140%;
}

/* Рамка аватара в мобильном хедере (40px) */
.mob-header__avatar-wrap.tc-avatar-frame{
  --tc-frame-inset:-6px;
  --tc-frame-size:140%;
}

/* Рамка аватара в тултипе действий с игроком (40px) */
.pt-header-avatar.tc-avatar-frame{
  --tc-frame-inset:-5px;
  --tc-frame-size:135%;
}

.tc-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f9fafb;
  background: linear-gradient(90deg, #4c1d95, #1d4ed8);
  box-shadow:
    0 0 0 1px rgba(15,23,42,.7),
    0 0 16px rgba(56,189,248,.7);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  animation: tc-title-glow-soft 3s ease-in-out infinite;
}

.tc-profile__title.tc-title {
  margin-top: 4px;
}

.trainer-row__title.tc-title,
.rating-player__title.tc-title,
.pt-title.tc-title {
  margin-top: 2px;
}

@keyframes tc-title-glow-soft {
  0%,100% { box-shadow: 0 0 0 1px rgba(15,23,42,.7), 0 0 10px rgba(56,189,248,.6); }
  50%     { box-shadow: 0 0 0 1px rgba(15,23,42,.9), 0 0 18px rgba(251,191,36,.9); }
}

/* Per-title themes */
.tc-title--starter {
  background: linear-gradient(90deg, #0f766e, #0ea5e9);
}

.tc-title--ranger_first {
  background: linear-gradient(90deg, #166534, #22c55e);
}

.tc-title--legend_silph_s1 {
  background: radial-gradient(circle at 0% 0%, #f97316, transparent 55%),
              radial-gradient(circle at 100% 100%, #22c55e, transparent 55%),
              radial-gradient(circle at 0% 100%, #6366f1, transparent 55%),
              #020617;
  box-shadow:
    0 0 0 1px rgba(15,23,42,.9),
    0 0 22px rgba(249,115,22,.9),
    0 0 32px rgba(59,130,246,.8);
  animation:
    tc-title-glow-legend 2.8s ease-in-out infinite,
    tc-title-stars 6s linear infinite;
}

@keyframes tc-title-glow-legend {
  0%,100% { filter: drop-shadow(0 0 4px rgba(249,115,22,.8)); }
  50%     { filter: drop-shadow(0 0 10px rgba(251,191,36,1)); }
}

@keyframes tc-title-stars {
  0%   { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 40px 20px, -40px -20px, 20px -40px, 0 0; }
}

/* Frame picker (own trainer card) */
.tc-frame-picker {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tc-frame-pill {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}

.tc-frame-pill:hover {
  border-color: rgba(148,163,184,.9);
  color: var(--text);
}

.tc-frame-pill--active {
  border-color: #facc15;
  background: rgba(250,204,21,.08);
  color: #facc15;
  font-weight: 700;
}
