.board-detail-main {
    max-width: 1680px;
    padding-left: 2rem;
    padding-right: 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}

.news-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.source-select {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: #374151;
    background: #fff;
    cursor: pointer;
    appearance: auto;
    margin-left: 0.5rem;
}

.filter-reset {
    display: inline-block;
    border: 1px solid #e5c6c6;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: #9b1c1c;
    background: #fef2f2;
    margin-left: auto;
}

.mark-all-read-button {
    border: 1px solid #c6dae5;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    background: #f0f7ff;
    color: #1c4f9b;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.mark-all-read-button:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

#mark-all-read-form {
    display: inline-flex;
    margin-left: 0.5rem;
}

.scroll-top-button {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    z-index: 1000;
}

.scroll-top-button:hover {
    background: #f8fafc;
}

.filter-link {
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    text-decoration: none;
    color: #374151;
    background: #fff;
}

.filter-link.is-active {
    border-color: #1a1a2e;
    background: #1a1a2e;
    color: #fff;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.news-card.is-removing {
    opacity: 0;
    transform: scale(0.985);
}

.news-card.is-read {
    opacity: 0.75;
}

.news-image {
    display: block;
    width: calc(100% + 2rem);
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    margin: -1rem -1rem 0.75rem -1rem;
}

.news-image.lazy-load {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: imgLoading 1.5s infinite;
}

.news-image.lazy-loaded {
    animation: imgFadeIn 0.3s ease-in-out;
}

.news-image.lazy-error {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
}

@keyframes imgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes imgLoading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (min-width: 1300px) {
    .news-image {
        height: 200px;
    }
}

.news-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-link {
    color: inherit;
    text-decoration: none;
}

.news-link:hover {
    text-decoration: underline;
}

.news-description {
    margin: 0;
    display: -webkit-box;
    line-clamp: 7;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-description.is-expanded {
    display: block;
    line-clamp: unset;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.description-toggle {
    align-self: flex-start;
    margin-top: 0.35rem;
    border: 0;
    padding: 0;
    background: none;
    color: #1f4f8f;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.description-toggle:hover {
    text-decoration: underline;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 0.65rem 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.news-source {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-state {
    font-weight: 600;
    color: #6b7280;
}

.news-date {
    white-space: nowrap;
}

.news-actions {
    margin-top: auto;
    padding-top: 0.85rem;
}

.mark-read-form {
    width: 100%;
}

.mark-read-button {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    background: #f9fafb;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.mark-read-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.mark-unread-button {
    width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.mark-unread-button:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

@media (min-width: 700px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1300px) {
    .news-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1700px) {
    .board-detail-main {
        max-width: 1820px;
    }
    .news-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
