/* Dairesel profil fotoğrafı + premium çerçeve */

.pf-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
}

.pf-avatar .pf-photo,
.pf-avatar .pf-fallback {
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 1;
}

.pf-avatar .pf-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
    letter-spacing: -0.02em;
}

.pf-avatar .pf-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* Boyut sınıfı yoksa bile menüde taşmayı engelle */
.nav-profile .pf-avatar {
    width: 34px;
    height: 34px;
    overflow: hidden;
}

.nav-profile .pf-avatar .pf-photo,
.nav-profile .pf-avatar .pf-frame,
.nav-profile .pf-avatar .pf-fallback {
    max-width: 100%;
    max-height: 100%;
}

/* Standart (çerçevesiz): tam daire */
.pf-avatar:not(.is-premium) .pf-photo,
.pf-avatar:not(.is-premium) .pf-fallback {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(201, 169, 98, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Premium: foto = delik boyutu; çerçeve üstte, süslemeler taşabilir */
.pf-avatar.is-premium {
    overflow: visible;
}

.pf-avatar.is-premium .pf-photo,
.pf-avatar.is-premium .pf-fallback {
    position: absolute;
    left: 50%;
    top: 50%;
    /*
      Çerçeve PNG ~%50–53 delik, frame katmanı %136 →
      foto ≈ 0.53 × 1.36 ≈ %72. Deliği doldurur; fazla kısım halkanın altında kalır.
    */
    width: 72%;
    height: 72%;
    transform: translate(-50%, -50%);
    border: 0;
    box-shadow: none;
    z-index: 1;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    overflow: hidden;
}

.pf-avatar.is-premium .pf-frame {
    position: absolute;
    z-index: 2;
    /* Süslemeler (kanat/bayrak) için daireyi geniş tut */
    inset: -18%;
    width: 136%;
    height: 136%;
    max-width: none;
    max-height: none;
    object-fit: contain;
}

.nav-profile .pf-avatar.is-premium {
    overflow: hidden;
}

.frame-card {
    overflow: visible;
}

.frame-card .pf-avatar.is-premium {
    width: 228px;
    height: 228px;
    margin: 0.85rem auto 0.7rem;
    overflow: visible;
}

.pf-xs { width: 36px; height: 36px; }
.pf-xs .pf-fallback { font-size: 0.62rem; letter-spacing: -0.02em; }

.pf-sm { width: 50px; height: 50px; }
.pf-sm .pf-fallback { font-size: 0.78rem; letter-spacing: -0.02em; }

.pf-md { width: 96px; height: 96px; }
.pf-md .pf-fallback { font-size: 1.25rem; letter-spacing: -0.02em; }

.pf-lg { width: 196px; height: 196px; }
.pf-lg .pf-fallback { font-size: 2.15rem; letter-spacing: -0.02em; }

.pf-xl { width: 260px; height: 260px; }
.pf-xl .pf-fallback { font-size: 2.7rem; letter-spacing: -0.02em; }

.nav-profile-wrap {
    display: inline-flex;
    align-items: center;
}

.nav-profile,
button.nav-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--brand-muted, #c8c2b6);
    font-weight: 700;
    font-size: 0.88rem;
    font-family: inherit;
    padding: 2px 6px;
    border: none;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-profile:hover,
.nav-profile.active {
    background: rgba(201, 169, 98, 0.12);
    color: #c9a962;
}

.nav-profile-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

.nav-profile-avatar-wrap > .nav-notif-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.25rem;
    z-index: 2;
    pointer-events: none;
}

.nav-profile-name-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 1.15em;
    padding-top: 0.35rem;
}

.nav-profile-name-wrap > .nav-notif-badge {
    position: absolute;
    left: 50%;
    top: -0.15rem;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
}

