.news-page {
    width: 90%;
    max-width: 1100px;
    margin: 32px auto 48px;
}

.news-banner {
    margin: 0 0 28px;
    padding: 36px 28px;
    border-radius: 22px;
    background: var(--red);
    color: #ffffff;
    text-align: center;
}

.news-banner h2 {
    margin: 8px 0 10px;
    color: #ffffff;
    font-size: 36px;
    line-height: 1.15;
}

.news-banner p {
    margin: 0 auto;
    max-width: 62ch;
}

.news-crumbs {
    margin: 0;
    font-size: 14px;
}

.news-crumbs a,
.news-banner .news-crumbs {
    color: #ffffff;
}

.news-crumbs a {
    text-decoration: none;
    font-weight: 700;
}

.news-crumbs span {
    margin: 0 6px;
}

.news-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notice-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 18px;
    border: 2px solid var(--brown);
    border-radius: 16px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(92, 64, 51, 0.06);
}

.notice-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: #fff8e6;
    color: var(--red);
}

.notice-day {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.notice-month {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.notice-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.notice-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--red);
}

.notice-summary,
.notice-ago {
    font-size: 14px;
    line-height: 1.4;
    color: #5c534c;
}

.notice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.notice-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notice-tag-type,
.notice-tag-new {
    background: #fff8e6;
    color: var(--red);
}

.notice-tag-important {
    background: #fde8ea;
    color: var(--red);
}

.notice-tag-document {
    background: #f8efe8;
    color: var(--brown);
}

.notice-tag-admissions,
.notice-tag-secondary {
    background: #fff3c4;
    color: #5c4033;
}

.notice-read {
    padding: 8px 12px;
    border: 2px solid var(--brown);
    border-radius: 999px;
    color: var(--red);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.notice-card:hover .notice-read {
    background: var(--red);
    border-color: var(--red);
    color: #ffffff;
}

.notice-empty {
    margin: 12px 0 0;
}

.news-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-search,
.news-help,
.calendar-month,
.notice-detail {
    padding: 20px;
    border: 2px solid var(--brown);
    border-radius: 16px;
    background: #ffffff;
}

.news-search label,
.news-help h3,
.calendar-month h3 {
    display: block;
    margin: 0 0 12px;
    color: var(--red);
    font-size: 18px;
}

.news-search label {
    padding-bottom: 8px;
    border-bottom: 3px solid var(--brown);
}

.news-search input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9cfc8;
    border-radius: 8px;
    font: inherit;
}

.news-help p {
    margin: 0 0 14px;
}

.news-help-btn,
.notice-back {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--red);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.news-help-btn:hover,
.notice-back:hover {
    background: var(--brown);
}

.notice-detail h2 {
    margin: 8px 0 8px;
    color: var(--red);
}

.notice-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
}

.notice-detail img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 18px;
    object-fit: contain;
    object-position: center;
    background: #f7f4f2;
    border-radius: 14px;
}

.notice-detail p {
    margin: 0 0 14px;
}

.notice-detail .news-crumbs a,
.notice-detail .news-crumbs {
    color: var(--brown);
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calendar-month h3 {
    margin-top: 0;
}

.calendar-month ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.calendar-month li {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(92, 64, 51, 0.12);
}

.calendar-month time {
    font-weight: 700;
}

.calendar-month a {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
}

.calendar-month a:hover {
    color: var(--brown);
}

a.highlight-btn {
    display: inline-block;
    text-decoration: none;
}

html[data-theme="dark"] .news-banner,
html[data-theme="dark"] .news-banner h2,
html[data-theme="dark"] .news-banner p,
html[data-theme="dark"] .news-banner a {
    background: var(--red);
    color: #ffffff;
}

html[data-theme="dark"] .news-banner h2,
html[data-theme="dark"] .news-banner p,
html[data-theme="dark"] .news-banner a {
    background: transparent;
}

html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .news-search,
html[data-theme="dark"] .news-help,
html[data-theme="dark"] .calendar-month,
html[data-theme="dark"] .notice-detail {
    background: #3a2d26;
    color: #f4eee9;
    border-color: rgba(224, 194, 176, 0.35);
}

html[data-theme="dark"] .notice-title,
html[data-theme="dark"] .news-search label,
html[data-theme="dark"] .news-help h3,
html[data-theme="dark"] .calendar-month h3,
html[data-theme="dark"] .notice-detail h2,
html[data-theme="dark"] .calendar-month a,
html[data-theme="dark"] .notice-read {
    color: #e07068;
}

html[data-theme="dark"] .news-search label {
    border-bottom-color: #e07068;
}

html[data-theme="dark"] .calendar-month a:hover,
html[data-theme="dark"] .notice-card:hover .notice-read {
    color: #ffffff;
}

html[data-theme="dark"] .notice-tag-type,
html[data-theme="dark"] .notice-tag-new,
html[data-theme="dark"] .notice-tag-document {
    background: #2a211c;
    color: #e0c2b0;
}

html[data-theme="dark"] .notice-tag-important {
    background: #3a1818;
    color: #f3b4b4;
}

html[data-theme="dark"] .notice-tag-admissions,
html[data-theme="dark"] .notice-tag-secondary {
    background: #3a3018;
    color: #f5c518;
}

html[data-theme="dark"] .notice-summary,
html[data-theme="dark"] .notice-ago,
html[data-theme="dark"] .notice-detail .news-crumbs,
html[data-theme="dark"] .notice-detail .news-crumbs a {
    color: #d9cdc4;
}

html[data-theme="dark"] .news-search input {
    background: #1a1410;
    color: #f4eee9;
    border-color: #c4a08e;
}

html[data-theme="dark"] .notice-date {
    background: #2a211c;
    color: #e07068;
}

.home-board {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-news-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.8fr);
    gap: 20px;
    align-items: stretch;
}

