:root {
  color-scheme: light;
  --ink: #112d49;
  --muted: #47617a;
  --accent: #235389;
  --line: #d8e7f2;
  --paper: #fbfdff;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #2369a9; outline-offset: 4px; }
.wrap { width: min(1180px, 91%); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, .section-head, .record { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 74px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand img { object-fit: contain; }
nav { display: flex; flex-wrap: wrap; gap: .25rem; }
nav a { color: var(--ink); font-weight: 650; text-decoration: none; padding: .6rem .85rem; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { border-bottom-color: #5388bf; color: var(--accent); }
main { min-height: 58vh; padding-block: 1.4rem 3rem; }
main:has(.hero) { width: 100%; padding-top: 0; }
h1, h2, h3, p { margin: 0; }
p { color: var(--muted); line-height: 1.65; }
h1 { font-size: clamp(2rem, 5.8vw, 4.3rem); line-height: 1.08; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.3rem, 3.1vw, 1.9rem); }
h3 { overflow-wrap: anywhere; }
section + section { margin-top: 2rem; }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .16em; color: var(--accent); margin-bottom: .45rem; }
.hero { background: #e5f2fc url('/winter.svg') center bottom / cover no-repeat; }
.hero-inner { position: relative; min-height: clamp(440px, 40vw, 580px); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; padding-block: 3rem 5rem; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1.12; }
.hero-copy { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: .5rem; font-size: .79rem; letter-spacing: .18em; font-weight: 750; color: var(--accent); margin-bottom: 1.1rem; }
.hero-kicker span { font-size: 1.15rem; line-height: 1; }
.hero p, .page-intro p { margin-top: .85rem; }
.hero-logo { display: block; width: 100%; max-width: 540px; height: auto; justify-self: end; filter: drop-shadow(0 12px 20px #274d7829); }
.hero-caption { position: absolute; bottom: 1.3rem; right: 0; display: flex; align-items: center; gap: .7rem; font-size: .64rem; font-weight: 750; letter-spacing: .18em; color: var(--muted); }
.hero-caption span { width: 28px; height: 1px; background: #7195b6; }
.hero-secondary { font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 1rem; }
.button, button { display: inline-flex; align-items: center; gap: .65rem; border-radius: 6px; border: 1px solid transparent; background: var(--accent); color: #fff; padding: .7rem 1rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: #163e69; }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { color: var(--accent); background: #eff7fd; border-color: var(--line); }
button.secondary:hover { background: #e1f0fb; }
.home-grid, .form-grid { display: grid; gap: 1.15rem; grid-template-columns: 1fr 1fr; }
.home-grid { margin-top: 1.5rem; gap: clamp(1rem, 4vw, 3.4rem); grid-template-columns: 1.35fr 1fr; }
.home-grid section { margin: 0; min-width: 0; padding-top: 1.15rem; border-top: 2px solid #a4c5e0; }
.section-head { margin-bottom: .85rem; }
.section-head > a { flex-shrink: 0; }
.empty { background: #f0f7fd; border: 1px solid var(--line); border-radius: 8px; padding: 1.3rem; color: var(--muted); }
.cards { display: grid; gap: .65rem; }
.card { display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: #7da8cf; }
.card span:last-child { margin-left: auto; color: var(--accent); }
.card img, .thumb { width: 78px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.page-intro { padding: clamp(1.3rem, 4vw, 3rem); margin-bottom: 1.6rem; background: linear-gradient(120deg, #e9f4fc, #f9fcff); border: 1px solid var(--line); border-radius: 8px; }
.detail .page-intro { margin-top: 1rem; }
.page-intro .empty { margin-top: 1rem; }
.detail { max-width: 800px; }
.detail-poster { display: block; max-width: 100%; max-height: 720px; object-fit: contain; border-radius: 14px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; margin-block: 1.2rem; }
.detail-back { display: inline-block; margin-bottom: 1rem; }
.event-overview {
  display: grid;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(120deg, #e9f4fc, #f9fcff);
}
.event-overview-with-poster { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
.event-overview .detail-poster { width: auto; max-height: 560px; justify-self: center; }
.event-summary h1 { font-size: clamp(1.9rem, 3.8vw, 3.15rem); line-height: 1.18; }
.event-facts { display: grid; gap: 1rem; margin: 1.5rem 0 0; }
.event-facts > div { display: grid; gap: .25rem; border-left: 2px solid #a4c5e0; padding-left: .8rem; }
.event-facts dt { color: var(--muted); font-size: .85rem; font-weight: 650; }
.event-facts dd { margin: 0; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; overflow-wrap: anywhere; }
.event-participation { margin-top: 1.6rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.event-participation h2 { font-size: 1.05rem; }
.event-participation p, .event-participation .actions { margin-top: .5rem; }
.event-details-link { display: inline-block; margin-top: .65rem; font-weight: 650; }
.event-body { max-width: 800px; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer { border-top: 1px solid var(--line); background: #edf6fd; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-block: 2rem; }
.footer-brand { display: flex; align-items: center; gap: .55rem; margin-bottom: .4rem; }
.footer-brand img { object-fit: contain; }
.footer-about p { max-width: 24rem; font-size: .85rem; }
.footer-copyright { margin-top: .35rem; }
.footer h2 { font-size: 1rem; margin-bottom: .5rem; }
.footer-nav { display: block; }
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav a { display: inline-block; border: 0; padding: .26rem 0; font-size: .9rem; font-weight: 500; }
.footer-nav a:hover, .footer-nav a[aria-current] { text-decoration: underline; }
.footer-contact .button { font-size: .9rem; }
#contact-title { margin-bottom: .75rem; }
.settings-help { margin-bottom: .85rem; }
.admin { max-width: 960px; }
.admin h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.admin section > h2 { margin-bottom: .6rem; }
.admin section > p { margin-bottom: .8rem; }
.panel, .record { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; margin-bottom: .7rem; }
.login { max-width: 440px; margin-inline: auto; }
.panel h1, .panel h2 { margin-bottom: .7rem; }
form label, .filters label { display: grid; gap: .35rem; margin-bottom: .85rem; font-weight: 650; font-size: .9rem; }
input, select, textarea { min-width: 0; color: var(--ink); background: #fff; border: 1px solid #acbfd1; border-radius: 7px; padding: .55rem .65rem; }
textarea { resize: vertical; }
.form-grid { gap: 0 1rem; }
.filters, .checks { display: flex; gap: 1rem; flex-wrap: wrap; }
.check { display: flex; align-items: center; }
.staff-form + .staff-form { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.staff-form h3 { margin-bottom: .6rem; }
.record .actions { margin-top: 0; }
#notice:not(:empty) { position: sticky; z-index: 2; top: .5rem; background: #dfedf8; color: var(--ink); border-radius: 9px; padding: .6rem 1rem; margin-bottom: 1rem; }
@media (max-width: 650px) {
  .event-overview-with-poster { grid-template-columns: minmax(0, 1fr); }
  .event-overview .detail-poster { max-height: 420px; }
  .header-inner { gap: .45rem; }
  .header-inner nav { font-size: .88rem; }
  nav a { padding-inline: .55rem; }
  .hero { background-position: 67% bottom; }
  .hero-inner { grid-template-columns: 1fr; gap: .8rem; min-height: 0; padding-block: 1.4rem 3rem; }
  .hero-logo { grid-row: 1; justify-self: center; max-width: 280px; width: 72%; }
  .hero h1 { font-size: clamp(1.85rem, 8.5vw, 2.65rem); }
  .hero-kicker { margin-bottom: .5rem; }
  .hero-caption { bottom: .7rem; font-size: .56rem; }
  .home-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .record { align-items: flex-start; flex-direction: column; }
}
