.announcement-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: rgba(32, 27, 22, 0.56);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 170ms ease;
}

.announcement-overlay.is-open {
    display: flex;
}

.announcement-overlay.is-visible {
    opacity: 1;
}

.announcement-panel {
    position: relative;
    display: block;
    width: min(720px, calc(100vw - 230px));
    height: min(620px, calc(100dvh - 80px));
    overflow: visible;
    color: #584738;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 220ms ease, transform 220ms cubic-bezier(.2,.7,.2,1);
}

.announcement-overlay.is-visible .announcement-panel {
    opacity: 1;
    transform: none;
}

.announcement-main {
    position: relative;
    z-index: 2;
    min-width: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 38px 42px 34px;
    overflow: hidden;
    background: #fbf7f1;
    border: 1px solid #cec1ab;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(32, 27, 22, 0.24);
}

.announcement-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #cec1ab;
}

.announcement-heading {
    margin: 0;
    color: #584738;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 500;
}

.announcement-date {
    flex: 0 0 auto;
    color: #9d876a;
    font-size: 13px;
}

.announcement-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 8px 20px 0;
    font-size: 15px;
    line-height: 1.85;
    animation: announcement-content-in 180ms ease;
}

.announcement-body p {
    margin: 0 0 1em;
}

.announcement-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(206, 193, 171, 0.65);
}

.announcement-tag {
    padding: 4px 11px;
    color: #9d876a;
    background: #fff;
    border: 1px solid #cec1ab;
    border-radius: 999px;
    font-size: 12px;
}

.announcement-list {
    position: absolute;
    top: 0;
    left: calc(100% - 12px);
    z-index: 1;
    width: 156px;
    height: 100%;
    padding: 78px 0 28px;
    overflow: visible;
}

.announcement-item {
    position: relative;
    display: block;
    width: 100%;
    min-height: 64px;
    margin: 0 0 15px;
    padding: 14px 14px 14px 24px;
    color: #705d4c;
    text-align: left;
    font: inherit;
    background: #f3ece2;
    border: 1px solid #cec1ab;
    border-left: 0;
    border-radius: 0 13px 13px 0;
    box-shadow: 9px 10px 24px rgba(67, 52, 38, 0.2);
    cursor: pointer;
    opacity: .82;
    transform: translateX(0);
    transition: background 180ms ease, color 180ms ease, opacity 180ms ease,
        transform 220ms cubic-bezier(.2,.75,.2,1), box-shadow 180ms ease;
}

.announcement-item:hover {
    color: #584738;
    background: #eee4d8;
    box-shadow: 10px 12px 28px rgba(67, 52, 38, 0.16);
    opacity: 1;
    transform: translateX(7px);
}

.announcement-item.active {
    color: #584738;
    background: #dfd1be;
    box-shadow: 12px 14px 30px rgba(67, 52, 38, 0.19);
    opacity: 1;
    transform: translateX(4px);
}

.announcement-item:focus {
    outline: none;
}

.announcement-item:focus-visible {
    outline: 2px solid #9d876a;
    outline-offset: 2px;
}

.announcement-item.active::after {
    content: '';
    position: absolute;
    right: 14px;
    bottom: 10px;
    width: 28px;
    height: 1px;
    background: #9d876a;
    opacity: .75;
}

.announcement-item-title,
.announcement-item-date {
    display: block;
}

.announcement-item-title {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.announcement-item-date {
    color: #9d876a;
    font-size: 11px;
}

.announcement-close {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 3;
    width: 38px;
    height: 38px;
    padding: 0;
    color: #806d59;
    font: 300 32px/34px Arial, sans-serif;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(181,158,125,.45);
    border-radius: 50%;
    cursor: pointer;
    transition: background 160ms ease, transform 160ms ease;
}

.announcement-close:hover {
    background: #fff;
    transform: scale(1.06);
}

@keyframes announcement-content-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 680px) {
    .announcement-overlay { padding: 16px 12px; }
    .announcement-panel {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        width: calc(100vw - 24px);
        height: calc(100dvh - 32px);
        border-radius: 18px;
    }
    .announcement-list {
        position: relative;
        top: auto;
        left: auto;
        grid-row: 1;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        width: auto;
        height: auto;
        padding: 8px 10px 12px;
    }
    .announcement-item {
        flex: 0 0 auto;
        width: auto;
        min-width: 132px;
        margin: 0;
        padding: 12px 15px;
        border: 1px solid #cec1ab;
        border-radius: 11px;
        transform: none;
    }
    .announcement-item:hover { transform: translateY(-2px); }
    .announcement-item.active { transform: translateY(2px); }
    .announcement-main {
        grid-row: 2;
        min-height: 0;
        height: auto;
        padding: 24px 22px 20px;
        border-radius: 18px;
    }
    .announcement-header { display: block; padding-right: 40px; }
    .announcement-date { display: block; margin-top: 8px; }
    .announcement-close { top: 14px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .announcement-overlay,
    .announcement-panel,
    .announcement-body { transition: none; animation: none; }
}
