/*
  charts-v2-profile.css
  V2 profile page.
  Requires:
  1. charts-v2-core.css
  2. charts-v2-trade-card.css

  Built to match the profile mockup while preserving Laravel conditions/JS hooks.
*/

.profile-v2-page {
  --profile-panel: rgba(8, 22, 39, 0.92);
  --profile-panel-2: rgba(11, 27, 46, 0.95);
  --profile-panel-3: rgba(6, 18, 31, 0.95);
  --profile-border: rgba(255, 208, 101, 0.16);
  --profile-border-strong: rgba(255, 208, 101, 0.34);
  --profile-gold: #e6b24c;
  --profile-gold-2: #ffd67c;
  --profile-gold-soft: rgba(230, 178, 76, 0.16);
  --profile-text: #edf2f8;
  --profile-muted: rgba(237, 242, 248, 0.72);
  --profile-soft: rgba(237, 242, 248, 0.48);
  --profile-green: #42d47b;
  --profile-red: #ff6969;
  --profile-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --profile-radius: 22px;
  --profile-radius-sm: 14px;
  --profile-font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --profile-font-display: Georgia, "Times New Roman", serif;

  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  gap: 16px;
  color: var(--profile-text);
  font-family: var(--profile-font-ui);
}

.profile-v2-page a {
  color: inherit;
  text-decoration: none;
}

.profile-v2-alert {
  padding: 0 !important;
  margin: 0 !important;
}

/* Hero */

.profile-v2-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--profile-radius);
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(4,13,24,0.85), rgba(4,12,20,0.96));
  box-shadow: var(--profile-shadow);
}

.profile-v2-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.profile-v2-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  display: block;
}

.profile-v2-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(2,10,20,0.48) 100%),
    radial-gradient(circle at 77% 24%, rgba(255, 196, 87, 0.22), transparent 16%),
    linear-gradient(90deg, rgba(2,9,18,0.38), rgba(2,9,18,0.08) 48%, rgba(2,9,18,0.24));
  pointer-events: none;
}

.profile-v2-hero-content {
  position: relative;
  z-index: 2;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px 34px 30px;
}

.profile-v2-top {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.profile-v2-avatar-wrap {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  border: 1px solid rgba(255, 207, 104, 0.92);
  box-shadow: 0 0 0 6px rgba(2, 10, 20, 0.50), 0 18px 48px rgba(0,0,0,0.35);
  background: rgba(5,16,29,0.92);
  position: relative;
}

.profile-v2-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.profile-v2-avatar-wrap .online-indicator {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 16px;
  height: 16px;
  border: 2px solid #07111d;
  border-radius: 999px;
  background: var(--profile-green);
  box-shadow: 0 0 0 4px rgba(66,212,123,0.14);
}

.profile-v2-identity {
  min-width: 0;
}

.profile-v2-identity h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--profile-font-display);
  font-size: clamp(3rem, 4.6vw, 4.65rem);
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: -0.055em;
  color: #fff;
  text-shadow: 0 18px 54px rgba(0,0,0,0.54);
}

.profile-v2-verified,
.profile-v2-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--profile-gold-2);
  transform: translateY(4px);
}

.profile-v2-verified svg,
.profile-v2-live svg {
  width: 22px;
  height: 22px;
}

.profile-v2-handle {
  margin-top: 8px;
  color: var(--profile-gold-2);
  font-size: 1.03rem;
  font-weight: 800;
}

.profile-v2-bio {
  margin-top: 10px;
  max-width: 680px;
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
  font-size: 0.98rem;
}

.profile-v2-bio p:last-child {
  margin-bottom: 0;
}

.profile-v2-more {
  display: inline-flex;
  margin-top: 8px;
  color: var(--profile-gold-2) !important;
  font-weight: 800;
}

.profile-v2-more.d-none {
  display: none !important;
}

.profile-v2-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  align-self: end;
}

.profile-v2-action-btn,
.profile-v2-icon-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--profile-text);
  background: linear-gradient(180deg, rgba(16,32,54,0.88), rgba(8,22,40,0.96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  white-space: nowrap;
  font-weight: 800;
  padding: 0 18px;
  cursor: pointer;
}

.profile-v2-icon-btn {
  width: 48px;
  padding: 0;
}

.profile-v2-action-btn:hover,
.profile-v2-icon-btn:hover {
  color: var(--profile-gold-2);
  border-color: rgba(255,208,101,0.45);
}

.profile-v2-action-btn--gold {
  color: #1e1200 !important;
  border-color: rgba(255,208,101,0.65);
  background: linear-gradient(180deg, #f1c96c, #d99d2b);
  box-shadow: 0 14px 26px rgba(217,157,43,0.18);
}

.profile-v2-action-btn--gold:hover {
  color: #1e1200 !important;
}

.profile-v2-action-btn svg,
.profile-v2-icon-btn svg {
  width: 18px;
  height: 18px;
}

.profile-v2-meta-row {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.profile-v2-meta-pill,
.profile-v2-socials a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(6,17,30,0.60);
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
}

.profile-v2-meta-pill svg {
  width: 18px;
  height: 18px;
}

.profile-v2-socials {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Shared panels */

.profile-v2-panel {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(circle at top right, rgba(255,208,101,0.04), transparent 24%),
    linear-gradient(180deg, rgba(9,25,44,0.95), rgba(5,17,30,0.98));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  padding: 18px;
}

.profile-v2-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-v2-eyebrow {
  color: var(--profile-gold-2);
  font-size: 0.83rem;
  letter-spacing: 0.11em;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-v2-panel h2 {
  margin: 2px 0 0;
  font-family: var(--profile-font-display);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.profile-v2-panel p {
  margin: 2px 0 0;
  color: var(--profile-soft);
  font-size: 0.92rem;
}

.profile-v2-panel-actions,
.profile-v2-button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-v2-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,208,101,0.25);
  color: var(--profile-gold-2);
  background: rgba(255,208,101,0.08);
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-v2-note {
  margin-top: 12px;
  color: var(--profile-soft);
  font-size: 0.88rem;
}

/* Stats */

.profile-v2-month-banner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255,208,101,0.20);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,208,101,0.10), rgba(8,22,39,0.90));
}