.nav-profile-name {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    color: var(--theme-accent, #22d3ee);
    -webkit-text-fill-color: var(--theme-accent, #22d3ee);
}

.nav-profile:hover .nav-profile-name:not(.is-rep-name-custom),
.nav-profile.active .nav-profile-name:not(.is-rep-name-custom) {
    color: #dbbc74;
    -webkit-text-fill-color: #dbbc74;
}

.nav-profile-name.is-rep-name-custom {
    color: var(--rep-name-color, #c9a962) !important;
    -webkit-text-fill-color: var(--rep-name-color, #c9a962);
}

.nav-profile-name.is-rep-name-shiny.is-rep-name-custom {
    display: inline-block;
    max-width: 110px;
    background-image: linear-gradient(
      110deg,
      var(--rep-name-color, #c9a962) 0%,
      #ffffff 42%,
      var(--rep-name-color, #c9a962) 58%,
      #ffffff 78%,
      var(--rep-name-color, #c9a962) 100%
    ) !important;
    background-size: 220% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
    animation: rep-name-shine 2.4s linear infinite;
}

.nav-profile-name.is-rep-name-shiny-default {
    display: inline-block;
    max-width: 110px;
    background-image: linear-gradient(
      110deg,
      #b8860b 0%,
      #ffe9a0 28%,
      #fff8dc 50%,
      #f5d76e 72%,
      #b8860b 100%
    ) !important;
    background-size: 220% 100% !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
    filter: drop-shadow(0 0 5px rgba(245, 215, 110, 0.4));
    animation: rep-name-shine 2.4s linear infinite;
}

@media (max-width: 720px) {
    .nav-profile-name { display: none; }
    .nav-profile-name-wrap {
        position: absolute;
        top: -0.15rem;
        right: -0.2rem;
        min-height: 0;
        padding-top: 0;
    }
    .nav-profile-name-wrap > .nav-notif-badge {
        position: static;
        transform: none;
    }
    .nav-profile-wrap .nav-profile {
        position: relative;
    }
}

/* Profil sayfası */
.profile-card {
    width: 94%;
    max-width: 960px;
    margin: 0 auto 3rem;
    background: var(--brand-panel, rgba(8, 10, 14, 0.85));
    border: 1px solid rgba(201, 169, 98, 0.25);
    border-radius: 10px;
    padding: 1.5rem 1.4rem 1.75rem;
}

.profile-banner {
    width: calc(100% + 2.8rem);
    margin: -1.5rem -1.4rem 1.15rem;
    height: min(168px, 28vw);
    min-height: 110px;
    border-radius: 10px 10px 0 0;
    background-color: #0a0c12;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(201, 169, 98, 0.28);
}

.profile-hero {
    position: relative;
    width: calc(100% + 2.8rem);
    margin: -1.5rem -1.4rem 1.15rem;
    border-radius: 10px 10px 0 0;
    isolation: isolate;
}

.profile-hero .profile-banner {
    width: 100%;
    margin: 0;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid rgba(201, 169, 98, 0.28);
    overflow: hidden;
}

.profile-hero.is-bare {
    min-height: 88px;
    background:
      linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.78));
    border-bottom: 1px solid rgba(201, 169, 98, 0.22);
}

.profile-hero.is-bare .profile-social-actions {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: min(34rem, 78%);
}

.profile-social-actions {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.38rem;
    z-index: 3;
    max-width: min(220px, 46%);
}

.psa-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-height: 2.05rem;
    padding: 0.38rem 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 12, 20, 0.72);
    color: #f8fafc;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    white-space: nowrap;
}

.psa-btn svg {
    flex: 0 0 auto;
}

.psa-btn.is-primary {
    background: linear-gradient(180deg, #e8c56a, #c9a962);
    color: #111;
    border-color: rgba(201, 169, 98, 0.85);
}

.psa-btn.is-msg {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(125, 211, 252, 0.45);
    color: #e0f2fe;
}

.psa-btn.is-report {
    background: rgba(127, 29, 29, 0.42);
    border-color: rgba(252, 165, 165, 0.35);
    color: #fecaca;
}

.psa-btn.is-friend,
.psa-btn.is-pending,
.psa-btn.is-done {
    background: rgba(15, 23, 42, 0.7);
    color: #dbeafe;
    cursor: default;
}

.psa-btn.is-pending,
.psa-btn.is-friend {
    cursor: pointer;
}

.psa-btn.is-accept {
    background: linear-gradient(180deg, #34d399, #059669);
    color: #052e16;
    border-color: rgba(52, 211, 153, 0.7);
}

.psa-btn.is-ghost {
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
}

.psa-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.psa-btn.is-done {
    cursor: default;
    opacity: 0.88;
    transform: none;
}

.friends-incoming {
    margin-bottom: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(14, 165, 233, 0.08);
}

.friends-incoming h3 {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    color: #7dd3fc;
}

.friends-incoming-list,
.friends-grid {
    list-style: none;
    margin: 0;
    padding: 0;
}

.friends-incoming-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0;
}

.friends-incoming-item + .friends-incoming-item {
    border-top: 1px solid rgba(125, 211, 252, 0.16);
}

.friends-incoming-meta {
    flex: 1 1 10rem;
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.friends-incoming-meta a {
    color: #f8fafc;
    font-weight: 800;
    text-decoration: none;
}

.friends-incoming-meta span {
    color: #94a3b8;
    font-size: 0.75rem;
}

.friends-incoming-actions {
    display: flex;
    gap: 0.35rem;
}

.friends-incoming-actions .psa-btn {
    position: static;
    max-width: none;
    box-shadow: none;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.friends-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem 0.7rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 98, 0.18);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
}

.friends-card-link {
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
}

.friends-card-link strong {
    font-size: 0.88rem;
    color: #f2efe8;
    word-break: break-word;
}

.friends-card-role {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #a8a29a;
}

.friends-card-actions {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

.friends-mini-btn {
    appearance: none;
    border: 1px solid rgba(201, 169, 98, 0.3);
    background: transparent;
    color: #dbbc74;
    border-radius: 999px;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.22rem 0.55rem;
    cursor: pointer;
}

.friends-mini-btn.is-danger {
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.35);
}

.friends-mini-btn:hover {
    background: rgba(201, 169, 98, 0.12);
}

@media (max-width: 720px) {
    .profile-social-actions {
        position: static;
        max-width: none;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.7rem 0.85rem 0.15rem;
    }
    .psa-btn {
        flex: 1 1 auto;
    }
    .profile-hero.is-bare {
        min-height: 0;
    }
}

.profile-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.profile-meta {
    flex: 1 1 18rem;
    min-width: 0;
    width: 100%;
}

.profile-meta h1,
.profile-meta h1.profile-name-row {
    color: #c9a962;
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.7rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.profile-name-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
}

.profile-name-row .staff-role-tag {
    margin: 0;
    font-size: 0.68rem;
}

.profile-username-text {
    line-height: 1.15;
}

.profile-meta p {
    color: var(--brand-muted, #c8c2b6);
    line-height: 1.5;
    font-size: 0.95rem;
}

.profile-badge {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.profile-badge.is-free {
    background: rgba(255, 255, 255, 0.08);
    color: #c8c2b6;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-badge.is-premium {
    background: rgba(201, 169, 98, 0.18);
    color: #dbbc74;
    border: 1px solid rgba(201, 169, 98, 0.45);
}

.profile-badge.is-yonetici,
.fp-role-badge.is-yonetici {
    background: rgba(248, 113, 113, 0.16);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.profile-badge.is-moderator,
.fp-role-badge.is-moderator {
    background: rgba(96, 165, 250, 0.16);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.4);
}

.profile-badge.is-yetkili,
.fp-role-badge.is-yetkili {
    background: rgba(52, 211, 153, 0.16);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.fp-role-badge {
    display: inline-block;
    margin: 0.35rem 0 0.15rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.author-name-row .fp-role-badge,
.author-name-row .staff-role-tag {
    margin: 0;
    vertical-align: middle;
}

.nav-profile-name-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    min-width: 0;
    max-width: 120px;
    line-height: 1.15;
}

.nav-profile-name-col .staff-role-tag {
    font-size: 0.52rem;
    padding: 0.1rem 0.38rem;
    margin: 0;
    align-self: flex-start;
}

.friends-name-row {
    justify-content: center;
}

.friends-name-row .staff-role-tag {
    font-size: 0.58rem;
}

.fp-role-badge.is-premium {
    background: rgba(201, 169, 98, 0.18);
    color: #dbbc74;
    border: 1px solid rgba(201, 169, 98, 0.45);
}

.fp-role-badge.is-free {
    background: rgba(255, 255, 255, 0.08);
    color: #c8c2b6;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.fp-role-badge.is-sendika {
    background: rgba(52, 211, 153, 0.14);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.42);
    letter-spacing: 0.02em;
}

.fp-sidebar .fp-kidem-badge {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    letter-spacing: 0.02em;
}

.staff-user-tools {
    margin-bottom: 1rem;
}

.staff-tool-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.65rem 0 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.staff-tool-label select {
    max-width: 22rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.28);
    color: inherit;
}

.fp-actions .btn-mod-del,
.fp-actions .btn-report {
    margin-left: 0.35rem;
}

.profile-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.profile-avatar-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem 0.55rem;
    margin-top: 0.15rem;
    max-width: 280px;
}

.profile-signature-wrap {
    margin: 0.7rem 0 0.45rem;
    width: fit-content;
    max-width: 100%;
    display: grid;
    gap: 0.4rem;
}

.profile-sig-display {
    display: inline-flex;
    align-items: baseline;
    gap: 0.12rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.45rem 0.75rem 0.45rem 0.7rem;
    border-left: 2px solid rgba(201, 169, 98, 0.55);
    background: rgba(201, 169, 98, 0.05);
    box-sizing: border-box;
}

.profile-sig-display .profile-sig-mark {
    position: static;
    flex: 0 0 auto;
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.35rem;
    line-height: 1;
    color: rgba(201, 169, 98, 0.7);
    pointer-events: none;
    transform: translateY(0.08em);
}

.profile-sig-display .profile-sig-text {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.45;
    color: #dbbc74;
    word-break: break-word;
}

.profile-sig-display .rep-signature {
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    overflow: visible;
}

.profile-sig-display .rep-signature-text {
    display: inline;
    padding-left: 0;
    white-space: normal;
    animation: none;
    transform: none;
    font-size: 0.92rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.45;
    color: #dbbc74;
}

.profile-signature-wrap .rep-signature {
    margin-top: 0;
}

.profile-signature-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.profile-signature-edit-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--theme-muted, #9ca3af);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    line-height: 1.2;
}

.profile-signature-edit-btn:hover {
    color: var(--theme-accent, #c9a962);
    border-bottom-color: rgba(201, 169, 98, 0.55);
    background: transparent;
}

.profile-signature-edit-btn.is-danger {
    color: rgba(252, 165, 165, 0.85);
}

.profile-signature-edit-btn.is-danger:hover {
    color: #f87171;
    border-bottom-color: rgba(248, 113, 113, 0.5);
    background: transparent;
}

.profile-signature-edit {
    display: grid;
    gap: 0.55rem;
    margin: 0.7rem 0 0.75rem;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
}

.profile-sig-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.profile-sig-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(201, 169, 98, 0.9);
}

.profile-sig-limit {
    font-weight: 500;
    font-size: 0.7rem;
    color: var(--theme-muted, #9ca3af);
    margin-left: 0;
}

.profile-sig-field {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid rgba(201, 169, 98, 0.28);
    background: rgba(0, 0, 0, 0.22);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-sig-field:focus-within {
    border-color: rgba(201, 169, 98, 0.62);
    box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.18);
}

.profile-sig-input-row {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0.55rem 0.1rem 0.5rem;
}

.profile-sig-field .profile-sig-mark {
    position: static;
    flex: 0 0 auto;
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.35rem;
    line-height: 1;
    color: rgba(201, 169, 98, 0.55);
    pointer-events: none;
    transform: translateY(0.06em);
}

.profile-signature-edit input[type="text"],
.profile-signature-edit textarea {
    display: block;
    flex: 0 1 auto;
    width: 42ch;
    max-width: min(42ch, calc(100vw - 7rem));
    box-sizing: border-box;
    resize: none;
    min-height: 0;
    height: 2.2rem;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--theme-ink, #f2efe8);
    padding: 0.35rem 0.15rem;
    font: inherit;
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.35;
    white-space: nowrap;
}

.profile-sig-foot {
    display: flex;
    justify-content: flex-end;
    padding: 0 0.65rem 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-sig-count {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--theme-muted, #9ca3af);
}

.profile-sig-count.is-max {
    color: #e8b86a;
}

.profile-signature-edit input[type="text"]:focus,
.profile-signature-edit textarea:focus {
    outline: none;
    border-color: transparent;
}

.profile-signature-edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.profile-sig-save {
    appearance: none;
    border: 1px solid rgba(201, 169, 98, 0.5);
    background: transparent;
    color: #dbbc74;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.38rem 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.profile-sig-save:hover {
    background: rgba(201, 169, 98, 0.16);
    border-color: rgba(201, 169, 98, 0.75);
    color: #f2efe8;
}

.profile-sig-cancel {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--theme-muted, #9ca3af);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.profile-sig-cancel:hover {
    color: var(--theme-ink, #f2efe8);
}

.profile-signature-edit .btn-ghost {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.avatar-tool-btn {
    appearance: none;
    border: 1px solid rgba(201, 169, 98, 0.45);
    border-radius: 999px;
    padding: 0.32rem 0.75rem;
    background: rgba(8, 10, 14, 0.72);
    color: #dbbc74;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.avatar-tool-btn:hover {
    background: #c9a962;
    color: #111;
    border-color: #c9a962;
}

.avatar-tool-btn.is-on {
    background: rgba(194, 65, 12, 0.12);
    border-color: rgba(194, 65, 12, 0.45);
    color: #e8b086;
}

.profile-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.profile-picker-modal[hidden] {
    display: none !important;
}

.profile-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 10, 0.72);
    cursor: pointer;
}

.profile-picker-sheet {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 98, 0.35);
    background: #12161e;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    padding: 1rem 1.1rem 1.25rem;
}

.profile-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.profile-picker-head h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #dbbc74;
    font-family: var(--font-display, Georgia, serif);
}

.profile-picker-close {
    appearance: none;
    border: none;
    background: transparent;
    color: #c8c2b6;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
}

.profile-picker-close:hover {
    color: #fff;
}

.frame-grid--picker {
    margin-top: 0.5rem;
}

.kart-fx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.kart-fx-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 98, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.kart-fx-card:hover {
    border-color: rgba(201, 169, 98, 0.55);
}

.kart-fx-card.is-selected {
    border-color: #c9a962;
    box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.45);
}

.kart-fx-card h3 {
    margin: 0.45rem 0 0.2rem;
    font-size: 0.92rem;
    color: #f2efe8;
}

.kart-fx-card p {
    margin: 0;
    font-size: 0.78rem;
    color: #c8c2b6;
    line-height: 1.35;
}

.kart-fx-card p.kart-fx-cost {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #c9a962;
}

.kart-fx-card p.kart-fx-remain {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #86efac;
}

.kart-fx-preview {
    display: block;
    height: 96px;
    border-radius: 10px 0 0 10px;
    background: #f3f4f6;
    position: relative;
    overflow: hidden;
}

.kart-fx-preview.is-off {
    background:
        repeating-linear-gradient(
            -45deg,
            #eceff3 0 8px,
            #f7f8fa 8px 16px
        );
    border: 1px dashed rgba(148, 163, 184, 0.55);
}

body.profile-picker-open {
    overflow: hidden;
}

.profile-avatar-edit {
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    margin-bottom: 1.35rem;
    overflow: visible;
}

.profile-avatar-edit .avatar-edit-btn {
    position: absolute;
    left: 50%;
    bottom: -1.15rem;
    transform: translateX(-50%);
    z-index: 5;
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    background: rgba(8, 10, 14, 0.82);
    color: #dbbc74;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, color 0.2s ease;
}

.profile-avatar-edit:hover .avatar-edit-btn,
.profile-avatar-edit .avatar-edit-btn:hover {
    background: #c9a962;
    color: #111;
}

.avatar-remove-link {
    appearance: none;
    border: none;
    background: transparent;
    color: #c8c2b6;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.avatar-remove-link:hover {
    color: #dbbc74;
}

.linkish-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: #c9a962;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.linkish-btn:hover {
    color: #dbbc74;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.profile-actions label.btn-file,
.profile-actions button,
.profile-actions a.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #c9a962;
    color: #111;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    padding: 0.65rem 1rem;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.profile-actions label.btn-file input {
    display: none;
}

.profile-actions button.btn-ghost,
.profile-actions a.btn-ghost {
    background: transparent;
    color: #dbbc74;
    border: 1px solid rgba(201, 169, 98, 0.45);
}

.profile-actions button:hover,
.profile-actions label.btn-file:hover,
.profile-actions a.btn-link:hover {
    background: #dbbc74;
}

.profile-actions button.btn-ghost:hover,
.profile-actions a.btn-ghost:hover {
    background: rgba(201, 169, 98, 0.12);
}

.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
    overflow: visible;
}

