/* sitejungle1 (Mortimer, 05-11-2026: «una tarjeta "@dueño in The Jungle" con sus 3 últimos posts y el botón Follow … esto
   bien hecho debe molar mucho»): the owner's block of The Jungle on their Ape Site (templates/ape_site/home.html). The site's
   own card and title in its theme; inside, The Jungle's colours (lime, slime, pink) so it reads as the club's feed. */
.sj { --jg: #8ee53f; --jg2: #d6f54c; --jg-pink: #ff4fa3; position: relative; overflow: hidden; isolation: isolate; }
.sj::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(70% 90% at 100% 0%, rgba(142,229,63,0.13), transparent 62%),
                radial-gradient(55% 70% at 0% 100%, rgba(255,79,163,0.09), transparent 66%); }

/* the owner: picture with the rank ring and the level, @handle in The Jungle, rank · team · followers · posts, Follow */
.sj-head { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; }
.sj-face { position: relative; flex: none; width: 60px; height: 60px; padding: 3px; border-radius: 50%;
    background: conic-gradient(from 210deg, var(--rk), color-mix(in srgb, var(--rk) 35%, #ffffff), var(--rk)); box-shadow: 0 0 22px color-mix(in srgb, var(--rk) 35%, transparent); }
.sj-face img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #140a24; border: 2px solid #0d0420; }
.sj-face i { position: absolute; right: -5px; bottom: -4px; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 999px; border: 2px solid #0d0420;
    background: var(--rk); color: #0b0418; font-style: normal; font-size: 0.75rem; font-weight: 900; line-height: 19px; text-align: center; font-variant-numeric: tabular-nums; }
.sj-id { flex: 1; min-width: 0; }
.sj-title { margin: 0; font-size: 1.3rem; font-weight: 900; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sj-title a { color: #fff; text-decoration: none; }
.sj-title a:hover { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--rk) 70%, transparent); text-underline-offset: 3px; }
.sj-title span { background: linear-gradient(90deg, var(--jg), var(--jg2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sj-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 5px 0 0; color: var(--muted); font-size: 0.85rem; }
.sj-meta b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.sj-rank { color: var(--rk); font-weight: 800; }
.sj-team { padding: 1px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); background: color-mix(in srgb, var(--tc) 14%, transparent);
    color: var(--tc); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }

.sj-follow { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 42px; min-width: 116px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px;
    background: linear-gradient(135deg, var(--jg), var(--jg2)); color: #0f1a02; font: inherit; font-size: 0.9rem; font-weight: 900; text-decoration: none; cursor: pointer;
    box-shadow: 0 8px 22px rgba(142,229,63,0.24); transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.sj-follow:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(142,229,63,0.36); }
.sj-follow:focus-visible { outline: 2px solid var(--jg2); outline-offset: 3px; }
.sj-follow.is-on { background: rgba(142,229,63,0.06); color: var(--text); border-color: rgba(142,229,63,0.5); box-shadow: none; }
.sj-follow.is-on:hover { background: rgba(255,79,163,0.09); color: #ffc2de; border-color: rgba(255,79,163,0.65); }
.sj-follow.is-me { background: rgba(142,229,63,0.08); color: var(--jg2); border-color: rgba(142,229,63,0.45); box-shadow: none; }
.sj-follow[disabled] { cursor: progress; opacity: 0.8; }
.sj-follow.is-pop { animation: sj-pop 0.38s ease; }
.sj-f-on, .sj-f-un, .sj-follow.is-on .sj-f-off, .sj-follow.is-on:hover .sj-f-on { display: none; }
.sj-follow.is-on .sj-f-on, .sj-follow.is-on:hover .sj-f-un { display: inline; }
@keyframes sj-pop { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }

/* the posts: three cards, a lime rail (gold to pink when it is Hot), the first photo / ape / link picture on top */
.sj-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.sj-n1 { grid-template-columns: minmax(0, 1fr); }
.sj-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sj-post { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)), rgba(9,3,20,0.55); border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.sj-post::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; z-index: 2; width: 3px; background: linear-gradient(var(--jg), var(--jg2)); opacity: 0.9; }
.sj-post.is-hot { border-color: rgba(255,79,163,0.32); box-shadow: 0 14px 34px rgba(255,79,163,0.1); }
.sj-post.is-hot::before { background: linear-gradient(#ffcf4a, var(--jg-pink)); }
.sj-post:hover { transform: translateY(-2px); border-color: rgba(142,229,63,0.45); box-shadow: 0 16px 36px rgba(0,0,0,0.35), 0 0 26px rgba(142,229,63,0.12); }
.sj-post.is-hot:hover { border-color: rgba(255,79,163,0.6); box-shadow: 0 16px 36px rgba(0,0,0,0.35), 0 0 26px rgba(255,79,163,0.16); }
.sj-pic { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: #140a24; }
.sj-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.sj-pic.is-ape img { object-position: center 28%; }
.sj-pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8,3,18,0.55)); pointer-events: none; }
.sj-post:hover .sj-pic img { transform: scale(1.045); }
.sj-chip, .sj-more { position: absolute; z-index: 1; bottom: 9px; padding: 3px 9px; border-radius: 999px; background: rgba(8,3,18,0.74); color: #fff;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 0.75rem; font-weight: 800; white-space: nowrap; }
.sj-chip { left: 12px; max-width: calc(100% - 70px); overflow: hidden; text-overflow: ellipsis; }
.sj-more { right: 10px; font-variant-numeric: tabular-nums; }
.sj-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 13px 16px 11px 18px; }
.sj-when { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 0.76rem; }
.sj-hot { padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(255,79,163,0.4); background: rgba(255,79,163,0.14); color: #ffc2de; font-weight: 800; }
.sj-text { flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; color: var(--text); font-size: 0.94rem; line-height: 1.5;
    text-decoration: none; overflow-wrap: anywhere; }
.has-pic .sj-text { -webkit-line-clamp: 3; }
.sj-post:not(.has-pic) { background: radial-gradient(90% 55% at 100% 100%, rgba(142,229,63,0.08), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02)), rgba(9,3,20,0.55); }
.sj-post:not(.has-pic) .sj-text { font-size: 1.04rem; line-height: 1.55; -webkit-line-clamp: 8; }   /* a post without a picture reads big, as in /jungle */
.sj-text.is-empty { color: var(--muted); }
.sj-text::after { content: ''; position: absolute; inset: 0; }   /* the whole card opens the post */
.sj-text:focus-visible { outline: none; }
.sj-post:focus-within { border-color: rgba(142,229,63,0.6); }
.sj-foot { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.sj-foot .jgm-like { font-size: 0.78rem; }
.sj-rep { display: inline-flex; align-items: center; gap: 4px; }
.sj-views { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: color-mix(in srgb, var(--jg) 72%, #9aa6bd); cursor: default; }
.sj-ic { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.sj-views .sj-ic { stroke-width: 2.1; }
.sj-all { display: inline-block; margin-top: 14px; color: var(--jg); font-size: 0.86rem; font-weight: 800; text-decoration: none; }
.sj-all:hover { text-decoration: underline; }
.sj-empty { margin: 0; padding: 18px 20px; border-radius: 14px; border: 1px dashed rgba(142,229,63,0.4); background: rgba(142,229,63,0.05); color: var(--muted); line-height: 1.55; }
.sj-empty a { color: var(--jg2); font-weight: 800; }
.sj .jgm-note { margin: 12px 0 0; }

/* tablet and phone: the posts become a rail that slides; the Follow button full width under the name */
@media (max-width: 760px) {
    .sj-head { flex-wrap: wrap; gap: 12px 14px; }
    .sj-face { width: 52px; height: 52px; }
    .sj-title { font-size: 1.12rem; }
    .sj-follow { width: 100%; }
    .sj-posts { display: flex; gap: 12px; margin: 0 -18px; padding: 2px 18px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 18px; scrollbar-width: none; }
    .sj-posts::-webkit-scrollbar { display: none; }
    .sj-post { flex: 0 0 82%; scroll-snap-align: start; }
    .sj-n1 .sj-post { flex-basis: 100%; }
    .sj-post:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sj-post, .sj-pic img, .sj-follow { transition: none; }
    .sj-post:hover, .sj-follow:hover { transform: none; }
    .sj-post:hover .sj-pic img { transform: none; }
    .sj-follow.is-pop { animation: none; }
}
