.notice-screen {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.notice-screen > .site-header,
.notice-screen > .footer {
    flex-shrink: 0;
}

.notice-screen .gnb__page-title {
    font-size: var(--font-size-16);
    font-weight: 700;
    line-height: 1.5rem;
}

.notice-page {
    flex: 1 0 auto;
    width: min(100% - 2.5rem, 75rem);
    min-height: 0;
    margin-inline: auto;
    padding-block: var(--space-24) var(--space-60);
    color: var(--color-gray-900);
}

.notice-page__title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.notice-tools {
    display: flex;
    flex-direction: column;
    gap: var(--space-20);
    margin-bottom: var(--space-20);
}

.notice-tools__description {
    word-break: keep-all;
    overflow-wrap: anywhere;
    font-size: var(--font-size-14);
    font-weight: 300;
    line-height: 1.25rem;
    color: var(--color-gray-800);
}

.notice-search {
    display: flex;
    gap: var(--space-8);
    min-width: 0;
}

.notice-search__input {
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: var(--space-10) 0.875rem;
    border: 1px solid var(--color-gray-300);
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: 1.25rem;
}

.notice-search__input::placeholder {
    color: var(--color-gray-500);
    font: inherit;
}

.notice-search__submit {
    flex: 0 0 4.5rem;
    height: 2.75rem;
    padding: 0;
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: 1.25rem;
}

.notice-table {
    width: 100%;
    border-top: 1px solid var(--color-gray-500);
    table-layout: fixed;
    font-size: var(--font-size-15);
    font-weight: 300;
    line-height: 1.375rem;
    color: var(--color-gray-800);
}

.notice-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.notice-table th {
    font-weight: 500;
    color: var(--color-gray-900);
}

.notice-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    padding-block: var(--space-24);
    border-bottom: 1px solid var(--color-gray-150);
}

.notice-table td {
    padding: 0;
    overflow-wrap: anywhere;
}

.notice-table .notice-table__number {
    display: none;
}

.notice-table__subject {
    font-weight: 400;
    color: var(--color-gray-900);
}

.notice-table__subject a {
    display: block;
}

.notice-article__date {
    font-size: var(--font-size-13);
    font-weight: 400;
    line-height: 1.125rem;
    color: var(--color-gray-500);
}

.notice-table .notice-table__empty {
    padding-block: var(--space-40);
    font-size: var(--font-size-14);
    line-height: 1.5rem;
    color: var(--color-gray-500);
    text-align: center;
}

.notice-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-32);
}

.notice-pagination a,
.notice-pagination__arrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.375rem;
    font-size: var(--font-size-16);
    line-height: 1.375rem;
}

.notice-pagination a::after {
    content: "";
    position: absolute;
    inset: -0.625rem -0.1875rem;
}

.notice-pagination [aria-current="page"] {
    font-weight: 700;
}

.notice-pagination .notice-pagination__number--desktop {
    display: none;
}

.notice-pagination__icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    transform: rotate(-90deg);
}

.notice-pagination__arrow--previous .notice-pagination__icon {
    transform: rotate(90deg);
}

.notice-pagination__arrow.is-disabled {
    color: var(--color-gray-300);
}

.notice-error {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    margin-block: var(--space-16);
    font-size: var(--font-size-14);
    line-height: 1.5rem;
    color: var(--color-accent);
}

.notice-error button {
    text-decoration: underline;
}

.notice-page--detail {
    padding-top: var(--space-24);
}

.notice-article__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding-block: var(--space-20);
    border-top: 1px solid var(--color-gray-500);
    border-bottom: 1px solid var(--color-gray-150);
}

.notice-article__title {
    font-size: var(--font-size-16);
    font-weight: 500;
    line-height: 1.5rem;
    overflow-wrap: anywhere;
}

.notice-article__body {
    padding-block: var(--space-24) var(--space-40);
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: 1.25rem;
    color: var(--color-gray-800);
    overflow-wrap: anywhere;
}

.notice-article__body p {
    white-space: pre-line;
}

.notice-article__body p + p {
    margin-top: var(--space-20);
}

/* CMS 편집기에서 넣은 링크·이미지. 전역 reset이 링크 밑줄을 없애므로 본문 링크는 밑줄로 구분한다. */
.notice-article__body a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.notice-article__body img {
    margin-block: var(--space-20);
}

