/* ══════════════════════════════════════════════════════════
   TVKit Sosyal — hesaplar, liste, arkadaşlık, sohbet
   ══════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }

body {
    transition: background-color .4s var(--ease), color .4s var(--ease);
}

/* ───────────────────────── HEADER ACCOUNT ───────────────────────── */

.tk-tab--social {
    position: relative;
}

.tk-tab-dot {
    position: absolute;
    top: 5px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--warm);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg) 70%, transparent);
    animation: dotPulse 2.4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: .7; }
}

.tk-account-wrap {
    position: relative;
    flex-shrink: 0;
}

.tk-account {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 4px 13px 4px 5px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-soft);
    transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}

.tk-account:hover {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--accent) 60%, transparent);
}

.tk-account:active { transform: translateY(0) scale(.985); }

.tk-account-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    transition: background .25s var(--ease), color .25s var(--ease);
}

.tk-account-avatar-ico { width: 17px; height: 17px; }

.tk-account-avatar.has-user {
    background: linear-gradient(145deg, hsl(var(--av-h, 168) 48% 63%), hsl(calc(var(--av-h, 168) + 28) 45% 45%));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.tk-account-avatar.has-user .tk-account-avatar-ico { display: none; }

.tk-account-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
}

.tk-account-name {
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-account-sub {
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: .01em;
}

.tk-badge--account {
    top: -4px;
    right: -3px;
    background: var(--warm);
    box-shadow: 0 0 0 3px var(--bg);
}

.tk-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 80;
    width: 244px;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
    box-shadow: 0 26px 60px -20px rgba(20, 24, 23, .34);
    opacity: 0;
    transform: translateY(-8px) scale(.97);
    transform-origin: top right;
    transition: opacity .2s var(--ease), transform .26s cubic-bezier(.16, 1, .3, 1);
}

.tk-account-menu.is-open {
    opacity: 1;
    transform: none;
}

.tk-account-menu-head {
    padding: 9px 10px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
}

.tk-account-menu-head strong {
    display: block;
    font-size: 13.5px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-account-menu-head span {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--muted);
}

.tk-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-soft);
    font-size: 13.5px;
    font-weight: 550;
    text-align: left;
    transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}

.tk-menu-item:hover {
    background: var(--surface-soft);
    color: var(--text);
    transform: translateX(2px);
}

.tk-menu-item svg { width: 17px; height: 17px; opacity: .8; flex-shrink: 0; }

.tk-menu-item.is-danger { color: var(--danger); }
.tk-menu-item.is-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

.tk-menu-count {
    margin-left: auto;
    min-width: 20px;
    height: 19px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
}

.tk-menu-sep {
    height: 1px;
    margin: 6px 4px;
    background: var(--line-soft);
}

/* ───────────────────────── SHARED SOCIAL PIECES ───────────────────────── */

.social-avatar {
    --av-size: 40px;
    position: relative;
    display: inline-grid;
    place-items: center;
    width: var(--av-size);
    height: var(--av-size);
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, hsl(var(--av-h, 168) 48% 63%), hsl(calc(var(--av-h, 168) + 28) 45% 45%));
    color: #fff;
    font-size: calc(var(--av-size) * .36);
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    user-select: none;
}

.social-avatar--lg { --av-size: 54px; border-radius: 18px; }
.social-avatar--xl { --av-size: 64px; border-radius: 22px; }

.social-avatar.is-online::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #42b98a;
    border: 2.5px solid var(--surface);
}

.social-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.social-kicker::before {
    content: "";
    width: 22px;
    height: 1.5px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

.social-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}

.social-ghost-btn svg { width: 14px; height: 14px; }
.social-ghost-btn:hover {
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    transform: translateY(-1px);
}
.social-ghost-btn--sm { padding: 6px 11px; font-size: 11.5px; }
.social-ghost-btn:disabled { opacity: .55; pointer-events: none; }
.social-ghost-btn.is-busy svg { animation: spin .8s linear infinite; }

.social-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--accent-ink);
    font-weight: 650;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.social-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #42b98a;
    box-shadow: 0 0 0 0 rgba(66, 185, 138, .45);
    animation: pulseRing 2.2s ease-out infinite;
    flex-shrink: 0;
}

@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(66, 185, 138, .4); }
    70% { box-shadow: 0 0 0 7px rgba(66, 185, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 185, 138, 0); }
}