.home-news,
.home-earlier,
.home-event {
    background: var(--white);
    border: 1px solid rgba(92, 64, 51, 0.1);
    border-radius: 22px;
    padding: 14px 14px 18px;
    box-shadow: 0 8px 28px rgba(92, 64, 51, 0.08);
}

.home-news h2,
.home-earlier h2,
.home-event h2 {
    margin: 0 0 16px;
    color: var(--red);
}

.home-empty {
    margin: 0;
    color: #3a3a3a;
    line-height: 1.45;
}

.home-news-latest,
.home-event-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.home-news-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-news-copy .home-kicker,
.home-news-copy strong,
.home-news-copy span {
    display: block;
}

.home-news-latest img,
.home-event-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 14px;
    border: 0;
}

.home-kicker {
    color: var(--brown);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-news-latest strong,
.home-event-card strong {
    color: var(--red);
    font-size: 22px;
    line-height: 1.25;
}

.home-news-past {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-news-past li + li {
    border-top: 1px solid rgba(92, 64, 51, 0.14);
}

.home-news-past a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.home-news-past time {
    color: var(--brown);
    font-size: 13px;
    font-weight: 700;
}

.home-news-past a:hover span,
.home-news-latest:hover strong,
.home-event-card:hover strong {
    color: var(--brown);
}

.home-event {
    display: flex;
    flex-direction: column;
}

.home-event-card {
    flex: 1;
}

.home-event-all {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 22px;
    border-radius: 8px;
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
}

.home-event-all:hover {
    background: var(--brown);
    color: var(--white);
}

.month-calendar {
    background: #ffffff;
    border: 2px solid var(--brown);
    border-radius: 16px;
    padding: 18px;
}

.month-calendar-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.month-calendar-bar h3 {
    margin: 0;
    color: var(--red);
    text-align: center;
}

.month-nav {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.month-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brown);
}

.month-day {
    min-height: 92px;
    padding: 6px;
    border-radius: 10px;
    background: #fff8e6;
}

.month-day.outside {
    opacity: 0.45;
}

.month-day.today {
    outline: 2px solid var(--red);
}

.month-day-number {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
}

.month-event {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 4px 6px;
    border: 0;
    border-radius: 6px;
    background: var(--red);
    color: #ffffff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
}

.month-event:hover {
    background: var(--brown);
}

.event-popup {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    overflow: auto;
}

.event-popup[hidden] {
    display: none;
}

.event-popup-card {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 28px 24px 20px;
    border-radius: 16px;
    background: #ffffff;
    color: #000000;
}

.event-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--brown);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.event-popup-date {
    margin: 0 36px 6px 0;
    color: var(--brown);
    font-size: 14px;
    font-weight: 700;
}

.event-popup-card h2 {
    margin: 0 36px 10px 0;
    color: var(--red);
}

.event-popup-summary {
    font-weight: 700;
}

html[data-theme="dark"] .home-news,
html[data-theme="dark"] .home-earlier,
html[data-theme="dark"] .home-event {
    background: #3a2d26;
    color: #f4eee9;
    border-color: rgba(224, 194, 176, 0.35);
}

html[data-theme="dark"] .month-calendar,
html[data-theme="dark"] .event-popup-card {
    background: #2a211c;
    color: #f4eee9;
    border-color: #c4a08e;
}

html[data-theme="dark"] .month-day {
    background: #32261f;
}

html[data-theme="dark"] .home-news-past a,
html[data-theme="dark"] .home-news-latest,
html[data-theme="dark"] .home-event-card {
    color: #f4eee9;
}

@media (max-width: 800px) {
    .home-news-row {
        grid-template-columns: 1fr;
    }

    .month-day {
        min-height: 64px;
        padding: 4px;
    }

    .month-event {
        font-size: 10px;
    }
}

@media (max-width: 800px) {
    .news-layout,
    .notice-card,
    .calendar-month li {
        grid-template-columns: 1fr;
    }

    .notice-date {
        width: 64px;
    }

    .news-banner h2 {
        font-size: 28px;
    }
}
