.chats-page { padding: 10px 12px 24px; }
.chats-list { display: flex; flex-direction: column; gap: 8px; }

.chat-row {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(14, 20, 30, 0.92);
    border: 1px solid rgba(255,255,255,0.05);
}

.chat-ava {
    width: 46px; height: 46px; border-radius: 16px;
    overflow: hidden;
    display: grid; place-items: center;
    background: linear-gradient(160deg, #1b2436, #0a0f18);
    color: #2EE6D6;
    font-weight: 800;
}
.chat-ava img { width: 100%; height: 100%; object-fit: cover; }

.chat-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-row-top strong { font-size: 14px; }
.chat-row-top em {
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 99px; background: #2EE6D6; color: #04110f;
    font-style: normal; font-size: 10px; font-weight: 800;
    display: grid; place-items: center;
}
.chat-row-main p {
    margin-top: 4px;
    color: #8B97A8;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-del {
    border: 0;
    background: transparent;
    color: #8B97A8;
    font-size: 11px;
    font-weight: 700;
}

.thread-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 62px);
    height: calc(100dvh - 62px);
}

.thread-notice {
    margin: 10px 14px 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #FECACA;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.thread-log {
    flex: 1;
    overflow: auto;
    padding: 8px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bubble {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}
.bubble.mine {
    margin-left: auto;
    background: linear-gradient(160deg, #2EE6D6, #14C8B9);
    color: #04110f;
    border-bottom-right-radius: 6px;
}
.bubble.theirs {
    background: rgba(20, 26, 38, 0.95);
    border: 1px solid rgba(255,255,255,0.06);
    border-bottom-left-radius: 6px;
}

.thread-composer {
    display: grid;
    grid-template-columns: 1fr 48px;
    gap: 8px;
    padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}

.thread-composer input {
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(46, 230, 214, 0.18);
    background: #0c111a;
    color: #EEF3F8;
    padding: 0 14px;
}

.thread-composer button {
    border: 0;
    border-radius: 16px;
    background: #2EE6D6;
    color: #04110f;
    font-size: 16px;
    font-weight: 800;
}

body.page-thread .nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.page-thread {
    padding-bottom: 0;
}
