/* ============================================================
   Style sekcji komentarzy pod artykulami KS Perla Wegrow.
   Spojny z identyfikacja kolorystyczna (navy #1a2332, gold #d4af37,
   blue #1a4c8b). Mobile-first, breakpoint 768px.
   ============================================================ */

.article-comments {
    background: #f7f8fa;
    border-top: 4px solid #1a2332;
    padding: 3rem 0;
    margin: 0;
}

.article-comments .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.comments-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.comments-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2332;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.comments-header h2 i {
    color: #1a4c8b;
}

.comments-count {
    font-weight: 500;
    color: #6b7280;
    font-size: 1rem;
}

/* --- Status messages --- */
.comments-status {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.comments-status--info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.comments-status--success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.comments-status--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* --- Loading / empty / login prompt --- */
.comments-loading,
.comments-empty,
.comments-login-prompt,
.comments-banned {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: #4b5563;
}

.comments-login-prompt p,
.comments-banned p,
.comments-empty p,
.comments-loading p {
    margin: 0;
}

.comments-login-prompt i { color: #1a4c8b; margin-right: 0.5rem; }
.comments-banned i { color: #dc2626; margin-right: 0.5rem; }

.comments-login-prompt a {
    color: #1a4c8b;
    font-weight: 600;
    text-decoration: underline;
}
.comments-login-prompt a:hover { color: #d4af37; }

.comments-form-skeleton {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    height: 80px;
}
.comments-form-skeleton__bar {
    height: 100%;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: comments-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes comments-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Form --- */
.comments-form {
    display: flex;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.comments-form__avatar {
    flex-shrink: 0;
}

.comments-form__avatar img,
.comments-form__avatar .comment-avatar__initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a4c8b;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    object-fit: cover;
}

.comments-form__main {
    flex: 1;
    min-width: 0;
}

.comments-form textarea {
    width: 100%;
    min-height: 70px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    color: #1a2332;
}
.comments-form textarea:focus {
    outline: none;
    border-color: #1a4c8b;
    box-shadow: 0 0 0 3px rgba(26, 76, 139, 0.15);
}

.comments-form__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.comments-form__counter {
    font-size: 0.85rem;
    color: #6b7280;
}

.comments-form__submit {
    background: #1a4c8b;
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.1s;
}
.comments-form__submit:hover  { background: #143b6c; }
.comments-form__submit:active { transform: scale(0.98); }
.comments-form__submit:disabled { opacity: 0.6; cursor: not-allowed; }
.comments-form__submit.is-loading i { animation: comments-spin 0.8s linear infinite; }

@keyframes comments-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* --- Comments list --- */
.comments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* .comment to teraz BLOKOWY wrapper - trzyma wizualna karte (.comment-card)
   oraz liste odpowiedzi (.comment-replies) jeden pod drugim. Sam nie ma
   stylowania (background/border/padding sa na .comment-card). */
.comment {
    display: block;
}

.comment-card {
    display: flex;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s;
}
.comment-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.comment--hidden .comment-card {
    background: #fffbeb;
    border-color: #fde68a;
    opacity: 0.85;
}

/* Wejscie z linku #comment-N (widget "Ostatnie komentarze" na listingu
   aktualnosci). Podswietlenie gasnie samo po ~2,5 s - klase zdejmuje
   comments.js, animacja tylko wygasza obwodke. */
.comment--highlighted .comment-card {
    border-color: #1a4c8b;
    box-shadow: 0 0 0 3px rgba(26, 76, 139, 0.18);
    animation: kspCommentFlash 2.6s ease-out;
}

@keyframes kspCommentFlash {
    0%   { background: #eaf1fb; }
    100% { background: #fff; }
}

.comment-avatar {
    flex-shrink: 0;
}
.comment-avatar img,
.comment-avatar__initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a4c8b;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    object-fit: cover;
}

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

.comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-weight: 600;
    color: #1a2332;
}

.comment-time {
    color: #6b7280;
    font-size: 0.85rem;
}

.comment-edited {
    color: #9ca3af;
    font-size: 0.85rem;
    font-style: italic;
}

.comment-role-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.comment-role-badge--admin {
    background: #d4af37;
    color: #1a2332;
}
.comment-role-badge--mod {
    background: #1a4c8b;
    color: #fff;
}

.comment-banner {
    background: #fef3c7;
    border-left: 3px solid #d97706;
    color: #92400e;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}
.comment-banner i { margin-right: 0.4rem; }

.comment-body {
    color: #1f2937;
    line-height: 1.55;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}
/* nl2br juz dodaje <br>, wiec wylaczamy white-space pre-wrap dla spojnosci */
.comment-body { white-space: normal; }

.comment-actions {
    margin-top: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.comment-action {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.15s;
}
.comment-action:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1a2332;
}

.comment-action--danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.comment-action--cancel {
    background: #f3f4f6;
}

.comment-edit-form textarea {
    width: 100%;
    min-height: 70px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    color: #1a2332;
}
.comment-edit-form textarea:focus {
    outline: none;
    border-color: #1a4c8b;
}
.comment-edit-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* --- Pole "Wpis jako nick" (impersonacja) ---
   Widoczne tylko dla osob z uprawnieniem comments.impersonate (admin lub moderator).
   Subtelnie wyrozniamy zeby nie myliło sie ze zwyklym polem. */
.comments-impersonate {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #fef9c3;
    border: 1px dashed #d4af37;
    border-radius: 6px;
}
.comments-impersonate label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #713f12;
    font-weight: 600;
    white-space: nowrap;
    cursor: text;
}
.comments-impersonate label i {
    color: #a16207;
}
.comments-impersonate input {
    flex: 1;
    min-width: 0;
    border: 1px solid #fbbf24;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
    background: #fffbeb;
    color: #1a2332;
}
.comments-impersonate input:focus {
    outline: none;
    border-color: #d4af37;
    background: #fff;
}

/* --- Marker "wystawione przez X" ---
   Pokazywany tylko jesli w danych jest real_author_name - backend zwraca to pole
   wylacznie dla moderatorow/admina. Czytelnicy nie widza tego markera. */
.comment-impersonation-marker {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-style: italic;
    border: 1px solid #fde68a;
}
.comment-impersonation-marker i {
    color: #a16207;
}

/* --- Odpowiedzi (replies) - 1 poziom zagniezdzenia ---
   Lista odpowiedzi pod karta komentarza top-level. Delikatny indent z lewej
   + zlota kreska pionowa wizualnie wskazuje przynaleznosc do parenta. Karta
   odpowiedzi jest lzejsza (szary background, mniejszy padding).

   Kreska WYRASTA SPOD karty komentarza, do ktorego naleza odpowiedzi: lista
   zaczyna sie tuz pod nia (zero marginesu u gory, odstep robi padding), a sama
   kreska jest wsunieta kilkanascie pikseli w gore, pod karte. Karta ma wyzszy
   z-index, wiec przykrywa jej koniec i widac tylko to, co spod niej wychodzi.
   Wczesniej kreska zaczynala sie z przerwa pod karta i przy dluzszej dyskusji
   trzeba bylo zgadywac, do ktorego komentarza nalezy odpowiedz. */
.comment-replies {
    list-style: none;
    position: relative;
    margin: 0 0 0 1.75rem;
    padding: 0.75rem 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.comment-replies::before {
    content: "";
    position: absolute;
    left: 0;
    top: -14px;
    bottom: 4px;
    width: 3px;
    border-radius: 0 0 3px 3px;
    background: #d4af37;
}

/* Karta musi lezec NAD kreska, inaczej jej wsuniety koniec wystawalby na
   komentarz rodzica. Dotyczy tez kart odpowiedzi - te przykrywaja konce
   poziomych odnog. */
.comment-card {
    position: relative;
    z-index: 1;
}

/* Pozioma odnoga od kreski do karty odpowiedzi, na wysokosci awatara. To ona
   robi z wciecia czytelne rozgalezienie: widac nie tylko ZE cos jest
   odpowiedzia, ale tez gdzie sie zaczyna kazda z nich. Gasnie ku karcie, zeby
   nie rysowac drugiej ramki tuz przy jej krawedzi. */
.comment--reply {
    position: relative;
}
.comment--reply::before {
    content: "";
    position: absolute;
    left: -1.25rem;
    top: 28px;
    width: 1.25rem;
    height: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(90deg, #d4af37, rgba(212, 175, 55, 0.35));
}

.comment--reply .comment-card {
    background: #f9fafb;
    padding: 0.75rem;
    border-color: #e5e7eb;
}
.comment--reply .comment-avatar img,
.comment--reply .comment-avatar__initials {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}
.comment--reply .comment-author {
    font-size: 0.9rem;
}
.comment--reply .comment-body {
    font-size: 0.95rem;
}

/* Strzalka "↳" przed nickiem odpowiedzi - dodatkowy wizualny sygnal
   ze to odpowiedz na komentarz powyzej. Zlota dla spojnosci z kreska po lewej. */
.comment--reply .comment-author::before {
    content: "↳";
    color: #d4af37;
    font-weight: 700;
    margin-right: 0.35rem;
    font-size: 1.05em;
}

/* --- Formularz odpowiedzi (inline pod komentarzem) --- */
.comment-reply-form-wrapper {
    margin-top: 0.6rem;
}
.comments-form--reply {
    margin-bottom: 0;
    padding: 0.75rem;
    background: #f3f4f6;
    border-color: #d1d5db;
}
.comments-form--reply textarea {
    min-height: 50px;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .article-comments { padding: 2rem 0; }
    .article-comments .container { padding: 0 1rem; }
    .comments-header h2 { font-size: 1.25rem; }
    .comments-form { padding: 0.75rem; }
    .comments-form__avatar img,
    .comments-form__avatar .comment-avatar__initials,
    .comment-avatar img,
    .comment-avatar__initials {
        width: 36px;
        height: 36px;
    }
    .comments-form__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .comments-form__submit { justify-content: center; }
    .comment-card { padding: 0.75rem; }

    /* Mniejsze wciecie dla replies na mobile zeby tekst sie miescil */
    .comment-replies {
        margin-left: 0.5rem;
        padding-left: 0.7rem;
    }
    /* Odnoga skraca sie razem z wcieciem, inaczej wychodzilaby przed kreske.
       Wysokosc liczona od mniejszego awatara (28 px) i mniejszego paddingu. */
    .comment--reply::before {
        left: -0.7rem;
        top: 24px;
        width: 0.7rem;
    }
    .comment--reply .comment-card {
        padding: 0.6rem;
    }
    .comment--reply .comment-avatar img,
    .comment--reply .comment-avatar__initials {
        width: 28px;
        height: 28px;
    }
    /* Pole nick na mobile - label nad inputem zeby sie miescilo */
    .comments-impersonate {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }
    .comments-impersonate label {
        white-space: normal;
    }
}

/* ============================================================
   KOMENTARZE BEZ KONTA, LAJKI, ODZNAKI, PROFIL KIBICA
   (dopisane razem z otwarciem komentarzy dla niezalogowanych)

   Ciemny motyw siedzi w css/dark-theme.css - ten plik laduje sie
   PRZED nim, wiec tamten moze nadpisac dowolna regule stad.
   ============================================================ */

/* --- Pole-pulapka na boty ---
   Musi byc widoczne dla przegladarki (bot czyta DOM, nie piksele), ale
   niedostepne dla czlowieka. Chowamy je poza ekranem, a nie display:none,
   bo brak renderu jest dla botow czytelnym sygnalem, ze to pulapka. */
.comments-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Formularz goscia --- */
.comments-guest__nick {
    margin-bottom: 0.6rem;
}
.comments-guest__nick label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}
.comments-guest__nick input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: #1a2332;
}
.comments-guest__nick input:focus {
    outline: none;
    border-color: #1a4c8b;
    box-shadow: 0 0 0 3px rgba(26, 76, 139, 0.12);
}
.comments-guest__hint {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.comments-guest__known {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: #4b5563;
}
.comments-guest__known strong { color: #1a2332; }
.comments-guest__change {
    background: none;
    border: none;
    padding: 0;
    color: #1a4c8b;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    /* js/script.js dokleja .touch-friendly do KAZDEGO <button> (min 44px + padding).
       Przy odnosniku w zdaniu robi to wyrwe, wiec zerujemy to jawnie. */
    min-width: 0;
    min-height: 0;
}
.comments-guest__known input[name="nick"] {
    padding: 0.35rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.comments-form__note {
    margin: 0.6rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}
.comments-form__note i { color: #1a4c8b; margin-top: 0.15rem; }

.comments-form__login {
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
}
.comments-form__login a { color: #1a4c8b; }

/* --- Plakietka goscia i awatar zastepczy --- */
.comment-role-badge--guest {
    background: #e5e7eb;
    color: #4b5563;
}
.comment-avatar--guest .comment-avatar__initials {
    background: #6b7280;
}

/* --- Odznaka kibica przy nicku ---
   Jedna, ta najwyzsza. Reszta jest w profilu pod nickiem. */
.comment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.comment-badge i { font-size: 0.75em; }
.comment-badge--braz {
    background: #f5ece1;
    color: #8a5a2b;
    border: 1px solid #e3d1bb;
}
.comment-badge--srebro {
    background: #eef1f5;
    color: #4b5563;
    border: 1px solid #d7dde5;
}
/* Zloto to kolor wyroznienia w calym serwisie - tu tez ma byc gradientem,
   nie plaskim zoltym. */
.comment-badge--zloto {
    background: linear-gradient(135deg, #AE802F, #FFEFA7);
    color: #1a2332;
    border: 1px solid rgba(174, 128, 47, 0.5);
}

/* --- Nick jako przycisk otwierajacy profil --- */
.comment-author--link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: #1a2332;
    cursor: pointer;
    border-bottom: 1px dotted transparent;
    min-width: 0;
    min-height: 0;
}
.comment-author--link:hover,
.comment-author--link:focus-visible {
    color: #1a4c8b;
    border-bottom-color: currentColor;
}

/* --- Lajk --- */
.comment-like {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    min-width: 0;
    min-height: 0;
}
.comment-like:hover {
    color: #b91c1c;
    border-color: #fca5a5;
    background: #fef2f2;
}
.comment-like.is-liked {
    color: #b91c1c;
    border-color: #fca5a5;
    background: #fef2f2;
}
.comment-like__count { font-weight: 600; font-variant-numeric: tabular-nums; }
.comment-like.is-bump i { animation: kspLikeBump 0.4s ease; }

@keyframes kspLikeBump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* --- Komentarz czekajacy na akceptacje --- */
.comment-banner--pending {
    background: #e0f2fe;
    border-left-color: #0284c7;
    color: #075985;
}
.comment--pending .comment-card {
    border-style: dashed;
}
.comment-action--ok {
    border-color: #a7f3d0;
    color: #065f46;
}
.comment-action--ok:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

@media (prefers-reduced-motion: reduce) {
    .comment-like.is-bump i { animation: none; }
}

/* ============================================================
   OKNO PROFILU KIBICA (po klikniciu w nick)
   ============================================================ */

.kibic-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.kibic-modal[hidden] { display: none; }

.kibic-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 25, 0.6);
    backdrop-filter: blur(2px);
}

.kibic-modal__box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: min(560px, 100%);
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
}

.kibic-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.kibic-modal__close:hover { background: #f3f4f6; color: #1a2332; }

.kibic-modal__loading {
    text-align: center;
    color: #6b7280;
    padding: 2rem 0;
}

.kibic-modal__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.kibic-modal__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a4c8b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    /* Pierscien w systemowym zlocie - ten sam gest co przy portrecie w cytacie. */
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.65);
}
.kibic-modal__avatar--guest { background: #6b7280; }
.kibic-modal__avatar img { width: 100%; height: 100%; object-fit: cover; }

.kibic-modal__nick {
    margin: 0 0 0.2rem;
    font-size: 1.25rem;
    color: #1a2332;
}
.kibic-modal__since {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.kibic-modal__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.kibic-modal__stats > div {
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem 0.4rem;
    text-align: center;
}
.kibic-modal__stats strong {
    display: block;
    font-size: 1.35rem;
    color: #1a2332;
    line-height: 1.2;
}
.kibic-modal__stats span {
    font-size: 0.75rem;
    color: #6b7280;
}

.kibic-modal__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}
.kibic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}
.kibic-badge--braz  { background: #f5ece1; color: #8a5a2b; border: 1px solid #e3d1bb; }
.kibic-badge--srebro{ background: #eef1f5; color: #4b5563; border: 1px solid #d7dde5; }
.kibic-badge--zloto { background: linear-gradient(135deg, #AE802F, #FFEFA7); color: #1a2332; border: 1px solid rgba(174,128,47,0.5); }

.kibic-modal__next {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: #4b5563;
    background: #f7f8fa;
    border-left: 3px solid #d4af37;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.kibic-modal__h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #1a2332;
}
.kibic-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.kibic-modal__list a {
    display: block;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: inherit;
}
.kibic-modal__list a:hover { border-color: #1a4c8b; }
.kibic-modal__cite {
    display: block;
    color: #1a2332;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.kibic-modal__meta {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
}

body.kibic-modal-open { overflow: hidden; }

@media (max-width: 768px) {
    .kibic-modal__box { padding: 1.1rem; }
    .kibic-modal__avatar { width: 52px; height: 52px; font-size: 1.1rem; }
    .kibic-modal__stats strong { font-size: 1.15rem; }
}