.social-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 7px;
    padding: 54px 26px;
    border: 1px dashed color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface-soft) 55%, transparent);
    color: var(--muted);
    animation: socialRise .4s var(--ease);
}

.social-empty-ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 19px;
    margin-bottom: 3px;
}

.social-empty h3 { font-size: 16px; color: var(--text); }
.social-empty p { font-size: 13px; max-width: 340px; line-height: 1.55; }
.social-empty .btn-soft { margin-top: 10px; padding: 8px 18px; font-size: 12.5px; }

.social-inline-empty {
    padding: 16px 2px;
    font-size: 12.5px;
    color: var(--muted);
}

/* ───────────────────────── BOOT / GUEST ───────────────────────── */

.social-boot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 46vh;
    color: var(--muted);
    font-size: 13.5px;
}

.tk-ring--accent {
    border-color: color-mix(in srgb, var(--accent) 18%, transparent);
    border-top-color: var(--accent);
}

.social-guest {
    position: relative;
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 30px;
    align-items: center;
    max-width: 1120px;
    margin: 10px auto;
    padding: 56px 52px;
    border-radius: 32px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(760px 420px at 12% 8%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%),
        radial-gradient(660px 400px at 92% 96%, color-mix(in srgb, var(--warm) 10%, transparent), transparent 60%),
        color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 40px 100px -48px rgba(25, 34, 32, .35);
    overflow: hidden;
    animation: socialRise .6s var(--ease);
}

.social-guest-art {
    position: relative;
    height: 360px;
    border-radius: 26px;
    background:
        radial-gradient(420px 300px at 30% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%),
        radial-gradient(360px 300px at 82% 88%, color-mix(in srgb, var(--warm) 26%, transparent), transparent 66%),
        linear-gradient(150deg, #10201e, #17342f 55%, #233c34);
    overflow: hidden;
    isolation: isolate;
}

.guest-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .55;
    animation: orbFloat 12s ease-in-out infinite;
}

.guest-orb--a {
    width: 180px;
    height: 180px;
    top: -30px;
    right: -40px;
    background: radial-gradient(circle at 30% 30%, rgba(137, 224, 205, .8), transparent 68%);
}

.guest-orb--b {
    width: 150px;
    height: 150px;
    bottom: -20px;
    left: -30px;
    background: radial-gradient(circle at 60% 40%, rgba(226, 174, 105, .65), transparent 66%);
    animation-delay: -4s;
}

.guest-orb--c {
    width: 90px;
    height: 90px;
    top: 46%;
    left: 30%;
    background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .5), transparent 70%);
    opacity: .25;
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(8px, -14px, 0) scale(1.06); }
}

.guest-ring {
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, .16);
    animation: slowSpin 44s linear infinite;
}

@keyframes slowSpin { to { transform: rotate(360deg); } }

.guest-avatars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.guest-avatars .social-avatar {
    box-shadow: 0 22px 42px -16px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .25);
    animation: avatarFloat 7s ease-in-out infinite;
}

.guest-avatars .social-avatar:nth-child(2) { animation-delay: -2.3s; }
.guest-avatars .social-avatar:nth-child(3) { animation-delay: -4.6s; }

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.social-guest-body h2 {
    margin: 12px 0 12px;
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.03em;
    font-weight: 750;
}

.social-guest-body h2 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--accent), color-mix(in srgb, var(--warm) 70%, var(--accent)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.social-guest-body > p {
    max-width: 480px;
    color: var(--text-soft);
    font-size: 14.5px;
    line-height: 1.65;
}

.social-perks {
    list-style: none;
    display: grid;
    gap: 13px;
    margin: 24px 0 28px;
    padding: 0;
}

.social-perks li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.perk-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    color: var(--accent-ink);
    font-size: 14px;
}

.social-perks strong { display: block; font-size: 13.5px; font-weight: 650; }
.social-perks small { display: block; margin-top: 2px; font-size: 12.3px; line-height: 1.45; color: var(--muted); }

