/* Social screens: home feed, profiles, Networks and the shared action sheets.
   Every class here starts with so- so it never collides with the other screens.
   Colours come from the palette variables so everything dims with the player's lamp. */

/* ---------------------------------------------------------------- small shared bits */
.so-tag { color: var(--nc, var(--muted)); border-color: color-mix(in srgb, var(--nc, var(--muted)) 45%, transparent); background: color-mix(in srgb, var(--nc, var(--muted)) 10%, transparent); margin-left: 6px; flex: none; }
.so-chip-dim { color: var(--ember); border-color: color-mix(in srgb, var(--ember) 45%, transparent); background: color-mix(in srgb, var(--ember) 10%, transparent); }
.so-chip-dark { color: var(--muted); background: var(--deep); }
.so-t-dim { color: var(--ember); }
.so-t-dark { color: var(--faint); font-weight: 600; }
.so-inline { font-size: 13px; vertical-align: -2px; }
.so-inline .ic { width: 14px; height: 14px; }
.so-dot { color: var(--faint); margin: 0 6px; }
.so-name { background: none; border: 0; padding: 0; color: var(--text); font-weight: 700; text-align: left; min-width: 0; }
.so-pad { padding: 12px 12px calc(24px + var(--safe-b)); }
.so-danger-link { color: #ff7fb5; }
.btn.off { opacity: .42; pointer-events: none; }

/* ---------------------------------------------------------------- feed: tonight */
.so-feed { display: flex; flex-direction: column; gap: 14px; }
.so-tonight { padding: 14px 14px 12px; }
.so-tn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.so-tasks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.so-task { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--deep); color: var(--muted); padding: 6px 2px; }
.so-task-ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.so-task-name { font: 600 12px/1 var(--display); letter-spacing: .03em; }
.so-task.done { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 35%, transparent); background: color-mix(in srgb, var(--gold) 7%, var(--deep)); }
.so-task.done .so-task-ic { background: color-mix(in srgb, var(--gold) 16%, transparent); box-shadow: 0 0 12px -2px var(--glow); }
.so-task:active { filter: brightness(1.2); }
.so-tn-line { margin-top: 10px; color: var(--text); }
.so-relay { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }

/* ---------------------------------------------------------------- feed: calls for help */
.so-calls { display: flex; flex-direction: column; gap: 10px; }
.so-call { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; color: inherit; }
button.so-call { font: inherit; }
.so-call .h3 { margin-top: 1px; }
.so-call-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); }
.call-danger .so-call-ic { background: rgba(255, 46, 136, .12); color: #ff7fb5; }
.so-call-who { background: none; border: 0; padding: 2px 0 0; }
.so-call > .btn, .so-call > .btn-sm { align-self: center; }
.so-call-live { animation: so-pulse 1.8s ease-in-out infinite; }
@keyframes so-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 136, 0); } 50% { box-shadow: 0 0 22px -2px rgba(255, 46, 136, .45); } }

