.ncm-shell{padding:0;overflow:hidden}.ncm-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);min-height:620px}.ncm-sidebar{padding:26px;border-right:1px solid #e5e7eb;background:#fff}.ncm-thread{min-width:0;padding:26px;background:#fbfcff}.ncm-sidebar-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:18px}.ncm-sidebar-head h2,.ncm-thread-head h2,.ncm-empty h2{margin:0;color:#101a33}.ncm-new-link{display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border-radius:14px;background:#101a33;color:#fff;text-decoration:none;font-weight:900}.ncm-compose{border:1px solid #e5e7eb;border-radius:20px;padding:14px;margin-bottom:18px;background:#f8fafc}.ncm-compose summary{cursor:pointer;font-weight:900;color:#101a33}.ncm-compose form,.ncm-reply{display:grid;gap:10px;margin-top:12px}.ncm-compose label{font-weight:800;color:#101a33}.ncm-compose input,.ncm-compose textarea,.ncm-reply textarea{width:100%;border:1px solid #d7deea;border-radius:16px;padding:12px 14px;font-size:15px;background:#fff}.ncm-notice{padding:12px 14px;border-radius:16px;background:#eef4ff;color:#1d4ed8;font-weight:800;margin-bottom:14px}.ncm-thread-list{display:grid;gap:10px}.ncm-thread-item{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border-radius:18px;text-decoration:none;background:#fff;border:1px solid #eef2f7;color:#101a33}.ncm-thread-item.is-active{border-color:#2563eb;background:#eff6ff}.ncm-avatar img,.ncm-avatar>span{width:52px;height:52px;border-radius:999px;object-fit:cover;display:flex;align-items:center;justify-content:center;background:#eef2ff;font-weight:900;color:#1e3a8a}.ncm-thread-meta{min-width:0}.ncm-thread-meta strong,.ncm-thread-meta small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ncm-thread-meta small,.ncm-muted,.ncm-thread-head p,.ncm-empty p{color:#667085}.ncm-thread-item em{min-width:24px;height:24px;border-radius:999px;background:#2563eb;color:#fff;font-style:normal;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:900}.ncm-thread-head{margin-bottom:20px}.ncm-messages{display:grid;gap:12px;margin-bottom:18px}.ncm-message{display:flex}.ncm-message.is-mine{justify-content:flex-end}.ncm-message.is-other{justify-content:flex-start}.ncm-bubble{max-width:min(620px,82%);border-radius:22px;padding:14px 16px;background:#fff;border:1px solid #e5e7eb}.ncm-message.is-mine .ncm-bubble{background:#2563eb;color:#fff;border-color:#2563eb}.ncm-bubble p{margin:0 0 8px}.ncm-bubble time{display:block;font-size:12px;opacity:.72}.ncm-empty{min-height:360px;display:grid;align-content:center;justify-items:center;text-align:center}@media(max-width:860px){.ncm-layout{display:block;min-height:auto}.ncm-sidebar{border-right:0;border-bottom:1px solid #e5e7eb}.ncm-sidebar,.ncm-thread{padding:20px}.ncm-bubble{max-width:92%}}
.ncm-compose-info {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-weight: 700;
}


/* 1.0.3 - porządek w wiadomościach */
.ncm-sidebar-head {
    margin-bottom: 18px !important;
}

.ncm-new-link,
.ncm-compose,
.ncm-compose-info {
    display: none !important;
}

/* Moje wiadomości: prawa strona, ale bez niebieskiego tła */
.ncm-message.is-mine {
    justify-content: flex-end !important;
}

.ncm-message.is-mine .ncm-bubble {
    background: #fff !important;
    color: #101a33 !important;
    border: 1px solid #d7deea !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06) !important;
}

.ncm-message.is-mine .ncm-bubble p,
.ncm-message.is-mine .ncm-bubble time {
    color: #101a33 !important;
}

.ncm-message.is-mine .ncm-bubble time {
    opacity: .65 !important;
}

/* Nieprzeczytane rozmowy wyraźniej na liście */
.ncm-thread-item em {
    background: #2563eb !important;
    color: #fff !important;
    font-style: normal !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 760px) {
    .ncm-layout {
        display: block !important;
        min-height: 0 !important;
    }

    .ncm-sidebar {
        border-right: 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .ncm-message.is-mine .ncm-bubble,
    .ncm-message.is-other .ncm-bubble {
        max-width: min(86vw, 420px) !important;
    }
}


/* 1.0.4 - układ komunikatora między górną i dolną belką */
.ncm-wrap {
    height: calc(100dvh - 164px) !important;
    max-height: calc(100dvh - 164px) !important;
    min-height: 520px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-layout {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-sidebar {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.ncm-sidebar-head {
    flex: 0 0 auto !important;
    margin-bottom: 14px !important;
}

.ncm-notice {
    flex: 0 0 auto !important;
    margin-bottom: 12px !important;
}

.ncm-thread-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 6px !important;
    scrollbar-width: thin !important;
    box-sizing: border-box !important;
}

.ncm-thread-list::-webkit-scrollbar,
.ncm-messages::-webkit-scrollbar {
    width: 8px !important;
}

.ncm-thread-list::-webkit-scrollbar-thumb,
.ncm-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 999px !important;
}

.ncm-thread {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-head {
    grid-row: 1 !important;
    flex: 0 0 auto !important;
    padding-bottom: 16px !important;
}

.ncm-messages {
    grid-row: 2 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 8px 12px 18px !important;
    box-sizing: border-box !important;
    scroll-behavior: smooth !important;
}

.ncm-reply {
    grid-row: 3 !important;
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 12px 0 !important;
    border-top: 1px solid #e5e7eb !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.ncm-reply textarea {
    width: 100% !important;
    min-height: 86px !important;
    height: 86px !important;
    max-height: 86px !important;
    resize: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.ncm-reply button,
.ncm-reply input[type="submit"] {
    width: auto !important;
    min-width: 132px !important;
    max-width: 180px !important;
    height: 86px !important;
    min-height: 86px !important;
    padding: 0 22px !important;
    align-self: stretch !important;
    justify-self: end !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
}

.ncm-empty {
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* wiadomości nie mogą wypychać formularza */
.ncm-message {
    max-width: 100% !important;
}

.ncm-bubble {
    max-width: min(520px, 72%) !important;
    overflow-wrap: anywhere !important;
}

/* Na desktopie cały moduł zostaje w oknie, nie rozpycha strony */
body:has(.ncm-wrap) .ncc-app-main,
body:has(.ncm-wrap) .ncc-page,
body:has(.ncm-wrap) .ncc-content {
    overflow: hidden !important;
}

/* Mobilnie: najpierw lista rozmów, potem rozmowa, bez ogromnych wysokości */
@media (max-width: 900px) {
    .ncm-wrap {
        height: calc(100dvh - 150px) !important;
        max-height: calc(100dvh - 150px) !important;
        min-height: 0 !important;
    }

    .ncm-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: minmax(150px, 34%) minmax(0, 1fr) !important;
    }

    .ncm-sidebar {
        grid-row: 1 !important;
        border-right: 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
        padding-bottom: 12px !important;
    }

    .ncm-thread {
        grid-row: 2 !important;
        min-height: 0 !important;
    }

    .ncm-thread-head {
        padding: 12px 0 10px !important;
    }

    .ncm-messages {
        padding: 8px 4px 14px !important;
    }

    .ncm-reply {
        grid-template-columns: 1fr auto !important;
        gap: 8px !important;
        padding: 12px 4px 0 !important;
    }

    .ncm-reply textarea {
        min-height: 74px !important;
        height: 74px !important;
        max-height: 74px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        min-width: 86px !important;
        max-width: 104px !important;
        height: 74px !important;
        min-height: 74px !important;
        padding: 0 12px !important;
        border-radius: 14px !important;
        font-size: 14px !important;
    }

    .ncm-bubble {
        max-width: min(78vw, 420px) !important;
    }
}

@media (max-width: 520px) {
    .ncm-wrap {
        height: calc(100dvh - 142px) !important;
        max-height: calc(100dvh - 142px) !important;
    }

    .ncm-layout {
        grid-template-rows: minmax(130px, 30%) minmax(0, 1fr) !important;
    }

    .ncm-sidebar {
        padding: 16px !important;
    }

    .ncm-thread {
        padding: 14px !important;
    }

    .ncm-thread-head h2 {
        font-size: 22px !important;
        line-height: 1.1 !important;
    }

    .ncm-reply {
        grid-template-columns: 1fr auto !important;
    }

    .ncm-reply textarea {
        min-height: 68px !important;
        height: 68px !important;
        max-height: 68px !important;
        font-size: 14px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        min-width: 76px !important;
        max-width: 86px !important;
        height: 68px !important;
        min-height: 68px !important;
        padding: 0 8px !important;
        font-size: 13px !important;
    }
}


/* 1.0.5 - formularz odpowiedzi nie może rozciągać komunikatora */
.ncm-wrap,
.ncm-layout,
.ncm-sidebar,
.ncm-thread {
    min-height: 0 !important;
}

.ncm-layout {
    align-items: stretch !important;
}

.ncm-sidebar {
    align-self: stretch !important;
}

.ncm-thread {
    align-self: stretch !important;
    height: 100% !important;
    max-height: 100% !important;
    grid-template-rows: auto minmax(0, 1fr) 104px !important;
}

.ncm-messages {
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.ncm-reply,
.ncm-reply form {
    min-height: 0 !important;
    max-height: 104px !important;
    height: 104px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-reply {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 132px !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 10px 12px 8px !important;
}

.ncm-reply textarea {
    display: block !important;
    width: 100% !important;
    min-height: 84px !important;
    height: 84px !important;
    max-height: 84px !important;
    resize: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.ncm-reply button,
.ncm-reply input[type="submit"] {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    height: 84px !important;
    min-height: 84px !important;
    max-height: 84px !important;
    align-self: stretch !important;
    justify-self: end !important;
    margin: 0 !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
}

/* Lewa lista nie może rosnąć od wysokości rozmowy */
.ncm-thread-list,
.ncm-thread-item {
    min-height: 0 !important;
}

.ncm-thread-item {
    height: auto !important;
    max-height: 96px !important;
    overflow: hidden !important;
}

.ncm-thread-item p,
.ncm-thread-item span,
.ncm-thread-item strong {
    min-width: 0 !important;
}

/* Docięcie bardzo długich tekstów w liście rozmów */
.ncm-thread-item p {
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

@media (max-width: 900px) {
    .ncm-thread {
        grid-template-rows: auto minmax(0, 1fr) 92px !important;
    }

    .ncm-reply,
    .ncm-reply form {
        height: 92px !important;
        max-height: 92px !important;
    }

    .ncm-reply {
        grid-template-columns: minmax(0, 1fr) 92px !important;
        gap: 8px !important;
        padding: 8px 4px 6px !important;
    }

    .ncm-reply textarea {
        min-height: 78px !important;
        height: 78px !important;
        max-height: 78px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        width: 92px !important;
        min-width: 92px !important;
        max-width: 92px !important;
        height: 78px !important;
        min-height: 78px !important;
        max-height: 78px !important;
        padding: 0 8px !important;
    }
}

@media (max-width: 520px) {
    .ncm-thread {
        grid-template-rows: auto minmax(0, 1fr) 84px !important;
    }

    .ncm-reply,
    .ncm-reply form {
        height: 84px !important;
        max-height: 84px !important;
    }

    .ncm-reply {
        grid-template-columns: minmax(0, 1fr) 76px !important;
        gap: 7px !important;
        padding: 7px 2px 5px !important;
    }

    .ncm-reply textarea {
        min-height: 72px !important;
        height: 72px !important;
        max-height: 72px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        width: 76px !important;
        min-width: 76px !important;
        max-width: 76px !important;
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
        padding: 0 6px !important;
        font-size: 13px !important;
    }
}


/* 1.0.6 - prosty komunikator: lista wiadomości + mały formularz na dole */
.ncm-thread {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
}

.ncm-thread-head {
    grid-row: 1 !important;
    flex: 0 0 auto !important;
}

.ncm-messages {
    grid-row: 2 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 16px 18px !important;
    box-sizing: border-box !important;
}

/* Formularz na dole: textarea 3 wiersze + mały przycisk przy dolnej krawędzi */
.ncm-reply {
    grid-row: 3 !important;
    display: grid !important;
    grid-template-columns: minmax(360px, 620px) auto !important;
    justify-content: end !important;
    align-items: end !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 12px 16px 14px !important;
    border-top: 1px solid #e5e7eb !important;
    background: #fff !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.ncm-reply form {
    display: contents !important;
}

.ncm-reply textarea {
    grid-column: 1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 78px !important;
    height: 78px !important;
    max-height: 78px !important;
    resize: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 13px 16px !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
}

.ncm-reply button,
.ncm-reply input[type="submit"] {
    grid-column: 2 !important;
    width: auto !important;
    min-width: 96px !important;
    max-width: 128px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    align-self: end !important;
    justify-self: end !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Wiadomości bliżej prawej, ale nadal w kontenerze ze scrollem */
.ncm-message.is-mine {
    justify-content: flex-end !important;
}

.ncm-message.is-other {
    justify-content: flex-start !important;
}

.ncm-bubble {
    max-width: min(560px, 70%) !important;
}

/* Lewa lista rozmów: scroll i bez gigantycznych kafli */
.ncm-thread-list {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
}

.ncm-thread-item {
    max-height: 92px !important;
    min-height: 76px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Responsive */
@media (max-width: 900px) {
    .ncm-reply {
        grid-template-columns: minmax(0, 1fr) auto !important;
        justify-content: stretch !important;
        gap: 8px !important;
        padding: 10px 10px 12px !important;
    }

    .ncm-reply textarea {
        min-height: 72px !important;
        height: 72px !important;
        max-height: 72px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        min-width: 82px !important;
        max-width: 96px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        padding: 0 10px !important;
    }

    .ncm-bubble {
        max-width: min(84vw, 420px) !important;
    }
}

@media (max-width: 520px) {
    .ncm-reply {
        grid-template-columns: minmax(0, 1fr) 74px !important;
        gap: 7px !important;
        padding: 8px 6px 10px !important;
    }

    .ncm-reply textarea {
        min-height: 66px !important;
        height: 66px !important;
        max-height: 66px !important;
        padding: 10px 12px !important;
        font-size: 14px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        min-width: 74px !important;
        max-width: 74px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        padding: 0 6px !important;
        font-size: 13px !important;
    }
}


/* 1.0.7 - wymuszenie niezależnych scrolli i blokada rozciągania lewej kolumny */
.ncm-wrap {
    height: calc(100dvh - 156px) !important;
    max-height: calc(100dvh - 156px) !important;
    min-height: 520px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-layout {
    display: grid !important;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
    align-items: stretch !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Lewa strona: niezależna kolumna, kafelki nie dziedziczą wysokości od prawego panelu */
.ncm-sidebar {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    align-self: stretch !important;
}

.ncm-sidebar-head,
.ncm-notice {
    min-height: 0 !important;
    flex: none !important;
}

.ncm-thread-list {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding-right: 6px !important;
    box-sizing: border-box !important;
}

.ncm-thread-item {
    flex: 0 0 auto !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) auto !important;
    align-items: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-item img,
.ncm-thread-avatar {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: cover !important;
}

.ncm-thread-item strong,
.ncm-thread-item p,
.ncm-thread-item span {
    min-width: 0 !important;
    max-width: 100% !important;
}

.ncm-thread-item p {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

/* Prawa strona: nagłówek / przewijane wiadomości / formularz */
.ncm-thread {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    align-self: stretch !important;
}

.ncm-thread-head {
    grid-row: 1 !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding-bottom: 12px !important;
}

.ncm-messages {
    grid-row: 2 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 16px 18px !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
}

.ncm-messages::-webkit-scrollbar,
.ncm-thread-list::-webkit-scrollbar {
    width: 8px !important;
}

.ncm-messages::-webkit-scrollbar-thumb,
.ncm-thread-list::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 999px !important;
}

/* Formularz nie jest częścią scrollowanej listy wiadomości */
.ncm-reply {
    grid-row: 3 !important;
    flex: 0 0 auto !important;
    min-height: 102px !important;
    max-height: 102px !important;
    height: 102px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-reply form {
    display: grid !important;
    grid-template-columns: minmax(360px, 620px) auto !important;
    justify-content: end !important;
    align-items: end !important;
    gap: 10px !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.ncm-reply textarea {
    height: 78px !important;
    min-height: 78px !important;
    max-height: 78px !important;
    resize: none !important;
    overflow-y: auto !important;
}

.ncm-reply button,
.ncm-reply input[type="submit"] {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    align-self: end !important;
}

@media (max-width: 900px) {
    .ncm-wrap {
        height: calc(100dvh - 148px) !important;
        max-height: calc(100dvh - 148px) !important;
        min-height: 0 !important;
    }

    .ncm-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: minmax(150px, 34%) minmax(0, 1fr) !important;
    }

    .ncm-sidebar {
        grid-row: 1 !important;
        grid-template-rows: auto auto minmax(0, 1fr) !important;
    }

    .ncm-thread {
        grid-row: 2 !important;
    }

    .ncm-thread-item {
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
        grid-template-columns: 48px minmax(0, 1fr) auto !important;
    }

    .ncm-thread-item img,
    .ncm-thread-avatar {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        max-width: 42px !important;
        max-height: 42px !important;
    }

    .ncm-reply {
        min-height: 90px !important;
        height: 90px !important;
        max-height: 90px !important;
    }

    .ncm-reply form {
        grid-template-columns: minmax(0, 1fr) 84px !important;
        justify-content: stretch !important;
        gap: 8px !important;
    }

    .ncm-reply textarea {
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        width: 84px !important;
        min-width: 84px !important;
        max-width: 84px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
    }
}

@media (max-width: 520px) {
    .ncm-wrap {
        height: calc(100dvh - 140px) !important;
        max-height: calc(100dvh - 140px) !important;
    }

    .ncm-layout {
        grid-template-rows: minmax(132px, 30%) minmax(0, 1fr) !important;
    }

    .ncm-reply {
        min-height: 82px !important;
        height: 82px !important;
        max-height: 82px !important;
    }

    .ncm-reply form {
        grid-template-columns: minmax(0, 1fr) 74px !important;
        gap: 7px !important;
    }

    .ncm-reply textarea {
        height: 66px !important;
        min-height: 66px !important;
        max-height: 66px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
    }
}


/* 1.0.8 - mobile: cały moduł wiadomości nie może rozciągać strony */
@media (max-width: 900px) {
    html:has(.ncm-wrap),
    body:has(.ncm-wrap) {
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }

    body:has(.ncm-wrap) .ncc-app-main,
    body:has(.ncm-wrap) .ncc-page,
    body:has(.ncm-wrap) .ncc-content,
    body:has(.ncm-wrap) .ncc-profile-content,
    body:has(.ncm-wrap) .ncu-profile-content {
        height: calc(100dvh - 132px) !important;
        max-height: calc(100dvh - 132px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .ncm-wrap {
        height: calc(100dvh - 132px) !important;
        max-height: calc(100dvh - 132px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .ncm-layout {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: 30% minmax(0, 70%) !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
    }

    .ncm-sidebar {
        grid-row: 1 !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-rows: auto auto minmax(0, 1fr) !important;
        box-sizing: border-box !important;
    }

    .ncm-thread-list {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .ncm-thread {
        grid-row: 2 !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-rows: auto minmax(0, 1fr) 88px !important;
        box-sizing: border-box !important;
    }

    .ncm-thread-head {
        grid-row: 1 !important;
        height: auto !important;
        max-height: 58px !important;
        min-height: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .ncm-messages {
        grid-row: 2 !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .ncm-reply {
        grid-row: 3 !important;
        height: 88px !important;
        max-height: 88px !important;
        min-height: 88px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        padding: 8px 6px 8px !important;
        margin: 0 !important;
    }

    .ncm-reply form {
        height: 72px !important;
        max-height: 72px !important;
        min-height: 72px !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 74px !important;
        align-items: end !important;
        gap: 7px !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .ncm-reply textarea {
        height: 66px !important;
        max-height: 66px !important;
        min-height: 66px !important;
        resize: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        height: 38px !important;
        max-height: 38px !important;
        min-height: 38px !important;
        width: 74px !important;
        max-width: 74px !important;
        min-width: 74px !important;
        align-self: end !important;
        justify-self: end !important;
        margin: 0 !important;
        padding: 0 6px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 520px) {
    body:has(.ncm-wrap) .ncc-app-main,
    body:has(.ncm-wrap) .ncc-page,
    body:has(.ncm-wrap) .ncc-content,
    body:has(.ncm-wrap) .ncc-profile-content,
    body:has(.ncm-wrap) .ncu-profile-content,
    .ncm-wrap {
        height: calc(100dvh - 124px) !important;
        max-height: calc(100dvh - 124px) !important;
    }

    .ncm-layout {
        grid-template-rows: 28% minmax(0, 72%) !important;
    }

    .ncm-thread {
        grid-template-rows: auto minmax(0, 1fr) 84px !important;
    }

    .ncm-reply {
        height: 84px !important;
        max-height: 84px !important;
        min-height: 84px !important;
    }
}

/* fallback dla przeglądarek bez :has() — sam moduł i tak nie rozpycha strony */
.ncm-wrap {
    contain: layout size !important;
}


/* 1.0.9 - FINAL: komunikator jako zamknięty układ, nie długa strona */

/* Komunikat nie może brać udziału w layoucie ani przewijać strony */
.ncm-toast-notice,
.ncm-notice {
    position: fixed !important;
    left: 50% !important;
    top: calc(env(safe-area-inset-top, 0px) + 86px) !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    width: min(520px, calc(100vw - 32px)) !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 12px 18px !important;
    border-radius: 18px !important;
    background: #eaf2ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .16) !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
}

.ncm-toast-notice.is-hiding {
    opacity: 0 !important;
    transition: opacity .35s ease !important;
}

.ncm-wrap {
    height: min(760px, calc(100dvh - 156px)) !important;
    max-height: min(760px, calc(100dvh - 156px)) !important;
    min-height: 460px !important;
    overflow: hidden !important;
    display: block !important;
    box-sizing: border-box !important;
}

.ncm-layout {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 360px minmax(0, 1fr) !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}

.ncm-sidebar {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.ncm-sidebar-head {
    flex: 0 0 auto !important;
    margin: 0 0 16px 0 !important;
}

.ncm-thread-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 6px 4px 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.ncm-thread-item {
    flex: 0 0 82px !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-item p {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.ncm-thread {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.ncm-thread-head {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    max-height: 72px !important;
    overflow: hidden !important;
    padding: 0 0 12px 0 !important;
    box-sizing: border-box !important;
}

.ncm-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 16px 18px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
}

.ncm-messages::-webkit-scrollbar,
.ncm-thread-list::-webkit-scrollbar {
    width: 8px !important;
}

.ncm-messages::-webkit-scrollbar-thumb,
.ncm-thread-list::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 999px !important;
}

.ncm-reply {
    flex: 0 0 100px !important;
    height: 100px !important;
    min-height: 100px !important;
    max-height: 100px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 10px 16px 12px !important;
    border-top: 1px solid #e5e7eb !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.ncm-reply form {
    display: grid !important;
    grid-template-columns: minmax(260px, 620px) 96px !important;
    justify-content: end !important;
    align-items: end !important;
    gap: 10px !important;
    height: 78px !important;
    max-height: 78px !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-reply textarea {
    display: block !important;
    width: 100% !important;
    height: 78px !important;
    min-height: 78px !important;
    max-height: 78px !important;
    resize: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.ncm-reply button,
.ncm-reply input[type="submit"] {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-self: end !important;
    justify-self: end !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

.ncm-message {
    flex: 0 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ncm-bubble {
    max-width: min(560px, 70%) !important;
    overflow-wrap: anywhere !important;
}

@media (max-width: 900px) {
    .ncm-toast-notice,
    .ncm-notice {
        top: calc(env(safe-area-inset-top, 0px) + 72px) !important;
        width: min(420px, calc(100vw - 24px)) !important;
    }

    .ncm-wrap {
        height: calc(100dvh - 128px) !important;
        max-height: calc(100dvh - 128px) !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .ncm-layout {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: 30% minmax(0, 70%) !important;
        overflow: hidden !important;
    }

    .ncm-sidebar {
        grid-row: 1 !important;
        min-height: 0 !important;
        max-height: 100% !important;
        overflow: hidden !important;
        padding-bottom: 10px !important;
        border-right: 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .ncm-thread-list {
        min-height: 0 !important;
        overflow-y: auto !important;
    }

    .ncm-thread-item {
        flex-basis: 70px !important;
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
    }

    .ncm-thread {
        grid-row: 2 !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
    }

    .ncm-thread-head {
        max-height: 56px !important;
        padding-bottom: 8px !important;
    }

    .ncm-messages {
        min-height: 0 !important;
        overflow-y: auto !important;
        padding: 8px 8px 12px !important;
    }

    .ncm-reply {
        flex-basis: 84px !important;
        height: 84px !important;
        min-height: 84px !important;
        max-height: 84px !important;
        padding: 7px 6px 8px !important;
    }

    .ncm-reply form {
        grid-template-columns: minmax(0, 1fr) 74px !important;
        gap: 7px !important;
        height: 68px !important;
        max-height: 68px !important;
        justify-content: stretch !important;
    }

    .ncm-reply textarea {
        height: 66px !important;
        min-height: 66px !important;
        max-height: 66px !important;
        padding: 10px 12px !important;
        font-size: 14px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        padding: 0 6px !important;
        font-size: 13px !important;
    }

    .ncm-bubble {
        max-width: min(84vw, 420px) !important;
    }
}

@media (max-width: 520px) {
    .ncm-wrap {
        height: calc(100dvh - 120px) !important;
        max-height: calc(100dvh - 120px) !important;
    }

    .ncm-layout {
        grid-template-rows: 28% minmax(0, 72%) !important;
    }
}


/* 1.0.10 - sztywna wysokość wyliczana JS-em między górną i dolną belką */
:root {
    --ncm-fixed-height: 620px;
}

.ncm-toast-notice,
.ncm-notice {
    position: fixed !important;
    left: 50% !important;
    top: calc(env(safe-area-inset-top, 0px) + 86px) !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    width: min(520px, calc(100vw - 32px)) !important;
    margin: 0 !important;
    padding: 12px 18px !important;
    border-radius: 18px !important;
    background: #eaf2ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .16) !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
}

.ncm-toast-notice.is-hiding,
.ncm-notice.is-hiding {
    opacity: 0 !important;
    transition: opacity .35s ease !important;
}

.ncm-shell,
.ncm-wrap {
    height: var(--ncm-fixed-height) !important;
    max-height: var(--ncm-fixed-height) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-layout {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 360px minmax(0, 1fr) !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
}

.ncm-sidebar {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.ncm-sidebar-head {
    flex: 0 0 auto !important;
}

.ncm-thread-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    box-sizing: border-box !important;
}

.ncm-thread-item {
    flex: 0 0 82px !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}

.ncm-thread-head {
    flex: 0 0 auto !important;
    max-height: 72px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

.ncm-reply {
    flex: 0 0 100px !important;
    height: 100px !important;
    min-height: 100px !important;
    max-height: 100px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-reply form {
    display: grid !important;
    grid-template-columns: minmax(260px, 620px) 96px !important;
    justify-content: end !important;
    align-items: end !important;
    gap: 10px !important;
    height: 78px !important;
    max-height: 78px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-reply textarea {
    height: 78px !important;
    min-height: 78px !important;
    max-height: 78px !important;
    resize: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.ncm-reply button,
.ncm-reply input[type="submit"] {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-self: end !important;
    justify-self: end !important;
    box-sizing: border-box !important;
}

@media (max-width: 900px) {
    :root {
        --ncm-fixed-height: calc(100dvh - 126px);
    }

    .ncm-toast-notice,
    .ncm-notice {
        top: calc(env(safe-area-inset-top, 0px) + 72px) !important;
        width: min(420px, calc(100vw - 24px)) !important;
    }

    .ncm-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: 30% minmax(0, 70%) !important;
    }

    .ncm-sidebar {
        grid-row: 1 !important;
        border-right: 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .ncm-thread {
        grid-row: 2 !important;
    }

    .ncm-thread-item {
        flex-basis: 70px !important;
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
    }

    .ncm-thread-head {
        max-height: 54px !important;
    }

    .ncm-reply {
        flex-basis: 84px !important;
        height: 84px !important;
        min-height: 84px !important;
        max-height: 84px !important;
    }

    .ncm-reply form {
        grid-template-columns: minmax(0, 1fr) 74px !important;
        height: 68px !important;
        max-height: 68px !important;
        gap: 7px !important;
        justify-content: stretch !important;
    }

    .ncm-reply textarea {
        height: 66px !important;
        min-height: 66px !important;
        max-height: 66px !important;
    }

    .ncm-reply button,
    .ncm-reply input[type="submit"] {
        width: 74px !important;
        min-width: 74px !important;
        max-width: 74px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}


/* 1.0.11 - desktop: okno wiadomości wyższe, ale nadal zamknięte */
@media (min-width: 901px) {
    :root {
        --ncm-fixed-height: min(820px, calc(100dvh - 110px));
    }

    .ncm-shell,
    .ncm-wrap {
        height: var(--ncm-fixed-height) !important;
        max-height: var(--ncm-fixed-height) !important;
        min-height: 680px !important;
    }

    .ncm-layout,
    .ncm-sidebar,
    .ncm-thread {
        height: 100% !important;
        max-height: 100% !important;
        min-height: 0 !important;
    }
}


/* 1.0.12 - wiadomości jako dwa osobne ekrany: lista albo rozmowa */
.ncm-shell {
    height: min(820px, calc(100dvh - 120px)) !important;
    max-height: min(820px, calc(100dvh - 120px)) !important;
    min-height: 560px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-view-list,
.ncm-view-thread {
    display: block !important;
}

/* Ekran listy rozmów */
.ncm-list-screen {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-list-head {
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr minmax(260px, 420px) !important;
    gap: 18px !important;
    align-items: end !important;
    margin-bottom: 18px !important;
}

.ncm-list-head h2 {
    margin: 0 !important;
}

.ncm-search {
    display: grid !important;
    gap: 6px !important;
}

.ncm-search span {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #64748b !important;
}

.ncm-search input {
    width: 100% !important;
    min-height: 46px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
}

.ncm-view-list .ncm-thread-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 14px !important;
    align-content: start !important;
    padding: 2px 6px 8px 2px !important;
    box-sizing: border-box !important;
}

.ncm-view-list .ncm-thread-item {
    height: 104px !important;
    min-height: 104px !important;
    max-height: 104px !important;
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-view-list .ncm-thread-item.has-unread {
    border-color: #2563eb !important;
    box-shadow: 0 12px 34px rgba(37, 99, 235, .12) !important;
}

.ncm-view-list .ncm-thread-meta small {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Ekran rozmowy */
.ncm-thread-screen {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-thread-head {
    flex: 0 0 auto !important;
    max-height: 74px !important;
    overflow: hidden !important;
    padding-bottom: 10px !important;
    box-sizing: border-box !important;
}

.ncm-thread-target {
    display: none !important;
}

.ncm-thread-screen .ncm-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 16px 18px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.ncm-load-older {
    align-self: center !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #eef2f7 !important;
    color: #334155 !important;
    padding: 8px 14px !important;
    font-weight: 800 !important;
    cursor: not-allowed !important;
    opacity: .85 !important;
}

/* Dolny pasek rozmowy: Wstecz / pole / Wyślij */
.ncm-thread-screen .ncm-reply {
    flex: 0 0 92px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    display: grid !important;
    grid-template-columns: 96px minmax(260px, 620px) 96px !important;
    justify-content: center !important;
    align-items: end !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 10px 14px 12px !important;
    border-top: 1px solid #e5e7eb !important;
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-back-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 14px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply textarea {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    resize: none !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply button {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    align-self: end !important;
    justify-self: end !important;
    box-sizing: border-box !important;
}

.ncm-message {
    flex: 0 0 auto !important;
}

.ncm-bubble {
    max-width: min(580px, 74%) !important;
}

.ncm-toast-notice,
.ncm-notice {
    position: fixed !important;
    left: 50% !important;
    top: calc(env(safe-area-inset-top, 0px) + 86px) !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    pointer-events: none !important;
}

.ncm-toast-notice.is-hiding,
.ncm-notice.is-hiding {
    opacity: 0 !important;
    transition: opacity .35s ease !important;
}

@media (max-width: 760px) {
    .ncm-shell {
        height: calc(100dvh - 124px) !important;
        max-height: calc(100dvh - 124px) !important;
        min-height: 0 !important;
    }

    .ncm-list-head {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .ncm-view-list .ncm-thread-list {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .ncm-view-list .ncm-thread-item {
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        border-radius: 18px !important;
    }

    .ncm-thread-screen .ncm-thread-head {
        max-height: 58px !important;
        padding-bottom: 8px !important;
    }

    .ncm-thread-screen .ncm-messages {
        padding: 8px 8px 12px !important;
    }

    .ncm-thread-screen .ncm-reply {
        grid-template-columns: 72px minmax(0, 1fr) 72px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        padding: 8px 6px 8px !important;
        gap: 6px !important;
    }

    .ncm-back-button,
    .ncm-thread-screen .ncm-reply button {
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 13px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        font-size: 14px !important;
        padding: 10px 11px !important;
    }

    .ncm-bubble {
        max-width: min(84vw, 420px) !important;
    }
}


/* 1.0.13 - poprawa proporcji nowego układu wiadomości */

/* Całość zwężona do szerokości zbliżonej do dolnej belki na desktopie */
.ncm-shell {
    width: min(100%, 980px) !important;
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    height: min(760px, calc(100dvh - 126px)) !important;
    max-height: min(760px, calc(100dvh - 126px)) !important;
    min-height: 540px !important;
    padding: 24px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Ekran listy rozmów */
.ncm-list-screen {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-list-head {
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: start !important;
    margin: 0 0 18px !important;
}

.ncm-list-head h2 {
    margin: 0 !important;
    font-size: clamp(28px, 3vw, 42px) !important;
    line-height: 1.05 !important;
}

.ncm-search {
    width: min(100%, 520px) !important;
    max-width: 520px !important;
    display: grid !important;
    gap: 6px !important;
}

.ncm-search input {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}

/* Kontakty zawsze jako pionowa lista */
.ncm-view-list .ncm-thread-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 2px 6px 8px 2px !important;
    box-sizing: border-box !important;
}

.ncm-view-list .ncm-thread-item {
    flex: 0 0 92px !important;
    width: 100% !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Ekran rozmowy też w tym samym węższym kontenerze */
.ncm-thread-screen {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-thread-head {
    flex: 0 0 auto !important;
    max-height: 76px !important;
    overflow: hidden !important;
    padding: 0 0 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-thread-head h2 {
    margin: 0 !important;
    font-size: clamp(26px, 3vw, 38px) !important;
    line-height: 1.05 !important;
}

.ncm-thread-screen .ncm-thread-head p {
    margin: 4px 0 0 !important;
}

/* Wiadomości mają właściwy kontener i nie wypychają formularza */
.ncm-thread-screen .ncm-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 8px 18px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.ncm-thread-screen .ncm-message {
    flex: 0 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-bubble {
    max-width: min(560px, 74%) !important;
    box-sizing: border-box !important;
}

/* Dolny pasek rozmowy - nic nie ucieka na boki */
.ncm-thread-screen .ncm-reply {
    flex: 0 0 92px !important;
    width: 100% !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) 96px !important;
    align-items: end !important;
    justify-content: stretch !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 10px 0 0 !important;
    border-top: 1px solid #e5e7eb !important;
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply .ncm-back-button {
    grid-column: 1 !important;
}

.ncm-thread-screen .ncm-reply textarea {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    resize: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply button {
    grid-column: 3 !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-self: end !important;
    justify-self: end !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.ncm-back-button {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    align-self: end !important;
    justify-self: start !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Nadpisanie starych resztek layoutu dwukolumnowego */
.ncm-layout,
.ncm-sidebar,
.ncm-thread {
    width: auto !important;
    max-width: none !important;
}

.ncm-view-list .ncm-layout,
.ncm-view-thread .ncm-layout {
    display: block !important;
}

/* Mobile */
@media (max-width: 760px) {
    .ncm-shell {
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100dvh - 124px) !important;
        max-height: calc(100dvh - 124px) !important;
        min-height: 0 !important;
        padding: 16px !important;
        border-radius: 22px !important;
    }

    .ncm-search {
        width: 100% !important;
        max-width: 100% !important;
    }

    .ncm-view-list .ncm-thread-item {
        flex-basis: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        grid-template-columns: 50px minmax(0, 1fr) auto !important;
        border-radius: 18px !important;
    }

    .ncm-thread-screen .ncm-thread-head {
        max-height: 58px !important;
        padding-bottom: 8px !important;
    }

    .ncm-thread-screen .ncm-messages {
        padding: 8px 2px 12px !important;
    }

    .ncm-thread-screen .ncm-reply {
        grid-template-columns: 68px minmax(0, 1fr) 68px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        gap: 6px !important;
        padding-top: 8px !important;
    }

    .ncm-back-button,
    .ncm-thread-screen .ncm-reply button {
        width: 68px !important;
        min-width: 68px !important;
        max-width: 68px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        font-size: 12px !important;
        border-radius: 13px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        padding: 10px !important;
        font-size: 14px !important;
    }

    .ncm-thread-screen .ncm-bubble {
        max-width: min(84vw, 420px) !important;
    }
}


/* 1.0.14 - dopieszczenie układu wiadomości */

/* Szerokość bliżej dolnej belki */
.ncm-shell {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 22px !important;
}

/* Lista: bez nagłówka, wyszukiwarka pełna szerokość */
.ncm-list-head {
    display: block !important;
    margin: 0 0 18px !important;
}

.ncm-list-head h2,
.ncm-search span {
    display: none !important;
}

.ncm-search {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.ncm-search input {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 50px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}

/* Pionowa lista kontaktów w węższym kontenerze */
.ncm-view-list .ncm-thread-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.ncm-view-list .ncm-thread-item {
    width: 100% !important;
    flex-basis: 90px !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
}

/* Rozmowa: Wstecz u góry na środku */
.ncm-thread-screen .ncm-thread-head {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    grid-template-areas:
        ". back ."
        "title title title"
        "sub sub sub" !important;
    justify-items: center !important;
    align-items: center !important;
    gap: 4px !important;
    max-height: 118px !important;
    padding: 0 0 12px !important;
    overflow: hidden !important;
}

.ncm-thread-screen .ncm-thread-head .ncm-back-button {
    grid-area: back !important;
    width: auto !important;
    min-width: 108px !important;
    max-width: 160px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    align-self: center !important;
    justify-self: center !important;
    margin: 0 !important;
}

.ncm-thread-screen .ncm-thread-head h2 {
    grid-area: title !important;
    text-align: center !important;
    margin: 4px 0 0 !important;
}

.ncm-thread-screen .ncm-thread-head p {
    grid-area: sub !important;
    text-align: center !important;
    margin: 0 !important;
}

/* Dolny pasek: textarea + Wyślij, bez Wstecz */
.ncm-thread-screen .ncm-reply {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 96px !important;
    justify-content: stretch !important;
    align-items: end !important;
    gap: 10px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    padding: 10px 0 0 !important;
}

.ncm-thread-screen .ncm-reply textarea {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.ncm-thread-screen .ncm-reply button {
    grid-column: 2 !important;
    justify-self: end !important;
    align-self: end !important;
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
}

/* Reset po wcześniejszej wersji, gdzie .ncm-back-button był częścią dolnego paska */
.ncm-thread-screen .ncm-reply .ncm-back-button {
    display: none !important;
}

@media (max-width: 760px) {
    .ncm-shell {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
    }

    .ncm-search input {
        min-height: 46px !important;
    }

    .ncm-view-list .ncm-thread-item {
        flex-basis: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
    }

    .ncm-thread-screen .ncm-thread-head {
        max-height: 104px !important;
        padding-bottom: 10px !important;
    }

    .ncm-thread-screen .ncm-thread-head .ncm-back-button {
        min-width: 92px !important;
        max-width: 120px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        font-size: 12px !important;
    }

    .ncm-thread-screen .ncm-reply {
        grid-template-columns: minmax(0, 1fr) 72px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        gap: 7px !important;
    }

    .ncm-thread-screen .ncm-reply button {
        width: 72px !important;
        min-width: 72px !important;
        max-width: 72px !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 12px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
    }
}


/* 1.0.15 - drobny retusz wiadomości */

/* Komunikat wysłania wyłączony całkowicie, bez wpływu na układ i scroll */
.ncm-notice,
.ncm-toast-notice {
    display: none !important;
}

/* Wyślij odrobinę bardziej do prawej */
.ncm-thread-screen .ncm-reply {
    overflow: visible !important;
}

.ncm-thread-screen .ncm-reply button {
    transform: translateX(18px) !important;
}

/* Na telefonach skrócenie okna o wysokość dolnego paska pisania, żeby widok nie był za długi */
@media (max-width: 760px) {
    .ncm-shell {
        height: calc(100dvh - 188px) !important;
        max-height: calc(100dvh - 188px) !important;
    }

    .ncm-thread-screen .ncm-reply button {
        transform: translateX(8px) !important;
    }
}

@media (max-width: 420px) {
    .ncm-shell {
        height: calc(100dvh - 196px) !important;
        max-height: calc(100dvh - 196px) !important;
    }
}


/* 1.0.16 - Wstecz w jednej belce z rozmową, mniej straconego miejsca */
.ncm-thread-screen .ncm-thread-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas:
        "back title"
        "back sub" !important;
    column-gap: 14px !important;
    row-gap: 2px !important;
    align-items: center !important;
    justify-items: start !important;
    max-height: 74px !important;
    min-height: 58px !important;
    padding: 0 0 8px !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-thread-head .ncm-back-button {
    grid-area: back !important;
    width: auto !important;
    min-width: 92px !important;
    max-width: 120px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    align-self: center !important;
    justify-self: start !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-thread-head h2 {
    grid-area: title !important;
    text-align: left !important;
    justify-self: start !important;
    align-self: end !important;
    margin: 0 !important;
    line-height: 1.05 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ncm-thread-screen .ncm-thread-head p {
    grid-area: sub !important;
    text-align: left !important;
    justify-self: start !important;
    align-self: start !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    min-width: 0 !important;
}

/* Trochę więcej miejsca dla wiadomości, trochę mniej pustego marginesu */
.ncm-thread-screen .ncm-messages {
    padding-top: 6px !important;
}

/* Minimalne skrócenie całego okna po poprzednim retuszu */
@media (min-width: 761px) {
    .ncm-shell {
        height: min(748px, calc(100dvh - 132px)) !important;
        max-height: min(748px, calc(100dvh - 132px)) !important;
    }
}

@media (max-width: 760px) {
    .ncm-shell {
        height: calc(100dvh - 194px) !important;
        max-height: calc(100dvh - 194px) !important;
    }

    .ncm-thread-screen .ncm-thread-head {
        grid-template-columns: auto minmax(0, 1fr) !important;
        column-gap: 10px !important;
        max-height: 64px !important;
        min-height: 52px !important;
        padding-bottom: 6px !important;
    }

    .ncm-thread-screen .ncm-thread-head .ncm-back-button {
        min-width: 74px !important;
        max-width: 86px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }

    .ncm-thread-screen .ncm-thread-head h2 {
        font-size: 24px !important;
    }

    .ncm-thread-screen .ncm-thread-head p {
        font-size: 14px !important;
    }
}

@media (max-width: 420px) {
    .ncm-shell {
        height: calc(100dvh - 202px) !important;
        max-height: calc(100dvh - 202px) !important;
    }

    .ncm-thread-screen .ncm-thread-head .ncm-back-button {
        min-width: 68px !important;
        max-width: 78px !important;
        padding: 0 6px !important;
    }
}


/* 1.0.17 - belka rozmowy na górze: Wstecz + avatar + nazwa */

/* Nagłówek rozmowy jako górna belka, bez osobnego opisu pod spodem */
.ncm-thread-screen .ncm-thread-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "back person ." !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 12px !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 0 0 10px !important;
    margin: 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* ukrywamy stary tytuł/opis, gdyby został z cache albo starszego HTML */
.ncm-thread-screen .ncm-thread-head h2,
.ncm-thread-screen .ncm-thread-head p {
    display: none !important;
}

.ncm-thread-screen .ncm-thread-head .ncm-back-button {
    grid-area: back !important;
    width: auto !important;
    min-width: 88px !important;
    max-width: 116px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    justify-self: start !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

.ncm-thread-person {
    grid-area: person !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: center !important;
    align-self: center !important;
}

.ncm-thread-person-avatar {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    box-sizing: border-box !important;
    font-weight: 900 !important;
    color: #111827 !important;
}

.ncm-thread-person-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.ncm-thread-person-name {
    min-width: 0 !important;
    max-width: min(360px, 52vw) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    color: #111827 !important;
}

/* Po skróceniu belki dajemy więcej miejsca wiadomościom */
.ncm-thread-screen .ncm-messages {
    padding-top: 10px !important;
}

/* Całość minimalnie krótsza, ale bez zabierania miejsca polu pisania */
@media (min-width: 761px) {
    .ncm-shell {
        height: min(738px, calc(100dvh - 138px)) !important;
        max-height: min(738px, calc(100dvh - 138px)) !important;
    }
}

@media (max-width: 760px) {
    .ncm-shell {
        height: calc(100dvh - 198px) !important;
        max-height: calc(100dvh - 198px) !important;
    }

    .ncm-thread-screen .ncm-thread-head {
        grid-template-columns: auto minmax(0, 1fr) 1px !important;
        column-gap: 8px !important;
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        padding-bottom: 8px !important;
    }

    .ncm-thread-screen .ncm-thread-head .ncm-back-button {
        min-width: 64px !important;
        max-width: 74px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 7px !important;
        font-size: 12px !important;
        border-radius: 13px !important;
    }

    .ncm-thread-person {
        gap: 7px !important;
    }

    .ncm-thread-person-avatar {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }

    .ncm-thread-person-name {
        max-width: 42vw !important;
        font-size: 20px !important;
    }
}

@media (max-width: 420px) {
    .ncm-shell {
        height: calc(100dvh - 206px) !important;
        max-height: calc(100dvh - 206px) !important;
    }

    .ncm-thread-person-name {
        max-width: 38vw !important;
        font-size: 19px !important;
    }
}


/* 1.0.18 - nagłówek aktywnej rozmowy przeniesiony na globalną górną belkę */

/*
 * Ten pasek jest renderowany przez moduł wiadomości, ale pozycjonowany fixed
 * na wysokości globalnej belki community, czyli tam, gdzie jest identyfikator id.tablica.cc.
 */
.ncm-thread-topbar {
    position: fixed !important;
    left: max(24px, calc((100vw - 1180px) / 2 + 24px)) !important;
    right: max(170px, calc((100vw - 1180px) / 2 + 170px)) !important;
    top: calc(env(safe-area-inset-top, 0px) + 18px) !important;
    z-index: 99990 !important;

    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;

    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "back person spacer" !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 12px !important;

    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    box-sizing: border-box !important;
}

/* elementy w pasku mają być klikalne */
.ncm-thread-topbar .ncm-back-button,
.ncm-thread-topbar .ncm-thread-person {
    pointer-events: auto !important;
}

.ncm-thread-topbar .ncm-back-button {
    grid-area: back !important;
    justify-self: start !important;
    align-self: center !important;

    width: auto !important;
    min-width: 88px !important;
    max-width: 118px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;

    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    box-sizing: border-box !important;
}

.ncm-thread-topbar .ncm-thread-person {
    grid-area: person !important;
    justify-self: center !important;
    align-self: center !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    min-width: 0 !important;
    max-width: min(420px, 54vw) !important;
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .86) !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08) !important;
    box-sizing: border-box !important;
}

.ncm-thread-topbar .ncm-thread-person-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    font-weight: 900 !important;
}

.ncm-thread-topbar .ncm-thread-person-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.ncm-thread-topbar .ncm-thread-person-name {
    min-width: 0 !important;
    max-width: 300px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    color: #111827 !important;
}

/*
 * Skoro nagłówek rozmowy jest na globalnej belce, nie zajmuje miejsca w karcie.
 * Karta zaczyna się od wiadomości.
 */
.ncm-thread-screen {
    padding-top: 0 !important;
}

.ncm-thread-screen > .ncm-thread-topbar {
    flex: 0 0 0 !important;
}

.ncm-thread-screen .ncm-messages {
    padding-top: 0 !important;
}

/* Desktop: karta może być odrobinę niżej pod globalną belką */
@media (min-width: 761px) {
    .ncm-shell {
        margin-top: 18px !important;
    }
}

/* Mobile: pasek rozmowy na wysokości białej belki z JB75PL */
@media (max-width: 760px) {
    .ncm-thread-topbar {
        left: 18px !important;
        right: 96px !important;
        top: calc(env(safe-area-inset-top, 0px) + 134px) !important;

        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        column-gap: 8px !important;
    }

    .ncm-thread-topbar .ncm-back-button {
        min-width: 64px !important;
        max-width: 72px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 7px !important;
        font-size: 12px !important;
        border-radius: 13px !important;
    }

    .ncm-thread-topbar .ncm-thread-person {
        max-width: min(240px, 44vw) !important;
        height: 34px !important;
        padding: 0 10px !important;
        gap: 7px !important;
    }

    .ncm-thread-topbar .ncm-thread-person-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
    }

    .ncm-thread-topbar .ncm-thread-person-name {
        max-width: 150px !important;
        font-size: 15px !important;
    }

    .ncm-shell {
        margin-top: 10px !important;
    }
}

@media (max-width: 420px) {
    .ncm-thread-topbar {
        left: 14px !important;
        right: 88px !important;
    }

    .ncm-thread-topbar .ncm-thread-person {
        max-width: 40vw !important;
    }

    .ncm-thread-topbar .ncm-thread-person-name {
        max-width: 110px !important;
    }
}


/* 1.0.19 - pasek rozmowy dokładnie w globalnej górnej belce */

/* Domyślne wartości, zanim JS zmierzy belkę */
:root {
    --ncm-global-top: 18px;
    --ncm-global-left: 32px;
    --ncm-global-width: calc(100vw - 220px);
    --ncm-global-height: 54px;
}

/* To ma siedzieć na białej belce community, nie w karcie wiadomości */
.ncm-thread-topbar {
    position: fixed !important;
    top: calc(var(--ncm-global-top) + 0px) !important;
    left: var(--ncm-global-left) !important;
    width: var(--ncm-global-width) !important;
    height: var(--ncm-global-height) !important;
    min-height: var(--ncm-global-height) !important;
    max-height: var(--ncm-global-height) !important;
    right: auto !important;

    z-index: 2147483000 !important;
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) 120px !important;
    grid-template-areas: "back person spacer" !important;
    align-items: center !important;
    justify-items: center !important;

    padding: 0 16px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Klikalne tylko elementy, nie cała warstwa */
.ncm-thread-topbar .ncm-back-button,
.ncm-thread-topbar .ncm-thread-person {
    pointer-events: auto !important;
}

.ncm-thread-topbar .ncm-back-button {
    grid-area: back !important;
    justify-self: start !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: auto !important;
    min-width: 86px !important;
    max-width: 112px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;

    margin: 0 !important;
    padding: 0 13px !important;
    border-radius: 14px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.ncm-thread-topbar .ncm-thread-person {
    grid-area: person !important;
    justify-self: center !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;

    height: 38px !important;
    max-width: min(340px, 52vw) !important;
    min-width: 0 !important;
    padding: 0 13px !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.ncm-thread-topbar .ncm-thread-person-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
}

.ncm-thread-topbar .ncm-thread-person-name {
    max-width: 260px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    color: #111827 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Wewnątrz karty nagłówek nie zajmuje miejsca */
.ncm-thread-screen > .ncm-thread-topbar {
    flex: 0 0 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Karta wiadomości bez pustego miejsca po nagłówku */
.ncm-thread-screen .ncm-messages {
    padding-top: 0 !important;
}

/* Na desktopie karta lekko niżej, bo belka jest globalna */
@media (min-width: 761px) {
    .ncm-shell {
        margin-top: 24px !important;
    }
}

/* Mobile: globalna belka jest niżej pod paskiem przeglądarki, JS ją mierzy; fallback zostaje rozsądny */
@media (max-width: 760px) {
    :root {
        --ncm-global-top: 138px;
        --ncm-global-left: 14px;
        --ncm-global-width: calc(100vw - 112px);
        --ncm-global-height: 58px;
    }

    .ncm-thread-topbar {
        grid-template-columns: 72px minmax(0, 1fr) 1px !important;
        padding: 0 8px !important;
    }

    .ncm-thread-topbar .ncm-back-button {
        min-width: 62px !important;
        max-width: 70px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 7px !important;
        font-size: 12px !important;
        border-radius: 13px !important;
    }

    .ncm-thread-topbar .ncm-thread-person {
        max-width: min(210px, 42vw) !important;
        gap: 7px !important;
        padding: 0 6px !important;
    }

    .ncm-thread-topbar .ncm-thread-person-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
    }

    .ncm-thread-topbar .ncm-thread-person-name {
        max-width: 130px !important;
        font-size: 15px !important;
    }

    .ncm-shell {
        margin-top: 14px !important;
    }
}


/* 1.0.20 - slot messages w globalnej górnej belce */
.ncm-global-topbar-host {
    position: relative !important;
}

.ncm-global-topbar-slot {
    position: absolute !important;
    left: 20px !important;
    right: 150px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 44px !important;
    z-index: 999 !important;
    pointer-events: none !important;
    display: block !important;
    box-sizing: border-box !important;
}

.ncm-topbar-mounted .ncm-global-topbar-slot .ncm-thread-topbar {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    z-index: auto !important;

    display: grid !important;
    grid-template-columns: 110px minmax(0, 1fr) 110px !important;
    grid-template-areas: "back person spacer" !important;
    align-items: center !important;
    justify-items: center !important;
    column-gap: 10px !important;

    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.ncm-topbar-mounted .ncm-thread-topbar .ncm-back-button,
.ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person {
    pointer-events: auto !important;
}

.ncm-topbar-mounted .ncm-thread-topbar .ncm-back-button {
    grid-area: back !important;
    justify-self: start !important;
    align-self: center !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-width: 86px !important;
    max-width: 108px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;

    padding: 0 12px !important;
    border-radius: 14px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person {
    grid-area: person !important;
    justify-self: center !important;
    align-self: center !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;

    max-width: min(360px, 54vw) !important;
    min-width: 0 !important;
    height: 38px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person-avatar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
}

.ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person-name {
    max-width: 260px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    color: #111827 !important;
}

.ncm-topbar-mounted .ncm-thread-screen > .ncm-thread-topbar {
    flex: 0 0 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

.ncm-topbar-mounted .ncm-thread-screen .ncm-messages {
    padding-top: 0 !important;
}

@media (max-width: 760px) {
    .ncm-global-topbar-slot {
        left: 12px !important;
        right: 92px !important;
        height: 42px !important;
    }

    .ncm-topbar-mounted .ncm-global-topbar-slot .ncm-thread-topbar {
        grid-template-columns: 68px minmax(0, 1fr) 1px !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        column-gap: 7px !important;
    }

    .ncm-topbar-mounted .ncm-thread-topbar .ncm-back-button {
        min-width: 62px !important;
        max-width: 68px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        padding: 0 6px !important;
        font-size: 12px !important;
        border-radius: 13px !important;
    }

    .ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person {
        max-width: min(220px, 42vw) !important;
        height: 34px !important;
        gap: 7px !important;
        padding: 0 4px !important;
    }

    .ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person-avatar {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
    }

    .ncm-topbar-mounted .ncm-thread-topbar .ncm-thread-person-name {
        max-width: 120px !important;
        font-size: 15px !important;
    }
}


/* 1.0.21 - topbar obsługiwany przez Core, bez hacków fixed/JS */
.ncm-thread-topbar,
.ncm-global-topbar-slot {
    display: none !important;
}

.ncm-thread-screen .ncm-thread-head {
    display: none !important;
}

.ncm-view-thread .ncm-shell,
.ncm-shell.ncm-view-thread {
    margin-top: 12px !important;
}

.ncm-topbar-person {
    pointer-events: none !important;
}

/* Karta rozmowy zaczyna się od wiadomości, topbar jest w core */
.ncm-thread-screen {
    padding-top: 0 !important;
}

.ncm-thread-screen .ncm-messages {
    padding-top: 0 !important;
}


/* 1.0.22 - wysokość messages liczona z przestrzeni między górną i dolną belką */
:root {
    --ncm-available-height: calc(100dvh - 160px);
}

/* Karta messages nie ma rozciągać strony, tylko mieścić się między belkami */
.ncm-shell {
    height: var(--ncm-available-height) !important;
    max-height: var(--ncm-available-height) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Oba ekrany messages muszą dziedziczyć zamkniętą wysokość */
.ncm-list-screen,
.ncm-thread-screen {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Lista rozmów scrolluje się sama */
.ncm-view-list .ncm-thread-list,
.ncm-thread-list {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Rozmowa: wiadomości biorą pozostałe miejsce, formularz jest stały na dole */
.ncm-thread-screen {
    display: flex !important;
    flex-direction: column !important;
}

.ncm-thread-screen .ncm-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

.ncm-thread-screen .ncm-reply {
    flex: 0 0 92px !important;
    height: 92px !important;
    min-height: 92px !important;
    max-height: 92px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Na niskich ekranach desktopowych formularz jest trochę niższy */
@media (max-height: 760px) and (min-width: 761px) {
    .ncm-thread-screen .ncm-reply {
        flex-basis: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 62px !important;
        min-height: 62px !important;
        max-height: 62px !important;
    }
}

/* Na bardzo niskich ekranach jeszcze mniej tapicerki, więcej treści */
@media (max-height: 650px) and (min-width: 761px) {
    .ncm-shell {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    .ncm-thread-screen .ncm-reply {
        flex-basis: 74px !important;
        height: 74px !important;
        min-height: 74px !important;
        max-height: 74px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important;
    }

    .ncm-thread-screen .ncm-reply button {
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
    }
}

@media (max-width: 760px) {
    .ncm-shell {
        height: var(--ncm-available-height) !important;
        max-height: var(--ncm-available-height) !important;
        min-height: 0 !important;
    }

    .ncm-thread-screen .ncm-reply {
        flex-basis: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
    }
}

@media (max-height: 720px) and (max-width: 760px) {
    .ncm-thread-screen .ncm-reply {
        flex-basis: 76px !important;
        height: 76px !important;
        min-height: 76px !important;
        max-height: 76px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 58px !important;
        min-height: 58px !important;
        max-height: 58px !important;
    }
}


/* 1.0.23 - messages korzysta z globalnych wymiarów core */
.ncm-shell {
    width: min(100%, var(--ncc-inner-width, 760px)) !important;
    max-width: var(--ncc-inner-width, 760px) !important;
    height: var(--ncc-available-height, calc(100dvh - 160px)) !important;
    max-height: var(--ncc-available-height, calc(100dvh - 160px)) !important;
    min-height: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Lokalna zmienna zostaje tylko aliasem, bez własnego mierzenia w messages */
.ncm-shell {
    --ncm-available-height: var(--ncc-available-height, calc(100dvh - 160px));
}

.ncm-list-screen,
.ncm-thread-screen {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-view-list .ncm-thread-list,
.ncm-thread-list,
.ncm-thread-screen .ncm-messages {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Na niskich ekranach nadal zmniejszamy tylko wnętrze formularza, ale wysokość zewnętrzna pochodzi z core */
@media (max-height: 760px) and (min-width: 761px) {
    .ncm-thread-screen .ncm-reply {
        flex-basis: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 62px !important;
        min-height: 62px !important;
        max-height: 62px !important;
    }
}

@media (max-height: 650px) and (min-width: 761px) {
    .ncm-shell {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    .ncm-thread-screen .ncm-reply {
        flex-basis: 74px !important;
        height: 74px !important;
        min-height: 74px !important;
        max-height: 74px !important;
    }

    .ncm-thread-screen .ncm-reply textarea {
        height: 54px !important;
        min-height: 54px !important;
        max-height: 54px !important;
    }
}


/* 1.0.24 - messages ufa globalnej wysokości core, bez dokładania własnego marginesu */
.ncm-shell {
    height: var(--ncc-available-height, calc(100dvh - 190px)) !important;
    max-height: var(--ncc-available-height, calc(100dvh - 190px)) !important;
}

/* Przy bardzo niskim ekranie odrobinę mniej tapicerki wewnątrz karty */
@media (max-height: 760px) {
    .ncm-shell {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }
}


/* 1.0.25 - formularz nie wypycha Wyślij + avatary przy wiadomościach */

/* Dolny pasek: textarea nie może wypchnąć przycisku poza ekran */
.ncm-thread-screen .ncm-reply {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(72px, 13vw, 96px) !important;
    align-items: end !important;
    gap: clamp(6px, 1.4vw, 12px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply button,
.ncm-thread-screen .ncm-reply input[type="submit"] {
    width: clamp(72px, 13vw, 96px) !important;
    min-width: 0 !important;
    max-width: 96px !important;
    justify-self: end !important;
    transform: none !important;
    box-sizing: border-box !important;
}

/* Wiadomości jako rzędy z avatarem */
.ncm-message {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 38px !important;
    align-items: end !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ncm-message.is-other {
    grid-template-areas: "avatar bubble ." !important;
}

.ncm-message.is-mine {
    grid-template-areas: ". bubble avatar" !important;
}

.ncm-message-avatar {
    grid-area: avatar !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.ncm-message-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.ncm-bubble {
    grid-area: bubble !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ncm-message.is-other .ncm-bubble {
    justify-self: start !important;
}

.ncm-message.is-mine .ncm-bubble {
    justify-self: end !important;
}

/* Niech bąbel nie robi autostrady przez cały ekran */
.ncm-thread-screen .ncm-bubble {
    max-width: min(560px, calc(100% - 6px)) !important;
    overflow-wrap: anywhere !important;
}

/* Na telefonie avatary mniejsze, żeby nie zjadły pola wiadomości */
@media (max-width: 760px) {
    .ncm-thread-screen .ncm-reply {
        grid-template-columns: minmax(0, 1fr) 72px !important;
        gap: 6px !important;
    }

    .ncm-thread-screen .ncm-reply button,
    .ncm-thread-screen .ncm-reply input[type="submit"] {
        width: 72px !important;
        max-width: 72px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        font-size: 12px !important;
    }

    .ncm-message {
        grid-template-columns: 30px minmax(0, 1fr) 30px !important;
        gap: 6px !important;
    }

    .ncm-message-avatar {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        max-width: 28px !important;
        max-height: 28px !important;
        font-size: 12px !important;
    }

    .ncm-thread-screen .ncm-bubble {
        max-width: min(78vw, calc(100% - 4px)) !important;
    }
}

@media (max-width: 390px) {
    .ncm-thread-screen .ncm-reply {
        grid-template-columns: minmax(0, 1fr) 66px !important;
    }

    .ncm-thread-screen .ncm-reply button,
    .ncm-thread-screen .ncm-reply input[type="submit"] {
        width: 66px !important;
        max-width: 66px !important;
    }
}


/* 1.0.26 - czas wiadomości nad treścią, mniejszą czcionką */
.ncm-bubble {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.ncm-bubble time {
    order: 1 !important;
    display: block !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
}

.ncm-bubble p {
    order: 2 !important;
    margin: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

@media (max-width: 760px) {
    .ncm-bubble time {
        font-size: 10px !important;
    }
}


/* 1.0.27 - menu wiadomości, profil z avatara, załączniki */
.ncm-message {
    position: relative !important;
}

.ncm-message-avatar {
    text-decoration: none !important;
    cursor: pointer !important;
}

.ncm-message-menu {
    grid-area: menu !important;
    position: absolute !important;
    bottom: -4px !important;
    z-index: 8 !important;
}

.ncm-message.is-other .ncm-message-menu {
    left: 44px !important;
}

.ncm-message.is-mine .ncm-message-menu {
    right: 44px !important;
}

.ncm-message-menu summary {
    list-style: none !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08) !important;
}

.ncm-message-menu summary::-webkit-details-marker {
    display: none !important;
}

.ncm-message-menu-panel {
    position: absolute !important;
    bottom: 32px !important;
    min-width: 170px !important;
    padding: 8px !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16) !important;
    display: grid !important;
    gap: 6px !important;
    box-sizing: border-box !important;
}

.ncm-message.is-other .ncm-message-menu-panel {
    left: 0 !important;
}

.ncm-message.is-mine .ncm-message-menu-panel {
    right: 0 !important;
}

.ncm-message-menu-item {
    width: 100% !important;
    min-height: 34px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    text-align: center !important;
    padding: 6px 10px !important;
    box-sizing: border-box !important;
}

.ncm-message-menu-item.is-danger {
    background: #fff1f2 !important;
    color: #be123c !important;
}

.ncm-message-menu-panel textarea {
    width: 100% !important;
    min-height: 58px !important;
    resize: vertical !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
}

.ncm-message.is-deleted .ncm-bubble {
    opacity: .82 !important;
    background: #f8fafc !important;
}

.ncm-message-deleted-text {
    color: #64748b !important;
    font-style: italic !important;
}

/* Załącznik w bąblu */
.ncm-message-attachment {
    display: grid !important;
    gap: 6px !important;
    margin-top: 8px !important;
    text-decoration: none !important;
    color: #111827 !important;
}

.ncm-message-attachment img {
    width: 180px !important;
    max-width: 100% !important;
    height: 110px !important;
    object-fit: cover !important;
    border-radius: 14px !important;
    display: block !important;
    background: #f1f5f9 !important;
}

.ncm-message-attachment span {
    font-size: 12px !important;
    color: #475569 !important;
    font-weight: 800 !important;
}

.ncm-message-attachment-placeholder {
    width: 180px !important;
    max-width: 100% !important;
    min-height: 86px !important;
    border-radius: 14px !important;
    background: #eef2f7 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    color: #111827 !important;
}

/* Picker galerii przy formularzu */
.ncm-attachment-picker {
    grid-column: 1 / -1 !important;
    margin-top: 6px !important;
    box-sizing: border-box !important;
}

.ncm-attachment-picker summary {
    cursor: pointer !important;
    font-weight: 800 !important;
    color: #334155 !important;
    font-size: 13px !important;
}

.ncm-attachment-options {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 8px 0 2px !important;
    -webkit-overflow-scrolling: touch !important;
}

.ncm-attachment-option {
    flex: 0 0 112px !important;
    display: grid !important;
    gap: 5px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    background: #fff !important;
}

.ncm-attachment-option input {
    margin: 0 !important;
}

.ncm-attachment-option img,
.ncm-attachment-file {
    width: 100% !important;
    height: 58px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    background: #eef2f7 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.ncm-attachment-option > span:last-child {
    font-size: 11px !important;
    line-height: 1.2 !important;
    color: #475569 !important;
    overflow-wrap: anywhere !important;
}

.ncm-attachment-option:has(input:checked) {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .16) !important;
}

/* Picker zwiększa formularz, więc pozwalamy mu scrollować tylko w środku */
.ncm-thread-screen .ncm-reply {
    overflow: visible !important;
}

@media (max-width: 760px) {
    .ncm-message.is-other .ncm-message-menu {
        left: 34px !important;
    }

    .ncm-message.is-mine .ncm-message-menu {
        right: 34px !important;
    }

    .ncm-message-menu summary {
        width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
    }

    .ncm-message-menu-panel {
        min-width: 150px !important;
    }

    .ncm-message-attachment img,
    .ncm-message-attachment-placeholder {
        width: 150px !important;
        height: 92px !important;
    }

    .ncm-attachment-option {
        flex-basis: 96px !important;
    }
}


/* 1.0.28 - poprawiony układ wiadomości, modal menu, spinacz i przycisk Wyślij */

/* Formularz odpowiedzi: spinacz | textarea | wyślij */
.ncm-thread-screen .ncm-reply {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) clamp(72px, 12vw, 96px) !important;
    align-items: end !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply textarea {
    grid-column: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.ncm-thread-screen .ncm-reply .ncm-send-button,
.ncm-thread-screen .ncm-reply button[type="submit"].ncm-send-button {
    grid-column: 3 !important;
    width: clamp(72px, 12vw, 96px) !important;
    min-width: 72px !important;
    max-width: 96px !important;
    justify-self: end !important;
    align-self: end !important;
    transform: none !important;
    box-sizing: border-box !important;
}

/* Spinacz po lewej pola */
.ncm-attachment-picker {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: end !important;
    justify-self: stretch !important;
    position: relative !important;
    margin: 0 !important;
    min-width: 0 !important;
}

.ncm-attachment-picker summary {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 15px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    list-style: none !important;
    font-size: 20px !important;
    box-sizing: border-box !important;
}

.ncm-attachment-picker summary::-webkit-details-marker {
    display: none !important;
}

.ncm-attachment-options {
    position: absolute !important;
    left: 0 !important;
    bottom: 52px !important;
    z-index: 40 !important;
    width: min(520px, calc(100vw - 40px)) !important;
    max-height: 230px !important;
    overflow: auto !important;
    display: flex !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16) !important;
    box-sizing: border-box !important;
}

/* Wiadomość: kolumna boczna z menu nad avatarem */
.ncm-message {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 46px !important;
    gap: 8px !important;
    align-items: end !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.ncm-message.is-other {
    grid-template-areas: "side bubble ." !important;
}

.ncm-message.is-mine {
    grid-template-areas: ". bubble side" !important;
}

.ncm-message-side {
    grid-area: side !important;
    display: grid !important;
    grid-template-rows: 26px 34px !important;
    gap: 4px !important;
    align-items: center !important;
    justify-items: center !important;
    align-self: end !important;
    width: 46px !important;
    min-width: 46px !important;
    box-sizing: border-box !important;
}

.ncm-message-menu {
    position: static !important;
    grid-row: 1 !important;
    z-index: 8 !important;
}

.ncm-message-menu-spacer {
    width: 26px !important;
    height: 26px !important;
    display: block !important;
}

.ncm-message-avatar {
    grid-row: 2 !important;
    position: static !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.ncm-message-avatar.is-self {
    cursor: default !important;
    pointer-events: none !important;
}

.ncm-bubble {
    grid-area: bubble !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ncm-message.is-other .ncm-bubble {
    justify-self: start !important;
}

.ncm-message.is-mine .ncm-bubble {
    justify-self: end !important;
}

/* Modal menu */
.ncm-message-menu[open]::before {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, .58) !important;
    z-index: 99980 !important;
    pointer-events: auto !important;
}

.ncm-message-menu summary {
    list-style: none !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .08) !important;
}

.ncm-message-menu summary::-webkit-details-marker {
    display: none !important;
}

.ncm-message-menu-panel {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99990 !important;

    width: min(320px, calc(100vw - 36px)) !important;
    min-width: 0 !important;
    padding: 42px 14px 14px !important;
    border-radius: 24px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .28) !important;
    box-sizing: border-box !important;
}

.ncm-message-menu-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    cursor: pointer !important;
}

.ncm-message-menu-content {
    display: grid !important;
    gap: 10px !important;
}

.ncm-message-menu-content form {
    display: grid !important;
    gap: 10px !important;
    margin: 0 !important;
}

.ncm-message-menu-item,
.ncm-message-menu-content form .ncm-message-menu-item {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    text-align: center !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ncm-message-menu-item.is-danger,
.ncm-message-menu-content form .ncm-message-menu-item.is-danger {
    background: #fff1f2 !important;
    color: #be123c !important;
}

.ncm-message-menu-panel textarea {
    width: 100% !important;
    min-height: 72px !important;
    resize: vertical !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}

@media (max-width: 760px) {
    .ncm-thread-screen .ncm-reply {
        grid-template-columns: 40px minmax(0, 1fr) 68px !important;
        gap: 6px !important;
    }

    .ncm-attachment-picker summary {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 18px !important;
    }

    .ncm-thread-screen .ncm-reply .ncm-send-button,
    .ncm-thread-screen .ncm-reply button[type="submit"].ncm-send-button {
        width: 68px !important;
        min-width: 68px !important;
        max-width: 68px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        font-size: 12px !important;
    }

    .ncm-message {
        grid-template-columns: 38px minmax(0, 1fr) 38px !important;
        gap: 6px !important;
    }

    .ncm-message-side {
        width: 38px !important;
        min-width: 38px !important;
        grid-template-rows: 24px 28px !important;
        gap: 3px !important;
    }

    .ncm-message-menu summary {
        width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
    }

    .ncm-message-menu-spacer {
        width: 24px !important;
        height: 24px !important;
    }
}

@media (max-width: 390px) {
    .ncm-thread-screen .ncm-reply {
        grid-template-columns: 38px minmax(0, 1fr) 64px !important;
    }

    .ncm-thread-screen .ncm-reply .ncm-send-button,
    .ncm-thread-screen .ncm-reply button[type="submit"].ncm-send-button {
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
    }
}


/* 1.0.29 - poprawki menu, focus UX i załączników */

/* Bez względu na położenie wiadomości/modal ma być zawsze środkiem ekranu */
.ncm-message .ncm-message-menu[open] .ncm-message-menu-panel,
.ncm-message.is-mine .ncm-message-menu[open] .ncm-message-menu-panel,
.ncm-message.is-other .ncm-message-menu[open] .ncm-message-menu-panel,
.ncm-message-side .ncm-message-menu[open] .ncm-message-menu-panel {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2147483001 !important;
}

/* Przyciemnienie zawsze pełny ekran */
.ncm-message .ncm-message-menu[open]::before,
.ncm-message-side .ncm-message-menu[open]::before {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
}

/* Avatar rozmówcy nad bąblem nie może wpływać na modal menu */
.ncm-message-avatar {
    z-index: 1 !important;
}

.ncm-message-menu {
    z-index: 20 !important;
}

.ncm-message-menu[open] {
    z-index: 2147483000 !important;
}

/* Drobne wzmocnienie widoczności spinacza/pickera */
.ncm-attachment-picker[open] summary {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.ncm-attachment-option input:checked + img,
.ncm-attachment-option input:checked + .ncm-attachment-file {
    outline: 3px solid rgba(37, 99, 235, .25) !important;
}

/* Jeżeli miniatura z galerii nie dojdzie, placeholder dalej ma być widoczny */
.ncm-attachment-file {
    color: #111827 !important;
}


/* 1.0.30 - załączniki wiadomości korzystają z frontowego endpointu /community/message-attachment/ */
.ncm-message-attachment {
    cursor: pointer !important;
}


/* 1.0.31 - modal podglądu załącznika wiadomości */
.ncm-attachment-preview-modal {
    display: none !important;
}

.ncm-attachment-preview-modal.is-open {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483100 !important;
    display: block !important;
}

.ncm-attachment-preview-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, .68) !important;
}

.ncm-attachment-preview-dialog {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(980px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - 42px) !important;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .34) !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
}

.ncm-attachment-preview-close {
    position: absolute !important;
    right: 14px !important;
    top: 12px !important;
    z-index: 2 !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 999px !important;
    border: 0 !important;
    background: #eef2f7 !important;
    color: #111827 !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

.ncm-attachment-preview-title {
    min-height: 66px !important;
    padding: 20px 70px 16px 24px !important;
    border-bottom: 1px solid #eef2f7 !important;
    color: #111827 !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    box-sizing: border-box !important;
}

.ncm-attachment-preview-body {
    min-height: 0 !important;
    max-height: calc(100dvh - 120px) !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0f172a !important;
    overflow: auto !important;
}

.ncm-attachment-preview-body img,
.ncm-attachment-preview-body video {
    display: block !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 130px) !important;
    object-fit: contain !important;
}

.ncm-attachment-preview-body iframe {
    width: 100% !important;
    height: calc(100dvh - 130px) !important;
    border: 0 !important;
    background: #fff !important;
}

.ncm-attachment-preview-download {
    position: absolute !important;
    bottom: 18px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #2563eb !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    padding: 12px 18px !important;
    border-radius: 14px !important;
}

@media (max-width: 760px) {
    .ncm-attachment-preview-dialog {
        width: calc(100vw - 18px) !important;
        max-height: calc(100dvh - 24px) !important;
        border-radius: 20px !important;
    }

    .ncm-attachment-preview-title {
        min-height: 58px !important;
        padding: 17px 62px 14px 18px !important;
        font-size: 15px !important;
    }

    .ncm-attachment-preview-close {
        width: 38px !important;
        height: 38px !important;
        right: 10px !important;
        top: 10px !important;
    }

    .ncm-attachment-preview-body,
    .ncm-attachment-preview-body iframe {
        max-height: calc(100dvh - 100px) !important;
        height: calc(100dvh - 100px) !important;
    }

    .ncm-attachment-preview-body img,
    .ncm-attachment-preview-body video {
        max-height: calc(100dvh - 100px) !important;
    }
}


/* 1.0.32 - menu spinacza wyżej, żeby nie nachodziło na pole pisania */
.ncm-attachment-options {
    bottom: calc(100% + 18px) !important;
    max-height: min(260px, calc(var(--ncc-available-height, 620px) - 150px)) !important;
}

@media (max-width: 760px) {
    .ncm-attachment-options {
        bottom: calc(100% + 14px) !important;
        max-height: min(230px, calc(var(--ncc-available-height, 520px) - 138px)) !important;
    }
}


/* v1.1.0-core: dopasowanie do NEWS Community Core */
.ncm-shell { width: 100%; max-width: none; }
.ncm-shell.nevv-panel { padding: 0; }
.ncm-new-link, .ncm-reply button, .ncm-reply input[type="submit"], .ncm-compose button { border-radius: var(--nevv-radius-button); background: var(--nevv-color-primary); color: #fff; }
.ncm-compose input, .ncm-compose textarea, .ncm-reply textarea, .ncm-search-input { border-radius: var(--nevv-radius-input); color: var(--nevv-color-text); font: inherit; }
.ncm-sidebar, .ncm-thread, .ncm-thread-item, .ncm-bubble { color: var(--nevv-color-text); }
.ncm-topbar-person { gap: 8px; }
.ncm-topbar-avatar img, .ncm-topbar-avatar > span { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }


/* v1.1.1-core: pelna szerokosc kontenera CORE */
.nevv-content .ncm-shell,
.nevv-content .ncm-shell.nevv-panel,
.ncm-shell.nevv-panel {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.nevv-content .ncm-thread-screen,
.nevv-content .ncm-list-screen,
.nevv-content .ncm-layout {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* v1.1.2-core: Wiadomosci wypelniaja cale pole CORE bez dodatkowego marginesu kontenera. */
body.nevv-community-standalone .nevv-content > .ncm-shell,
body.nevv-community-standalone .nevv-content > .ncm-shell.nevv-panel,
body.nevv-community-standalone .nevv-content > .ncm-thread-screen,
body.nevv-community-standalone .nevv-content > .ncm-list-screen,
body.nevv-community-standalone .nevv-content > .ncm-layout {
    margin: calc(-1 * var(--nevv-content-margin, 12px)) !important;
    width: calc(100% + (var(--nevv-content-margin, 12px) * 2)) !important;
    max-width: calc(100% + (var(--nevv-content-margin, 12px) * 2)) !important;
    height: calc(100% + (var(--nevv-content-margin, 12px) * 2)) !important;
    max-height: calc(100% + (var(--nevv-content-margin, 12px) * 2)) !important;
    box-sizing: border-box !important;
}

body.nevv-community-standalone .nevv-content > .ncm-shell .ncm-layout,
body.nevv-community-standalone .nevv-content > .ncm-shell .ncm-thread,
body.nevv-community-standalone .nevv-content > .ncm-shell .ncm-list {
    width: 100% !important;
    max-width: none !important;
}

/* v1.1.3-core: jednolite przyciski, pola i listy wg NEWS Community Core */
body.nevv-community-standalone .ncm-shell button,
body.nevv-community-standalone .ncm-shell input[type="submit"],
body.nevv-community-standalone .ncm-shell .nevv-btn,
body.nevv-community-standalone .ncm-shell a.nevv-btn,
body.nevv-community-standalone .ncm-shell .ncm-new-link,
body.nevv-community-standalone .ncm-shell .ncm-load-older,
body.nevv-community-standalone .ncm-shell .ncm-message-menu-item,
body.nevv-community-standalone .ncm-topbar-back,
body.nevv-community-standalone .ncm-topbar-person {
    font-family: var(--nevv-font-family, inherit) !important;
    font-size: var(--nevv-normal-font-size, 16px) !important;
    border-radius: var(--nevv-radius-button, var(--nevv-radius-md, 10px)) !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

body.nevv-community-standalone .ncm-shell button[type="submit"],
body.nevv-community-standalone .ncm-shell input[type="submit"],
body.nevv-community-standalone .ncm-shell .nevv-btn-primary,
body.nevv-community-standalone .ncm-shell .ncm-new-link,
body.nevv-community-standalone .ncm-shell .ncm-reply button,
body.nevv-community-standalone .ncm-shell .ncm-compose button[type="submit"] {
    background: var(--nevv-color-primary, #2563eb) !important;
    border-color: var(--nevv-color-primary, #2563eb) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

body.nevv-community-standalone .ncm-shell button[type="submit"]:hover,
body.nevv-community-standalone .ncm-shell input[type="submit"]:hover,
body.nevv-community-standalone .ncm-shell .nevv-btn-primary:hover,
body.nevv-community-standalone .ncm-shell .ncm-new-link:hover,
body.nevv-community-standalone .ncm-shell .ncm-reply button:hover,
body.nevv-community-standalone .ncm-shell .ncm-compose button[type="submit"]:hover {
    background: var(--nevv-color-primary-hover, var(--nevv-color-primary, #2563eb)) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}

body.nevv-community-standalone .ncm-shell .nevv-btn-secondary,
body.nevv-community-standalone .ncm-shell button:not([type="submit"]),
body.nevv-community-standalone .ncm-topbar-back,
body.nevv-community-standalone .ncm-topbar-person,
body.nevv-community-standalone .ncm-shell .ncm-load-older,
body.nevv-community-standalone .ncm-shell .ncm-message-menu-item {
    background: var(--nevv-color-button-secondary-bg, rgba(15, 23, 42, .08)) !important;
    border-color: var(--nevv-color-border, #d7deea) !important;
    color: var(--nevv-color-text, #111827) !important;
}

body.nevv-community-standalone .ncm-shell .nevv-btn-secondary:hover,
body.nevv-community-standalone .ncm-shell button:not([type="submit"]):hover,
body.nevv-community-standalone .ncm-topbar-back:hover,
body.nevv-community-standalone .ncm-topbar-person:hover,
body.nevv-community-standalone .ncm-shell .ncm-load-older:hover,
body.nevv-community-standalone .ncm-shell .ncm-message-menu-item:hover {
    background: var(--nevv-color-button-secondary-hover-bg, rgba(15, 23, 42, .12)) !important;
    color: var(--nevv-color-text, #111827) !important;
}

body.nevv-community-standalone .ncm-shell .is-danger,
body.nevv-community-standalone .ncm-shell .ncm-message-menu-item.is-danger {
    background: var(--nevv-color-danger-bg, rgba(220, 38, 38, .08)) !important;
    border-color: var(--nevv-color-danger, #dc2626) !important;
    color: var(--nevv-color-danger, #dc2626) !important;
}

body.nevv-community-standalone .ncm-shell input,
body.nevv-community-standalone .ncm-shell select,
body.nevv-community-standalone .ncm-shell textarea,
body.nevv-community-standalone .ncm-search-input,
body.nevv-community-standalone .ncm-reply textarea,
body.nevv-community-standalone .ncm-compose input,
body.nevv-community-standalone .ncm-compose textarea {
    font-family: var(--nevv-font-family, inherit) !important;
    font-size: var(--nevv-normal-font-size, 16px) !important;
    border-radius: var(--nevv-radius-input, var(--nevv-radius-md, 10px)) !important;
    color: var(--nevv-color-text, #111827) !important;
    background: var(--nevv-color-surface, #fff) !important;
    border-color: var(--nevv-color-border, #d7deea) !important;
}

body.nevv-community-standalone .ncm-thread-item h2.ncm-thread-name {
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--nevv-font-family, inherit) !important;
    font-size: var(--nevv-h2-font-size, 26px) !important;
    line-height: 1.18 !important;
    font-weight: 800 !important;
    color: var(--nevv-h2-color, var(--nevv-color-text, #111827)) !important;
}

body.nevv-community-standalone .ncm-thread-item .ncm-thread-role-label {
    color: var(--nevv-description-color, var(--nevv-color-text, #667085)) !important;
    font-size: var(--nevv-description-font-size, 15px) !important;
    font-weight: 500 !important;
}

body.nevv-community-standalone .ncm-thread-item strong,
body.nevv-community-standalone .ncm-thread-item small,
body.nevv-community-standalone .ncm-thread-item span {
    color: inherit;
}

body.nevv-community-standalone .nevv-topbar .ncm-topbar-back,
body.nevv-community-standalone .nevv-topbar .ncm-topbar-person {
    color: var(--nevv-topbar-menu-text-color, var(--nevv-color-text, #111827)) !important;
    border-radius: var(--nevv-radius-button, var(--nevv-radius-md, 10px)) !important;
}

/* 1.1.4-core - elementy interaktywne korzystaja z wygladu CORE. */
.ncm-shell .nevv-btn,
.ncm-shell button,
.ncm-shell input[type="submit"],
.ncm-shell input[type="button"] {
    min-height: var(--nevv-button-height, 44px) !important;
    height: var(--nevv-button-height, 44px) !important;
    border-radius: var(--nevv-radius-button) !important;
    font-family: var(--nevv-font-family) !important;
    font-size: var(--nevv-button-font-size, 16px) !important;
    line-height: 1 !important;
}
.ncm-shell .nevv-btn-primary,
.ncm-shell button[type="submit"] {
    background: var(--nevv-color-primary) !important;
    border-color: var(--nevv-color-primary) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}
.ncm-shell .nevv-btn-primary:hover,
.ncm-shell button[type="submit"]:hover {
    background: var(--nevv-color-primary-hover) !important;
    border-color: var(--nevv-color-primary-hover) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}
.ncm-shell .nevv-btn-primary:active,
.ncm-shell button[type="submit"]:active,
.ncm-shell .nevv-btn.is-active {
    background: var(--nevv-color-primary-active) !important;
    border-color: var(--nevv-color-primary-active) !important;
    color: var(--nevv-color-on-primary, #fff) !important;
}
.ncm-shell .nevv-input,
.ncm-shell .nevv-select,
.ncm-shell input,
.ncm-shell select,
.ncm-shell textarea {
    border-radius: var(--nevv-radius-input) !important;
    font-family: var(--nevv-font-family) !important;
}
