.announcement-reading { overflow: hidden; }

.announcement-dialog {
    --announcement-dialog-top: clamp(24px, 10dvh, 96px);
    box-sizing: border-box;
    inset: var(--announcement-dialog-top) 0 auto;
    width: min(800px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - var(--announcement-dialog-top) - 16px);
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce5f0;
    border-radius: 16px;
    color: #1e293b;
    background: #fff;
    box-shadow: 0 24px 80px rgb(15 23 42 / 24%);
}

.announcement-dialog[open] {
    display: flex;
    flex-direction: column;
}

.announcement-dialog::backdrop { background: rgb(15 23 42 / 46%); }

.announcement-dialog-heading {
    flex: 0 0 auto;
    padding: 24px 32px 20px;
    border-top: 4px solid #2563eb;
    border-bottom: 1px solid #e8edf4;
    background: linear-gradient(120deg, #f5f9ff, #fff 75%);
}

.announcement-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.announcement-notice-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgb(37 99 235 / 8%);
}

.announcement-dialog-heading h2 {
    margin: 0 0 8px;
    color: #172b4d;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.announcement-dialog-heading time,
.announcement-document-heading time {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.announcement-body-frame {
    display: block;
    flex: 0 1 auto;
    width: 100%;
    height: var(--announcement-content-height, 160px);
    min-height: 0;
    max-height: min(56dvh, 520px);
    border: 0;
    background: #fff;
}

.announcement-dialog-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 20px;
    padding: 18px 32px;
    border-top: 1px solid #e8edf4;
    background: #f8fafc;
}

.announcement-dialog-footer p {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.announcement-dialog-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.announcement-dialog-actions .btn {
    min-height: 42px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.announcement-dialog-actions .btn-primary {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.announcement-dialog-actions .btn-primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

.announcement-dialog-actions .btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.announcement-dialog-actions .btn:focus-visible,
.announcement-table-scroll:focus-visible {
    outline: 2px solid #93b4fd;
    outline-offset: 3px;
    box-shadow: none;
}

.announcement-details-frame {
    display: block;
    width: 100%;
    height: 65dvh;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.announcement-check-error {
    position: fixed;
    bottom: 4rem;
    left: 1rem;
    z-index: 1030;
    max-width: calc(100vw - 2rem);
}

.announcement-document {
    margin: 0;
    font: 16px/1.8 system-ui, sans-serif;
    color: #334155;
    background: #fff;
    overflow-wrap: anywhere;
}

.announcement-document-content {
    display: flow-root;
    box-sizing: border-box;
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 32px;
}

.announcement-document-heading {
    margin-bottom: 24px;
    overflow-wrap: anywhere;
}

.announcement-document-heading h1 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.45;
}

.announcement-rich-content { display: flow-root; min-width: 0; }

.announcement-rich-content :is(img, video) {
    max-width: 100%;
    height: auto !important;
    border-radius: 6px;
}

@media (max-width: 575px) {
    .announcement-dialog {
        --announcement-dialog-top: clamp(16px, 6dvh, 48px);
        width: calc(100vw - 24px);
        max-height: calc(100dvh - var(--announcement-dialog-top) - 12px);
        border-radius: 12px;
    }

    .announcement-dialog-heading { padding: 18px 20px 16px; }
    .announcement-dialog-heading h2 { font-size: 20px; }
    .announcement-document-content { padding: 20px; }

    .announcement-dialog-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 20px;
    }

    .announcement-dialog-actions { flex-direction: column-reverse; align-items: stretch; }
    .announcement-dialog-actions .btn { width: 100%; min-height: 44px; }
}