/* ---------------------------------------------------------------- feed: composer */
.so-compose { padding: 12px 0 4px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.so-compose-text { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; resize: none; color: var(--text); font-size: 16px; line-height: 1.4; padding: 6px 0; }
.so-compose-text:focus { outline: none; }
.so-compose-text::placeholder { color: var(--faint); }
.so-compose-bar { display: flex; align-items: center; gap: 10px; padding: 6px 0 8px 44px; }
.so-scope { padding: 2px; border-radius: 9px; }
.so-scope > button { min-height: 32px; padding: 0 12px; font-size: 13px; flex: none; }
.so-compose-bar .so-cc { flex: 1; text-align: right; }
.so-compose-bar > .btn { min-width: 72px; min-height: 40px; }

/* ---------------------------------------------------------------- feed: items */
.so-list { display: flex; flex-direction: column; }
.so-item { position: relative; display: flex; gap: 12px; padding: 14px 0 4px; border-bottom: 1px solid var(--line-soft); }
.so-item:last-child { border-bottom: 0; }
.so-item-main { flex: 1; min-width: 0; }
.so-fav { position: relative; flex: none; width: 44px; height: 44px; background: none; border: 0; padding: 0; }
.so-fav-to { position: absolute; right: -6px; bottom: -6px; border-radius: 50%; box-shadow: 0 0 0 3px var(--night); }
.so-fav-to .av-sm { width: 24px; height: 24px; }
.so-fav-k { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); box-shadow: 0 0 0 3px var(--night); }
.so-fav-k .ic { width: 13px; height: 13px; }
.so-fav-sys { display: grid; place-items: center; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.so-item-head { display: flex; align-items: center; min-width: 0; }
.so-item-head .so-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-post-text { margin-top: 3px; font-size: 16px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.so-sys-text { font-size: 15px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; padding-top: 1px; }
.so-sys-text b { color: var(--text); font-weight: 600; }
.so-meta { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.so-meta .so-tag { margin: 0 6px 0 0; }
.so-kind { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--display); letter-spacing: .03em; }
.so-kind .ic { width: 13px; height: 13px; }
.so-bar { display: flex; align-items: center; gap: 0; margin: 0 -8px 0 0; min-height: 40px; }
.so-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; height: 40px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: var(--faint); font-size: 13px; flex: none; }
.so-btn .ic { width: 18px; height: 18px; }
.so-btn .num:empty { display: none; }
.so-btn:active { background: var(--raised); }
.so-btn.on { color: var(--gold); }
.so-btn.on .ic { filter: drop-shadow(0 0 6px var(--glow)); }
.so-more { padding: 0; }
.so-older { margin-top: 6px; color: var(--muted); }

/* kinds */
.so-k-warm .so-kind, .so-k-warm .so-fav-k { color: var(--gold); }
.so-k-warm .so-sys-text b { color: var(--gold-pale); }
.so-k-cool .so-kind, .so-k-cool .so-fav-k { color: var(--cyan); }
.so-k-need .so-kind, .so-k-need .so-fav-k { color: var(--ember); }
.so-item-ln { position: absolute; right: 2px; top: 12px; width: 40px; filter: drop-shadow(0 0 10px var(--glow)); pointer-events: none; }
.so-has-ln .so-sys-text { padding-right: 50px; }
.so-item-ln .art { width: 40px; height: 52px; }
/* A relight is a rescue: the line lights up behind it. */
.so-k-rescue { background: radial-gradient(120% 90% at 0% 50%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 65%); }
.so-k-rescue::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 2px; background: var(--gold); box-shadow: 0 0 10px 1px var(--glow); border-radius: 2px; }
.so-k-rescue .so-kind { color: var(--gold); }
.so-k-rescue .so-sys-text { color: var(--text); }
.so-k-rescue .so-sys-text b { color: var(--gold-pale); }
.so-k-rescue .so-fav-to .av { box-shadow: 0 0 0 2px var(--gold), 0 0 12px var(--glow); }
/* A Hunt result reads like a headline. */
.so-k-headline { padding-top: 18px; }
.so-headline-kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font: 600 13px/1 var(--display); letter-spacing: .04em; color: var(--muted); }
.so-headline-kicker .so-tag { margin: 0 0 0 4px; }
.so-hl-ic { width: 18px; height: 18px; color: var(--gold); }
.so-headline { font: 700 22px/1.15 var(--display); letter-spacing: .005em; color: var(--text); overflow-wrap: anywhere; padding-right: 8px; }
.so-emptycity { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 28px 18px 18px; }
.so-ec-art { width: 120px; height: 150px; filter: drop-shadow(0 0 24px var(--glow)); }
.so-emptycity p { max-width: 300px; }

/* ---------------------------------------------------------------- sheets */
.so-who { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--deep); border: 1px solid var(--line-soft); }
.so-who-name { font: 700 18px/1.2 var(--display); letter-spacing: .01em; }
.so-trade { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.so-trade-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.so-trade-k { color: var(--muted); flex: none; }
.so-trade-v { text-align: right; min-width: 0; }
.so-trade-v .res { font-size: 14px; vertical-align: -2px; }
.so-trade-v .res .ic { width: 15px; height: 15px; }

.so-ln-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.so-ln-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; min-height: 84px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--deep); color: var(--text); }
.so-ln-opt .art { width: 34px; height: 48px; }
.so-ln-opt.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--deep)); box-shadow: 0 0 18px -6px var(--glow); }
.so-ln-opt.on .art { filter: drop-shadow(0 0 8px var(--glow)); }
.so-ln-opt.none { opacity: .35; }
.so-ln-opt.none .art { filter: grayscale(1); }
.so-ln-n { font-size: 13px; color: var(--muted); }
.so-ln-opt.on .so-ln-n { color: var(--gold); }
.so-ln-name { font: 700 16px/1.2 var(--display); display: flex; align-items: center; gap: 8px; margin-top: -4px; }
.so-count { text-align: right; font-style: normal; }
.so-empty-lantern { display: flex; gap: 14px; align-items: center; padding: 4px 0; }
.so-ln-ghost { width: 54px; height: 76px; opacity: .35; filter: grayscale(1); }

