.news-container {
    max-width: 760px;
    margin: 20px auto;
    padding: 0 20px;
}

.news-header {
    text-align: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 1px;
}

.news-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 5px;
}

.news-time {
    font-size: 14px;
    color: #888;
    white-space: nowrap;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

.news-subtitle {
    text-align: center;
    font-size: 15px;
    margin-bottom: 30px;
}

.news-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.news-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.news-content {
    font-size: 15px;
    color: #222;
    line-height: 1.4;
    margin-bottom: 0px;
}



.no-news {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 50px;
}

.news-footer {
    display: flex;
    justify-content: space-around;
}
.news-author-top {
    display: flex;
    align-items: center;
}



.author-avatar, .author-avatar-letter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ccc;
    font-weight: bold;
    font-size: 18px;
    color: #fff;
}

.author-meta-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.author-name {
    font-weight: 700;
    color: #222;
}

.news-time, .news-date {
    font-size: 13px;
    color: #887;
}

.comment-btn,
.share-btn,
.open-comments-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    font-size: 18px;
    transition: color 0.3s;
}

.comment-btn:hover,
.share-btn:hover,
.open-comments-btn:hover {
    color: #0077ff;
}

#comments {
    margin-top: 40px;
}



#comment-form textarea,
.comment-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    resize: vertical;
    transition: border-color 0.3s;
}


.comments-block {
    margin-top: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
}

.comment-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}



.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
}


.u-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    z-index: 11000;
}

.u-modal.u-open {
    display: flex;
}



.u-modal__content.modal-news-content {
    width: 100%;
    max-width: 100%;
    max-width: 700px;
    max-height: 100vh;
    background-color: white;
    border-radius: 6px;
    overflow: hidden; /* скругление работает */
}
.u-modal__content.modal-news-content {
    overflow-y: auto;
    scrollbar-gutter: stable;
    width: 100vw;
}
.u-modal__close {
    position: fixed;
    top: 10px;
    right: 20px;
    background: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 28px;
    color: #555;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 12000; /* выше, чем у модалки */
}

.u-modal__close:hover {
    color: #007BFF;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}
#addNewsForm input[type="text"],
#addNewsForm textarea,
#addNewsForm input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 15px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    resize: vertical;
}

#addNewsForm input[type="text"]:focus,
#addNewsForm textarea:focus {
    border-color: #007BFF;
    outline: none;
}

#addNewsForm button[type="submit"] {
    width: 100%;
    padding: 12px 0;
    background-color: #007BFF;
    color: white;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#addNewsForm button[type="submit"]:hover {
    background-color: #0056b3;
}

#addNewsModal .u-modal__content {
    background: #fefefe;
    border-radius: 12px;
    padding: 25px 30px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#addNewsModal h2 {
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 700;
    color: #222;
    text-align: center;
}
.ck-editor__editable[role="textbox"] {
    min-height: 200px;   /* можно поставить 500px, если хочешь ещё выше */
    max-height: 400px;   /* необязательно, но удобно */
    margin-bottom: 18px;
}
.subcategories {
    display: none;
    list-style: none;
    padding-left: 15px;
}

.subcategories.show {
    display: block;
}

.news-report {
    text-align: right;
    margin-top: 4px;
    margin-bottom: 4px;
}

.report-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.report-btn-news{
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s;
    opacity: 0.3;
}
.report-btn:hover {
    opacity: 1;
}

#modalCommentList {
    overflow-x: hidden;
}

.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

#modalLikeBtn.liked {
    color: red;
    font-size: 16px;
}

#modalLikeBtn {
    font-size: 16px;
}

.news-gallery .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.news-gallery .gallery-nav:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.news-gallery .gallery-nav.prev {
    left: 10px;
}

.news-gallery .gallery-nav.next {
    right: 10px;
}

.news-card:hover .gallery-nav {
    opacity: 1;
}

#modalNewsGallery .news-gallery {
    position: relative;
    width: 100%;
    max-height: 100px;
    overflow: hidden;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#modalNewsGallery .news-gallery img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f0f0f0;
}

/* Навигационные стрелки */
#modalNewsGallery .gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}


#modalNewsGallery .news-gallery:hover .gallery-nav {
    opacity: 1;
}
.modal-gallery-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    padding: 0;
}

.modal-gallery-container img,
.modal-gallery-container video {
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    width: auto;
    height: auto;
}

.modal-gallery-container video {
    max-height: 40vh;
}

#zoomModal.u-modal,
#newsDetailModal.u-modal {
    background: rgba(0, 0, 0, 0.85); /* более темный фон */
    backdrop-filter: blur(5px); /* размытие фона */
    -webkit-backdrop-filter: blur(5px);
    z-index: 12000;
}
.modal-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.modal-gallery-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

.modal-gallery-container img {
  max-width: 100%;
  max-height: 500px;
}

.gallery-click-area {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10%; /* немного уже */
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.9), transparent);
  transition: background 0.3s ease;
  opacity: 0;
}

.gallery-click-area.is-hidden {
  display: none;
}

.gallery-click-area.right {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.05), transparent);
}

.gallery-click-area.left {
  left: 0;
}

.gallery-click-area:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
}

.gallery-arrow {
  font-size: 1.5rem;
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.01);
  pointer-events: none;
  opacity: 0.8;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-click-area:hover .gallery-arrow {
  transform: scale(1.1);
  opacity: 1;
  outline: none;
  user-select: none;
}
.gallery-click-area .gallery-arrow:focus {
  outline: none;
}

.gallery-click-area span {
  outline: none;
}

.zoom-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 20;
  pointer-events: none;
}

