/* ── Page shell ── */
.profile-page {
  min-height: 100dvh;
  padding-top: var(--nav-h);
  padding-bottom: var(--sp-2xl);
  background:
    radial-gradient(ellipse 60% 50% at 75% 5%, rgba(0,212,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(0,184,217,0.03) 0%, transparent 60%),
    var(--bg-deep);
}

/* ============================================================
   CONNECT CARD (no Steam ID state)
   ============================================================ */
.connect-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--nav-h));
  padding: var(--sp-xl) var(--sp-lg);
}

.connect-card {
  background: var(--bg-card);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--sp-2xl) var(--sp-xl);
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,212,255,0.06), 0 24px 80px rgba(0,0,0,0.4);
}

/* top glow bar */
.connect-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.connect-card__icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--cyan-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
}

.connect-card__title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1;
}

.connect-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 360px;
}

.connect-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.connect-input {
  width: 100%;
  background: rgba(5,13,26,0.7);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  caret-color: var(--cyan);
  text-align: center;
  letter-spacing: 0.04em;
}

.connect-input::placeholder { color: var(--text-muted); font-family: var(--font-body); }

.connect-input:focus {
  border-color: rgba(0,212,255,0.6);
  box-shadow: 0 0 16px rgba(0,212,255,0.15);
}

.connect-submit {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 13px;
}

.connect-helper {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.connect-helper a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0,212,255,0.3);
  transition: text-decoration-color var(--t-fast);
}

.connect-helper a:hover { text-decoration-color: var(--cyan); }

/* ============================================================
   PRIVATE PROFILE STATE
   ============================================================ */
.private-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80dvh - var(--nav-h));
  padding: var(--sp-xl) var(--sp-lg);
}

.private-card {
  background: rgba(255,77,77,0.04);
  border: 1px solid rgba(255,77,77,0.25);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl) var(--sp-xl);
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  text-align: center;
  backdrop-filter: blur(12px);
}

.private-card__icon { color: var(--red); }

.private-card__title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.private-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.private-share {
  width: 100%;
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
}

.private-share__url {
  flex: 1;
  background: rgba(5,13,26,0.6);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   PROFILE LOADED STATE
   ============================================================ */
.profile-view { display: none; }
.profile-view.active { display: block; }

/* ── Hero strip ── */
.profile-hero {
  position: relative;
  overflow: hidden;
  padding: var(--sp-xl) 0 0;
}

/* Subtle background gradient */
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 280px;
  background: linear-gradient(180deg, rgba(0,212,255,0.04) 0%, transparent 100%);
  pointer-events: none;
}

.profile-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  flex-wrap: wrap;
}

/* Avatar */
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--cyan);
  box-shadow:
    0 0 0 2px rgba(0,212,255,0.15),
    0 0 24px rgba(0,212,255,0.35),
    0 0 60px rgba(0,212,255,0.12);
}

.profile-avatar-fallback {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 24px rgba(0,212,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Online indicator */
.profile-status-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
}

.profile-status-dot--online  { background: #44cc44; box-shadow: 0 0 8px rgba(68,204,68,0.5); }
.profile-status-dot--offline { background: var(--text-muted); }
.profile-status-dot--away    { background: #ffaa00; }

/* Profile info */
.profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.profile-name {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: 0.06em;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-badges {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.steam-level-badge {
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(0,184,217,0.1));
  border: 1px solid rgba(0,212,255,0.4);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-country {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Actions */
.profile-actions {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-top: var(--sp-xs);
}

/* ── Completion ring ── */
.profile-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.completion-ring {
  position: relative;
  width: 120px; height: 120px;
}

.completion-ring svg {
  width: 120px; height: 120px;
  transform: rotate(-90deg);
}

.completion-ring__track {
  fill: none;
  stroke: rgba(0,212,255,0.1);
  stroke-width: 8;
}

.completion-ring__fill {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1);
  filter: drop-shadow(0 0 6px rgba(0,212,255,0.5));
}

.completion-ring__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.ring-pct {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--cyan);
  line-height: 1;
}

.ring-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ring-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Stats row ── */
.stats-row {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-lg) var(--sp-xl);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.3), transparent);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.35);
}