.profile-v2-month-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,208,101,0.25);
  background: rgba(255,208,101,0.08);
}

.profile-v2-month-banner span,
.profile-v2-month-banner strong {
  display: block;
}

.profile-v2-month-banner span {
  color: var(--profile-soft);
  font-size: 0.82rem;
}

.profile-v2-month-banner strong {
  color: var(--profile-gold-2);
  font-size: 1.1rem;
}

.profile-v2-stats-grid {
  display: grid;
  grid-template-columns: 1.14fr repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.profile-v2-stat-tile {
  min-height: 118px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(13,28,47,0.85), rgba(7,19,33,0.96));
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.profile-v2-stat-tile::after {
  content: "";
  position: absolute;
  inset: auto -10px -50px auto;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255,208,101,0.08), transparent 65%);
  pointer-events: none;
}

.profile-v2-stat-tile span {
  color: var(--profile-muted);
  font-size: 0.92rem;
  line-height: 1.2;
}

.profile-v2-stat-tile strong {
  display: block;
  margin-top: 8px;
  color: var(--profile-text);
  font-size: 2rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.04em;
}

.profile-v2-stat-tile em {
  display: block;
  margin-top: 7px;
  color: var(--profile-soft);
  font-style: normal;
  font-size: 0.86rem;
}

.profile-v2-green,
.profile-v2-page .text-success {
  color: var(--profile-green) !important;
}

.profile-v2-red,
.profile-v2-page .text-danger {
  color: var(--profile-red) !important;
}

.profile-v2-page .text-warning {
  color: var(--profile-gold-2) !important;
}

.profile-v2-divider {
  color: var(--profile-soft);
  padding: 0 3px;
}

.profile-v2-stats-buttons {
  margin-top: 14px;
  justify-content: flex-start;
}

.profile-v2-stats-buttons .profile-v2-action-btn,
.profile-v2-tools-panel .profile-v2-action-btn {
  min-height: 40px;
  border-radius: 11px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* AI panel */

.profile-v2-ai-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.profile-v2-ai-left {
  padding-right: 18px;
  border-right: 1px solid rgba(255,255,255,0.07);
}

.profile-v2-ai-text {
  color: rgba(255,255,255,0.90);
  line-height: 1.65;
  font-size: 0.98rem;
}

.profile-v2-ai-text ul,
.profile-v2-ai-text .ai-analysis-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.profile-v2-ai-text li,
.profile-v2-ai-text .ai-analysis-list li {
  position: relative;
  padding-left: 28px;
}

.profile-v2-ai-text li::before,
.profile-v2-ai-text .ai-analysis-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--profile-green);
  background: rgba(66,212,123,0.18);
  border: 1px solid rgba(66,212,123,0.35);
  font-size: 0.76rem;
}

.profile-v2-ai-takeaway {
  min-height: 184px;
  padding: 22px 24px;
  border: 1px solid rgba(255,208,101,0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at bottom right, rgba(255,208,101,0.05), transparent 30%),
    linear-gradient(180deg, rgba(8,22,40,0.96), rgba(6,18,32,0.96));
}

.profile-v2-ai-takeaway h3 {
  margin: 0 0 14px;
  color: var(--profile-gold-2);
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-v2-ai-takeaway p {
  color: rgba(255,255,255,0.92);
  line-height: 1.65;
  font-size: 1rem;
}

/* Highlights/follow/subscription */

.profile-highlights .profile-v2-section-title {
  margin-bottom: 12px;
  color: var(--profile-gold-2);
  font-weight: 950;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.profile-highlights .profile-highlights-swiper {
  padding: 0;
}

.subscription-holder h2,
.subscription-holder h3 {
  color: var(--profile-text);
}

.cs-followCard__title {
  color: var(--profile-text);
  font-weight: 900;
  font-size: 1.1rem;
}

.cs-followCard__sub {
  color: var(--profile-soft);
  margin-top: 3px;
}

.cs-followBtn,
.subscription-holder .btn {
  border-color: rgba(255,208,101,0.50) !important;
  color: var(--profile-gold-2) !important;
  background: rgba(255,208,101,0.08) !important;
}

/* Tabs / feed */

.profile-v2-ideas-panel {
  padding: 0;
  overflow: hidden;
}

.profile-v2-ideas-head {
  min-height: 76px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.profile-v2-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.profile-v2-tab {
  position: relative;
  padding: 4px 0 10px;
  font-size: 1rem;
  color: var(--profile-muted);
  font-weight: 800;
}

.profile-v2-tab.active {
  color: var(--profile-gold-2);
}

.profile-v2-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--profile-gold), var(--profile-gold-2));
}

.profile-v2-feed-controls {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,20,36,0.74);
  color: rgba(255,255,255,0.82);
  font-weight: 750;
}

.profile-v2-feed-controls svg {
  width: 16px;
  height: 16px;
}

.profile-v2-feed-wrap {
  padding: 18px;
  margin: 0 !important;
}

.profile-v2-feed-list {
  display: grid;
  gap: 12px;
  padding: 0 !important;
  background: transparent !important;
}

.profile-v2-feed-list .post-box,
.profile-v2-feed-list .ledger-card {
  margin-bottom: 0 !important;
}

