:root {
    color-scheme: light;
    font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
    color: #252525;
    background: #fff;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }

.event-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
}

.event-shell { width: min(1248px, calc(100% - 48px)); margin-inline: auto; }

.event-header { border-bottom: 1px solid #ececec; background: #fff; }

.event-header__inner {
    min-height: 92px;
    padding-top: env(safe-area-inset-top, 0px);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 24px;
}

.event-brand img { width: min(390px, 65vw); height: auto; }

.event-page-heading { margin-bottom: 20px; }
.event-page-heading h1 { margin: 0; color: #8d0000; font-size: 1.5rem; }

.event-main { flex: 1; padding: 36px 0 64px; }

.event-category-nav { margin-bottom: 28px; }
.event-category-bar { display: flex; align-items: center; gap: 6px; }
.event-category-hint { margin: 8px 0 0; color: #666; font-size: .78rem; text-align: center; }
.event-scroll {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid #e2d7d7;
    border-radius: 50%;
    background: #fff;
    color: #8d0000;
    font: inherit;
    font-size: 1.75rem;
    cursor: pointer;
    touch-action: manipulation;
}
.event-scroll:disabled { color: #aaa; background: #f5f5f5; cursor: default; }
.event-scroll:focus-visible { outline: 3px solid #8d0000; outline-offset: 2px; }
.event-scroll[hidden], .event-category-hint[hidden] { display: none; }

.event-tabs {
    flex: 1;
    min-width: 0;
    display: -webkit-flex;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.event-tab {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 24px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #315d7c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    transition: color .2s ease, background-color .2s ease;
}

.event-tab:hover, .event-tab:focus-visible { color: #8d0000; outline: none; box-shadow: 0 0 0 3px rgba(141, 0, 0, .18); }

.event-tab.is-active { background: #8d0000; color: #fff; }

.event-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }

.event-card { min-width: 0; border: 1px solid #d8d8d8; background: #fff; display: flex; flex-direction: column; }

.event-card[hidden] { display: none; }

.event-card__media {
    aspect-ratio: 4 / 3;
    min-height: 180px;
    margin: 8px 8px 0;
    overflow: hidden;
    background: #f2f2f2;
}

.event-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }

.event-card:hover .event-card__media img { transform: scale(1.025); }

.event-card__media--empty { background: #f3f0ed; }

.event-card__body { min-height: 160px; padding: 14px 16px 16px; display: flex; flex-direction: column; }

.event-card__meta { display: flex; gap: 0; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #e4e4e4; color: #777; font-size: .82rem; }

.event-card__meta span:not(:empty)::after { content: "｜"; color: #bbb; }

.event-card h2 { margin: 0; color: #242424; font-size: 1.08rem; font-weight: 500; line-height: 1.65; }

.event-card__more { align-self: flex-end; margin-top: auto; padding-top: 22px; color: #7b4545; font-size: .82rem; font-weight: 700; text-decoration: none; }

.event-card__more:hover, .event-card__more:focus-visible { color: #8d0000; text-decoration: underline; text-underline-offset: 4px; }

.event-state { max-width: 640px; margin: 72px auto; padding: 40px 24px; border: 1px solid #e2d7d7; text-align: center; }

.event-state h2 { margin-top: 0; color: #8d0000; }

.event-state p { margin-bottom: 0; color: #666; }

#footer7 {
    padding: 24px 0 max(24px, env(safe-area-inset-bottom, 0px));
    background: #8d0000;
    color: #fff;
}

.event-footer__inner { text-align: center; }

#footer7 p { margin: 0; }

.event-footer__notice {
    max-width: 880px;
    margin-inline: auto !important;
    color: rgba(255, 255, 255, .9);
    font-size: .9rem;
    line-height: 1.75;
}

.event-footer__copyright {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 14px !important;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .24);
    font-size: .82rem;
    line-height: 1.6;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
    .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .event-shell { width: min(100% - 28px, 1248px); }
    .event-header__inner { min-height: 76px; }
    .event-page-heading h1 { font-size: 1.25rem; }
    .event-main { padding-top: 22px; }
    .event-category-nav { margin-bottom: 24px; }
    .event-tabs { gap: 8px; }
    .event-tab { padding-inline: 18px; }
    .event-grid { grid-template-columns: 1fr; gap: 22px; }
    .event-footer__notice { text-align: left; }
    .event-footer__copyright { display: block; }
    .event-footer__copyright span { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