.notice-neighbors {
    border-top: 1px solid var(--color-gray-500);
    font-size: var(--font-size-14);
    line-height: 1.25rem;
}

.notice-neighbors__row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: var(--space-8);
    padding-block: 0.875rem;
    border-bottom: 1px solid var(--color-gray-150);
}

.notice-neighbors__label {
    font-weight: 500;
}

.notice-neighbors__link {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.notice-neighbors__link time {
    font-weight: 300;
    font-size: var(--font-size-13);
    line-height: 1.125rem;
}

.notice-neighbors__link {
    color: var(--color-gray-800);
}

.notice-neighbors__link time,
.notice-neighbors__empty {
    color: var(--color-gray-500);
}

.notice-page__actions {
    margin-top: var(--space-24);
    text-align: center;
}

.notice-page__back {
    width: 100%;
    height: 3rem;
    border: 1px solid var(--color-gray-300);
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: 1.5rem;
}

@media (max-width: 47.999rem) {
    .notice-table__date {
        font-weight: 400;
        font-size: var(--font-size-13);
        line-height: 1.125rem;
        color: var(--color-gray-500);
    }

    .notice-neighbors__link time {
        font-weight: 400;
        font-size: var(--font-size-12);
        line-height: 1rem;
    }

    .notice-page__back {
        font-weight: 500;
        line-height: 1.25rem;
    }
}

@media (min-width: 48rem) {
    .notice-page {
        padding-block: var(--space-80) 10rem;
    }

    .notice-page__title {
        position: static;
        width: auto;
        height: auto;
        margin-bottom: var(--space-60);
        clip-path: none;
        font-size: var(--font-size-32);
        font-weight: 700;
        line-height: 2.5rem;
    }

    .notice-tools {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-20);
        margin-bottom: var(--space-32);
    }

    .notice-tools__description {
        font-size: var(--font-size-16);
        line-height: 1.5rem;
    }

    .notice-search {
        flex: 0 0 26.75rem;
        max-width: 55%;
    }

    .notice-search__input,
    .notice-search__submit {
        height: 3rem;
        font-size: var(--font-size-15);
        line-height: 1.375rem;
    }

    .notice-search__submit {
        flex-basis: 6.25rem;
        background: var(--color-gray-900);
    }

    .notice-table thead {
        position: static;
        width: auto;
        height: auto;
        clip-path: none;
        background: var(--color-gray-50);
    }

    .notice-table th {
        height: 2.625rem;
        padding: var(--space-8) var(--space-16);
        text-align: left;
    }

    .notice-table tbody tr {
        display: table-row;
        height: 3.8125rem;
    }

    .notice-table td {
        padding: var(--space-16);
    }

    .notice-table .notice-table__number {
        display: table-cell;
        width: 6.25rem;
        text-align: center;
    }

    .notice-table .notice-table__date {
        width: 10rem;
        text-align: center;
    }

    .notice-pagination {
        gap: var(--space-12);
        margin-top: 4rem;
    }

    .notice-pagination .notice-pagination__number--desktop {
        display: inline-flex;
    }

    .notice-article__header {
        gap: var(--space-8);
        padding: var(--space-30) var(--space-16);
    }

    .notice-article__title {
        font-size: var(--font-size-22);
        line-height: 1.875rem;
    }

    .notice-article__date {
        font-size: var(--font-size-14);
        line-height: 1.375rem;
        color: var(--color-gray-600);
    }

    .notice-article__body {
        font-size: var(--font-size-15);
        padding: var(--space-40) var(--space-16) var(--space-60);
        line-height: 1.5rem;
    }

    .notice-article__body p + p {
        margin-top: var(--space-24);
    }

    .notice-neighbors {
        font-size: var(--font-size-15);
        line-height: 1.375rem;
    }

    .notice-neighbors__row {
        grid-template-columns: 5.5rem minmax(0, 1fr);
        gap: var(--space-16);
        padding: 1.125rem var(--space-16);
    }

    .notice-neighbors__link {
        flex-direction: row;
        justify-content: space-between;
        gap: var(--space-24);
    }

    .notice-neighbors__link time {
        flex-shrink: 0;
        font-size: var(--font-size-14);
        line-height: 1.375rem;
    }

    .notice-page__actions {
        margin-top: var(--space-40);
    }

    .notice-page__back {
        width: 10rem;
        height: 3.25rem;
    }
}
