:root {
  --navy-950: #061426;
  --navy-850: #0b2544;
  --navy-700: #173b65;
  --gold: #cda64c;
  --gold-pale: #f4ead0;
  --paper: #f7f4ec;
  --ink: #13233a;
  --muted: #667085;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--navy-950); }
body {
  margin: 0; min-width: 0; overflow-x: hidden;
  color: var(--ink); background: var(--navy-950);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  -webkit-font-smoothing: antialiased;
}
body.is-lightbox-open { overflow: hidden; }
button, input { font: inherit; }

.event-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 8px max(18px, env(safe-area-inset-left));
  color: #fff; background: rgba(6,20,38,0.94);
  border-bottom: 1px solid rgba(205,166,76,0.24); backdrop-filter: blur(14px);
}
.event-topbar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; text-decoration: none; }
.event-topbar__brand img { width: 34px; height: 34px; object-fit: contain; }
.event-topbar__brand span { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.event-topbar__back { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; color: var(--gold-pale); font-size: 14px; text-decoration: none; }

.event-page { width: min(920px, 100%); margin: 0 auto; }
.event-loading, .event-error { min-height: 70vh; padding: 80px 24px; color: #fff; text-align: center; }
.event-error a { color: var(--gold-pale); }
.event-story { background: var(--paper); }
.event-hero { margin: 0; background: var(--navy-850); }
.event-hero img { display: block; width: 100%; max-height: 620px; aspect-ratio: 3 / 2; object-fit: cover; }
.event-story__body { padding: 28px 18px 44px; }
.event-kicker { margin: 0 0 10px; color: #957124; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; }
h1 { margin: 0; color: var(--navy-950); font-size: clamp(28px, 7.8vw, 46px); line-height: 1.18; }
.event-subtitle { margin: 12px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.event-meta { display: grid; gap: 10px; margin: 22px 0; color: #3b4960; font-size: 14px; line-height: 1.6; }
.event-summary { margin: 0; color: #263a56; font-size: 17px; line-height: 2; text-align: justify; }

.event-share-panel {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px;
  margin: 28px 0 12px; padding: 16px; border: 1px solid rgba(205,166,76,0.48);
  border-radius: 16px; background: linear-gradient(135deg, #fffaf0, #f1e4c1);
}
.event-page-share {
  min-width: 118px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--navy-850); color: #fff; font-weight: 700; cursor: pointer;
  box-shadow: 0 9px 24px rgba(6,20,38,0.19);
}
.event-share-panel > div > strong, .event-share-panel > div > span { display: block; }
.event-share-panel > div > strong { color: var(--navy-950); font-size: 14px; }
.event-share-panel > div > span { margin-top: 4px; color: #6f6043; font-size: 12px; line-height: 1.5; }
.event-share-status { grid-column: 1 / -1; color: #36405a; font-size: 13px; line-height: 1.7; }
.event-share-status strong { margin-right: 4px; color: var(--navy-850); }
.event-share-status label, .event-share-status span { display: block; }
.event-share-status input, .event-canonical {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #c5b98e;
  border-radius: 9px; background: rgba(255,255,255,0.9); color: #27344f; font: inherit;
}
.event-share-status input { margin-top: 7px; }
.event-canonical { margin-bottom: 26px; font-size: 12px; }

.event-gallery-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 14px; }
.event-gallery-head p { margin: 0; color: var(--navy-950); font-size: 24px; font-weight: 700; }
.event-gallery-head span { color: var(--muted); font-size: 13px; }
.event-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.event-photo { display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #d8dfd8; cursor: zoom-in; }
.event-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 180ms ease; }
.event-photo:active img { transform: scale(1.025); }

.event-footer { padding: 36px 20px calc(38px + env(safe-area-inset-bottom)); color: rgba(255,255,255,0.72); text-align: center; }
.event-footer img { width: 42px; height: 42px; object-fit: contain; }
.event-footer p { margin: 10px 0; letter-spacing: 0.12em; }
.event-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--gold-pale); }

.event-lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 20px; background: rgba(2,10,20,0.94);
}
.event-lightbox[hidden] { display: none; }
.event-lightbox img { max-width: min(1100px, 94vw); max-height: calc(100dvh - 96px); object-fit: contain; border-radius: 10px; }
.event-lightbox > button#eventLightboxClose {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: #fff; color: var(--navy-950); font-size: 28px; cursor: pointer;
}
.event-lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.16); color: #fff; font-size: 28px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.event-lightbox__nav[hidden] { display: none; }
.event-lightbox__nav--prev { left: 12px; }
.event-lightbox__nav--next { right: 12px; }
.event-lightbox__count {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: rgba(255,255,255,0.88); font-size: 14px; letter-spacing: 1px;
  background: rgba(255,255,255,0.10); padding: 5px 15px; border-radius: 999px;
}

@media (min-width: 720px) {
  body { padding: 30px; }
  .event-topbar { width: min(920px, 100%); margin: 0 auto; border-radius: 18px 18px 0 0; }
  .event-story { border-radius: 0 0 22px 22px; overflow: hidden; }
  .event-story__body { padding: 46px 54px 62px; }
  .event-meta { grid-template-columns: auto 1fr auto; gap: 18px; }
  .event-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 420px) {
  .event-topbar__brand span { max-width: 190px; }
  .event-share-panel { grid-template-columns: 1fr; }
  .event-page-share { width: 100%; }
}

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