.stat-card__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card__value--cyan { color: var(--cyan); }
.stat-card__value--gold { color: var(--gold); }

.stat-card__sub {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Section layout (profile game rows) ── */
.profile-section {
  margin-bottom: var(--sp-2xl);
}

.profile-section-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-lg) var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.profile-section-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.07em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  line-height: 1;
}

.profile-section-title__accent {
  width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dim));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0,212,255,0.5);
  flex-shrink: 0;
}

.profile-section-title__accent--gold {
  background: linear-gradient(180deg, var(--gold), #e6a800);
  box-shadow: 0 0 8px rgba(255,209,102,0.5);
}

.profile-section-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--cyan-faint);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}

/* ── Game card with progress bar (profile variant) ── */
.profile-game-card {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-game-card__cover-wrap {
  position: relative;
  width: 160px;
  height: 240px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(0,212,255,0.12);
  background: var(--bg-surface);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.profile-game-card:hover .profile-game-card__cover-wrap {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 0 0 1px rgba(0,212,255,0.45), 0 8px 28px rgba(0,212,255,0.2);
  border-color: rgba(0,212,255,0.55);
}

.profile-game-card__cover-wrap--gold {
  border-color: rgba(255,209,102,0.3);
}

.profile-game-card:hover .profile-game-card__cover-wrap--gold {
  box-shadow: 0 0 0 1px rgba(255,209,102,0.5), 0 8px 28px rgba(255,209,102,0.15);
  border-color: rgba(255,209,102,0.6);
}

.profile-game-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow);
}

.profile-game-card:hover .profile-game-card__img { transform: scale(1.06); }

/* Gold shine on 100% cards */
.profile-game-card__cover-wrap--gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,209,102,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Cover overlay */
.profile-game-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,13,26,0.9) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--t-base);
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.profile-game-card:hover .profile-game-card__overlay { opacity: 1; }

.profile-game-card__name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* Badge */
.profile-game-card__badge {
  position: absolute;
  top: 7px; right: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.profile-game-card__badge--gold {
  background: rgba(255,209,102,0.22);
  border: 1px solid rgba(255,209,102,0.55);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(255,209,102,0.3);
}

/* Progress bar under card */
.profile-game-card__progress {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-game-card__progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-game-card__progress-label {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.profile-game-card__progress-pct {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

/* ── Rarest achievements row ── */
.rarest-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

/* Reuse achievement card but add game label */
.rarest-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: rgba(10,22,40,0.7);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.rarest-card:hover {
  border-color: rgba(0,212,255,0.35);
  box-shadow: 0 4px 24px rgba(0,212,255,0.08);
}

.rarest-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ff6b40, #c080ff);
  border-radius: 0 2px 2px 0;
}

.rarest-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  object-fit: cover;
  flex-shrink: 0;
}

.rarest-card__icon-placeholder {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: rgba(0,212,255,0.06);
  border: 1px solid var(--cyan-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rarest-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rarest-card__name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rarest-card__game {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rarest-card__pct {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ff6b40;
  flex-shrink: 0;
}

/* ── Scroll track (reuse from library, scoped) ── */
.profile-scroll-wrap {
  position: relative;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.profile-scroll-wrap::before,
.profile-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.profile-scroll-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-deep), transparent);
}

.profile-scroll-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-deep), transparent);
}

.profile-scroll-track {
  display: flex;
  gap: var(--sp-md);
  overflow-x: auto;
  padding: var(--sp-xs) var(--sp-lg) var(--sp-md);
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  max-width: 1100px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  align-items: flex-start;
  touch-action: pan-x;
  cursor: grab;
}

.profile-scroll-track:active {
  cursor: grabbing;
}