.social-guest-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.social-guest-actions .btn-primary, .social-guest-actions .btn-glass { padding: 12px 24px; font-size: 14px; }
.social-guest-actions .btn-glass {
    color: var(--text);
    background: var(--surface-soft);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.social-guest-actions .btn-glass:hover {
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

/* ───────────────────────── APP LAYOUT ───────────────────────── */

.social-app {
    display: grid;
    grid-template-columns: 246px minmax(0, 1fr) 288px;
    gap: 22px;
    align-items: start;
    padding-bottom: 20px;
    animation: socialFade .5s var(--ease);
}

.social-rail {
    position: sticky;
    top: calc(var(--header-h) + 18px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-me {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 16px;
    border-radius: 24px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(280px 180px at 8% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.social-me-id { min-width: 0; }
.social-me-id strong {
    display: block;
    font-size: 14.5px;
    letter-spacing: -.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.social-me-id span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.social-me-edit {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
    color: var(--muted);
    transition: color .18s, background .18s, transform .18s;
}

.social-me-edit svg { width: 14px; height: 14px; }
.social-me-edit:hover { color: var(--accent-ink); background: var(--accent-soft); transform: rotate(-4deg); }

.social-me-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.social-me-stats span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.social-me-stats b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.social-me-stats small { font-size: 10.5px; color: var(--muted); }

.social-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.social-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--text-soft);
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.social-nav-item svg { width: 18px; height: 18px; opacity: .75; flex-shrink: 0; }
.social-nav-item:hover { background: var(--surface-soft); color: var(--text); }
.social-nav-item.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.social-nav-item.is-active svg { opacity: 1; }

.social-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 50%;
    width: 3px;
    height: 18px;
    border-radius: 3px;
    background: var(--accent);
    transform: translateY(-50%);
    animation: navBar .3s var(--ease);
}

@keyframes navBar { from { height: 0; opacity: 0; } to { height: 18px; opacity: 1; } }

.social-nav-badge {
    margin-left: auto;
    min-width: 19px;
    height: 18px;
    padding: 0 6px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

#navFriendBadge { background: var(--warm); }

.social-rail-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 11.5px;
    color: var(--muted);
}

.social-main { min-width: 0; }

.social-panel {
    display: none;
    padding: 22px;
    border-radius: 26px;
    border: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-sm);
}

.social-panel.is-active {
    display: block;
    animation: panelSwap .38s var(--ease);
}

@keyframes panelSwap {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.social-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.social-panel-head h2 { font-size: 22px; letter-spacing: -.025em; }

.social-panel-head p {
    margin-top: 3px;
    font-size: 12.8px;
    color: var(--muted);
}

/* ───────────────────────── FEED ───────────────────────── */

.social-composer {
    display: flex;
    gap: 12px;
    padding: 15px;
    margin-bottom: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    transition: border-color .2s, box-shadow .25s, background .2s;
}

.social-composer:focus-within {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent);
}

.social-composer-main { flex: 1; min-width: 0; }

.social-composer textarea,
.chat-form textarea {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 14px;
    line-height: 1.55;
    padding: 4px 2px;
    max-height: 160px;
    color: var(--text);
}

.social-composer textarea::placeholder,
.chat-form textarea::placeholder { color: var(--muted); }

.social-composer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 9px;
    border-top: 1px solid var(--line-soft);
}

.social-composer-hint { font-size: 10.8px; color: var(--muted); }

.social-post-btn {
    padding: 8px 20px;
    font-size: 12.8px;
    border-radius: 999px;
}

.social-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-post,
.social-activity {
    position: relative;
    padding: 16px 17px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    animation: socialRise .42s var(--ease) backwards;
    transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}

.social-post:hover,
.social-activity:hover {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
    box-shadow: 0 16px 34px -24px rgba(28, 38, 35, .35);
    transform: translateY(-1px);
}

@keyframes socialRise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.post-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.post-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
}

.post-user-id { min-width: 0; }
.post-user-id strong {
    display: block;
    font-size: 13.5px;
    font-weight: 650;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-user-id span { display: block; font-size: 11px; color: var(--muted); }

.post-time {
    margin-left: auto;
    font-size: 10.8px;
    color: var(--muted);
    white-space: nowrap;
}

.post-del {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    opacity: .7;
    transition: color .18s, background .18s, opacity .18s;
}

.post-del svg { width: 14px; height: 14px; }
.post-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); opacity: 1; }
.post-del.is-confirm {
    color: #fff;
    background: var(--danger);
    opacity: 1;
    animation: confirmPulse .9s ease-in-out infinite;
}

.post-body {
    font-size: 14px;
    line-height: 1.62;
    color: var(--text-soft);
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0 2px;
}

.post-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.post-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    transition: background .18s, color .18s, transform .18s;
}

.post-action svg { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.post-action:hover { background: var(--surface-soft); color: var(--text); }
.post-action.is-liked { color: #c2544a; }
.post-action.is-liked svg { fill: currentColor; transform: scale(1.08); }
.post-action:active svg { transform: scale(.86); }

.post-like-pop { animation: likePop .4s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes likePop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1.08); } }