.gallery-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    user-select: none;
}

/* Счетчик в модалке */
.modal-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 10px;
    user-select: none;
    pointer-events: none; /* чтобы не мешал кликам */
    font-weight: 500;
}

.modal-gallery-wrapper:hover .gallery-counter {
  opacity: 1;
}
.scroll-top-btn {
    position: fixed;
    bottom: 1vh;
    right: 30px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 16px;
    cursor: pointer;
    display: none; /* скрыта по умолчанию */
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.scroll-top-btn:hover {
    background-color: rgba(0,0,0,0.9);
}

#addNewsForm select {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 15px;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='70,100 100,50 40,50' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

#addNewsForm select:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#addNewsForm optgroup {
    font-weight: bold;
    color: #333;
    padding: 5px 0;
}

#addNewsForm option {
    padding-left: 10px;
    color: #444;
}

.remove-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    background: #ff6b6b;
    color: white;
    font-size: 16px;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#modalShareBtn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.vk-comment-form {
    width: 100%;
    margin-top: 10px;
}

.vk-send-btn:hover {
    transform: scale(1.2);
}


.comment-share-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #a0a0a0; /* Тусклый серый */
    padding: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
    opacity: 0.7;
}

.comment-share-btn:hover {
    color: #0077ff;  /* Синий как в ВК */
    opacity: 1;      /* Ярче при наведении */
    transform: scale(1.2);
}

.delete-news-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    text-align: right;
}

.delete-news-btn:hover {
    background-color: #c0392b;
}

.vk-post-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #f0f2f5;
}

.vk-post {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 20px;
    max-width: 650px;
    width: 100%;
    font-family: 'Segoe UI', sans-serif;
}

.vk-post-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.vk-post-time {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
}

.vk-post-text {
    font-size: 15px;
    margin-bottom: 15px;
    white-space: pre-line;
}

.vk-post-gallery {
    margin-bottom: 15px;
}

.vk-post-image {
    max-width: 100%;
    border-radius: 8px;
}

.vk-post-video {
    border-radius: 8px;
}

.news-interactions {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
}

.likes-section {
    margin-bottom: 15px;
}

.like-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    color: rgba(255, 0, 0, 0.3);
    cursor: pointer;
    transition: color 0.2s ease;
}

.like-btn.liked {
    color: #e53935;
}

.comments-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.comment-like-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #555;
}

.comment-like-btn.liked {
    color: #e53935;
}

.vk-comment-input-wrapper {
    display: flex;

    background: #f0f2f5;
    position: relative;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 18px;
    padding: 8px 12px;
}

.vk-comment-input-wrapper textarea {
    flex: 1;
    resize: none;
    border: none;
    background: transparent;
    padding: 5px;
    font-size: 14px;
    outline: none;
    min-height: 40px;
    max-height: 100px;
    padding-right: 5px;
    margin-right: 25px;
}

.vk-send-btn {
    position: absolute;
    right: 10px;
    transition: transform 0.2s ease;
    background: none;
    border: none;
    font-size: 20px;
    color: #3b5998;
    cursor: pointer;
    margin-left: 10px;
}


.comment-avatar {
    margin-right: 10px;
}


.comment {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;

}

.comment-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.avatar-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-content{
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comment-main{
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.comment-avatar-link{
  flex: 0 0 auto;
  display: inline-block;
}

.comment-body{
  flex: 1;
  min-width: 0;
}

.comment-replies{
  margin-top: 8px;
  margin-left: 50px; /* 40px аватар + 10px gap */
}


.comment-author {
    color: black;
    text-decoration: none;
}

.comment-text {
    margin-top: 4px;
    color: #222;
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.comment-actions {
    display: flex;
    align-items: center;
    margin-top: 6px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.news-author-top {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-letter {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ddd;
    color: #555;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anon-avatar {
    background-color: #bbb;
    color: #fff;
}

.anon-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    margin-top: 10px;
    cursor: pointer;
    margin-bottom: 15px;
}

.anon-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #007BFF; /* современный синий — можно заменить */
}

.video-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}


.preview-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.mobile-actions {
  display: flex;
  justify-content: space-between; /* Раздвигаем левую и правую группу */
  align-items: center;
  background-color: #fff;
  margin: 0 auto; /* по центру контейнера */
  font-size: 16px;
  gap: 20px;
  width: 100%;
}

.left-actions, .right-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.right-actions button, .right-actions form button {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 18px;
  color: #555;
  padding: 4px 6px;
}

.right-actions button:hover, .right-actions form button:hover {
  color: #e0245e;
}

.like-btn.liked {
  color: #e0245e;
}

.mobile-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #555;
  gap: 2px;
  display: flex;
  align-items: center;
}


.news-gallery .media-item {
    flex: 0 0 100%;
    max-width: 100%;
    border-radius: 8px;
}

.news-card .news-gallery img,
.news-card .news-gallery video {
  max-width: 600px;   /* ограничение ширины */
  max-height: 400px;  /* ограничение высоты */
  border-radius: 8px;
}

.news-gallery .media-item {
  display: flex;
  align-items: center;   /* центр по вертикали */
  justify-content: center; /* центр по горизонтали */
  overflow: hidden;
}

/* Фото и видео одинаково вписываются */
.news-gallery img,
.news-gallery video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;   /* без обрезки, с сохранением пропорций */
  display: block;
  background: #000;
}
.news-gallery {
    overflow: hidden;
    position: relative;
}
.news-gallery {
  position: relative;
  overflow: hidden; /* чтобы скрывать лишние слайды */
  width: 100%; /* важно, чтобы слайдер занимал ширину */
}