.profile-scroll-track::-webkit-scrollbar { display: none; }

/* Inline empty state inside flex scroll track */
.profile-track-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-xl) var(--sp-2xl);
  text-align: center;
  color: var(--text-muted);
  min-width: 280px;
  flex-shrink: 0;
}

.profile-track-empty__icon {
  opacity: 0.25;
  color: var(--text-muted);
}

.profile-track-empty__title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0.7;
}

.profile-track-empty__msg {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.5;
  max-width: 200px;
}

/* ── Skeleton profile ── */
.profile-hero-skeleton {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-lg);
  display: flex;
  gap: var(--sp-xl);
  align-items: center;
  flex-wrap: wrap;
}

.skeleton-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  min-width: 200px;
}

/* ── Card info strip below cover ── */
.profile-game-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}

.profile-game-card__info-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-game-card__playtime {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
}

/* ── Skeleton game card ── */
.profile-game-card-skeleton {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-game-card-skeleton__cover {
  width: 160px;
  height: 240px;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
}

.profile-game-card-skeleton__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(13,30,53,0.9) 25%,
    rgba(0,212,255,0.05) 50%,
    rgba(13,30,53,0.9) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.8s infinite linear;
}

.profile-game-card-skeleton__bar {
  height: 6px;
  border-radius: 3px;
}

/* ── Rarest skeleton ── */
.rarest-card-skeleton {
  height: 76px;
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  background: rgba(10,22,40,0.7);
}

.rarest-card-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(13,30,53,0.9) 25%,
    rgba(0,212,255,0.05) 50%,
    rgba(13,30,53,0.9) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
}

/* ── Share button ── */
.share-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(5,13,26,0.92);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-pill);
  padding: 8px 20px;
  font-size: 13px;
  color: var(--cyan);
  backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: calc(var(--z-toast) - 1);
  white-space: nowrap;
}

.share-toast.visible { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .profile-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-lg);
    padding: var(--sp-lg) var(--sp-md);
  }

  .profile-ring-wrap {
    align-self: flex-start;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-lg);
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
    padding: 0 var(--sp-md) var(--sp-lg);
    gap: var(--sp-sm);
  }

  .stats-row .stat-card:last-child { grid-column: 1 / -1; }

  .profile-section-header { padding: 0 var(--sp-md) var(--sp-sm); }
  .profile-scroll-track   { padding: var(--sp-xs) var(--sp-md) var(--sp-md); }

  .rarest-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--sp-md);
    gap: var(--sp-sm);
  }

  .connect-card { padding: var(--sp-xl) var(--sp-lg); }

  .profile-game-card { width: 130px; }
  .profile-game-card__cover-wrap { width: 130px; height: 195px; }
  .profile-game-card-skeleton { width: 130px; }
  .profile-game-card-skeleton__cover { width: 130px; height: 195px; }

  .profile-name { font-size: clamp(26px, 6vw, 40px); }
  .profile-actions { flex-wrap: wrap; gap: var(--sp-sm); }
  .steam-banner__inner { padding: var(--sp-md); }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .stats-row .stat-card:last-child { grid-column: auto; }
  .profile-ring-wrap { flex-direction: column; align-items: flex-start; }
  .profile-badges { flex-wrap: wrap; gap: var(--sp-sm); }
  .stat-card__value { font-size: 28px; }
  .completion-ring { width: 90px; height: 90px; }
  .completion-ring svg { width: 90px; height: 90px; }
  .ring-pct { font-size: 20px; }
}

/* ── Connect mode tabs (Link vs Lookup) ── */
.connect-mode-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0,212,255,0.06);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: var(--sp-lg);
}

.connect-mode-tab {
  flex: 1;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}

.connect-mode-tab:hover {
  color: var(--text-secondary);
  background: rgba(0,212,255,0.06);
}

.connect-mode-tab.active {
  background: rgba(0,212,255,0.15);
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.3);
}