.social-activity {
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

.activity-main { flex: 1; min-width: 0; }

.activity-line {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-soft);
}

.activity-line b { color: var(--text); font-weight: 650; }

.activity-time { display: block; margin-top: 2px; font-size: 10.8px; color: var(--muted); }

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 9px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface-soft);
    text-align: left;
    transition: background .18s, border-color .18s, transform .18s;
}

.activity-item:hover {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
    transform: translateX(2px);
}

.activity-thumb {
    display: grid;
    place-items: center;
    width: 38px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 9px;
    background: color-mix(in srgb, var(--accent) 15%, var(--surface));
    color: var(--accent-ink);
    overflow: hidden;
}

.activity-thumb img { width: 100%; height: 100%; object-fit: cover; }
.activity-thumb span { font-size: 15px; }
.activity-copy { min-width: 0; }
.activity-copy strong {
    display: block;
    font-size: 12.8px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.activity-copy small { font-size: 10.5px; color: var(--muted); }

.social-skeleton {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
}

.sk-line {
    height: 11px;
    border-radius: 6px;
    background: linear-gradient(100deg, var(--line-soft) 30%, var(--surface-soft) 50%, var(--line-soft) 70%);
    background-size: 240% 100%;
    animation: shimmer 1.3s linear infinite;
    margin-top: 9px;
}

.sk-line--sm { width: 42%; height: 9px; }
.sk-line--head { width: 30%; height: 13px; margin-top: 0; }

@keyframes shimmer {
    from { background-position: 140% 0; }
    to { background-position: -80% 0; }
}

/* ───────────────────────── DISCOVER / USER ROWS ───────────────────────── */

.social-searchbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 46px;
    padding: 0 15px;
    margin-bottom: 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    transition: border-color .18s, box-shadow .22s, background .18s;
}

.social-searchbox:focus-within {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.social-searchbox svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }

.social-searchbox input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 13.5px;
}

.social-searchbox input::placeholder { color: var(--muted); }
.social-searchbox input::-webkit-search-cancel-button { display: none; }

.social-search-clear {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: var(--line);
    color: var(--text-soft);
    font-size: 14px;
}

.social-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.social-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    animation: socialRise .42s var(--ease) backwards;
    transition: border-color .2s, box-shadow .25s, transform .2s;
}

.social-user-card:hover {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
    box-shadow: 0 16px 34px -24px rgba(28, 38, 35, .35);
    transform: translateY(-2px);
}

.user-card-main {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    padding: 0;
    text-align: left;
}

.user-card-id { min-width: 0; }
.user-card-id strong {
    display: block;
    font-size: 13.2px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-card-id span { display: block; font-size: 11px; color: var(--muted); }
.user-card-id small {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 9.8px;
    font-weight: 650;
    letter-spacing: .03em;
}

.user-card-actions { display: flex; gap: 6px; align-items: center; }

.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 11.3px;
    font-weight: 650;
    white-space: nowrap;
    transition: background .17s, color .17s, border-color .17s, transform .17s;
}

.mini-btn svg { width: 13px; height: 13px; }
.mini-btn:hover {
    color: var(--accent-ink);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
    transform: translateY(-1px);
}

.mini-btn--solid {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    border-color: transparent;
    color: #fff;
}

.mini-btn--solid:hover { color: #fff; filter: brightness(1.04); background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
.mini-btn--muted { background: var(--surface-soft); color: var(--muted); pointer-events: none; }
[data-theme="dark"] .mini-btn--solid { color: #10201d; }
.mini-btn--danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.mini-btn.is-confirm {
    color: #fff;
    background: var(--danger);
    border-color: transparent;
    animation: confirmPulse .9s ease-in-out infinite;
}
[data-theme="dark"] .mini-btn.is-confirm { color: #1a0f0d; }

@keyframes confirmPulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 38%, transparent); }
    50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 0%, transparent); }
}

.social-block { margin-bottom: 24px; }
.social-block:last-child { margin-bottom: 0; }

.social-block-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.social-block-head h3 { font-size: 13.5px; letter-spacing: -.01em; }

.social-count-pill {
    min-width: 20px;
    height: 19px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--bg-tint);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
}

.social-user-list { display: flex; flex-direction: column; gap: 8px; }

.social-user-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    animation: socialRise .4s var(--ease) backwards;
    transition: border-color .2s, background .2s;
}