.news-slider-track {
  display: flex;

  transition: transform 0.3s ease;
  will-change: transform;
  width: 100%; /* ширина трека растянута, но лучше это оставить гибким за счет flex */
}

.news-slider-track .media-item {
  flex: 0 0 100%; /* элемент занимает 100% ширины родителя */
  max-width: 100%;
  box-sizing: border-box;

}


.zoom-slider-track {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}


/* Добавь в CSS */
#modalGalleryContainer {
  overflow: hidden;
  position: relative;

}

.modal-gallery-track {
  display: flex;
  transition: transform 0.3s ease;
  will-change: transform;
  width: 100%;
}

.modal-gallery-item {
  flex-shrink: 0;
  width: 100%;
  display: block !important; /* Чтобы все были видимы, а не display:none */
}


/* Контейнер, который держит одинаковый размер для всех медиа */
.zoom-media-container .media-item {
  width: 90vw;       /* ширина слайда = 90% ширины окна */
  height: 80vh;      /* высота слайда = 80% высоты окна */
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  background: #000;  /* фон, чтобы не было "просветов" */
  border-radius: 8px;
  overflow: hidden;
}

/* Фото и видео в одном формате */
.zoom-media-container img,
.zoom-media-container video {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain; /* вписывает медиа без обрезки */
  background: #000;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.author-name {
  font-size: 16px;
  font-weight: 500;
}

.author-meta {
  padding: 0px 5px;
}
.like-btn .heart {
    transition: 0.2s;
}

.like-btn.liked .heart {
    color: red;
}

.comment-emoji-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}


.news-views {
    color: #555;
    font-size: 13px;
}
.comment-emoji-picker {
    display:none;
    position:absolute;
    bottom:45px;
    left:5px;
    background:white;
    border:1px solid #ccc;
    padding:5px;
    border-radius:8px;
    max-width:200px;
    max-height:150px;
    overflow-y:auto;
    z-index:1000;
}
.news-emoji-btn {
    position:absolute;
    bottom:5px;
    font-size:18px;
    background:none;
    border:none;
    cursor:pointer;
}
.news-emoji-picker {
    display:none;
    position:absolute;
    bottom:30px;
    background:white;
    border:1px solid #ccc;
    padding:5px;
    border-radius:8px;
    max-width:200px;
    max-height:150px;
    overflow-y:auto;
    z-index:1000;
}
.title-emoji-btn {
    position: absolute;
    right: 6px;
    top: 35%;
    transform: translateY(-50%);
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.title-emoji-picker {
    display:none;
    position:absolute;
    top:40px;
    right:0;
    background:white;
    border:1px solid #ccc;
    padding:5px;
    border-radius:8px;
    max-width:200px;
    max-height:150px;
    overflow-y:auto;
    z-index:1000;
}

.comment-emoji-picker-news-detail {
    display:none;
    position:absolute;
    bottom: 45px;
    background:white;
    border:1px solid #ccc;
    padding:5px;
    border-radius:8px;
    max-width:200px;
    max-height:150px;
    overflow-y:auto;
    z-index:1000;
}

body.modal-open {
    overflow: hidden;
}

.comments-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 10px 0 12px;
}

.comments-layout{
  display: flex;
  flex-direction: column;
}

.comments-input{
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
}

.reply-info {
  display: none;
  align-items: center;
  justify-content: space-between;

  background: #f0f4ff;
  border: 1px solid #d6e2ff;
  border-radius: 8px 8px 0 0;

  padding: 6px 10px;
  margin-left: 10px;
  margin-right: 10px;
  font-size: 13px;
  color: #333;
}

.reply-info__text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.reply-info__text span {
  font-weight: 600;
  color: #0077ff;
}

.reply-cancel-btn {
  background: none;
  border: none;
  cursor: pointer;

  font-size: 14px;
  color: #777;
  padding: 2px 6px;
  border-radius: 4px;
}

.reply-cancel-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.comment-reply-btn {
  background: none;
  border: none;
  padding: 0;

  color: #0077ff;
  font-size: 13px;
  cursor: pointer;

  text-decoration: underline;
}

.comment-reply-btn:hover {
  color: #005bcc;
  text-decoration-thickness: 2px;
}

.reply-to-link {
  font-weight: 600;
  color: #0077ff;
  text-decoration: none;
}

.reply-to-link:hover {
  text-decoration: underline;
}

.comment-highlight {
  outline: 2px solid #0077ff;
  background: #f0f6ff;
  border-radius: 10px;
  transition: background 1s ease, outline 1s ease;
}

.comment-highlight-fade {
  outline-color: transparent;
  background: transparent;
}

/* Нижняя панель ввода комментария */
.comment-input-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 50px;
  background: none;
  z-index: 10000;
  /* safe-area для iPhone */
  padding-bottom: env(safe-area-inset-bottom);
}

/* Центрируем как news-container */
.comment-input-bar .comment-form {
  max-width: 760px; /* как .news-container */
  margin: 0 auto;
}
.newsLimitInfo {
    position:absolute;
    font-size:12px;
    color:grey;
    bottom:5px;
    right:5px;
}

.read-more-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: #6a6a6a;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}

.read-more-btn:hover {
  text-decoration: underline;
}

.preview-comment-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.preview-comment-row .comment-avatar-link{
  flex: 0 0 auto;
}