.profile-v2-page .feed-box {
  background: transparent !important;
}

.profile-v2-page .posts-loading-indicator,
.profile-v2-page .posts-loading-spinner {
  color: var(--profile-soft);
}

/* Hidden legacy separators/padding cleanup */

.profile-v2-page .bg-separator,
.profile-v2-page .border-right {
  display: none !important;
  border: 0 !important;
}

.profile-v2-page .text-muted {
  color: var(--profile-soft) !important;
}

.profile-v2-page .alert {
  border-radius: 14px;
}

.profile-v2-page .card,
.profile-v2-page .modal-content {
  color: var(--profile-text);
}

.profile-v2-page .line-clamp-3 {
  -webkit-line-clamp: 3;
}

/* Responsive */

@media (max-width: 1400px) {
  .profile-v2-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .profile-v2-ai-panel {
    grid-template-columns: 1fr;
  }

  .profile-v2-ai-left {
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 1100px) {
  .profile-v2-hero {
    min-height: auto;
  }

  .profile-v2-hero-content {
    min-height: auto;
    padding: 30px 24px;
  }

  .profile-v2-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-v2-actions {
    justify-content: flex-start;
  }

  .profile-v2-avatar-wrap {
    width: 108px;
    height: 108px;
  }
}

@media (max-width: 860px) {
  .profile-v2-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-v2-identity h1 {
    font-size: 3rem;
  }

  .profile-v2-action-btn {
    min-height: 44px;
  }
}

@media (max-width: 620px) {
  .profile-v2-hero-content,
  .profile-v2-feed-wrap,
  .profile-v2-ideas-head,
  .profile-v2-panel {
    padding: 16px;
  }

  .profile-v2-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-v2-actions,
  .profile-v2-action-btn {
    width: 100%;
  }

  .profile-v2-icon-btn {
    width: 44px;
  }
}

/* ==============================
   Profile v2 header/meta icon + stats cleanup
   Exact v2 selectors only.
============================== */

/* Header meta/social row */
.profile-v2-meta-row {
  align-items: center;
  gap: 10px 12px;
  overflow: visible;
}

.profile-v2-meta-pill,
.profile-v2-socials,
.profile-v2-socials a {
  overflow: visible;
}

/* Header chips/pills */
.profile-v2-meta-pill,
.profile-v2-socials a {
  min-height: 38px;
  height: auto;
  padding: 8px 12px;
  line-height: 1;
  box-sizing: border-box;
}

/* The icon include can output a wrapper, an ion-icon, svg, i, or a generic first child.
   Normalize the wrapper first so the actual icon has room. */
.profile-v2-meta-pill > :first-child,
.profile-v2-socials a > :first-child,
.profile-v2-meta-pill .icon-wrapper,
.profile-v2-meta-pill .ion-icon-wrapper,
.profile-v2-meta-pill .d-flex:first-child,
.profile-v2-socials a .icon-wrapper,
.profile-v2-socials a .ion-icon-wrapper,
.profile-v2-socials a .d-flex:first-child {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: visible;
  margin: 0;
  padding: 0;
  transform: none;
}

/* Normalize the actual icon element inside those wrappers. */
.profile-v2-meta-pill svg,
.profile-v2-meta-pill ion-icon,
.profile-v2-meta-pill i,
.profile-v2-meta-pill .icon,
.profile-v2-meta-pill > :first-child svg,
.profile-v2-meta-pill > :first-child ion-icon,
.profile-v2-meta-pill > :first-child i,
.profile-v2-meta-pill .icon-wrapper svg,
.profile-v2-meta-pill .icon-wrapper ion-icon,
.profile-v2-meta-pill .ion-icon-wrapper svg,
.profile-v2-meta-pill .ion-icon-wrapper ion-icon,
.profile-v2-socials a svg,
.profile-v2-socials a ion-icon,
.profile-v2-socials a i,
.profile-v2-socials a .icon,
.profile-v2-socials a > :first-child svg,
.profile-v2-socials a > :first-child ion-icon,
.profile-v2-socials a > :first-child i,
.profile-v2-socials a .icon-wrapper svg,
.profile-v2-socials a .icon-wrapper ion-icon,
.profile-v2-socials a .ion-icon-wrapper svg,
.profile-v2-socials a .ion-icon-wrapper ion-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  flex: 0 0 18px;
  display: block;
  line-height: 1;
  overflow: visible;
  vertical-align: middle;
  transform: none;
}

/* Ionicons can clip from their internal svg box if legacy CSS forces contain/hidden. */
.profile-v2-meta-pill ion-icon,
.profile-v2-socials a ion-icon {
  contain: none;
  overflow: visible;
}

/* SVG internals follow the visible box. */
.profile-v2-meta-pill svg *,
.profile-v2-socials a svg * {
  overflow: visible;
}