.social-user-row:hover {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
    background: color-mix(in srgb, var(--surface) 70%, var(--accent-soft));
}

.user-row-main {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
}

.user-row-id { min-width: 0; }
.user-row-id strong {
    display: block;
    font-size: 13px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-row-id span { display: block; font-size: 11px; color: var(--muted); }

.user-row-actions { display: flex; gap: 6px; align-items: center; }

/* ───────────────────────── CHAT ───────────────────────── */

.social-panel[data-social-panel="messages"] {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.social-chat {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    height: min(760px, calc(100dvh - var(--header-h) - 52px));
    min-height: 520px;
    border-radius: 26px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.chat-list-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
}

.chat-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 16px 12px;
}

.chat-list-head h2 { font-size: 18px; letter-spacing: -.02em; }

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 2px 8px 12px;
    scrollbar-width: thin;
}

.chat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    text-align: left;
    transition: background .16s var(--ease);
}

.chat-row:hover { background: var(--surface); }
.chat-row.is-active { background: var(--accent-soft); }

.chat-row-id { flex: 1; min-width: 0; }
.chat-row-id strong {
    display: block;
    font-size: 12.8px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-row-id span {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-row-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.chat-row-time { font-size: 9.8px; color: var(--muted); }

.chat-unread {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.chat-list-empty {
    padding: 34px 22px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.chat-list-empty .social-empty-ico { margin: 0 auto 8px; }

.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    background:
        radial-gradient(420px 280px at 70% 18%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 68%),
        transparent;
}

.chat-placeholder-art {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 6px;
    border-radius: 20px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 22px;
    animation: avatarFloat 5s ease-in-out infinite;
}

.chat-placeholder h3 { font-size: 16px; color: var(--text); }
.chat-placeholder p { font-size: 12.8px; max-width: 280px; line-height: 1.55; }

.chat-conversation { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.chat-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
}

.chat-back {
    display: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-soft);
}

.chat-back svg { width: 16px; height: 16px; }

.chat-head-id { flex: 1; min-width: 0; }
.chat-head-id strong { display: block; font-size: 13.8px; font-weight: 650; }
.chat-head-id span { display: block; font-size: 11px; color: var(--muted); }
.chat-head-id span.is-online { color: #2f9c74; }

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background:
        radial-gradient(420px 300px at 88% 4%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 66%),
        transparent;
    scrollbar-width: thin;
}

.chat-day {
    align-self: center;
    margin: 6px 0;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.chat-bubble {
    max-width: 74%;
    padding: 9px 13px;
    border-radius: 17px;
    font-size: 13.2px;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
    animation: bubbleIn .26s var(--ease);
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(5px) scale(.985); }
    to { opacity: 1; transform: none; }
}

.chat-bubble time {
    display: block;
    margin-top: 3px;
    font-size: 9.5px;
    opacity: .62;
    text-align: right;
}

.chat-bubble--in {
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    color: var(--text);
}

.chat-bubble--out {
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}

[data-theme="dark"] .chat-bubble--out { color: #0e211e; }

.chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 10px 13px;
    border-radius: 16px;
    background: var(--surface-soft);
}

.chat-typing i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--muted);
    animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 11px 13px;
    border-top: 1px solid var(--line-soft);
    background: var(--surface);
}

.chat-form textarea {
    flex: 1;
    min-height: 38px;
    max-height: 120px;
    padding: 9px 13px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: 13px;
    transition: border-color .18s, box-shadow .2s, background .18s;
}

.chat-form textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
}

.chat-send {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent);
    transition: transform .18s var(--ease), filter .18s;
}

.chat-send svg { width: 17px; height: 17px; }
.chat-send:hover { transform: translateY(-1px) scale(1.03); filter: brightness(1.05); }
.chat-send:active { transform: scale(.94); }
.chat-send:disabled { opacity: .5; pointer-events: none; }
[data-theme="dark"] .chat-send { color: #0e211e; }

/* ───────────────────────── LIBRARY ───────────────────────── */

.social-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
    gap: 14px 12px;
}

.social-lib-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: left;
    border: 0;
    padding: 0;
    background: none;
    animation: socialRise .42s var(--ease) backwards;
}

.social-lib-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--surface-soft), var(--bg-tint));
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-sm);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s;
}

.social-lib-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.social-lib-poster span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 24px;
    color: var(--accent-ink);
}

.social-lib-card:hover .social-lib-poster {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px -20px rgba(25, 34, 32, .45);
}