.preview-comment-row .avatar-img{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.preview-comment-row .preview-comment{
  flex: 1 1 auto;
  min-width: 0;
}

.news-preview-comments {
    margin-top: 8px;
    padding: 8px 0 0;
    border-top: 1px solid #eee;
}

.news-meta-actions{
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
}

.news-more-btn{
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 6px;
  color: #777;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  color: #8a8a8a;
}

.news-more-menu{
  position:absolute;
  top: 24px;
  right: 0;
  min-width: 170px;
  background:#fff;
  border:1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px;
  z-index: 9999;
}



.news-menu-item{
  width:100%;
  text-align:left;
  background:none;
  border:none;
  padding:10px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
}

.news-menu-item:hover{ background:#f4f4f4; }

.news-menu-item.danger{
  color:#d33;
}
.news-author-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news-author-link {
  display: inline-flex;      /* ❗ НЕ flex */
  align-items: center;
  gap: 4px;
  width: auto;               /* ❗ запрещаем растягивание */
  max-width: max-content;    /* ❗ только по контенту */
  text-decoration: none;
  color: inherit;
}

.author-meta-right {
  flex-shrink: 0;
}

/* Чтобы меню позиционировалось относительно блока с кнопкой */
.news-meta-actions{
  position: relative;
}

/* Меню — по умолчанию скрыто (но в DOM есть, чтобы работала анимация) */
.news-more-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;

  opacity: 0;
  transform: translate(4px, -4px) scale(0.98); /* "из правого верхнего" */
  transform-origin: top right;

  pointer-events: none;
  visibility: hidden;

  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1),
    visibility 0s linear 220ms;
  will-change: opacity, transform;
}

/* Открыто */
.news-more-menu.open{
  opacity: 1;
  transform: translate(0, 0) scale(1);
  pointer-events: auto;
  visibility: visible;

  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1),
    visibility 0s; /* показываем сразу */
}

.icon-wrap {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.badge {
  position: absolute;
  top: -6px;
  right: -14px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #00b894;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.badge:empty { display: none; }

.badge { max-width: 28px; }

.news-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.unread-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#19c37d; /* зелёный */
  box-shadow:0 0 0 2px rgba(25,195,125,.18);
  flex:0 0 auto;
}

.unread-dot--card {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 10px;
  height: 10px;
  border-radius: 50%;

  background: #19c37d; /* зелёный */
  box-shadow: 0 0 0 2px rgba(25,195,125,.25);

  z-index: 5;
}

.news-content p {
  margin: 10px 0 5px 0px;
}

.news-time-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* справа, как сейчас */
  line-height: 1.2;
}

.news-edited {
  font-size: 11px;
  color: #aaa;
}

.zoom-media-container{
      overflow: hidden;
      touch-action: pan-y;          /* чтобы вертикальный скролл работал */
      position: relative;
}

.zoom-track{
      display: flex;
      height: 100vh;
      width: 100vw;
      will-change: transform;
      transition: transform .25s ease;
      gap: 12px;
}

.zoom-slide{
      flex: 0 0 100%;
      width: 100%;
      height: 100%;
      display:flex;
      align-items:center;
      justify-content:center;
      box-sizing: border-box;
}

.zoom-slide img,
.zoom-slide video{
      max-width: 100%;
      max-height: 100%;
}



.zoom-media {
  will-change: transform;
  touch-action: none;
}

.zoom-media-container { overflow: hidden; touch-action: none; }

.zoom-media {
  max-width: none;          /* важно */
  max-height: none;         /* важно */
  transform-origin: center center;
  will-change: transform;
}
.zoom-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-media { backface-visibility: hidden; transform: translateZ(0); }

.media-item {
  position: relative;
}

.media-loader{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.35);
  z-index:2;
  pointer-events:none;
}

.media-item.is-loaded .media-loader{
  display:none;
}

/* можно, чтобы медиа плавно появлялось */
.media-item img,
.media-item video{
  opacity:0;
  transition: opacity .2s ease;
}
.media-item.is-loaded img,
.media-item.is-loaded video{
  opacity:1;
}

/* ВАЖНО: только для newsDetailModal, остальные u-modal не трогаем */
#newsDetailModal.u-modal--anim{
  display: flex;                 /* перебиваем твой display:none, но только тут */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

/* когда открыто — показываем */
#newsDetailModal.u-modal--anim.is-visible{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition: opacity 180ms ease, visibility 0s;
}

/* анимация раскрытия оболочки */
#newsDetailModal.u-modal--anim .news-detail-shell{
  will-change: transform, border-radius;
  transform-origin: top left;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), border-radius 260ms cubic-bezier(.2,.8,.2,1);
}

#newsDetailModal.u-modal--anim.is-animating .news-detail-shell{
  border-radius: 12px;
  overflow: hidden;
}


.comment-icon-wrapper {
    position: relative;
    display: inline-block;
}

.comment-dots {
    position: absolute;
    top: 3px;
    right: 4px;
    font-size: 10px;
    color: #888;
}

.fa-regular.fa-comment {
    font-size: 18px;
}

.comment-icon-bg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
}

.comment-icon-bg i {
    color: #333;
    font-size: 14px;
}

.comment-deleted{
  color:#777;
  font-style:italic;
}

.deleted-user{
  color:#888;
}

.avatar-deleted{
  width:32px;
  height:32px;
  border-radius:50%;
  background:#ddd;
}

/* контейнер для ⋯ и меню */
.comment-more-wrap{
  position:absolute;
  right:0;
  top:0;
  display:inline-flex;
  align-items:center;
}

/* кнопка ⋯ */
.comment-more-btn{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
  cursor:pointer;
  border-radius:10px;
  color:#8a8a8a;
}
.comment-more-btn:hover{ background:rgba(0,0,0,.06); }
.comment-more-btn:active{ transform:scale(.98); }

.news-more-btn:hover{ background:rgba(0,0,0,.06); }
.news-more-btn:active{ transform:scale(.99); }