.so-drones { display: flex; align-items: center; gap: 8px; }
.so-drone { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--cyan) 12%, transparent); color: var(--cyan); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); }
.so-drone.out { background: var(--deep); color: var(--faint); border-color: var(--line-soft); }
.so-drones .muted { margin-left: 4px; }

.so-rl-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 2px; }
.so-rl-av { padding: 8px; }
.so-rl-go { min-height: 56px; font-size: 18px; }
.so-relit { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 4px; }
.so-relit-av { position: relative; padding: 14px; }
.so-relit-av .av { position: relative; z-index: 1; animation: so-ignite 1.4s cubic-bezier(.2, .8, .2, 1) both; }
.so-relit-glow { position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 62%); animation: so-bloom 1.6s ease-out both; }
@keyframes so-ignite { 0% { filter: grayscale(.9) brightness(.55); box-shadow: 0 0 0 2px var(--line); } 35% { filter: grayscale(.4) brightness(.9); } 100% { filter: none; box-shadow: 0 0 0 3px var(--gold), 0 0 34px 4px var(--glow); } }
@keyframes so-bloom { 0% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1.15); } 100% { opacity: .85; transform: scale(1); } }
.so-relit p { max-width: 290px; }
.so-relit .btn { margin-top: 6px; }

.so-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.so-preset { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border-radius: 12px; border: 1px solid var(--line); background: var(--deep); color: var(--text); }
.so-preset .num { font-size: 20px; }
.so-preset .tiny { color: var(--muted); }
.so-preset.on { border-color: var(--gold); color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--deep)); }
.so-preset.off { opacity: .35; pointer-events: none; }
.so-build { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--deep); color: var(--cyan); }
.so-build .h3 { color: var(--text); }

.so-reasons { display: flex; flex-direction: column; }
.so-reason { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px; background: none; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--text); text-align: left; }
.so-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.so-reason.on .so-radio { border-color: #ff7fb5; box-shadow: inset 0 0 0 4px var(--panel); background: #ff7fb5; }

.so-notes { display: flex; flex-direction: column; margin: 0 -4px; }
.so-note { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.so-note:last-child { border-bottom: 0; }
.so-note.new { background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 7%, transparent), transparent 70%); }
.so-note.new.warm { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 9%, transparent), transparent 70%); }
.so-note-av { position: relative; flex: none; width: 36px; height: 36px; background: none; border: 0; padding: 0; display: grid; place-items: center; }
.so-note-av .av-sm { width: 36px; height: 36px; }
.so-note-ic { position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); box-shadow: 0 0 0 2px var(--panel); }
.so-note-ic .ic { width: 12px; height: 12px; }
.so-note.warm .so-note-ic, .so-note.warm .so-note-sys { color: var(--gold); }
.so-note-sys { border-radius: 50%; background: var(--raised); color: var(--muted); }
.so-note-text { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }

.so-search { position: relative; }
.so-search > .ic { position: absolute; left: 13px; top: 13px; color: var(--faint); }
.so-search .input { padding-left: 42px; }
.so-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: -2px; }
.so-tabs::-webkit-scrollbar { display: none; }
.so-tab { min-height: 38px; padding: 0 4px; border-radius: 19px; font-size: 13px !important; white-space: nowrap; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 14px/1 var(--display); letter-spacing: .03em; }
.so-tab.on { background: var(--raised); color: var(--text); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.so-people { display: flex; flex-direction: column; }
.so-person, .so-mem { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line-soft); min-height: 64px; }
.so-person:last-child, .so-mem:last-child { border-bottom: 0; }
.so-person-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; background: none; border: 0; text-align: left; color: inherit; }
.so-person-main .row-title { display: flex; align-items: center; gap: 0; }
.so-quick { display: flex; gap: 0; flex: none; }
.so-q { width: 42px; height: 44px; color: var(--muted); }
.so-q:first-child { color: var(--gold); }
.so-q.off { opacity: .3; pointer-events: none; }

.so-invite { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 4px; }
.so-invite-flame { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); background: radial-gradient(circle, color-mix(in srgb, var(--gold) 22%, transparent), transparent 70%); }
.so-invite-flame .ic { width: 30px; height: 30px; filter: drop-shadow(0 0 10px var(--glow)); }
.so-code { font-size: 46px; letter-spacing: .16em; color: var(--gold-pale); text-shadow: 0 0 24px var(--glow); padding: 2px 0 4px; user-select: all; }
.so-invite p { max-width: 290px; }

