/* ---------- net2 (01-11-2026): /ape/<username>/network, someone's whole Ape network (templates/ape_network.html).
   The hero is a window on a deep night sky (Mortimer: «más oscuridad al fondo, no ese morado … más sensación de
   constelación»): the text on the left, the constellation of up to 40 apes on three rings on the right (the same stage as
   the card of /ape/<username>, ape-page.css). Then «Share the network» (the 1080×1350 picture, drawn in the browser by
   ape-network-share.js) and the list of how each one connects, by orbit. Text never under 12px. */

.nw-hero { --nw-sky: #04040b; position: relative; margin: 28px 20px 0; border-radius: 24px; overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--an-c) 30%, var(--line-strong)); box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    background: url(../img/an-sky.svg) 0 0 / 480px 480px repeat,
        radial-gradient(760px 620px at 72% 50%, color-mix(in srgb, var(--an-c) 9%, transparent), transparent 70%),
        radial-gradient(900px 700px at 72% 50%, #0b0d1f 0, #060713 55%, var(--nw-sky) 100%); }
.nw-hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 6;
    background: linear-gradient(90deg, var(--an-c), #d946ef, var(--orange)); }
.nw-hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); align-items: center; gap: 28px;
    max-width: 1240px; margin: 0 auto; padding: 44px 32px 40px; }
.nw-intro { position: relative; z-index: 5; }
.nw-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 0.88rem; font-weight: 700; color: #cbd5e1; }
.nw-back:hover, .nw-back:focus-visible { color: #fff; }
.nw-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--an-c); }
.nw-hero h1 { margin: 0 0 14px; font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 900; line-height: 1.04; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.nw-lead { margin: 0 0 18px; color: #cbd5e1; font-size: 1rem; line-height: 1.55; }
.nw-lead b { color: #fff; }
.nw-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.nw-pills li { --tc: var(--an-c); display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 0.78rem; font-weight: 800;
    color: #f1f5f9; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 24%, #141b36), color-mix(in srgb, var(--tc) 12%, #0d1329));
    border: 1px solid color-mix(in srgb, var(--tc) 50%, #141b36); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
/* netcards1 (01-11-2026, Mortimer: «estas cards son demasiado transparentes, puedes darles un poco de color y que no sea
   semitransparente»): the pills and the orbits are solid now, each in its colour (the owner's level, magenta, orange: the
   BASC gradient), so the stars never show through them. */
.nw-pills li:nth-child(2) { --tc: #d946ef; }
.nw-pills li:nth-child(3) { --tc: var(--orange); }
.nw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--an-c); box-shadow: 0 0 8px var(--an-c); }
.nw-orbits { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.nw-orbit--0 { --oc: var(--an-c); }
.nw-orbit--1 { --oc: #d946ef; }
.nw-orbit--2 { --oc: var(--orange); }
.nw-orbit { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 14px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--oc) 26%, #10162f) 0%, color-mix(in srgb, var(--oc) 8%, #0c1128) 60%, #0c1128 100%);
    border: 1px solid color-mix(in srgb, var(--oc) 45%, #10162f); box-shadow: inset 3px 0 0 var(--oc), 0 6px 18px rgba(0,0,0,0.32); }
.nw-orbit b { font-size: 0.95rem; }
.nw-orbit small { margin-left: auto; color: color-mix(in srgb, var(--oc) 30%, #e2e8f0); font-size: 0.82rem; font-weight: 700; }
.nw-orbit-mark { flex: none; position: relative; width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,0.45); }
.nw-orbit-mark::after { content: ''; position: absolute; left: 50%; top: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
    background: var(--an-c); box-shadow: 0 0 8px var(--an-c); }
.nw-orbit--1 .nw-orbit-mark { border-color: rgba(255,255,255,0.3); }
.nw-orbit--1 .nw-orbit-mark::after { background: #d946ef; box-shadow: 0 0 8px #d946ef; width: 7px; height: 7px; margin-left: -3.5px; top: -3.5px; }
.nw-orbit--2 .nw-orbit-mark { border-style: dotted; border-color: rgba(255,255,255,0.22); }
.nw-orbit--2 .nw-orbit-mark::after { background: var(--orange); box-shadow: 0 0 8px var(--orange); width: 6px; height: 6px; margin-left: -3px; top: -3px; }
.nw-hero .an-common { background: linear-gradient(90deg, #3b300b, #1d1808 70%); border: 1px solid #7c6413; box-shadow: inset 3px 0 0 #facc15, 0 6px 18px rgba(0,0,0,0.32); }   /* netcards1: solid too */
.nw-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nw-hero .nw-actions .btn-ghost { background: linear-gradient(180deg, #19213d, #0f1530); border-color: #2c3760; }   /* netcards1: no stars through it */

/* the stage: the same constellation as the card, bigger, three rings; the sky is the hero itself */
.nw-sky { position: relative; z-index: 4; width: 100%; max-width: 720px; justify-self: center; }
/* tipfix1 (01-11-2026, Mortimer: «estos tooltips son tapados por el texto de la izquierda»): while the card of a face is
   open, the sky goes over the text (same level, later in the page), so the card is never under it. */
.nw-sky:has(.an-tip:not([hidden])) { z-index: 5; }
.nw-sky .an-stage { margin: 0; }
.nw-sky .an-sky { inset: -6%; background: radial-gradient(closest-side, color-mix(in srgb, var(--an-c) 7%, transparent), transparent); }
.an-stage--whole .an-core { width: 19%; }
.an-stage--whole .an-lv { font-size: 0.95rem; }
.an-stage--whole .an-logo { width: 96%; }
.an-ring--far { stroke: rgba(255,255,255,0.07); stroke-dasharray: 1 9; }
.an-node--far .an-face { border-width: 1.5px; box-shadow: 0 0 8px color-mix(in srgb, var(--pc) 26%, transparent); }
.an-node--far .an-face img { opacity: 0.82; }
.an-node--far .an-plv { min-width: 17px; height: 17px; font-size: 0.75rem; padding: 0 2px; right: -24%; bottom: -24%; }
.an-stage--whole .an-tag { font-size: 0.75rem; }

/* ---------- Share the network ---------- */
.nw-share { position: relative; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 36px; align-items: center; margin: 28px 0 24px;
    padding: 26px 30px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--an-c) 26%, var(--line)); overflow: hidden;
    background: radial-gradient(520px 340px at 0% 50%, color-mix(in srgb, var(--an-c) 12%, transparent), transparent 70%), var(--panel); }
.nw-share::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--an-c), #d946ef, var(--orange)); }
.nw-share-pic { position: relative; aspect-ratio: 1080 / 1350; border-radius: 16px; overflow: hidden; background: #04040b;
    border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 24px 50px rgba(0,0,0,0.5), 0 0 40px color-mix(in srgb, var(--an-c) 18%, transparent);
    transform: rotate(-2deg); transition: transform 0.4s cubic-bezier(.2,.8,.2,1); }
.nw-share-pic:hover { transform: rotate(0deg) scale(1.02); }
.nw-share-pic canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; }
.nw-share-pic.is-ready canvas { opacity: 1; }
.nw-share-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    color: #cbd5e1; font-size: 0.88rem; font-weight: 700; }
.nw-share-pic.is-ready .nw-share-wait { display: none; }
.nw-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--an-c); animation: nw-spin 0.9s linear infinite; }
.nw-share-side h2 { margin: 0 0 10px; font-size: 1.6rem; font-weight: 900; line-height: 1.15; }
.nw-share-side > p { margin: 0 0 18px; color: #cbd5e1; font-size: 0.95rem; line-height: 1.55; max-width: 560px; }
.nw-share-side > p b { color: var(--an-c); }
.nw-share-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.nw-share-btns .btn[hidden] { display: none; }
.nw-share-btns .btn[disabled] { opacity: 0.55; cursor: progress; }
.nw-share-url { display: inline-flex; max-width: 100%; margin: 0 0 8px; }
.nw-share-url span { padding: 6px 12px; border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; color: #e2e8f0;
    background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-share-side .nw-share-note { margin: 0; color: #94a3b8; font-size: 0.82rem; }

/* ---------- How each one connects ---------- */
.nw-list { margin: 0 0 40px; }
.nw-list-head { margin-bottom: 18px; }
.nw-list-head h2 { margin: 0 0 6px; font-size: 1.6rem; font-weight: 900; }
.nw-list-head p { margin: 0; color: #94a3b8; font-size: 0.9rem; }
.nw-group { margin-bottom: 26px; }
.nw-group h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 1.08rem; font-weight: 900; }
.nw-group h3 small { color: #94a3b8; font-size: 0.82rem; font-weight: 700; }
.nw-people { --bal-cols: 4; --bal-gap: 14px; margin: 0; padding: 0; list-style: none; }
.nw-person { position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 14px 14px 16px; border-radius: 16px; color: #fff;
    background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 7%, transparent), transparent 60%), rgba(255,255,255,0.03);
    border: 1px solid color-mix(in srgb, var(--pc) 22%, var(--line)); transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.25s, box-shadow 0.25s; }
.nw-person:hover, .nw-person:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--pc) 60%, transparent);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35), 0 0 26px color-mix(in srgb, var(--pc) 22%, transparent); outline: none; }
.nw-person.is-you { border-color: rgba(250,204,21,0.6); }
.nw-person-head { display: flex; align-items: center; gap: 12px; }
.nw-face { position: relative; flex: none; width: 52px; height: 52px; }
.nw-face img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #0b0520; border: 2.5px solid var(--pc);
    box-shadow: 0 0 14px color-mix(in srgb, var(--pc) 40%, transparent); }
.nw-face .an-plv { right: -6px; bottom: -4px; min-width: 22px; height: 22px; }
.nw-person.is-you .nw-face img { border-color: #facc15; }
.nw-id { flex: 1; min-width: 0; }
.nw-id b { display: block; font-size: 1rem; font-weight: 900; color: var(--pc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-id small { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #94a3b8;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-go { flex: none; color: #64748b; font-weight: 900; transition: transform 0.25s, color 0.25s; }
.nw-person:hover .nw-go { color: var(--pc); transform: translateX(3px); }
.nw-flag { flex: none; padding: 2px 9px; border-radius: 99px; font-size: 0.75rem; font-weight: 900; color: #0b0520; background: #facc15; }
.nw-why { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.nw-why li { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; line-height: 1.3; color: #e2e8f0; }
.nw-ic { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 0.9rem; font-style: normal; line-height: 1;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); }
.nw-foot { margin: 6px 0 0; color: #64748b; font-size: 0.82rem; text-align: center; }

/* a face in the list lights its planet in the sky */
.an-stage.is-pick .an-node:not(.is-on) { opacity: 0.35; filter: saturate(0.5); }

@keyframes nw-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
    .nw-people { --bal-cols: 3; }
}
@media (max-width: 1000px) {
    /* one column: the sky right under the name, then the words (the intro's pieces join the hero's grid) */
    .nw-hero-in { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 34px 22px 26px; }
    .nw-intro { display: contents; }
    .nw-intro > * { position: relative; z-index: 5; order: 5; }
    .nw-intro > .nw-back { order: 1; justify-self: start; }
    .nw-intro > .nw-eyebrow { order: 2; }
    .nw-intro > h1 { order: 3; margin-bottom: 4px; }
    .nw-sky { max-width: 640px; order: 4; margin: 0 auto 14px; }
    .nw-orbits { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .nw-share { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 760px) {
    .nw-people { --bal-cols: 2; }
}
@media (max-width: 640px) {
    .nw-hero { margin: 14px 10px 0; border-radius: 20px; }
    .nw-hero-in { padding: 24px 14px 18px; }
    .nw-back { margin-bottom: 12px; }
    .nw-lead { font-size: 0.92rem; }
    .nw-orbits { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .nw-orbit { padding: 7px 12px; }
    .nw-actions .btn { flex: 1 1 100%; }
    .nw-why { gap: 5px; }
    .nw-why li { font-size: 0.84rem; }
    .nw-ic { width: 24px; height: 24px; font-size: 0.82rem; }
    .nw-person { padding: 12px 12px 14px; gap: 10px; }
    .nw-share { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; gap: 20px; }
    .nw-share-pic { max-width: 300px; justify-self: center; width: 100%; }
    .nw-share-btns .btn { flex: 1 1 100%; }
    .nw-people { --bal-cols: 1; }
    .an-stage--whole .an-node--out .an-plv { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .nw-share-pic, .nw-person, .nw-go { transition: none; }
    .nw-share-pic { transform: none; }
    .nw-spin { animation: none; }
}

/* ---------- net3 (01-11-2026): «Make a video», only for the owner and the superadmins (ape-network-video.js) ---------- */
.nw-video { position: relative; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 36px; align-items: center; margin: 0 0 24px;
    padding: 26px 30px; border-radius: 22px; border: 1px solid rgba(245,158,11,0.32); overflow: hidden;
    background: radial-gradient(520px 340px at 0% 50%, rgba(245,158,11,0.1), transparent 70%), var(--panel); }
.nw-video::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, #9945ff, #f59e0b, #14f195); }
.nw-vstage { position: relative; justify-self: center; width: 100%; max-width: 270px; aspect-ratio: 1080 / 1920; border-radius: 16px; overflow: hidden; background: #04040b;
    border: 1px solid rgba(245,158,11,0.4); box-shadow: 0 24px 50px rgba(0,0,0,0.5), 0 0 40px rgba(245,158,11,0.12); }
.nw-vstage[data-format="square"] { max-width: 300px; aspect-ratio: 1; }
.nw-vstage canvas, .nw-vstage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #04040b; }
.nw-vstage canvas { opacity: 0; transition: opacity 0.4s ease; }
.nw-vstage.is-ready canvas { opacity: 1; }
.nw-vstage.is-ready .nw-share-wait { display: none; }
.nw-vstage canvas[hidden], .nw-vstage video[hidden] { display: none; }
.nw-vfmts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 520px; margin: 0 0 16px; }
.nw-vfmt { position: relative; display: block; cursor: pointer; }
.nw-vfmt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.nw-vfmt > span { display: grid; justify-items: center; gap: 4px; height: 100%; padding: 14px 10px 12px; border-radius: 14px; text-align: center;
    background: rgba(255,255,255,0.035); border: 1px solid var(--line-strong); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.nw-vfmt b { font-size: 0.92rem; color: #fff; }
.nw-vfmt small { font-size: 0.75rem; color: #94a3b8; line-height: 1.35; }
.nw-vfmt:hover > span { border-color: rgba(245,158,11,0.5); }
.nw-vfmt input:checked + span { border-color: #f59e0b; background: linear-gradient(160deg, rgba(245,158,11,0.18), rgba(153,69,255,0.12));
    box-shadow: 0 0 0 1px rgba(245,158,11,0.35), 0 10px 26px -12px rgba(245,158,11,0.8); }
.nw-vfmt input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.nw-vshape { display: block; margin-bottom: 4px; border-radius: 5px; border: 2px solid currentColor; color: #cbd5e1; font-style: normal;
    background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0)); }
.nw-vshape--v { width: 22px; height: 38px; }
.nw-vshape--s { width: 32px; height: 32px; margin-top: 3px; margin-bottom: 7px; }
.nw-vfmt input:checked + span .nw-vshape { color: #fbbf24; }
.nw-video.is-busy .nw-vfmt { pointer-events: none; opacity: 0.6; }
.nw-video.is-busy [data-nw-vmake] { cursor: progress; }
.nw-vprog { display: grid; gap: 8px; max-width: 520px; margin: 0 0 12px; }
.nw-vprog[hidden], .nw-vmeta[hidden], .nw-verr[hidden] { display: none; }
.nw-vprog > i { display: block; height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.07); border: 1px solid var(--line); }
.nw-vprog > i > i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9945ff, #f59e0b, #14f195);
    background-size: 200% 100%; animation: nw-vrun 1.6s linear infinite; transition: width 0.25s; }
.nw-vprog span { font-size: 0.84rem; font-weight: 700; color: #e2e8f0; font-variant-numeric: tabular-nums; }
.nw-video .nw-share-side > .nw-vmeta { margin: 0 0 12px; font-size: 0.82rem; font-weight: 700; color: #cbd5e1; font-variant-numeric: tabular-nums; }
.nw-video .nw-share-side > .nw-verr { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 0.86rem; font-weight: 700; color: #fecaca;
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.45); max-width: 520px; }
@keyframes nw-vrun { to { background-position: -200% 0; } }
@media (max-width: 1000px) {
    .nw-video { grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 640px) {
    .nw-video { grid-template-columns: minmax(0, 1fr); padding: 20px 16px; gap: 20px; }
    .nw-vstage { max-width: 240px; }
    .nw-vfmts { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .nw-vprog > i > i { animation: none; transition: none; }
    .nw-vfmt > span, .nw-vstage canvas { transition: none; }
}