/* само меню (по образу news-more-menu) */
.comment-more-menu{
  position:absolute;
  right:0;
  top:36px;
  min-width:180px;
  background:#fff;
  border:1px solid #eee;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.12);
  padding:6px;
  z-index:12000;
  transform-origin: top right;
  /* скрытое состояние */
  opacity:0;
  transform: translateY(-6px) scale(.98);
  visibility:hidden;
  pointer-events:none;

  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1),
    visibility 0s linear 180ms; /* visibility скрываем ПОСЛЕ fade-out */
}

.comment-more-menu.open{
  opacity:1;
  transform: translateY(0) scale(1);
  visibility:visible;
  pointer-events:auto;

  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(.2,.8,.2,1),
    visibility 0s linear 0s; /* visibility показываем СРАЗУ */
}

/* пункты меню */
.comment-menu-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border:0;
  background:transparent;
  cursor:pointer;
  border-radius:10px;
  font-size:14px;
  text-align:left;
  color:#222;
}
.comment-menu-item:hover{ background:rgba(0,0,0,.06); }
.comment-menu-item i{ width:18px; text-align:center; color:#777; }

.searchbar__form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.searchbar__input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.searchbar__input {
  width: 100%;
  padding-right: 38px;
}

.searchbar__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.searchbar__clear.is-visible {
  display: flex;
}

.searchbar__clear:hover {
  color: #111;
}

.searchbar__input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.searchbar__input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.searchbar__input[type="search"]::-ms-clear,
.searchbar__input[type="search"]::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}  .modal-gallery-container

.emoji-trigger {
    color: grey;
}

.news-detail-topbar .ride-topbar-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.news-detail-topbar .ride-topbar-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.auth-note--fixed-comment {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(700px, calc(100vw - 16px));
  margin: 0;
  z-index: 12001;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.news-sections {
    width: 100%;
    overflow-x: auto;
    padding: 0px 0 0px;
    scrollbar-width: none;
}

.news-sections::-webkit-scrollbar {
    display: none;
}

.news-sections__inner {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: max-content;
    min-width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
}

.news-section-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #e5e7eb;
    transition: .2s ease;
    position: relative;
    overflow: hidden;
}

.news-section-chip:hover {
    background: #e9edf3;
    transform: translateY(-1px);
}