/* Normalize legacy social-link/p-pill output only inside this hero meta row. */
.profile-v2-socials .p-pill,
.profile-v2-socials .social-link,
.profile-v2-socials a {
  width: auto;
  min-width: 38px;
  height: auto;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Header action button icons */
.profile-v2-action-btn svg,
.profile-v2-action-btn ion-icon,
.profile-v2-action-btn i,
.profile-v2-icon-btn svg,
.profile-v2-icon-btn ion-icon,
.profile-v2-icon-btn i {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  display: block;
  line-height: 1;
  overflow: visible;
  transform: none;
}

/* Fix Wins/Losses value size.
   The generic stat span rule was shrinking the colored spans inside <strong>. */
.profile-v2-stat-tile strong span,
.profile-v2-stat-tile strong .profile-v2-green,
.profile-v2-stat-tile strong .profile-v2-red,
.profile-v2-stat-tile strong .profile-v2-divider {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.profile-v2-stat-tile strong .profile-v2-divider {
  color: var(--profile-soft);
  padding: 0 4px;
}

/* ==============================
   Profile archived v2 card fixes
   Scoped only to the archived profile page.
============================== */

.profile-v2-archived .posts-loading-indicator,
.profile-v2-archived .posts-loading-indicator .spinner {
  display: none !important;
}

/* Keep the top Engagement/dots row clean. */
.profile-v2-archived .profile-v2-feed-list .post-box-v2 .engagement-topline {
  justify-content: space-between !important;
  gap: 10px !important;
}

.profile-v2-archived .profile-v2-feed-list .post-box-v2 .engagement-topline::before {
  content: none !important;
  display: none !important;
}

/* Put the archived Trade Locked pill UNDER the heart/comment row, not over the label/dots. */
.profile-v2-archived .profile-v2-feed-list .post-box-v2 .engagement-icons {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 13px !important;
  max-width: 100% !important;
}

.profile-v2-archived .profile-v2-feed-list .post-box-v2 .engagement-icons::after {
  content: "🔒 Trade Locked";
  order: 99;
  flex: 0 0 100%;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 4px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(244, 200, 106, 0.36);
  background: rgba(216, 155, 53, 0.105);
  color: var(--profile-gold-2);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

@media (max-width: 920px) {
  .profile-v2-archived .profile-v2-feed-list .post-box-v2 .engagement-icons::after {
    font-size: 0.58rem;
    padding: 0 8px;
  }
}


/* ==============================
   Mobile profile polish + profile feed card fix
   Keeps desktop profile unchanged and lets the shared feed-card CSS control cards.
============================== */

.profile-v2-page .profile-v2-feed-list .post-box-v2 {
  width: 100%;
  max-width: 100%;
}

/* The archived profile now uses elements.feed.post-box-archived.
   Do not add the old pseudo Trade Locked pill here, or it can fight the real chip. */
.profile-v2-archived .profile-v2-feed-list .post-box-v2 .engagement-icons::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 640px) {
  .profile-v2-page {
    gap: 12px !important;
    padding-bottom: 8px;
  }

  .profile-v2-hero {
    min-height: auto !important;
    border-radius: 18px !important;
  }

  .profile-v2-cover img {
    opacity: 0.78;
  }

  .profile-v2-hero-overlay {
    background:
      linear-gradient(180deg, rgba(2,10,20,0.14) 0%, rgba(2,10,20,0.62) 100%),
      radial-gradient(circle at 84% 18%, rgba(255,196,87,0.12), transparent 20%),
      linear-gradient(90deg, rgba(2,9,18,0.46), rgba(2,9,18,0.24));
  }

  .profile-v2-hero-content {
    min-height: auto !important;
    padding: 16px !important;
  }

  .profile-v2-top {
    display: grid !important;
    grid-template-columns: 62px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
  }

  .profile-v2-avatar-wrap {
    width: 62px !important;
    height: 62px !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 3px rgba(2,10,20,0.42), 0 10px 26px rgba(0,0,0,0.30) !important;
  }

  .profile-v2-avatar-wrap .online-indicator {
    right: 2px !important;
    bottom: 2px !important;
    width: 12px !important;
    height: 12px !important;
  }

  .profile-v2-identity {
    min-width: 0 !important;
  }

  .profile-v2-identity h1 {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin-top: 2px !important;
    font-size: 1.62rem !important;
    line-height: 1.02 !important;
    letter-spacing: -0.045em !important;
  }

  .profile-v2-handle {
    margin-top: 3px !important;
    font-size: 0.83rem !important;
  }

  .profile-v2-bio {
    margin-top: 8px !important;
    max-width: 100% !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
  }

  .profile-v2-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    justify-content: stretch !important;
    align-self: stretch !important;
    margin-top: 4px !important;
  }

  .profile-v2-action-btn,
  .profile-v2-icon-btn {
    width: 100% !important;
    min-height: 38px !important;
    border-radius: 11px !important;
    padding: 0 12px !important;
    font-size: 0.76rem !important;
  }

  .profile-v2-icon-btn {
    max-width: 44px !important;
  }

  .profile-v2-meta-row {
    margin-top: 12px !important;
    gap: 7px !important;
  }

  .profile-v2-meta-pill,
  .profile-v2-socials a {
    min-height: 30px !important;
    padding: 6px 9px !important;
    font-size: 0.69rem !important;
    max-width: 100% !important;
  }

  .profile-v2-meta-pill > :first-child,
  .profile-v2-socials a > :first-child,
  .profile-v2-meta-pill svg,
  .profile-v2-meta-pill ion-icon,
  .profile-v2-socials a svg,
  .profile-v2-socials a ion-icon {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
  }

  .profile-v2-panel {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .profile-v2-panel-head {
    display: grid !important;
    gap: 10px !important;
    align-items: start !important;
  }

  .profile-v2-panel-actions,
  .profile-v2-button-row {
    justify-content: flex-start !important;
  }

  .profile-v2-eyebrow {
    font-size: 0.72rem !important;
  }

  .profile-v2-panel h2 {
    font-size: 1.08rem !important;
  }

  .profile-v2-panel p {
    font-size: 0.78rem !important;
  }

  .profile-v2-chip {
    min-height: 30px !important;
    padding: 0 9px !important;
    font-size: 0.72rem !important;
  }

  .profile-v2-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .profile-v2-stat-main {
    grid-column: 1 / -1 !important;
  }

  .profile-v2-stat-tile {
    min-height: 88px !important;
    padding: 10px !important;
    border-radius: 13px !important;
  }

  .profile-v2-stat-tile span {
    font-size: 0.72rem !important;
  }

  .profile-v2-stat-tile strong {
    margin-top: 6px !important;
    font-size: 1.35rem !important;
  }

  .profile-v2-stat-tile em {
    margin-top: 5px !important;
    font-size: 0.68rem !important;
  }

  .profile-v2-ideas-panel {
    border-radius: 16px !important;
  }

  .profile-v2-ideas-head {
    min-height: 0 !important;
    padding: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .profile-v2-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .profile-v2-tab {
    min-height: 36px !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    background: rgba(8,20,36,0.74) !important;
    color: rgba(237,242,248,0.80) !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }

  .profile-v2-tab.active {
    color: var(--profile-gold-2) !important;
    border-color: rgba(255,208,101,0.34) !important;
    background: rgba(255,208,101,0.09) !important;
  }

  .profile-v2-tab.active::after {
    display: none !important;
  }

  .profile-v2-feed-controls {
    width: 100% !important;
    min-height: 34px !important;
    justify-content: space-between !important;
    border-radius: 10px !important;
    font-size: 0.76rem !important;
  }

  .profile-v2-feed-wrap {
    padding: 12px !important;
  }

  .profile-v2-feed-list {
    gap: 12px !important;
  }

  .profile-v2-feed-list .post-box-v2.ledger-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .profile-v2-feed-list .ledger-mobile-card {
    display: grid;
  }

  .profile-v2-feed-list .post-box-v2 > .ledger-main {
    display: none !important;
  }
}

@media (max-width: 370px) {
  .profile-v2-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-v2-tabs {
    grid-template-columns: 1fr !important;
  }
}


/* ==============================
   Final mobile profile fixes v3
   - compact header actions
   - cleaner meta chips
   - even two-column stats
   - restore full card bodies inside profile feeds
============================== */

@media (max-width: 640px) {
  .profile-v2-page {
    gap: 12px !important;
  }

  .profile-v2-hero-content {
    padding: 18px !important;
  }

  .profile-v2-top {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
  }

  .profile-v2-avatar-wrap {
    width: 72px !important;
    height: 72px !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 4px rgba(2,10,20,0.48), 0 12px 30px rgba(0,0,0,0.32) !important;
  }

  .profile-v2-avatar-wrap .online-indicator {
    right: 4px !important;
    bottom: 4px !important;
  }

  .profile-v2-identity {
    min-width: 0 !important;
  }

  .profile-v2-identity h1 {
    font-size: 1.72rem !important;
    line-height: 1.02 !important;
    letter-spacing: -0.045em !important;
  }

  .profile-v2-handle {
    margin-top: 4px !important;
    font-size: 0.88rem !important;
  }

  .profile-v2-bio {
    margin-top: 10px !important;
    max-width: none !important;
    font-size: 0.90rem !important;
    line-height: 1.45 !important;
  }

  .profile-v2-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: stretch !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin-top: 4px !important;
  }

  .profile-v2-actions .profile-v2-action-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 38px !important;
    padding: 0 7px !important;
    border-radius: 11px !important;
    font-size: 0.70rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .profile-v2-actions .profile-v2-icon-btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 11px !important;
  }

  .profile-v2-actions .profile-v2-action-btn svg,
  .profile-v2-actions .profile-v2-action-btn ion-icon,
  .profile-v2-actions .profile-v2-icon-btn svg,
  .profile-v2-actions .profile-v2-icon-btn ion-icon {
    width: 15px !important;
    height: 15px !important;
    min-width: 15px !important;
  }

  .profile-v2-meta-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }

  .profile-v2-meta-pill,
  .profile-v2-socials,
  .profile-v2-socials a {
    width: 100% !important;
    min-width: 0 !important;
  }

  .profile-v2-meta-pill,
  .profile-v2-socials a {
    min-height: 36px !important;
    justify-content: center !important;
    padding: 7px 9px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    line-height: 1.08 !important;
    text-align: center !important;
  }

  .profile-v2-socials {
    display: contents !important;
  }

  .profile-v2-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .profile-v2-stat-main {
    grid-column: auto !important;
  }

  .profile-v2-stat-tile {
    min-height: 92px !important;
    padding: 11px !important;
    border-radius: 13px !important;
  }

  .profile-v2-stat-tile span {
    font-size: 0.72rem !important;
  }

  .profile-v2-stat-tile strong {
    font-size: 1.35rem !important;
  }

  .profile-v2-stat-tile em {
    font-size: 0.68rem !important;
  }

  .profile-v2-ideas-head {
    padding: 12px !important;
    display: block !important;
  }

  .profile-v2-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .profile-v2-feed-controls {
    display: none !important;
  }

  .profile-v2-feed-wrap {
    padding: 12px !important;
  }

  /* The profile page was hiding the body of each card. Undo that. */
  .profile-v2-feed-list .post-box-v2 > .ledger-main {
    display: grid !important;
  }

  .profile-v2-feed-list .post-box-v2 > .ledger-mobile-card {
    display: none !important;
  }

  .profile-v2-feed-list .post-box-v2.ledger-card {
    overflow: visible !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 390px) {
  .profile-v2-actions {
    gap: 6px !important;
  }

  .profile-v2-actions .profile-v2-action-btn {
    font-size: 0.66rem !important;
    padding: 0 5px !important;
  }

  .profile-v2-meta-row {
    grid-template-columns: 1fr !important;
  }
}

/* ==============================
   Final mobile profile feed card body restore v4
   The profile page should use the same visible card body pattern as the feed,
   not just the thesis/footer row.
============================== */

@media (max-width: 640px) {
  .profile-v2-feed-list .post-box-v2 > .ledger-main {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    min-height: 0 !important;
  }

  .profile-v2-feed-list .post-box-v2 > .ledger-mobile-card {
    display: none !important;
  }

  .profile-v2-feed-list .post-box-v2 .ledger-cell {
    padding: 14px 14px !important;
    border-right: 1px solid rgba(244,200,106,0.075) !important;
    border-top: 1px solid rgba(244,200,106,0.075) !important;
  }

  .profile-v2-feed-list .post-box-v2 .trader-cell {
    grid-column: 1 / -1 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .post-box-v2 .trader-topline {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .post-box-v2 .trader-cell .avatar {
    width: 42px !important;
    height: 42px !important;
  }

  .profile-v2-feed-list .post-box-v2 .trader-name-wrap .cell-label {
    display: none !important;
  }

  .profile-v2-feed-list .post-box-v2 .trader-meta-wrap {
    display: block !important;
    text-align: right !important;
    min-width: 0 !important;
  }

  .profile-v2-feed-list .post-box-v2 .trader-time {
    margin-top: 4px !important;
    white-space: normal !important;
  }

  .profile-v2-feed-list .post-box-v2 .ledger-main > .ledger-cell:nth-child(2) {
    grid-column: 1 / -1 !important;
    border-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .profile-v2-feed-list .post-box-v2 .ledger-main > .ledger-cell:nth-child(2) > .cell-label {
    display: none !important;
  }

  .profile-v2-feed-list .post-box-v2 .market-symbol strong {
    font-size: clamp(1.7rem, 8vw, 2.2rem) !important;
    line-height: 0.95 !important;
  }

  .profile-v2-feed-list .post-box-v2 .market-meta {
    margin-top: 0 !important;
    white-space: nowrap !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
  }

  .profile-v2-feed-list .post-box-v2 .ledger-main > .ledger-cell:nth-child(4),
  .profile-v2-feed-list .post-box-v2 .ledger-main > .ledger-cell:nth-child(6) {
    border-right: 0 !important;
  }

  .profile-v2-feed-list .post-box-v2 .price-stack,
  .profile-v2-feed-list .post-box-v2 .target-stack,
  .profile-v2-feed-list .post-box-v2 .plan-stack,
  .profile-v2-feed-list .post-box-v2 .outcome-stack {
    gap: 9px !important;
  }

  .profile-v2-feed-list .post-box-v2 .price-row,
  .profile-v2-feed-list .post-box-v2 .target-line,
  .profile-v2-feed-list .post-box-v2 .plan-item,
  .profile-v2-feed-list .post-box-v2 .outcome-meta {
    padding: 10px 10px !important;
    border-radius: 13px !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    background: rgba(255,255,255,0.025) !important;
  }

  .profile-v2-feed-list .post-box-v2 .target-line {
    grid-template-columns: 42px minmax(0, 1fr) !important;
  }

  .profile-v2-feed-list .post-box-v2 .price-row strong,
  .profile-v2-feed-list .post-box-v2 .target-line strong,
  .profile-v2-feed-list .post-box-v2 .plan-item strong,
  .profile-v2-feed-list .post-box-v2 .outcome-meta strong {
    font-size: 0.98rem !important;
  }

  .profile-v2-feed-list .post-box-v2 .engagement {
    grid-column: 1 / -1 !important;
    border-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .profile-v2-feed-list .post-box-v2 .engagement-topline {
    order: 3 !important;
    margin: 0 !important;
  }

  .profile-v2-feed-list .post-box-v2 .engagement-topline .cell-label {
    display: none !important;
  }

  .profile-v2-feed-list .post-box-v2 .trade-follow-chip {
    order: 1 !important;
    margin: 0 !important;
  }

  .profile-v2-feed-list .post-box-v2 .engagement-icons {
    order: 2 !important;
    margin-left: auto !important;
  }
}


/* ==============================
   Profile mobile final cleanup
   - keep X/social icon beside followers/likes
   - enlarge Wins/Losses and remove wasted vertical feel
============================== */

.profile-v2-stat-wins-losses strong {
  font-size: 2rem;
  letter-spacing: -0.035em;
}

@media (max-width: 620px) {
  .profile-v2-meta-row {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .profile-v2-meta-member {
    grid-column: 1 / 4 !important;
  }

  .profile-v2-meta-website {
    grid-column: 4 / 7 !important;
  }

  .profile-v2-meta-followers {
    grid-column: 1 / 3 !important;
  }

  .profile-v2-meta-likes {
    grid-column: 3 / 5 !important;
  }

  .profile-v2-meta-socials {
    grid-column: 5 / 7 !important;
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  .profile-v2-meta-socials a,
  .profile-v2-socials a[href*="x.com"],
  .profile-v2-socials a[href*="twitter.com"] {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    color: rgba(245,241,232,0.92) !important;
  }

  .profile-v2-socials a[href*="x.com"] > *,
  .profile-v2-socials a[href*="twitter.com"] > * {
    display: none !important;
  }

  .profile-v2-socials a[href*="x.com"]::before,
  .profile-v2-socials a[href*="twitter.com"]::before {
    content: "𝕏";
    display: block;
    color: rgba(245,241,232,0.92);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
  }

  .profile-v2-stat-wins-losses strong {
    font-size: 2.45rem !important;
    line-height: 1.05 !important;
  }

  .profile-v2-stat-wins-losses {
    justify-content: center !important;
  }

  .profile-v2-stat-wins-losses em {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .profile-v2-meta-row {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .profile-v2-meta-member,
  .profile-v2-meta-website {
    grid-column: 1 / 7 !important;
  }

  .profile-v2-meta-followers {
    grid-column: 1 / 3 !important;
  }

  .profile-v2-meta-likes {
    grid-column: 3 / 5 !important;
  }

  .profile-v2-meta-socials {
    grid-column: 5 / 7 !important;
  }
}
/* ==============================
   Wins / Losses tile final sizing fix
============================== */

/* Desktop: remove the large vertical gap inside the Wins / Losses tile */
.profile-v2-stat-wins-losses {
  justify-content: flex-start !important;
  gap: 12px !important;
}

.profile-v2-stat-wins-losses strong {
  margin-top: 4px !important;
}

/* Mobile: enlarge the actual colored spans inside the strong */
@media (max-width: 620px) {
  .profile-v2-stat-wins-losses {
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .profile-v2-stat-wins-losses strong,
  .profile-v2-stat-wins-losses strong span,
  .profile-v2-stat-wins-losses strong .profile-v2-green,
  .profile-v2-stat-wins-losses strong .profile-v2-red,
  .profile-v2-stat-wins-losses strong .profile-v2-divider {
    font-size: 1.90rem !important;
    line-height: 1.05 !important;
    font-weight: 850 !important;
  }

  .profile-v2-stat-wins-losses strong .profile-v2-divider {
    padding: 0 4px !important;
  }

  .profile-v2-stat-wins-losses em {
    display: none !important;
  }
}

/* ==============================
   Profile hero buttons compact polish
   Scoped only to the three action buttons in the profile header.
============================== */

@media (min-width: 641px) {
  .profile-v2-actions .profile-v2-action-btn,
  .profile-v2-actions .profile-v2-icon-btn {
    min-height: 42px;
    border-radius: 12px;
    gap: 7px;
    padding: 0 14px;
    font-size: 0.86rem;
    line-height: 1;
  }

  .profile-v2-actions .profile-v2-icon-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .profile-v2-actions .profile-v2-action-btn svg,
  .profile-v2-actions .profile-v2-action-btn ion-icon,
  .profile-v2-actions .profile-v2-action-btn i,
  .profile-v2-actions .profile-v2-icon-btn svg,
  .profile-v2-actions .profile-v2-icon-btn ion-icon,
  .profile-v2-actions .profile-v2-icon-btn i {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    flex: 0 0 16px;
  }
}

/* ==============================
   Profile follow/action card polish
   Moves trader actions out of the hero and into the follow relationship panel.
============================== */

.cs-followCard--withActions {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) auto minmax(300px, 0.92fr);
  gap: 22px;
  align-items: stretch;
  position: relative;
  padding: 22px;
  overflow: hidden;
}

.cs-followCard--withActions::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 12%, rgba(255,208,101,0.08), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 46%);
}

.cs-followCard__followPane,
.cs-followCard__actionsPane {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.cs-followCard__followPane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cs-followCard__divider {
  position: relative;
  z-index: 1;
  width: 1px;
  min-height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255,208,101,0.28), rgba(255,255,255,0.08), transparent);
  box-shadow: 0 0 24px rgba(255,208,101,0.08);
}

.cs-followCard__actionsPane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.cs-followCard__actionsTitle {
  color: var(--profile-gold-2);
  font-weight: 950;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.80rem;
}

.cs-followCard__actionsSub {
  margin-top: 5px;
  color: var(--profile-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

.cs-followCard__actionRow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.cs-followCard__actionRow .profile-v2-action-btn,
.cs-followCard__actionRow button.profile-v2-action-btn {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 13px;
  border-color: rgba(255,255,255,0.105);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,208,101,0.055), transparent 34%),
    linear-gradient(180deg, rgba(16,32,54,0.92), rgba(8,22,40,0.98));
  color: rgba(237,242,248,0.92);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.035),
    0 10px 22px rgba(0,0,0,0.18);
  appearance: none;
  -webkit-appearance: none;
}

.cs-followCard__actionRow .profile-v2-action-btn:hover,
.cs-followCard__actionRow button.profile-v2-action-btn:hover {
  color: var(--profile-gold-2);
  border-color: rgba(255,208,101,0.40);
  transform: translateY(-1px);
}

.cs-followCard__actionRow .profile-v2-action-btn svg,
.cs-followCard__actionRow .profile-v2-action-btn ion-icon,
.cs-followCard__actionRow button.profile-v2-action-btn svg,
.cs-followCard__actionRow button.profile-v2-action-btn ion-icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
}

.cs-followCard--withActions .cs-followBtn {
  border-radius: 999px !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.03)) !important;
  color: rgba(255,255,255,0.94) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
}

.cs-followCard--withActions .cs-followBtn:hover {
  border-color: rgba(255,208,101,0.34) !important;
  background: linear-gradient(180deg, rgba(255,208,101,0.09), rgba(255,255,255,0.035)) !important;
  transform: translateY(-1px);
}

.cs-followBtn__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cs-followBtn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .92;
}

.cs-followBtn__text {
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .93rem;
}

@media (max-width: 991.98px) {
  .cs-followCard--withActions {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .cs-followCard__divider {
    width: 100%;
    height: 1px;
    min-height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,208,101,0.26), rgba(255,255,255,0.08), transparent);
  }

  .cs-followCard__actionRow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-followCard__actionRow .profile-v2-action-btn,
  .cs-followCard__actionRow button.profile-v2-action-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .cs-followCard__actionRow {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   Profile-only mobile trade card cleanup
   Keeps the feed cards untouched by scoping every override to .profile-v2-feed-list.
============================== */

@media (max-width: 767.98px) {
  .profile-v2-page,
  .profile-v2-page > *,
  .profile-v2-ideas-panel,
  .profile-v2-feed-wrap,
  .profile-v2-feed-list,
  .profile-v2-feed-list .ledger-list,
  .profile-v2-feed-list .ledger-card-live,
  .profile-v2-feed-list .ledger-card-live > .ledger-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .profile-v2-page {
    overflow-x: clip !important;
  }

  @supports not (overflow: clip) {
    .profile-v2-page {
      overflow-x: hidden !important;
    }
  }

  .profile-v2-feed-list.feed-box {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 {
    margin: 0 0 14px !important;
    overflow: hidden !important;
    border-radius: 20px !important;
    border-color: rgba(244, 200, 106, 0.20) !important;
    background:
      radial-gradient(circle at 95% 0%, rgba(244,200,106,0.07), transparent 32%),
      radial-gradient(circle at 4% 0%, rgba(93,156,236,0.055), transparent 38%),
      linear-gradient(180deg, #0c1928 0%, #07111d 62%, #040911 100%) !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 > .ledger-main {
    position: relative !important;
    z-index: 2 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell {
    min-height: 0 !important;
    padding: 12px 13px !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.065) !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(1),
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(2),
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(7) {
    grid-column: 1 / -1 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(3),
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(5) {
    border-right: 1px solid rgba(244,200,106,0.065) !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(7) {
    border-bottom: 0 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .cell-label {
    margin-bottom: 8px !important;
    font-size: 0.64rem !important;
    letter-spacing: 0.09em !important;
    color: rgba(244,200,106,0.76) !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-cell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-topline {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-cell .avatar,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-topline .avatar {
    width: 40px !important;
    height: 40px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-name-wrap .cell-label {
    display: none !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-name {
    font-size: 0.96rem !important;
    line-height: 1.1 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-name a {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-meta-wrap {
    display: grid !important;
    gap: 2px !important;
    justify-items: end !important;
    text-align: right !important;
    min-width: 0 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-handle,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-time {
    margin: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
    color: rgba(245,241,232,0.58) !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-time br {
    display: none !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(2) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 8px 11px !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(2) > .cell-label {
    display: none !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-symbol {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trade-card-asset-icon {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-symbol-link {
    min-width: 0 !important;
    max-width: 100% !important;
    display: inline-flex !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-symbol strong {
    display: block !important;
    max-width: 100% !important;
    font-size: clamp(1.12rem, 5.2vw, 1.42rem) !important;
    line-height: 1 !important;
    letter-spacing: -0.035em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-bias-spaced {
    margin: 0 !important;
    min-width: 0 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .direction-pill {
    min-height: 27px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 0.70rem !important;
    letter-spacing: 0.10em !important;
    white-space: nowrap !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-meta {
    margin: 0 !important;
    justify-self: end !important;
    flex: 0 0 auto !important;
    color: rgba(245,241,232,0.58) !important;
    font-size: 0.78rem !important;
    font-weight: 780 !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .price-stack,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .target-stack,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .plan-stack,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .outcome-stack {
    display: grid !important;
    gap: 8px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .price-row,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .target-line,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .plan-item,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .outcome-meta {
    display: grid !important;
    gap: 3px !important;
    padding: 9px 9px !important;
    border-radius: 13px !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    background: rgba(255,255,255,0.032) !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .price-row span,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .target-line span,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .plan-item span,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .outcome-meta span {
    margin: 0 !important;
    color: rgba(245,241,232,0.52) !important;
    font-size: 0.64rem !important;
    line-height: 1 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    font-weight: 900 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .price-row strong,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .target-line strong,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .plan-item strong,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .outcome-meta strong {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: clamp(0.86rem, 3.6vw, 1rem) !important;
    line-height: 1.15 !important;
    font-weight: 880 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .target-line {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .target-line span {
    font-size: 0.70rem !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .outcome-pill {
    width: max-content !important;
    max-width: 100% !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 0.68rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .outcome-pill::before {
    width: 6px !important;
    height: 6px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement {
    grid-column: 1 / -1 !important;
    border-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-topline {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    order: 3 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-topline .cell-label {
    display: none !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement .dots-btn {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    border-radius: 10px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trade-follow-chip {
    min-height: 32px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
    order: 1 !important;
    margin: 0 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trade-locked-chip {
    min-width: 0 !important;
    max-width: 100% !important;
    order: 1 !important;
    margin: 0 !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-icons {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 13px !important;
    margin-left: auto !important;
    order: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-action {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: rgba(245,241,232,0.78) !important;
    font-size: 0.86rem !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-action .cs-actionBtn,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-action .cs-actionBtn svg,
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .engagement-action .cs-actionBtn ion-icon {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 > .thesis-row {
    min-height: 46px !important;
    padding: 0 14px !important;
    border-top: 1px solid rgba(244,200,106,0.11) !important;
    background: rgba(3,9,16,0.58) !important;
    font-size: 0.91rem !important;
    border-radius: 0 0 20px 20px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 > .thesis-row::after {
    display: none !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 > .thesis-row span:first-child {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .cs-v2-share-card-source {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    max-height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    transform: translateX(-200vw) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    contain: layout paint size !important;
  }
}

@media (max-width: 430px) {
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(2) {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "symbol meta"
      "bias meta" !important;
    align-items: center !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-symbol {
    grid-area: symbol !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-bias-spaced {
    grid-area: bias !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .market-meta {
    grid-area: meta !important;
    align-self: center !important;
  }
}

@media (max-width: 390px) {
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-cell {
    grid-template-columns: 1fr !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .trader-meta-wrap {
    justify-items: start !important;
    text-align: left !important;
    grid-template-columns: repeat(2, max-content) !important;
    gap: 8px !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-main {
    grid-template-columns: 1fr !important;
  }

  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(3),
  .profile-v2-feed-list .ledger-card-live.post-box-v2 .ledger-cell:nth-child(5) {
    border-right: 0 !important;
  }
}