.social-lib-card:hover .social-lib-poster img { transform: scale(1.045); }

.social-lib-open { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }

.social-lib-remove {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 0;
    border-radius: 9px;
    background: rgba(12, 18, 17, .55);
    color: #fff;
    opacity: 0;
    transform: translateY(-4px);
    backdrop-filter: blur(6px);
    transition: opacity .18s, transform .18s, background .18s;
}

.social-lib-card:hover .social-lib-remove { opacity: 1; transform: none; }
.social-lib-remove:hover { background: color-mix(in srgb, var(--danger) 80%, #000); }
.social-lib-remove.is-confirm {
    opacity: 1;
    transform: none;
    background: var(--danger);
    animation: confirmPulse .9s ease-in-out infinite;
}
.social-lib-remove svg { width: 13px; height: 13px; }

.social-lib-kind {
    position: absolute;
    left: 7px;
    bottom: 7px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(12, 18, 17, .55);
    color: #fff;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: .05em;
    backdrop-filter: blur(6px);
    pointer-events: none;
}

.social-lib-title {
    font-size: 12.3px;
    font-weight: 620;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-lib-sub { font-size: 10.5px; color: var(--muted); margin-top: -3px; }

/* ───────────────────────── ASIDE ───────────────────────── */

.social-aside {
    position: sticky;
    top: calc(var(--header-h) + 18px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-side-card {
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow-sm);
}

.social-side-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
}

.social-side-head h3, .social-side-card > h3 {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .01em;
}

.social-side-head h3 { margin-right: auto; }

.social-online-list, .social-suggest-list { display: flex; flex-direction: column; gap: 2px; }

.side-user {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 7px 6px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    transition: background .16s;
}

.side-user:hover { background: var(--surface-soft); }
.side-user div { min-width: 0; }
.side-user strong {
    display: block;
    font-size: 12px;
    font-weight: 620;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.side-user span { display: block; font-size: 10px; color: var(--muted); }

.side-user .mini-btn { margin-left: auto; padding: 4px 8px; font-size: 10px; }

.social-side-card--invite {
    background:
        radial-gradient(240px 160px at 90% 0%, color-mix(in srgb, var(--warm) 16%, transparent), transparent 70%),
        var(--surface);
}

.social-side-card--invite p { margin: 5px 0 12px; font-size: 11.8px; color: var(--muted); line-height: 1.5; }
.social-invite-btn { padding: 7px 14px; font-size: 11.8px; width: 100%; justify-content: center; }

/* ───────────────────────── AUTH MODAL ───────────────────────── */

.auth-card {
    grid-template-columns: 1.04fr .96fr;
    display: grid;
    width: min(920px, 100%);
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: hidden auto;
    overscroll-behavior: contain;
    border-radius: 30px;
}

.auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 38px;
    color: rgba(255, 255, 255, .92);
    background:
        radial-gradient(500px 380px at 20% 12%, rgba(118, 214, 194, .38), transparent 64%),
        radial-gradient(420px 340px at 92% 96%, rgba(226, 174, 105, .3), transparent 66%),
        linear-gradient(160deg, #10201e, #17342f 58%, #1f3a31);
    overflow: hidden;
    isolation: isolate;
}

.auth-art-badge {
    position: relative;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.auth-art h2 {
    position: relative;
    margin: 18px 0 12px;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
    letter-spacing: -.03em;
}

.auth-art h2 em {
    font-style: normal;
    background: linear-gradient(100deg, #9fe8d8, #f0c98c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-art-desc { position: relative; font-size: 13.5px; line-height: 1.6; color: rgba(255, 255, 255, .68); max-width: 320px; }

.auth-perks {
    position: relative;
    list-style: none;
    display: grid;
    gap: 11px;
    margin: 26px 0 0;
    padding: 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .78);
}

.auth-perks li { display: flex; align-items: center; gap: 10px; }
.auth-perks span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 11px;
    color: #a9e3d8;
}

.auth-art-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    right: -110px;
    bottom: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 216, 197, .32), transparent 68%);
    filter: blur(8px);
    animation: orbFloat 11s ease-in-out infinite;
    z-index: -1;
}

.auth-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 38px;
    background: var(--surface);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 24px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.auth-tab {
    flex: 1;
    padding: 9px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    transition: background .22s var(--ease), color .22s var(--ease), box-shadow .22s;
}

.auth-tab.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 3px 10px -4px rgba(30, 34, 32, .25);
}

.auth-form { display: flex; flex-direction: column; gap: 13px; }

.auth-fields { display: flex; flex-direction: column; gap: 13px; }

.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }

.auth-field > span {
    font-size: 11.5px;
    font-weight: 650;
    color: var(--text-soft);
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.auth-field > span small { font-weight: 500; color: var(--muted); font-size: 10.5px; }

.auth-field input,
.auth-field textarea {
    width: 100%;
    padding: 11px 13px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    transition: border-color .18s, box-shadow .22s, background .18s;
}

.auth-field textarea { resize: vertical; min-height: 74px; }

.auth-field input:focus,
.auth-field textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.auth-field input::placeholder,
.auth-field textarea::placeholder { color: var(--muted); }

.auth-genres { display: flex; flex-wrap: wrap; gap: 6px; }

.genre-chip {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 11.3px;
    font-weight: 600;
    transition: background .18s, color .18s, border-color .18s, transform .18s;
}

.genre-chip:hover { transform: translateY(-1px); }
.genre-chip.is-active {
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.auth-accents { display: flex; gap: 8px; flex-wrap: wrap; }

.accent-dot {
    --av-h: 168;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(145deg, hsl(var(--av-h) 48% 63%), hsl(calc(var(--av-h) + 28) 45% 45%));
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
}

.accent-dot:hover { transform: scale(1.1); }
.accent-dot.is-active {
    border-color: var(--surface);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 10px rgba(0, 0, 0, .16);
    transform: scale(1.06);
}

.auth-error {
    padding: 9px 12px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--danger) 11%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
    color: var(--danger);
    font-size: 12px;
    line-height: 1.45;
    animation: shakeIn .34s var(--ease);
}

@keyframes shakeIn {
    0% { transform: translateX(0); }
    24% { transform: translateX(-5px); }
    48% { transform: translateX(4px); }
    72% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.auth-submit { justify-content: center; width: 100%; padding: 12px; font-size: 13.5px; margin-top: 3px; }

.auth-switch {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.auth-switch button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--accent-ink);
    font-weight: 650;
    font-size: inherit;
}

.auth-submit.is-loading { pointer-events: none; opacity: .75; }

/* ───────────────────────── PROFILE EDIT ───────────────────────── */

.profile-edit-card {
    width: min(520px, 100%);
    padding: 28px;
}

.profile-edit-card h2 { font-size: 20px; letter-spacing: -.02em; margin-bottom: 16px; }

.profile-edit-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.profile-edit-head strong { display: block; font-size: 13.5px; }
.profile-edit-head p { margin-top: 2px; font-size: 11.5px; color: var(--muted); }

.profile-form { display: flex; flex-direction: column; gap: 13px; }

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 4px;
}

.profile-form-actions .btn-primary, .profile-form-actions .btn-soft { padding: 9px 20px; font-size: 13px; }

/* ───────────────────────── PERSON MODAL ───────────────────────── */

.person-card {
    width: min(720px, 100%);
    padding: 26px;
}

.person-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 26px;
}

.person-id { flex: 1; min-width: 0; }
.person-id h2 { font-size: 23px; letter-spacing: -.025em; }

.person-handle {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    color: var(--muted);
}

.person-genre {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 10.5px;
    font-weight: 650;
}

.person-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

.person-bio {
    margin: 16px 0 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-soft);
}

.person-bio:empty { display: none; }

.person-stats {
    display: flex;
    gap: 22px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 15px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.person-stats span { display: flex; flex-direction: column; gap: 1px; }
.person-stats b { font-size: 16px; font-weight: 700; }
.person-stats small { font-size: 10.5px; color: var(--muted); }

.person-tabs {
    display: flex;
    gap: 4px;
    margin: 20px 0 14px;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    width: fit-content;
}

.person-tab {
    padding: 7px 17px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 12.3px;
    font-weight: 650;
    transition: background .2s, color .2s, box-shadow .2s;
}

.person-tab.is-active { background: var(--surface); color: var(--text); box-shadow: 0 3px 9px -4px rgba(30, 34, 32, .22); }

.person-panel { display: none; }
.person-panel.is-active { display: block; animation: panelSwap .32s var(--ease); }

.person-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 12px 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: thin;
}

.person-list .social-lib-poster { border-radius: 12px; }
.person-list .social-lib-title { font-size: 11.5px; }

.person-posts { display: flex; flex-direction: column; gap: 9px; max-height: 320px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }

.person-posts .social-post { padding: 13px 14px; }

.person-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    border: 1px dashed var(--line);
    border-radius: 16px;
}

.person-locked span { font-size: 22px; }

/* ───────────────────────── RESPONSIVE ───────────────────────── */

@media (max-width: 1240px) {
    .social-app { grid-template-columns: 228px minmax(0, 1fr); }
    .social-aside { display: none; }
}

@media (max-width: 980px) {
    .social-app {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .social-rail {
        position: static;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
    }

    .social-me {
        flex: 1;
        min-width: 240px;
    }

    .social-nav {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
        gap: 4px;
    }

    .social-nav-item {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        padding: 9px 2px 8px;
        font-size: 10.6px;
        line-height: 1.2;
    }

    .social-nav-item svg { width: 17px; height: 17px; }
    .social-nav-item.is-active::before { display: none; }
    .social-nav-badge { position: absolute; top: 3px; right: 4px; }

    .social-rail-foot { display: none; }
    .social-main { width: 100%; }

    .social-chat { height: min(660px, calc(100dvh - 210px)); }
}

@media (max-width: 860px) {
    .tk-account { padding: 4px; border-radius: 50%; border-color: transparent; background: transparent; }
    .tk-account:hover { background: var(--accent-soft); transform: none; box-shadow: none; }
    .tk-account-avatar { width: 34px; height: 34px; }
    .tk-account-text { display: none; }
    .tk-badge--account { top: -2px; right: -2px; }
    .tk-account-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(260px, calc(100vw - 24px)); }

    .social-guest { grid-template-columns: 1fr; padding: 26px 22px 30px; border-radius: 24px; }
    .social-guest-art { height: 190px; order: 2; }
    .social-guest-body { order: 1; }
    .guest-avatars .social-avatar { --av-size: 42px; border-radius: 14px; }
    .social-perks { margin: 18px 0 22px; gap: 10px; }
    .social-guest-actions { width: 100%; }
    .social-guest-actions .btn-primary, .social-guest-actions .btn-glass { flex: 1; justify-content: center; }

    .social-panel { padding: 16px; border-radius: 22px; }
    .social-panel-head h2 { font-size: 19px; }
    .social-panel-head p { font-size: 12px; }

    .social-post, .social-activity { padding: 14px; border-radius: 17px; }
    .post-body { font-size: 13.4px; }

    .social-user-grid { grid-template-columns: 1fr; }

    .social-chat {
        grid-template-columns: 1fr;
        height: calc(100dvh - 470px);
        min-height: 280px;
        border-radius: 20px;
    }

    .social-chat.is-chatting { height: calc(100dvh - 320px); }
    .social-app:has(.social-chat.is-chatting) .social-me { display: none; }

    .chat-main { display: none; }
    .social-chat.is-chatting .chat-list-col { display: none; }
    .social-chat.is-chatting .chat-main { display: flex; }
    .chat-back { display: grid; }

    .auth-card { display: block; width: min(460px, 100%); border-radius: 24px; }
    .auth-art { display: none; }
    .auth-pane { padding: 28px 22px 26px; }
    .auth-tabs { margin-bottom: 18px; }

    .profile-edit-card, .person-card { padding: 20px 17px; border-radius: 22px; }
    .person-hero { flex-wrap: wrap; padding-right: 20px; }
    .person-id h2 { font-size: 20px; }
    .person-stats { gap: 16px; }
    .person-list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

@media (max-width: 560px) {
    .tk-tab { padding: 8px 4px; font-size: 12px; }
    .tk-tab--social { flex: 1.1; }

    .social-me { min-width: 100%; }
    .social-nav-item span:not(.social-nav-badge) { font-size: 11px; }
    .social-nav-item svg { width: 16px; height: 16px; }

    .social-composer-hint { display: none; }
    .social-composer-foot { justify-content: flex-end; }

    .social-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 9px; }
    .social-lib-title { font-size: 11.3px; }
    .social-lib-sub { display: none; }

    .auth-field-row { grid-template-columns: 1fr; }

    .person-actions { width: 100%; }
    .person-actions .mini-btn { flex: 1; justify-content: center; }

    .person-stats { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
    .guest-orb, .guest-ring, .guest-avatars .social-avatar, .chat-placeholder-art, .auth-art-glow, .tk-tab-dot, .social-pulse,
    .post-del.is-confirm, .social-lib-remove.is-confirm, .mini-btn.is-confirm {
        animation: none !important;
    }
}