.news-section-chip.is-active {
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

.news-section-chip.home.is-active {
    background: linear-gradient(135deg, #9aa0a6, #7b8188);
}

.news-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.news-card-badge-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.news-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.news-card-badge--news {
  background: linear-gradient(135deg, #2f80ed, #1f5fd1);
}

.news-card-badge--confession {
  background: linear-gradient(135deg, #8e63d2, #6f42c1);
}

.news-card-badge--question {
  background: linear-gradient(135deg, #2ea44f, #218a42);
}

.news-card-badge--ad {
  background: linear-gradient(135deg, #f2994a, #e46b1f);
}

.news-card-badge--default {
  background: linear-gradient(135deg, #9aa0a6, #7b8188);
}

.news-card-top-actions {
  position: relative;
  flex-shrink: 0;
}

.news-author-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.author-meta-right {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin: 5px;
}

.news-time-block {
  display: flex;
  align-items: center;
  color: #8a8f98;
  font-size: 13px;
  white-space: nowrap;
}

.news-edited {
  font-size: 12px;
  color: #a0a5ad;
}

.news-section-chip[data-section="news"].is-active {
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
}

.news-section-chip[data-section="confession"].is-active {
    background: linear-gradient(135deg, #8e63d2, #6f42c1);
}

.news-section-chip[data-section="question"].is-active {
    background: linear-gradient(135deg, #2ea44f, #218a42);
}

.news-section-chip[data-section="ad"].is-active {
    background: linear-gradient(135deg, #f2994a, #e46b1f);
}

.anon-inline-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
  max-width: 100%;
}

.anon-checkbox-label--inline {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 8px;
}

.anon-hint-wrap {
  position: absolute;
  top: -6px;
  right: -16px;
  z-index: 20;
}

.anon-hint-btn {
  width: 16px;
  height: 16px;
  border: 1px solid #cfd4dc;
  border-radius: 50%;
  background: #f7f8fa;
  color: #666;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: .2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.anon-hint-btn:hover,
.anon-hint-btn.is-active {
  background: #eef4ff;
  border-color: #b8cff7;
  color: #0077ff;
}

.anon-hint-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  max-width: min(260px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.anon-hint-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}

.anon-hint-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 8px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #222;
}

.publish-rules-note {
  margin: 2px 0 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

.publish-rules-link {
  display: inline;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: #0077ff;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.publish-rules-link:hover {
  text-decoration: underline;
}

/* модалка правил */
.publish-rules-modal__content {
  width: min(620px, calc(100vw - 24px));
  max-height: min(88vh, 900px);
  overflow-y: auto;
  border-radius: 16px;
  padding: 22px 20px 18px;
  background: #fff;
  position: relative;
  max-width: 100%;
}

.publish-rules-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.publish-rules-head__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eef4ff;
  color: #0077ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}

.publish-rules-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #222;
}

.publish-rules-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #666;
}

.publish-rules-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.publish-rules-item {
  padding: 12px 14px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #fafbfc;
}

.publish-rules-item strong {
  display: block;
  margin-bottom: 6px;
  color: #222;
  font-size: 14px;
}

.publish-rules-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}

.publish-rules-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.section-moderation-hint {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #b26a00;
  background: #fff8e8;
  border: 1px solid #f1d48a;
  border-radius: 10px;
  padding: 10px 12px;
}

.news-card-badge-wrap {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.news-card-badge--pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe08a;
}

.news-card-badge--hidden {
    background: #f1f1f1;
    color: #666;
    border: 1px solid #d8d8d8;
}

.news-card-badge--rejected {
    background: #fdeaea;
    color: #b42318;
    border: 1px solid #f5b5b5;
}

.news-moderation-note {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.news-moderation-note--rejected {
    background: #fff3f2;
    border: 1px solid #f5c2c0;
}

.news-moderation-note__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #b42318;
    margin-bottom: 6px;
}

.news-moderation-note__text {
    color: #7a271a;
    word-break: break-word;
}

.news-moderation-note {
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    background: #f8f9fb;
    border: 1px solid #e4e7ec;
}

.news-moderation-note__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #344054;
}

.news-moderation-note__text {
    color: #475467;
    word-break: break-word;
}

.news-moderation-note--rejected {
    background: #fff3f2;
    border: 1px solid #f5c2c0;
}

.news-moderation-note--rejected .news-moderation-note__title {
    color: #b42318;
}

.news-moderation-note--rejected .news-moderation-note__text {
    color: #7a271a;
}

.news-moderation-note--hidden {
    background: #f5f5f5;
    border: 1px solid #dddddd;
}

.news-moderation-note--hidden .news-moderation-note__title {
    color: #555;
}

.news-moderation-note--hidden .news-moderation-note__text {
    color: #666;
}

@media (hover: hover) and (pointer: fine) {
  .anon-hint-wrap:hover .anon-hint-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
  }
}

#addNewsModal .news-detail-shell.news-add-shell {
  width: min(700px, calc(100vw - 32px));
  max-width: 700px;
  max-height: 100vh;

  background: #fff;
  border-radius: 16px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  box-sizing: border-box;
}

#addNewsModal .u-modal__content.news-add-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}


@media (max-width: 768px) {
  .auth-note--fixed-comment {
    width: min(700px, 100vw);
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    margin: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
    .news-card .news-gallery img,
    .news-card .news-gallery video {
        max-width: 100%;
        max-height: 300px;
    }

    .comment-emoji-btn {
        font-size: 20px;
    }

    .news-container {
        padding: 0px;
        margin: 0px auto;
    }

    .news-card {
        padding: 10px;
    }

    .news-title {
        font-size: 16px;
    }

    .news-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .news-footer {
        flex-direction: column
        align-items: stretch;
    }

    .u-modal__content {
        max-height: 100%;
        height: 100%;
        padding: 15px;
    }

    #addNewsModal .u-modal__content {
        padding: 20px;
        width: 100vw;
        border-radius: 0px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }



    .gallery-arrow {
        font-size: 20px;
    }



    .news-gallery img,
    .news-gallery video {
        max-height: 200px;
    }

    .u-modal__close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }




    .zoom-counter {
        font-size: 12px;
        padding: 2px 8px;
    }

    .gallery-click-area {
        width: 15%;
    }

    .gallery-arrow {
        font-size: 20px;
    }

    .modal-gallery-counter {
        font-size: 12px;
        padding: 2px 6px;
    }

    .scroll-top-btn {
        bottom: 55px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .remove-btn {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }



    .anon-checkbox-label {
        font-size: 14px;
    }

    .anon-checkbox {
        width: 18px;
        height: 18px;
    }

    .vk-comment-input-wrapper {
        padding: 6px 10px;
        border-radius: 14px;
    }

    .vk-comment-input-wrapper textarea {
        font-size: 13px;
        padding-right: 10px;
    }

    .vk-send-btn {
        font-size: 18px;
        right: 8px;
    }

    .vk-post {
        padding: 15px;
    }

    .vk-post-title {
        font-size: 18px;
    }

    .vk-post-time {
        font-size: 11px;
    }

    .vk-post-text {
        font-size: 14px;
    }

    .like-btn,
    .comment-share-btn {
        font-size: 12px;
    }

    .comment-like-btn{
        font-size: 14px;
    }

    #addNewsForm select {
        font-size: 14px;
        padding: 8px 12px;
        background-position: right 10px center;
        background-size: 10px;
    }

    #addNewsForm option {
        padding-left: 6px;
    }

    .preview-thumb video {
        max-width: 100px;
        max-height: 100px;
    }

    .mobile-actions {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        max-width: 420px; /* примерно ширина экрана телефона */
    }

    .mobile-actions button {
        background: none;
        border: none;
        font-size: 15px;
        cursor: pointer;
        color: #555;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
    }

    .mobile-actions button.liked {
        color: #e0245e; /* цвет лайка, если поставлен */
        font-size: 15px;
    }

    .mobile-actions {
        display: flex;
        justify-content: flex-start; /* Выровнять влево */
        align-items: center;
        gap: 20px; /* Отступы между кнопками */
        background-color: #fff;
        font-size: 14px; /* Сделать иконки меньше */
    }

    .action-btn {
      background: none;
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      color: #555;
      user-select: none;
      transition: color 0.2s;
      font-size: 8px; /* Размер иконок */
      padding: 4px 6px; /* Немного внутреннего отступа */
    }

    .action-btn .count {
      font-size: 12px;
      color: #888;
    }

    .action-btn:hover {
      color: #007bff;
    }

    .like-btn.liked {
      color: #e0245e;
    }
    .mobile-actions {
      display: flex;
      justify-content: space-between; /* Раздвигаем левую и правую группу */
      align-items: center;

      background-color: #fff;
      max-width: 420px; /* или 100%, в зависимости от дизайна */
      margin: 0 auto; /* по центру контейнера */
      font-size: 14px;
      gap: 20px;
    }

    .left-actions, .right-actions {
      display: flex;
      align-items: center;
      gap: 20px;
    }

    .right-actions button, .right-actions form button {
      cursor: pointer;
      background: none;
      border: none;
      font-size: 14px;
      color: #555;
      padding: 4px 6px;
    }

    .right-actions button:hover, .right-actions form button:hover {
      color: #e0245e;
    }

    .like-btn.liked {
      color: #e0245e;
    }




    .author-name {
      font-size: 16px;
      font-weight: 500;
    }

    .news-time {
      font-size: 12px;
      color: #888;
    }
    .nav-left {
    flex-wrap: nowrap;
    gap: 6px;

  }

  .nav-search-form {
    flex: 1;
    display: flex;
    margin: 0;
  }

  .nav-search-form input {
    flex: 1;
    padding: 13px 10px;
    font-size: 12px;
    border-radius: 6px 0 0 6px;
    min-width: 10px;
  }

  .nav-search-form button {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 0 6px 6px 0;
  }

  .addNewsBtn {
    padding: 4px 12px;
    font-size: 32px;
    border-radius: 6px;
    border: 1px solid #ccc;
    cursor: pointer;
    min-width: 42px;
  }

  .newsLimitInfo {
    font-size:10px;
  }

  .scroll-top-btn.from-appp1 {
    bottom: 0px !important;
  }

  .u-modal__close.news {
    display:none;
  }

  #newsDetailModal .news-detail-shell{
      height: 100vh;
      max-height: 100vh;
  }

  #newsDetailModal.u-modal{
      align-items: stretch;
      justify-content: center;
      padding: 0;
  }

    /* оболочка модалки */
  #newsDetailModal .news-detail-shell{
      width: min(700px, 100vw);
      height: 100dvh;
      max-height: 100dvh;
      background: #fff;
      border-radius: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
  }


  #newsDetailModal .news-detail-topbar{
      flex: 0 0 auto;
  }


  #newsDetailModal .u-modal__content.modal-news-content{
      flex: 1 1 auto;
      height: auto;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      padding: 10px 10px 1px 10px;
      border-radius: 0;
  }


  #modalCommentsContainer.comments-layout{
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
  }


  #modalCommentList{
        flex: 0 0 auto;
        overflow: visible;
        padding-bottom: 105px;
  }

  #modalCommentForm{
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      bottom: 0;
      width: min(700px, 100vw);
      padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
      z-index: 12001;
  }

  .modalCommentForm{
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      bottom: 0;
      width: min(700px, 100vw);
      padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
      z-index: 12001;
      background: white;
      margin: 0;
  }

  #replyInfo{
      position: sticky;
      bottom: 58px;
      z-index: 6;
  }

  .add-btn.add-btn--news.from-app2 {
        margin-bottom: -50px;
  }

  .category {
    font-size: 22px;
    padding: 6px 10px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    background-color: #fff;
  }
  .modal-gallery-item {
      display: none;
  }

  .modal-gallery-item.active {
      display: block;
  }

  .add-btn.add-btn--news {
    border: 0px solid #0077FF;
  }

  .u-modal__close.news,
  #addNewsModalTitle {
    display: none;
  }

  .fa-regular.fa-comment {
        font-size: 16px;
  }

  .comment-dots {
        top: 2px;
        right: 3px;
        font-size: 10px;
  }
  #addNewsModal.u-modal {
      align-items: stretch;
      justify-content: center;
      padding: 0;
      overflow: hidden;
      background: none;
    }

    /* внешняя оболочка */
  #addNewsModal .news-detail-shell.news-add-shell {
      width: min(700px, 100vw);
      height: calc(100dvh - 50px);
      max-height: calc(100dvh - 50px);
      margin-bottom: 50px;
      background: #fff;
      border-radius: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
  }

    /* шапка */
  #addNewsModal .news-add-topbar {
      flex: 0 0 auto;
  }

    /* контент */
  #addNewsModal .u-modal__content.news-add-content {
      flex: 1 1 auto;
      min-height: 0;  
      border-radius: 0;
      padding: 16px;
      width: 100%;
      max-width: none;
      box-sizing: border-box;
  }

  .nav-left-news {
     margin: 10px 0px 5px auto;
  }

    #addNewsModal.u-modal {
    align-items: stretch;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    background: none;
  }

  #addNewsModal .news-detail-shell.news-add-shell {
    width: min(700px, 100vw);
    height: calc(100dvh - 50px);
    max-height: calc(100dvh - 50px);
    margin-bottom: 50px;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #addNewsModal .news-add-topbar {
    flex: 0 0 auto;
  }

  #addNewsModal .u-modal__content.news-add-content {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border-radius: 0;
    padding: 16px;

    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

    .anon-inline-wrap {
    display: flex;
    width: 100%;
  }

  .anon-checkbox-label--inline {
    font-size: 14px;
    padding-right: 18px;
  }

  .anon-hint-wrap {
    top: -4px;
    right: 0;
  }

  .anon-hint-popover {
    right: 0;
    width: min(260px, calc(100vw - 32px));
    font-size: 12px;
  }

  .publish-rules-modal__content {
    width: min(700px, 100vw);
    max-width: 100%;
    max-height: 100dvh;
    height: auto;
    border-radius: 0;
    padding: 18px 16px 16px;
  }

  .publish-rules-title {
    font-size: 20px;
  }

  .publish-rules-item p,
  .publish-rules-subtitle {
    font-size: 13px;
  }
  .news-sections__inner {
        margin-bottom: 10px;
  }
}