.frame-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 8px;
    padding: 1.35rem 1.1rem 1.2rem;
    text-align: center;
    cursor: pointer;
    overflow: visible;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.frame-card:hover {
    border-color: rgba(201, 169, 98, 0.55);
    background: rgba(201, 169, 98, 0.08);
    transform: translateY(-2px);
}

.frame-card.is-selected {
    border-color: #c9a962;
    box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.45);
}

.frame-card h3 {
    color: #f2efe8;
    font-size: 0.88rem;
    margin: 0.55rem 0 0.2rem;
}

.frame-card p {
    color: #c8c2b6;
    font-size: 0.75rem;
    line-height: 1.35;
}

.frame-card .frame-unlock {
    margin-top: 0.35rem;
    color: #8fd4a4;
    font-size: 0.72rem;
    font-weight: 700;
}

.frame-card.is-locked {
    opacity: 0.72;
}

.frame-card.is-locked .frame-unlock {
    color: #e8a0a0;
}

.frame-card.is-owned .frame-unlock,
.frame-card.is-selected .frame-unlock {
    color: #8fd4a4;
}

.profile-section-title {
    color: #c9a962;
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.25rem;
    margin: 1.75rem 0 0.35rem;
}

.profile-hint {
    color: #c8c2b6;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.feed-row .pf-avatar {
    justify-self: center;
}
