.news-panel {
    --news-accent: #ae4c0b;
    --news-tint: #fff1e4;
}
.news-panel[data-news-category="notice"] {
    --news-accent: #22664f;
    --news-tint: #edf7f1;
}
.news-panel[data-news-category="event"] {
    --news-accent: #345ba2;
    --news-tint: #eef3fc;
}
.news-panel .news-panel-body {
    --news-viewport-height: 360px;
    padding: 14px 14px 12px;
    border: 1px solid #eadac9;
    border-radius: 14px;
    background: linear-gradient(150deg, #fffaf3, #f6ede2);
    box-shadow: 0 8px 24px rgba(77, 49, 21, 0.05);
}
.news-panel .news-scroll-viewport {
    position: relative;
    height: var(--news-viewport-height);
    overflow: hidden;
    border-radius: 10px;
}
.news-panel .news-scroll-track {
    display: flex;
    flex-direction: column;
    animation: news-rise var(--news-duration, 30s) linear infinite;
}
.news-panel .news-scroll-group {
    flex: 0 0 auto;
    width: 100%;
    min-height: var(--news-viewport-height);
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    list-style: none;
}
.news-panel.news-loop-ready .news-scroll-group { min-height: 0; }
.news-panel .news-scroll-item {
    margin: 0;
    padding: 0 0 14px;
    list-style: none;
}
.news-panel .news-item-link {
    display: block;
    overflow: hidden;
    border: 1px solid #ede4d9;
    border-radius: 12px;
    background: #fff;
    color: #242b25;
    text-decoration: none;
    box-shadow: 0 3px 9px rgba(54, 39, 22, 0.04);
}
.news-panel .news-item-link:hover {
    border-color: var(--news-accent);
    color: #242b25;
}
.news-panel .news-image-trigger { display: block; cursor: zoom-in; }
.news-panel .news-title-link { color: inherit; text-decoration: none; }
.news-panel .news-title-link:hover { color: var(--news-accent); }
.news-panel .news-title-link,
.news-panel .news-view-label { cursor: pointer; }
.news-panel .news-item-image {
    display: block;
    width: 100%;
    height: 170px;
    margin: 0;
    border-bottom: 1px solid #eee5db;
    object-fit: cover;
}
.news-panel .news-item-content { padding: 16px 16px 14px; }
.news-panel .news-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.news-panel .news-category-tag {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 6px;
    background: var(--news-tint);
    color: var(--news-accent);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}
.news-panel .news-item-meta time {
    color: #797e78;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.news-panel .news-item-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.news-panel .news-item-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: #242b25;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.news-panel .news-item-icon {
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 42px;
    border-radius: 9px;
    background: var(--news-tint);
    color: var(--news-accent);
}
.news-panel .news-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #f0ebe4;
    background: #fffefa;
}
.news-panel .news-update-label,
.news-panel .news-view-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
}
.news-panel .news-update-label { color: #85877e; }
.news-panel .news-update-label > span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--news-accent);
}
.news-panel .news-view-label { color: var(--news-accent); font-weight: 600; }
.news-panel .news-view-label:hover { text-decoration: underline; }
body.news-image-popup-open { overflow: hidden; }
.news-image-popup-open .news-panel .news-scroll-track { animation-play-state: paused; }
.news-image-popup {
    position: fixed;
    inset: 0;
    width: min(1000px, calc(100% - 32px));
    max-width: none;
    height: fit-content;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    box-sizing: border-box;
    margin: auto;
    padding: 12px;
    overflow: auto;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.news-image-popup:not([open]) { display: none; }
.news-image-popup::backdrop { background: rgba(12, 17, 14, 0.82); }
.news-image-popup figure { margin: 0; }
.news-image-popup-photo {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
}
.news-image-popup figcaption {
    margin: 14px 8px 6px;
    color: #292e29;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}
.news-image-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    background: #222c25;
    color: #fff;
    cursor: pointer;
}
.news-image-popup-close:hover { background: #ae4c0b; }
.news-image-popup-close:focus-visible { outline: 3px solid #d8792d; outline-offset: 3px; }
.news-panel:hover .news-scroll-track,
.news-panel .news-scroll-viewport:focus-within .news-scroll-track,
.news-panel[data-paused="true"] .news-scroll-track { animation-play-state: paused; }
.news-panel .news-panel-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e8dacb;
}
.news-panel .news-panel-count {
    color: #827261;
    font-size: 11px;
    font-weight: 500;
}
.news-panel .news-scroll-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}
.news-panel .news-scroll-toggle,
.news-panel .news-scroll-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid #e5d7c7;
    border-radius: 7px;
    background: #fff;
    color: #66513c;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}
.news-panel .news-scroll-step {
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
}
.news-panel .news-scroll-toggle::before { content: "Ⅱ"; font-size: 12px; }
.news-panel[data-paused="true"] .news-scroll-toggle::before { content: "▶"; font-size: 9px; }
.news-panel .news-scroll-toggle:hover,
.news-panel .news-scroll-step:hover { border-color: var(--news-accent); color: var(--news-accent); }
.news-panel .news-scroll-toggle:focus-visible,
.news-panel .news-scroll-step:focus-visible,
.news-panel .news-scroll-viewport:focus-visible,
.news-panel .news-image-trigger:focus-visible,
.news-panel .news-title-link:focus-visible,
.news-panel .news-view-label:focus-visible { outline: 2px solid var(--news-accent); outline-offset: 2px; }
.news-panel .news-image-trigger:focus-visible { outline-offset: -3px; }
.news-panel .news-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
    text-align: center;
}
.news-panel .news-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    margin-bottom: 20px;
    border: 1px solid #e9e0d4;
    border-radius: 22px;
    background: #fff;
    color: var(--news-accent);
    box-shadow: 0 6px 16px rgba(68, 46, 23, 0.04);
}
.news-panel .news-empty-title {
    margin: 0 0 8px;
    color: #514c44;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}
.news-panel .news-empty-message {
    max-width: 220px;
    margin: 0;
    color: #8a8176;
    font-size: 12px;
    line-height: 1.8;
}
@keyframes news-rise {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .news-panel .news-panel-body { padding: 10px; }
    .news-panel .news-item-content { padding: 12px; }
    .news-panel .news-item-footer { padding: 9px 12px; flex-wrap: wrap; }
    .news-panel .news-item-icon { display: none; }
    .news-panel .news-item-text { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .news-panel .news-scroll-track { animation: none; }
    .news-panel .news-scroll-viewport { overflow-y: auto; }
    .news-panel .news-scroll-group[aria-hidden="true"],
    .news-panel .news-scroll-item[data-news-repeat],
    .news-panel .news-scroll-toggle { display: none; }
}