/* ===== CKEditor content in cards + modal ===== */
.ck-content {
  line-height: 1.6;
  word-break: break-word;
}

.ck-content p {
  margin: 0 0 12px;
}

.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content h4,
.ck-content h5,
.ck-content h6 {
  margin: 16px 0 10px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
}

.ck-content h1 { font-size: 28px; }
.ck-content h2 { font-size: 24px; }
.ck-content h3 { font-size: 20px; }
.ck-content h4 { font-size: 18px; }
.ck-content h5 { font-size: 16px; }
.ck-content h6 { font-size: 15px; }

.ck-content ul,
.ck-content ol {
  margin: 0 0 12px 22px;
  padding: 0;
}

.ck-content li {
  margin-bottom: 6px;
}

.ck-content blockquote {
  margin: 14px 0;
  padding: 12px 14px;
  border-left: 4px solid #7c5cff;
  background: rgba(124, 92, 255, 0.10);
  border-radius: 10px;
  color: #eaeaea;
}

.ck-content a {
  color: #7bb8ff;
  text-decoration: underline;
}

.ck-content figure.table {
  margin: 14px 0;
  width: 100%;
  overflow-x: auto;
}

.ck-content table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  border-spacing: 0;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  overflow: hidden;
}

.ck-content th,
.ck-content td {
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.ck-content th {
  background: rgba(255,255,255,0.06);
  font-weight: 700;
}

.ck-content hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 16px 0;
}

