.notice-reader-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 24px;
    background: rgba(2, 6, 15, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.notice-reader-modal[aria-hidden="true"] {
    display: none;
}

.notice-reader-panel {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(760px, calc(100vw - 48px));
    max-height: min(82vh, 760px);
    overflow: hidden;
    color: #f8fbff;
    border: 1px solid transparent;
    border-radius: 28px;
    outline: none;
    background:
        linear-gradient(160deg, rgba(12, 28, 48, 0.98), rgba(7, 12, 27, 0.99)) padding-box,
        linear-gradient(120deg, rgba(84, 225, 255, 0.78), rgba(119, 118, 255, 0.35) 52%, rgba(255, 93, 207, 0.65)) border-box;
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.72),
        0 0 40px rgba(69, 216, 255, 0.1),
        0 0 52px rgba(255, 83, 199, 0.08);
    animation: noticeReaderEnter 180ms ease-out both;
}

.notice-reader-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 0 0, rgba(66, 209, 255, 0.12), transparent 31%),
        radial-gradient(circle at 100% 100%, rgba(234, 76, 255, 0.08), transparent 34%);
}

.notice-reader-header {
    position: relative;
    padding: 30px 82px 24px 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.notice-reader-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 30px;
    margin-bottom: 15px;
}

.notice-reader-category {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(150, 180, 211, 0.18);
    border-radius: 999px;
    color: #dfeaf6;
    background: rgba(155, 178, 204, 0.12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.notice-reader-modal[data-category="event"] .notice-reader-category {
    color: #ffd6f4;
    border-color: rgba(255, 104, 207, 0.32);
    background: rgba(255, 86, 200, 0.13);
}

.notice-reader-modal[data-category="maintenance"] .notice-reader-category {
    color: #ffe4ac;
    border-color: rgba(255, 189, 83, 0.32);
    background: rgba(255, 174, 56, 0.13);
}

.notice-reader-modal[data-category="update"] .notice-reader-category {
    color: #c9f6ff;
    border-color: rgba(84, 225, 255, 0.32);
    background: rgba(55, 205, 255, 0.13);
}

.notice-reader-date {
    color: rgba(223, 234, 246, 0.58);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.notice-reader-title {
    max-width: 640px;
    margin: 0;
    color: #fff;
    text-align: left;
    font-size: clamp(22px, 3vw, 29px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.notice-reader-x {
    position: absolute;
    top: 24px;
    right: 28px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.055);
    font: inherit;
    cursor: pointer;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.notice-reader-x span {
    display: block;
    margin-top: -3px;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
}

.notice-reader-x:hover,
.notice-reader-x:focus-visible {
    color: #fff;
    border-color: rgba(95, 231, 255, 0.48);
    background: rgba(95, 231, 255, 0.11);
    transform: scale(1.05);
    outline: none;
}

.notice-reader-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 27px 34px 30px;
    scrollbar-width: thin;
    scrollbar-color: rgba(95, 231, 255, 0.45) rgba(255, 255, 255, 0.04);
}

.notice-reader-scroll::-webkit-scrollbar {
    width: 8px;
}

.notice-reader-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
}

.notice-reader-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(95, 231, 255, 0.42);
    background-clip: padding-box;
}

.notice-reader-image-wrap {
    margin: 0 0 26px;
}

.notice-reader-image {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.notice-reader-body {
    color: rgba(242, 247, 255, 0.84);
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.notice-reader-body > :first-child {
    margin-top: 0;
}

.notice-reader-body > :last-child {
    margin-bottom: 0;
}

.notice-reader-body p {
    margin: 0 0 1.15em;
}

.notice-reader-body h1,
.notice-reader-body h2,
.notice-reader-body h3,
.notice-reader-body h4 {
    margin: 1.5em 0 0.65em;
    color: #fff;
    line-height: 1.5;
}

.notice-reader-body h1 {
    font-size: 1.55em;
}

.notice-reader-body h2 {
    font-size: 1.35em;
}

.notice-reader-body h3,
.notice-reader-body h4 {
    font-size: 1.15em;
}

.notice-reader-body ul,
.notice-reader-body ol {
    margin: 0 0 1.2em;
    padding-inline-start: 1.6em;
}

.notice-reader-body li + li {
    margin-top: 0.35em;
}

.notice-reader-body a {
    color: #55e6ff;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: rgba(85, 230, 255, 0.62);
    text-underline-offset: 3px;
}

.notice-reader-body a:hover,
.notice-reader-body a:focus-visible {
    color: #a5f4ff;
    text-decoration-color: currentColor;
}

.notice-reader-body blockquote {
    margin: 1.25em 0;
    padding: 0.8em 1em;
    border-left: 3px solid rgba(95, 231, 255, 0.62);
    border-radius: 0 10px 10px 0;
    color: rgba(242, 247, 255, 0.78);
    background: rgba(95, 231, 255, 0.06);
}

.notice-reader-body img {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 1.35em auto;
    border-radius: 14px;
}

.notice-reader-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.notice-reader-body th,
.notice-reader-body td {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.notice-reader-body hr {
    margin: 1.5em 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.notice-reader-footer {
    display: flex;
    justify-content: center;
    padding: 17px 34px 23px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 10, 23, 0.38);
}

.notice-reader-dismiss {
    min-width: 170px;
    min-height: 46px;
    padding: 0 28px;
    border: 1px solid rgba(255, 255, 255, 0.27);
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.035);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.notice-reader-dismiss:hover,
.notice-reader-dismiss:focus-visible {
    border-color: rgba(95, 231, 255, 0.52);
    background: rgba(95, 231, 255, 0.09);
    transform: translateY(-1px);
    outline: none;
}

@keyframes noticeReaderEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .notice-reader-modal {
        padding: 12px;
    }

    .notice-reader-panel {
        width: 100%;
        max-height: calc(100dvh - 24px);
        border-radius: 23px;
    }

    .notice-reader-header {
        padding: 21px 62px 19px 20px;
    }

    .notice-reader-meta {
        gap: 10px;
        margin-bottom: 12px;
    }

    .notice-reader-category {
        min-height: 27px;
        padding: 0 11px;
        font-size: 11px;
    }

    .notice-reader-date {
        font-size: 12px;
    }

    .notice-reader-title {
        font-size: 20px;
        line-height: 1.5;
    }

    .notice-reader-x {
        top: 17px;
        right: 17px;
        width: 38px;
        height: 38px;
    }

    .notice-reader-x span {
        font-size: 29px;
    }

    .notice-reader-scroll {
        padding: 22px 20px 25px;
    }

    .notice-reader-body {
        font-size: 14px;
        line-height: 1.9;
    }

    .notice-reader-image {
        max-height: 230px;
        border-radius: 14px;
    }

    .notice-reader-footer {
        padding: 14px 20px 18px;
    }

    .notice-reader-dismiss {
        width: 100%;
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notice-reader-panel {
        animation: none;
    }

    .notice-reader-x,
    .notice-reader-dismiss {
        transition: none;
    }
}
