/* Academy Connect: a student's profile card in 3D (connect-profile.js, founder 2026-10-10: "Add a beautiful 3D quality
   feature to users as users profile"). Rounded corners need !important: square.css squares everything on the site. */
html.cnp-open { overflow: hidden; }
.cnp-back {
  position: fixed; inset: 0; z-index: 1260; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(31, 123, 255, 0.18), rgba(2, 6, 18, 0.78) 60%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  perspective: 1600px; animation: cnp-fade 0.25s ease both;
}
.cnp-back.is-out { animation: cnp-fade-out 0.24s ease both; }
.cnp-back.is-out .cnp-stage { animation: cnp-leave 0.24s ease both; }
.cnp-stage { width: min(600px, 100%); perspective: 1400px; animation: cnp-swing 0.62s cubic-bezier(0.2, 0.9, 0.25, 1.08) both; transform-origin: 50% 0%; }
.cnp {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%;
  --line: rgba(255, 255, 255, 0.1); --mute: #8b93ad; --act: #38b6ff; --ok: #34d399; --gold: #fbbf24;
  position: relative; display: flex; flex-direction: column; max-height: calc(100dvh - 32px);
  border-radius: 22px !important; color: #e8ecf8; font-family: var(--font-body, Inter, sans-serif);
  background: linear-gradient(180deg, #0d1730 0%, #0a1226 45%, #080f20 100%);
  border: 1px solid rgba(120, 170, 255, 0.22);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(56, 182, 255, 0.06), 0 30px 80px -40px rgba(31, 123, 255, 0.55);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform 0.25s ease-out;
}
/* The light that follows the pointer */
.cnp-glare { position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit !important; background: radial-gradient(60% 45% at var(--gx) var(--gy), rgba(255, 255, 255, 0.09), transparent 70%); mix-blend-mode: screen; }

/* The header world: sky, a moving grid floor, glowing orbs and stars (each layer moved by the tilt) */
.cnp-world { position: absolute; left: 0; right: 0; top: 0; height: 200px; overflow: hidden; border-radius: 22px 22px 0 0 !important; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent); }
.cnp-world span { position: absolute; transition: translate 0.25s ease-out; }
.cnp-sky { inset: -20%; background:
  radial-gradient(40% 60% at 22% 30%, rgba(31, 123, 255, 0.75), transparent 70%),
  radial-gradient(35% 55% at 78% 25%, rgba(56, 182, 255, 0.55), transparent 70%),
  radial-gradient(30% 50% at 60% 80%, rgba(167, 139, 250, 0.45), transparent 70%),
  linear-gradient(180deg, #0b2a6b, #0a1530); animation: cnp-sky 14s ease-in-out infinite alternate; }
.cnp-floor { left: -40%; right: -40%; bottom: 30px; height: 220px; border-radius: 0 !important;
  background-image: linear-gradient(rgba(125, 211, 252, 0.55) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(125, 211, 252, 0.55) 1.5px, transparent 1.5px);
  background-size: 38px 38px; transform: perspective(240px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 5%, #000 75%); mask-image: linear-gradient(180deg, transparent 5%, #000 75%);
  animation: cnp-floor 3.2s linear infinite; }
.cnp-orb { border-radius: 50% !important; background: radial-gradient(circle at 32% 30%, #fff, rgba(125, 211, 252, 0.95) 18%, rgba(31, 123, 255, 0.6) 48%, transparent 72%); filter: drop-shadow(0 0 14px rgba(56, 182, 255, 0.7)); animation: cnp-float 7s ease-in-out infinite; }
.cnp-orb.o1 { width: 46px; height: 46px; left: 9%; top: 26px; }
.cnp-orb.o2 { width: 22px; height: 22px; right: 14%; top: 22px; animation-delay: -2.4s; background: radial-gradient(circle at 32% 30%, #fff, rgba(251, 191, 36, 0.95) 22%, rgba(245, 158, 11, 0.55) 52%, transparent 74%); filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.7)); }
.cnp-orb.o3 { width: 30px; height: 30px; right: 26%; top: 92px; animation-delay: -4.6s; background: radial-gradient(circle at 32% 30%, #fff, rgba(196, 181, 253, 0.95) 20%, rgba(139, 92, 246, 0.55) 50%, transparent 74%); filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.7)); }
.cnp-stars { inset: 0; background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 34% 44%, #cfe8ff, transparent), radial-gradient(1.2px 1.2px at 52% 12%, #fff, transparent), radial-gradient(1px 1px at 68% 52%, #cfe8ff, transparent), radial-gradient(1.4px 1.4px at 88% 36%, #fff, transparent), radial-gradient(1px 1px at 44% 70%, #fff, transparent); opacity: 0.8; animation: cnp-twinkle 4s ease-in-out infinite alternate; }

.cnp-x { position: absolute; top: 12px; right: 12px; z-index: 6; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50% !important; color: #fff; background: rgba(2, 6, 18, 0.45); border: 1px solid rgba(255, 255, 255, 0.2); cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transform: translateZ(70px); }
.cnp-x svg { width: 18px; height: 18px; }
.cnp-x:hover { background: rgba(2, 6, 18, 0.7); }

/* Photo, name and chips: they stand in front of the card */
.cnp-top { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 92px 24px 6px; text-align: center; transform: translateZ(46px); transform-style: preserve-3d; }
.cnp-ring { position: relative; width: 128px; height: 128px; padding: 5px; box-sizing: border-box; border-radius: 50% !important; isolation: isolate; filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55)); animation: cnp-bob 6s ease-in-out infinite; }
.cnp-ring::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50% !important; background: conic-gradient(from 0deg, #1f7bff, #38b6ff, #a78bfa, #38b6ff, #1f7bff); animation: cnp-spin 6s linear infinite; }
.cnp-ring.is-team::before { background: conic-gradient(from 0deg, #f59e0b, #fde68a, #fbbf24, #f59e0b, #fde68a, #f59e0b); }
.cnp-ring::after { content: ""; position: absolute; inset: -10px; z-index: -2; border-radius: 50% !important; background: radial-gradient(circle, rgba(56, 182, 255, 0.45), transparent 70%); filter: blur(8px); }
.cnp-ring.is-team::after { background: radial-gradient(circle, rgba(251, 191, 36, 0.45), transparent 70%); }
.cnp-av { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 50% !important; border: 4px solid #0b1328; box-sizing: border-box; font-family: var(--font-head, inherit); font-size: 2.3rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1f7bff, #38b6ff); }
.cnp-av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50% !important; }
.cnp-on { position: absolute; right: 10px; bottom: 10px; width: 20px; height: 20px; border-radius: 50% !important; background: var(--ok); box-shadow: 0 0 0 4px #0b1328, 0 0 14px var(--ok); }
.cnp-on::after { content: ""; position: absolute; inset: -4px; border-radius: 50% !important; border: 2px solid var(--ok); animation: cnp-ping 2s ease-out infinite; }
.cnp-name { margin: 8px 0 0; font-family: var(--font-head, inherit); font-size: clamp(1.45rem, 3.4vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; text-shadow: 0 6px 24px rgba(31, 123, 255, 0.45); overflow-wrap: anywhere; }
.cnp-full { margin: -2px 0 0; font-size: 0.86rem; color: var(--mute); }
.cnp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 6px; }
.cnp-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px !important; font-size: 0.78rem; font-weight: 600; color: #d6deef; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.cnp-chip svg { width: 14px; height: 14px; color: var(--act); }
.cnp-chip i { width: 8px; height: 8px; border-radius: 50% !important; background: var(--mute); }
.cnp-chip.is-live { color: #a7f3d0; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); }
.cnp-chip.is-live i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.cnp-chip.is-gold { color: #1a1200; background: linear-gradient(135deg, #fde68a, #fbbf24); border-color: transparent; }
.cnp-chip.is-gold svg { color: #1a1200; }

/* Everything below the chips scrolls when the card is taller than the screen */
.cnp-body { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; padding: 14px 24px 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.cnp-wait, .cnp-empty { margin: 10px 0; font-size: 0.88rem; color: var(--mute); text-align: center; }
.cnp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 6px; perspective: 700px; }
.cnp-stat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px 12px; border-radius: 14px !important;
  background: linear-gradient(160deg, rgba(56, 182, 255, 0.14), rgba(31, 123, 255, 0.04) 60%); border: 1px solid rgba(56, 182, 255, 0.24);
  box-shadow: 0 14px 26px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: cnp-rise 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards; animation-delay: calc(0.25s + var(--i) * 0.08s); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.cnp-stat:hover { transform: translateY(-4px) rotateX(10deg); box-shadow: 0 22px 32px -16px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(56, 182, 255, 0.4); }
.cnp-stat-ic { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 4px; border-radius: 9px !important; color: #fff; background: linear-gradient(135deg, #1f7bff, #38b6ff); box-shadow: 0 6px 14px -4px rgba(31, 123, 255, 0.8); }
.cnp-stat:nth-child(4) .cnp-stat-ic { color: #1a1200; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 6px 14px -4px rgba(245, 158, 11, 0.8); }
.cnp-stat-ic svg { width: 16px; height: 16px; }
.cnp-stat strong { font-family: var(--font-head, inherit); font-size: 1.45rem; font-weight: 800; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
.cnp-stat small { font-size: 0.74rem; color: var(--mute); }
.cnp-sec { margin: 16px 0 4px; animation: cnp-rise 0.6s ease backwards; animation-delay: 0.4s; }
.cnp-sec h3 { margin: 0 0 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.cnp-bio { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #d6deef; white-space: pre-line; overflow-wrap: anywhere; }
.cnp-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.cnp-tag { padding: 5px 11px; border-radius: 999px !important; font-size: 0.8rem; color: #cfe8ff; background: rgba(56, 182, 255, 0.1); border: 1px solid rgba(56, 182, 255, 0.28); animation: cnp-pop 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.3) backwards; animation-delay: calc(0.45s + var(--i) * 0.04s); }

/* Websites: tiles that lean towards the pointer */
.cnp-sites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cnp-site { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px !important; text-decoration: none; color: #e8ecf8;
  background: #0b1328; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 28px -18px rgba(0, 0, 0, 0.95);
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.2s ease-out, border-color 0.2s, box-shadow 0.2s;
  animation: cnp-rise 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards; animation-delay: calc(0.5s + var(--i) * 0.06s); }
.cnp-site:hover, .cnp-site:focus-visible { border-color: rgba(56, 182, 255, 0.6); box-shadow: 0 24px 34px -18px rgba(0, 0, 0, 0.95), 0 0 24px -6px rgba(56, 182, 255, 0.55); outline: none; }
.cnp-site-pic { position: relative; display: grid; place-items: center; aspect-ratio: 1200 / 630; overflow: hidden; background: linear-gradient(135deg, #12306b, #0b1a3a); }
.cnp-site-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cnp-site:hover .cnp-site-pic img { transform: scale(1.08); }
.cnp-site-pic b { padding: 8px; font-family: var(--font-head, inherit); font-size: 0.86rem; text-align: center; color: #fff; overflow-wrap: anywhere; }
.cnp-site-cap { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 9px; min-width: 0; }
.cnp-site-cap strong { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnp-site-cap small { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; color: var(--mute); }
.cnp-site-cap small svg { width: 12px; height: 12px; }
.cnp-site-gl { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 55% at var(--gx) var(--gy), rgba(255, 255, 255, 0.14), transparent 70%); opacity: 0; transition: opacity 0.2s; }
.cnp-site:hover .cnp-site-gl { opacity: 1; }
.cnp-more { margin: 8px 0 0; font-size: 0.8rem; color: var(--mute); text-align: right; }

.cnp-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 20px 18px; border-top: 1px solid var(--line); transform: translateZ(30px); }
.cnp-foot:empty { display: none; }
/* flex: 1 1 auto + min-width lets 6-8 buttons share the row evenly and wrap into tidy rows instead of
   being crushed onto one line (founder 2026-10-24: "Resize all the buttons to fit perfectly"). */
.cnp-btn { flex: 1 1 auto; min-width: 92px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 11px !important; font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: none; white-space: nowrap; color: #e8ecf8; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.cnp-btn svg { width: 15px; height: 15px; flex: 0 0 15px; }
.cnp-btn.is-main { flex: 2; color: #fff; border-color: transparent; background: linear-gradient(135deg, #1f7bff, #38b6ff); box-shadow: 0 12px 26px -10px rgba(31, 123, 255, 0.85); }
.cnp-btn:hover { transform: translateY(-2px); }
.cnp-btn.is-main:hover { box-shadow: 0 16px 30px -10px rgba(31, 123, 255, 0.95); }
.cnp button:focus-visible, .cnp a:focus-visible { outline: 2px solid #38b6ff; outline-offset: 2px; }

/* The names that open a profile in the chat */
.cn-who.is-link, .cn-title.is-link { cursor: pointer; }
.cn-who.is-link:hover, .cn-title.is-link:hover { text-decoration: underline; text-underline-offset: 3px; color: #7cc8ff; }
.cn-msg .cn-av.is-link { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cn-msg .cn-av.is-link:hover { transform: scale(1.08); box-shadow: 0 0 0 2px #38b6ff; }
/* The hover bar (reactions, Reply, More) sat on top of the sender's name; on computers it now sits at the right end
   of the row, so the name stays clickable. Phones show it only after a tap on the message. */
@media (hover: hover) { .cn-msg.is-theirs .cn-tools { left: auto; right: 24px; } }
/* Phones: a tap leaves a sticky :hover (and focus) behind, which put the bar over the name too; there the bar shows
   only for the message tapped (.is-touch, connect-app.js), as intended. */
@media (hover: none) { .cn-msg:not(.is-touch) .cn-tools:not(:has(.cn-menu)) { visibility: hidden; opacity: 0; } }

@keyframes cnp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cnp-fade-out { to { opacity: 0; } }
@keyframes cnp-swing { from { opacity: 0; transform: translateY(46px) rotateX(24deg) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes cnp-leave { to { opacity: 0; transform: translateY(30px) rotateX(-12deg) scale(0.94); } }
@keyframes cnp-sky { from { transform: translate3d(-3%, 0, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.08); } }
@keyframes cnp-floor { from { background-position: 0 0; } to { background-position: 0 38px; } }
@keyframes cnp-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -10px, 0); } }
@keyframes cnp-twinkle { from { opacity: 0.45; } to { opacity: 0.95; } }
@keyframes cnp-spin { to { transform: rotate(360deg); } }
@keyframes cnp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes cnp-ping { from { transform: scale(1); opacity: 0.8; } to { transform: scale(2.1); opacity: 0; } }
@keyframes cnp-rise { from { opacity: 0; transform: translateY(16px) rotateX(18deg); } to { opacity: 1; transform: none; } }
@keyframes cnp-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* Phones: a sheet from the bottom, two websites per row */
@media (max-width: 600px) {
  .cnp-back { place-items: end center; padding: 0; }
  .cnp-stage { width: 100%; transform-origin: 50% 100%; }
  .cnp { max-height: 92dvh; border-radius: 22px 22px 0 0 !important; }
  .cnp-world { height: 170px; }
  .cnp-top { padding: 70px 18px 4px; }
  .cnp-ring { width: 112px; height: 112px; }
  .cnp-body { padding: 12px 16px 6px; }
  .cnp-sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cnp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cnp-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .cnp-coin, .cnp-badge, .cnp-badge-coin, .cnp-post, .cnp-lb-row, .cnp-cup, .cnp-rank.is-top::before { animation: none !important; }
  .cnp-back, .cnp-stage, .cnp-sky, .cnp-floor, .cnp-orb, .cnp-stars, .cnp-ring, .cnp-ring::before, .cnp-on::after, .cnp-stat, .cnp-sec, .cnp-tag, .cnp-site { animation: none !important; }
  .cnp, .cnp-site { transform: none !important; }
}

/* ---------- More features (founder 2026-10-10: "Add more features to it") ---------- */
.cnp-btn span { pointer-events: none; }
.cnp-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.cnp-btn.is-warn { flex: 1; color: #fca5a5; background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); }
.cnp-chip.is-bad { color: #fecaca; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); }
.cnp-chip.is-bad svg { color: #f87171; }
.cnp-sec h3 { display: flex; align-items: center; gap: 8px; }
.cnp-sec h3 span { padding: 1px 8px; border-radius: 999px !important; font-size: 0.68rem; letter-spacing: 0.04em; text-transform: none; color: #cfe8ff; background: rgba(56, 182, 255, 0.12); }

/* Copy and Download live in the footer now (next to Close), as normal .cnp-btn buttons. Their done/
   failed tints: */
.cnp-btn.is-done { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.5); background: rgba(52, 211, 153, 0.1); }
.cnp-btn.is-bad { color: #fecaca; border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.08); }
.cnp-dl span, .cnp-copy span { white-space: nowrap; }
/* A full-width row under the footer buttons, shown only when copying is blocked (some installed-app
   WebViews): the raw link, selectable, to copy by hand. user-select:all means one tap grabs it all. */
.cnp-linkbox { flex: 1 1 100%; margin-top: 2px; padding: 9px 12px; border-radius: 10px !important; font-size: 0.8rem; line-height: 1.4; color: #e8ecf8; background: rgba(2, 6, 18, 0.6); border: 1px solid rgba(255, 255, 255, 0.25); word-break: break-all; -webkit-user-select: all; user-select: all; text-align: center; }
.cnp-linkbox[hidden] { display: none; }

/* Builder rank: a spinning 3D medal, the rank, how the score is made, and Top builders */
.cnp-rank { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; margin: 6px 0 0; padding: 14px 16px; overflow: hidden; border-radius: 16px !important; font: inherit; text-align: left; color: #e8ecf8; cursor: pointer;
  background: linear-gradient(120deg, rgba(31, 123, 255, 0.2), rgba(56, 182, 255, 0.06) 55%, rgba(167, 139, 250, 0.14)); border: 1px solid rgba(56, 182, 255, 0.35);
  box-shadow: 0 18px 34px -20px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.08); animation: cnp-rise 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards; animation-delay: 0.18s; transition: transform 0.2s ease, border-color 0.2s; }
.cnp-rank:hover { transform: translateY(-2px); border-color: rgba(56, 182, 255, 0.65); }
.cnp-rank.is-top { background: linear-gradient(120deg, rgba(251, 191, 36, 0.24), rgba(245, 158, 11, 0.06) 55%, rgba(253, 230, 138, 0.14)); border-color: rgba(251, 191, 36, 0.5); }
.cnp-rank.is-top::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%); background-size: 250% 100%; animation: cnp-shine 3.6s ease-in-out infinite; }
.cnp-rank.is-founder { cursor: pointer; background: linear-gradient(120deg, rgba(251, 191, 36, 0.16), rgba(56, 182, 255, 0.06)); border-color: rgba(251, 191, 36, 0.35); }
.cnp-rank-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cnp-rank-tx small { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.cnp-rank-tx strong { font-family: var(--font-head, inherit); font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: #fff; }
.cnp-rank-tx strong b { font-variant-numeric: tabular-nums; }
.cnp-rank-tx strong em { font-style: normal; font-size: 0.95rem; font-weight: 600; color: var(--mute); }
.cnp-rank-why { font-size: 0.8rem; color: #b8c2dc; }
.cnp-rank-go { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px !important; font-size: 0.8rem; font-weight: 700; color: #1a1200; background: linear-gradient(135deg, #fde68a, #fbbf24); box-shadow: 0 8px 18px -8px rgba(245, 158, 11, 0.8); white-space: nowrap; }
.cnp-rank-go svg { width: 15px; height: 15px; }

.cnp-medal { --c1: #60a5fa; --c2: #1d4ed8; --c3: #93c5fd; display: inline-block; width: 64px; height: 64px; flex-shrink: 0; perspective: 400px; }
.cnp-medal.is-gold { --c1: #fde68a; --c2: #d97706; --c3: #fff7cc; }
.cnp-medal.is-silver { --c1: #f1f5f9; --c2: #64748b; --c3: #ffffff; }
.cnp-medal.is-bronze { --c1: #fdba74; --c2: #9a3412; --c3: #ffedd5; }
.cnp-medal.is-small { width: 40px; height: 40px; }
.cnp-coin { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: cnp-coin 7s ease-in-out infinite; }
.cnp-medal.is-small .cnp-coin { animation: none; }
.cnp-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50% !important; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  font-family: var(--font-head, inherit); font-size: 1.05rem; font-weight: 800; color: #0b1328; letter-spacing: -0.02em;
  background: radial-gradient(circle at 30% 28%, var(--c3), var(--c1) 38%, var(--c2) 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.35), inset 0 -6px 10px rgba(0, 0, 0, 0.25), 0 10px 22px -8px rgba(0, 0, 0, 0.8); }
.cnp-medal.is-small .cnp-face { font-size: 0.8rem; }
.cnp-medal.is-blue .cnp-face { color: #fff; }
.cnp-face.is-back { transform: rotateY(180deg); }
.cnp-face svg { width: 46%; height: 46%; }

/* Badges: coins that flip in, with their name */
.cnp-badges { display: flex; flex-wrap: wrap; gap: 10px; perspective: 600px; }
.cnp-badge { --b1: #60a5fa; --b2: #1d4ed8; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px !important; font-size: 0.8rem; font-weight: 600; color: #e8ecf8; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); outline: none;
  animation: cnp-flip 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.2) backwards; animation-delay: calc(0.35s + var(--i) * 0.09s); transition: transform 0.2s ease, border-color 0.2s; }
.cnp-badge:hover, .cnp-badge:focus-visible { transform: translateY(-2px); border-color: var(--b1); }
.cnp-badge.is-gold { --b1: #fde68a; --b2: #d97706; }
.cnp-badge.is-violet { --b1: #c4b5fd; --b2: #7c3aed; }
.cnp-badge.is-teal { --b1: #5eead4; --b2: #0f766e; }
.cnp-badge.is-rose { --b1: #fda4af; --b2: #e11d48; }
.cnp-badge-coin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% !important; color: #fff; background: radial-gradient(circle at 30% 28%, #fff, var(--b1) 30%, var(--b2) 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35), 0 6px 12px -4px rgba(0, 0, 0, 0.7); }
.cnp-badge.is-gold .cnp-badge-coin { color: #3b2400; }
.cnp-badge-coin svg { width: 15px; height: 15px; }
.cnp-badge:hover .cnp-badge-coin { animation: cnp-spin-y 0.8s ease; }

/* Their newest posts in the channels */
.cnp-posts { display: flex; flex-direction: column; gap: 8px; }
.cnp-post { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 10px 12px; border-radius: 12px !important; font: inherit; text-align: left; color: #d6deef; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-left: 3px solid var(--act); cursor: pointer;
  animation: cnp-rise 0.5s ease backwards; animation-delay: calc(0.45s + var(--i) * 0.06s); transition: transform 0.18s ease, background 0.18s; }
.cnp-post:hover { transform: translateX(3px); background: rgba(56, 182, 255, 0.08); }
.cnp-post-h { display: flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 700; color: #9cc9ff; }
.cnp-post-h svg { width: 13px; height: 13px; }
.cnp-post-h time { margin-left: auto; font-weight: 500; color: var(--mute); }
.cnp-post-t { font-size: 0.86rem; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }

/* Top builders */
.cnp-stage.is-wide { width: min(680px, 100%); }
.cnp-cup { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50% !important; color: #3b2400; background: radial-gradient(circle at 30% 28%, #fff7cc, #fde68a 35%, #d97706 100%); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.35), 0 22px 40px -14px rgba(245, 158, 11, 0.75); animation: cnp-bob 6s ease-in-out infinite; }
.cnp-cup svg { width: 52px; height: 52px; }
.cnp-lb { display: flex; flex-direction: column; gap: 8px; perspective: 900px; }
.cnp-lb-row { display: grid; grid-template-columns: 48px 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; border-radius: 14px !important; font: inherit; text-align: left; color: #e8ecf8; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  animation: cnp-rise 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.1) backwards; animation-delay: calc(0.15s + var(--i) * 0.035s); transition: transform 0.18s ease, border-color 0.18s, background 0.18s; }
.cnp-lb-row:hover { transform: translateX(4px) rotateY(-1.5deg); border-color: rgba(56, 182, 255, 0.55); background: rgba(56, 182, 255, 0.07); }
.cnp-lb-row.is-top { background: linear-gradient(100deg, rgba(251, 191, 36, 0.13), rgba(255, 255, 255, 0.03) 60%); border-color: rgba(251, 191, 36, 0.32); }
.cnp-lb-row.is-me { border-color: rgba(52, 211, 153, 0.6); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.25); }
.cnp-lb-row .cnp-medal { margin: 0 auto; }
.cnp-lb-av { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 50% !important; font-size: 0.82rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #1f7bff, #38b6ff); }
.cnp-lb-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% !important; }
.cnp-lb-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cnp-lb-tx strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnp-lb-tx small { font-size: 0.74rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnp-lb-sc { display: flex; flex-direction: column; align-items: flex-end; }
.cnp-lb-sc b { font-family: var(--font-head, inherit); font-size: 1.2rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.cnp-lb-sc small { font-size: 0.68rem; color: var(--mute); }
.cnp-lb-you { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px !important; background: rgba(52, 211, 153, 0.07); border: 1px solid rgba(52, 211, 153, 0.4); }
.cnp-lb-you span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #6ee7b7; }
.cnp-lb-you strong { font-family: var(--font-head, inherit); font-size: 1.15rem; color: #fff; }
.cnp-lb-you small { flex-basis: 100%; font-size: 0.8rem; color: #b8c2dc; }

/* Sidebar: Top builders */
.cn-top-b { display: flex; align-items: center; gap: 8px; width: calc(100% - 4px); margin: 10px 2px 0; padding: 9px 12px; border-radius: 12px !important; font: inherit; font-size: 0.84rem; font-weight: 700; text-align: left; color: #fde68a; cursor: pointer;
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0.03)); border: 1px solid rgba(251, 191, 36, 0.35); transition: transform 0.18s ease, border-color 0.18s; }
.cn-top-b:hover { transform: translateY(-1px); border-color: rgba(251, 191, 36, 0.7); }
.cn-top-b svg { width: 18px; height: 18px; flex-shrink: 0; }
.cn-top-b small { margin-left: auto; font-size: 0.72rem; font-weight: 600; color: #b8a26a; }

@keyframes cnp-coin { 0%, 62% { transform: rotateY(0deg); } 80%, 100% { transform: rotateY(360deg); } }
@keyframes cnp-flip { from { opacity: 0; transform: rotateY(-90deg) scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes cnp-spin-y { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes cnp-shine { 0% { background-position: 150% 0; } 60%, 100% { background-position: -50% 0; } }

/* Phones: the rank wraps, a tighter Top builders list */
@media (max-width: 600px) {
  .cnp-rank { grid-template-columns: auto minmax(0, 1fr); }
  .cnp-rank-go { grid-column: 1 / -1; justify-content: center; }
  .cnp-lb-row { grid-template-columns: 40px 38px minmax(0, 1fr) auto; gap: 9px; padding: 8px 10px; }
  .cnp-rank-tx strong { font-size: 1.3rem; }
  .cnp-foot { flex-wrap: wrap; }
  .cnp-foot .cnp-btn.is-main { flex: 1 1 100%; }
  .cnp-medal { width: 54px; height: 54px; }
  .cnp-lb-row .cnp-medal { width: 34px; height: 34px; }
  .cnp-lb-av { width: 38px; height: 38px; }
}
/* The X and the share button must sit in front of the header: in the 3D card the header (.cnp-top, translateZ 46px) covered
   them (40px), so clicks on the X landed on the header and the card never closed (founder 2026-10-10). They are now at 70px,
   and the header's empty space lets clicks through. */
.cnp-top { pointer-events: none; }
.cnp-top > * { pointer-events: auto; }
/* The X is outside the tilting 3D card (connect-profile.js): flat, always on top, in every browser (founder 2026-10-11:
   "when I click on X to close it, it doesn't close"). */
.cnp-stage { position: relative; }
.cnp-stage > .cnp-x { position: absolute; top: 12px; right: 12px; z-index: 30; transform: none; }

/* Voice and video call buttons beside Message (founder 2026-10-12) */
.cnp-btn.is-call { flex: 1; color: #bbf7d0; background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.4); }
.cnp-btn.is-call:hover { background: rgba(34, 197, 94, 0.18); }
/* With the founder's Mute and Suspend there are six buttons: wrap to a second row, never squeeze or spill */
.cnp-foot { flex-wrap: wrap; }
.cnp-foot .cnp-btn { white-space: nowrap; min-width: max-content; }