/* выравнивание CKEditor */
.ck-content .text-tiny { font-size: 0.7em; }
.ck-content .text-small { font-size: 0.85em; }
.ck-content .text-big { font-size: 1.4em; }
.ck-content .text-huge { font-size: 1.8em; }

.ck-content[style*="text-align:center"],
.ck-content p[style*="text-align:center"],
.ck-content h1[style*="text-align:center"],
.ck-content h2[style*="text-align:center"],
.ck-content h3[style*="text-align:center"],
.ck-content h4[style*="text-align:center"] {
  text-align: center;
}

.ck-content[style*="text-align:right"],
.ck-content p[style*="text-align:right"],
.ck-content h1[style*="text-align:right"],
.ck-content h2[style*="text-align:right"],
.ck-content h3[style*="text-align:right"],
.ck-content h4[style*="text-align:right"] {
  text-align: right;
}

body.dark-theme .ck-content table {
  background: rgba(255,255,255,0.03);
}

body.dark-theme .ck-content th {
  background: rgba(255,255,255,0.08);
}

body.dark-theme .ck-content blockquote {
  background: rgba(124, 92, 255, 0.12);
}


.news-container--empty {
    display: block;
}

.empty-news {
    margin-top: 8px;
    padding: 34px 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e8edf3;
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.06),
        0 4px 10px rgba(15, 23, 42, 0.04);
    text-align: center;
}

.empty-news__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

.empty-news--home .empty-news__icon {
    background: linear-gradient(135deg, #9aa0a6, #7b8188);
}

.empty-news--news .empty-news__icon {
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
}

.empty-news--confession .empty-news__icon {
    background: linear-gradient(135deg, #8e63d2, #6f42c1);
}

.empty-news--question .empty-news__icon {
    background: linear-gradient(135deg, #2ea44f, #218a42);
}

.empty-news--ad .empty-news__icon {
    background: linear-gradient(135deg, #f2994a, #e46b1f);
}

.empty-news__title {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
    color: #182230;
}

.empty-news__text {
    max-width: 560px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.6;
    color: #667085;
}

.empty-news__actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.empty-news__btn {
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.empty-news__btn:hover {
    transform: translateY(-1px);
}

.empty-news__btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
    box-shadow: 0 10px 22px rgba(47, 128, 237, 0.22);
}

.empty-news--confession .empty-news__btn--primary {
    background: linear-gradient(135deg, #8e63d2, #6f42c1);
    box-shadow: 0 10px 22px rgba(111, 66, 193, 0.22);
}

.empty-news--question .empty-news__btn--primary {
    background: linear-gradient(135deg, #2ea44f, #218a42);
    box-shadow: 0 10px 22px rgba(33, 138, 66, 0.22);
}

.empty-news--ad .empty-news__btn--primary {
    background: linear-gradient(135deg, #f2994a, #e46b1f);
    box-shadow: 0 10px 22px rgba(228, 107, 31, 0.22);
}

.empty-news__btn--ghost {
    color: #344054;
    background: #fff;
    border: 1px solid #dfe3e8;
}

.empty-news__btn--ghost:hover {
    background: #f8fafc;
}

.no-news {
    margin: 0;
    display: none;
}

@media (max-width: 768px) {
    .empty-news {
        margin-top: 0;
        padding: 26px 16px;
        border-radius: 18px;
    }

    .empty-news__icon {
        width: 66px;
        height: 66px;
        font-size: 26px;
        margin-bottom: 14px;
    }

    .empty-news__title {
        font-size: 21px;
    }

    .empty-news__text {
        font-size: 14px;
    }

    .empty-news__actions {
        gap: 10px;
    }

    .empty-news__btn {
        width: 100%;
    }
}

.empty-news--liked .empty-news__icon {
    background: linear-gradient(135deg, #ff6b81, #e0315b);
}

.empty-news--my .empty-news__icon {
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
}

.empty-news--my .empty-news__btn--primary {
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
    box-shadow: 0 10px 22px rgba(47, 128, 237, 0.22);
}

.empty-news--liked .empty-news__btn--primary {
    background: linear-gradient(135deg, #ff6b81, #e0315b);
    box-shadow: 0 10px 22px rgba(224, 49, 91, 0.22);
}