.so-menu { display: flex; flex-direction: column; margin-top: -4px; }
.so-menu-i { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 4px; background: none; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 15px; text-align: left; }
.so-menu-i:last-child { border-bottom: 0; }
.so-menu-i .ic { color: var(--muted); }
.so-menu-i.danger { color: #ff7fb5; }
.so-menu-i.danger .ic { color: #ff7fb5; }

.so-cm-src { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--deep); }
.so-cm-src .small { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.so-comments { display: flex; flex-direction: column; flex: 1; }
.so-cm { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.so-cm > button:first-child { background: none; border: 0; padding: 0; }
.so-cm-text { font-size: 15px; margin-top: 2px; overflow-wrap: anywhere; }
.so-cm-compose { position: sticky; bottom: calc(-18px - var(--safe-b)); margin: auto -16px calc(-18px - var(--safe-b)); padding: 10px 16px calc(12px + var(--safe-b)); background: var(--panel); border-top: 1px solid var(--line-soft); display: flex; gap: 8px; }
.so-cm-compose .btn { width: 48px; padding: 0; flex: none; }
.so-cm-compose .btn-primary { min-height: 46px; }

/* ---------------------------------------------------------------- profile */
.so-prof { display: flex; flex-direction: column; }
.so-hero-sk { height: 300px; border-radius: 16px; }
.so-hero { position: relative; height: 320px; margin: -12px -12px 0; overflow: hidden; background: var(--deep); }
.so-hero-bg { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); aspect-ratio: auto; border-radius: 0; object-fit: cover; filter: blur(22px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.so-hero-img { position: absolute; left: 50%; top: 0; height: 100%; width: auto; aspect-ratio: 4 / 5; transform: translateX(-50%); border-radius: 0; object-fit: cover; background: transparent; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.so-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 11, 20, 0) 45%, rgba(7, 11, 20, .6) 70%, var(--night) 99%); }
.so-hero-text { position: absolute; left: 16px; right: 16px; bottom: 12px; }
.so-hero-chips { display: flex; gap: 6px; margin-bottom: 8px; }
.so-hero-name { font-size: 36px; line-height: 1; overflow-wrap: anywhere; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.so-hero-sub { margin-top: 6px; color: var(--muted); font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.so-netname { --nc: var(--muted); display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.so-netname > .ic { width: 16px; height: 16px; color: var(--nc); }
.so-netname .so-tag { margin-left: 2px; }
.so-light-dark .so-hero-img, .so-light-dark .so-hero-bg { filter: grayscale(.85) brightness(.55); }
.so-light-dim .so-hero-img { filter: saturate(.6) brightness(.8); }
.so-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.so-stats > div { text-align: center; border-left: 1px solid var(--line-soft); }
.so-stats > div:first-child { border-left: 0; }
.so-stat { font-size: 22px; line-height: 1.1; }
.so-bio { margin-top: 14px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.so-seen { margin-top: 8px; }
.so-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.so-rescue { padding: 14px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 60%), var(--panel); }
.so-rescue b { color: var(--text); }
.so-rescue .btn-lg { min-height: 54px; }
.so-act-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.so-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 66px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: 600 13px/1.1 var(--display); letter-spacing: .03em; text-align: center; }
.so-act .ic { width: 22px; height: 22px; color: var(--gold); }
.so-act-cyan .ic { color: var(--cyan); }
.so-act.off { opacity: .38; pointer-events: none; }
.so-act:active { filter: brightness(1.2); transform: translateY(1px); }
.so-dist { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.so-dist > span { display: inline-flex; align-items: center; gap: 5px; }
.so-dist .ic { width: 14px; height: 14px; }

.so-flame { display: flex; flex-direction: column; gap: 8px; }
.so-fl-chain { display: flex; align-items: center; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.so-fl-chain::-webkit-scrollbar { display: none; }
.so-fl-node { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; flex: none; background: none; border: 0; padding: 0; color: var(--text); font-size: 12px; }
.so-fl-node > span { max-width: 64px; }
.so-fl-node .av-sm { width: 40px; height: 40px; }
.so-fl-self .av { box-shadow: 0 0 0 2px var(--gold), 0 0 16px var(--glow); }
.so-fl-self { color: var(--gold-pale); font-weight: 700; }
.so-fl-link { flex: 1 0 14px; max-width: 40px; height: 2px; margin: 0 -6px 18px; background: linear-gradient(90deg, var(--ember), var(--gold)); box-shadow: 0 0 8px var(--glow); border-radius: 1px; }
.so-fl-down { display: flex; flex-wrap: wrap; gap: 6px 2px; }

.so-keepers { display: grid; grid-template-columns: repeat(auto-fill, 76px); gap: 10px; }
.so-keeper { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.so-keeper .portrait { border: 1px solid var(--line-soft); }
.so-keeper.on .portrait { border-color: var(--gold); box-shadow: 0 0 16px -4px var(--glow); }
.so-keeper-name { font: 600 13px/1.1 var(--display); max-width: 100%; }

.so-roof { position: relative; border-radius: var(--r); background: linear-gradient(180deg, #0a1020, var(--deep)); border: 1px solid var(--line-soft); overflow: hidden; padding-bottom: 12px; }
.so-roof-art { width: 100%; height: auto; aspect-ratio: 400 / 120; display: block; margin-bottom: -13%; }
.so-wall { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; padding: 0 8px; }
.so-wall > .so-hang { width: calc(25% - 4px); }
.so-hang { position: relative; display: flex; flex-direction: column; align-items: center; background: none; border: 0; padding: 0 0 4px; color: inherit; min-height: 96px; }
.so-string { width: 1px; height: calc(8px + var(--d, 0px)); background: linear-gradient(180deg, var(--line), var(--faint)); }
.so-hang-ln { width: 38px; height: 54px; filter: drop-shadow(0 0 12px var(--glow)); animation: so-sway 5s ease-in-out infinite; transform-origin: 50% 0; }
.so-hang:nth-child(2n) .so-hang-ln { animation-delay: -1.7s; }
.so-hang:nth-child(3n) .so-hang-ln { animation-delay: -3.1s; }
@keyframes so-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.so-hang-av { width: 22px; height: 22px; margin-top: 4px; box-shadow: 0 0 0 2px var(--deep); }
.so-hang-note { position: absolute; top: calc(14px + var(--d, 0px)); right: calc(50% - 26px); width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.so-roof-empty { padding: 18px 16px 6px; text-align: center; }
.so-wl { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0; }
.so-wl-art { width: 66px; height: 92px; filter: drop-shadow(0 0 20px var(--glow)); }
.so-wl-note { margin: 0; padding: 12px 16px; border-left: 2px solid var(--gold); background: var(--deep); border-radius: 0 10px 10px 0; font-size: 17px; line-height: 1.4; align-self: stretch; overflow-wrap: anywhere; }
.so-wl-from { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); font-size: 14px; min-height: 44px; }
.so-wl-from b { color: var(--text); }

/* ---------------------------------------------------------------- network */
.so-emblem { --nc: var(--gold); display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--nc); background: color-mix(in srgb, var(--nc) 12%, var(--deep)); border: 1px solid color-mix(in srgb, var(--nc) 40%, transparent); box-shadow: 0 0 18px -8px var(--nc); }
.so-emblem .ic { width: 26px; height: 26px; }
.so-emblem.sm { width: 30px; height: 30px; border-radius: 8px; }
.so-emblem.sm .ic { width: 18px; height: 18px; }
.so-emblem.lg { width: 64px; height: 64px; border-radius: 16px; }
.so-emblem.lg .ic { width: 38px; height: 38px; }
.so-nonet { padding: 18px 2px 4px; }
.so-nonet-ems { display: flex; gap: 6px; margin-bottom: 16px; }
.so-nonet .h1 { margin-bottom: 8px; }
.so-netlist { display: flex; flex-direction: column; gap: 10px; }
.so-netcard { --nc: var(--gold); display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-soft); border-left: 2px solid var(--nc); }
.so-netcard .h3 { min-width: 0; }
.so-netcard .so-tag { margin-left: 0; }
.so-netcard .btn { align-self: center; }
.so-blurb { margin-top: 6px; overflow-wrap: anywhere; color: var(--text); }
.so-nc-preview { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r); background: var(--deep); border: 1px solid var(--line-soft); }
.so-nc-preview .so-tag { margin: 4px 0 0; }
.so-nc-tag { text-transform: uppercase; letter-spacing: .12em; font-family: var(--display); font-weight: 700; }
.so-styles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.so-style { --nc: var(--gold); aspect-ratio: 1; min-height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--nc); background: var(--deep); border: 1px solid var(--line-soft); padding: 0; }
.so-style .ic { width: 22px; height: 22px; }
.so-style.on { border-color: var(--nc); background: color-mix(in srgb, var(--nc) 15%, var(--deep)); box-shadow: 0 0 14px -4px var(--nc); }
@media (max-width: 380px) { .so-styles { grid-template-columns: repeat(4, 1fr); } }

.so-netwrap { display: flex; flex-direction: column; }
.so-netwrap.so-fixed { height: 100%; }
.so-net-top { flex: none; padding: 12px 12px 0; display: flex; flex-direction: column; gap: 10px; }
.so-nethead { --nc: var(--gold); display: flex; align-items: center; gap: 12px; min-width: 0; }
.so-nethead .h2 { min-width: 0; }
.so-nethead .so-tag { margin-left: 0; }
.so-huntcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px 10px 12px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-soft); color: inherit; text-align: left; font: inherit; }
.so-huntcard > .grow { display: flex; flex-direction: column; gap: 2px; }
.so-hc-title { display: block; white-space: normal; overflow-wrap: anywhere; }
.so-hc-sub { display: block; line-height: 1.3; }
.so-hc-ic { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: var(--muted); }
.so-hc-ask { border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }
.so-hc-ask .so-hc-ic { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.so-hc-live { border-color: rgba(255, 46, 136, .55); background: linear-gradient(90deg, rgba(255, 46, 136, .12), transparent 70%), var(--panel); animation: so-pulse 1.8s ease-in-out infinite; }
.so-hc-live .so-hc-ic { color: #ff7fb5; background: rgba(255, 46, 136, .14); }
.so-huntcard .btn { flex: none; pointer-events: none; }
.so-netseg { margin-bottom: 2px; }
.so-netseg > button { font-size: 13px; padding: 0 4px; min-height: 40px; }

.so-chat { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.so-chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 8px 12px 8px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.so-chat-scroll::-webkit-scrollbar { width: 0; }
.so-chat-start { text-align: center; padding: 12px 20px 14px; margin-top: auto; }
.so-chat-empty { margin-top: auto; }
.so-sysmsg { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--faint); font-size: 12px; text-align: center; }
.so-sysmsg::before, .so-sysmsg::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.so-sysmsg > span { max-width: 78%; overflow-wrap: anywhere; }
.so-msg { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.so-msg.cont { margin-top: 2px; }
.so-msg-av { background: none; border: 0; padding: 2px 0 0; flex: none; }
.so-msg-gap { width: 32px; flex: none; }
.so-msg-body { min-width: 0; max-width: 82%; display: flex; flex-direction: column; align-items: flex-start; }
.so-msg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; min-width: 0; }
.so-msg-head .so-name { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-msg-head .so-tag { margin: 0; font-size: 10px; }
.so-bubble { padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--raised); font-size: 15px; line-height: 1.38; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; -webkit-touch-callout: none; }
.so-msg.cont .so-bubble { border-radius: 14px; }
.so-msg.mine { justify-content: flex-end; }
.so-msg.mine .so-msg-body { align-items: flex-end; }
.so-msg.mine .so-bubble { background: color-mix(in srgb, var(--gold) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); border-radius: 14px 4px 14px 14px; }
.so-msg.mine.cont .so-bubble { border-radius: 14px; }
.so-msg.sel .so-bubble { box-shadow: 0 0 0 1px var(--cyan); }
.so-msg-tools { display: flex; gap: 16px; padding: 6px 4px 0; }
.so-msg-tools .linkbtn { min-height: 32px; }
.so-newpill { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid color-mix(in srgb, var(--cyan) 50%, transparent); background: var(--raised); color: var(--cyan); font: 600 13px/1 var(--display); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 2; }
.so-newpill .ic { width: 16px; height: 16px; }
.so-chat-compose { flex: none; display: flex; gap: 8px; padding: 8px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line-soft); background: var(--night); }
.so-chat-compose .input { min-height: 46px; border-radius: 23px; padding: 0 16px; }
.so-chat-compose .btn { width: 48px; min-height: 46px; padding: 0; flex: none; }

.so-members { padding-top: 6px; }
.so-mem-sum { padding: 4px 2px 6px; }
.so-role { height: 22px; padding: 0 7px; margin-left: 6px; font-size: 11px; }
.so-role .ic { width: 12px; height: 12px; }
.so-mem .row-title { display: flex; align-items: center; gap: 6px; }
.so-mem .row-title .so-role { margin-left: 0; }

