/* Event stories retain their original block content and gallery positions. */
.cye-event-story { overflow-wrap: anywhere; }
.cye-event-story .event-story-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); }
.cye-event-story .event-story-hero-media { position: absolute; inset: 0; z-index: -2; }
.cye-event-story .event-story-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.cye-event-story .event-story-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(4,17,15,.94),rgba(4,17,15,.65) 60%,rgba(4,17,15,.35)),linear-gradient(0deg,rgba(4,17,15,.6),transparent); }
.cye-event-story .event-story-hero-inner { display: flex; align-items: center; min-height: 620px; padding-block: var(--section-space); }
.cye-event-story .event-story-hero-copy { width: 100%; max-width: 1000px; min-width: 0; }
.cye-event-story .event-story-hero h1 { font-size: var(--heading-feature); line-height: 1.06; letter-spacing: -.04em; font-weight: 800; }
.cye-event-story .event-story-back { margin-top: 28px; }
.cye-event-story .event-story-body { display: flow-root; }
.cye-event-story .event-story-body > * { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
.cye-event-story .event-story-body > * + * { margin-top: 24px; }
.cye-event-story .event-story-body > :first-child { margin-top: 0; }
.cye-event-story .event-story-body > :last-child { margin-bottom: 0; }
.cye-event-story .event-story-body :is(h2,h3,h4) { color: var(--white); line-height: 1.2; }
.cye-event-story .event-story-body h2 { font-size: 34px; margin-top: 40px; }
.cye-event-story .event-story-body h3 { font-size: 26px; margin-top: 36px; }
.cye-event-story .event-story-body h4 { font-size: 22px; margin-top: 32px; }
.cye-event-story .event-story-body > :is(h2,h3,h4):first-child { margin-top: 0; }
.cye-event-story .event-story-body :is(ul,ol) { padding-left: 24px; color: var(--muted); }
.cye-event-story .event-story-body li + li { margin-top: 8px; }
.cye-event-story .event-story-body a:not(.event-story-photo-link) { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.cye-event-story .event-story-body blockquote { padding: 16px 24px; border-left: 1px solid var(--green); }
.cye-event-story .event-story-body :is(img,video,iframe) { max-width: 100%; }
.cye-event-story .event-story-body :is(video,iframe) { width: 100%; }
.cye-event-story .event-story-body > .event-story-gallery { max-width: 760px; margin-block: 40px; }
.cye-event-story .event-story-gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; align-items: start; }
.cye-event-story .event-story-gallery-grid[data-columns="1"] { grid-template-columns: minmax(0,1fr); }
.cye-event-story .event-story-gallery-grid[data-columns="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.cye-event-story .event-story-photo { margin: 0; min-width: 0; }
.cye-event-story .event-story-photo-link { display: block; position: relative; overflow: hidden; aspect-ratio: 4/3; border-radius: 6px; background: var(--raised); }
.cye-event-story .event-story-photo-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.cye-event-story .event-story-photo-link:hover img { transform: scale(1.025); }
.cye-event-story .event-story-photo-zoom { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; background: rgba(4,17,15,.85); color: var(--white); }
.cye-event-story .event-story-photo-zoom .icon { width: 18px; height: 18px; }
.cye-event-story .event-story-photo figcaption,
.cye-event-story .event-story-gallery-caption { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cye-event-story .event-story-gallery-caption { max-width: 760px; margin-inline: auto; text-align: center; }
.cye-event-story .event-story-related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--grid-gap); }
.cye-event-story .event-story-related-card { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cye-event-story .event-story-related-card > a { display: flex; flex-direction: column; height: 100%; }
.cye-event-story .event-story-related-photo { aspect-ratio: 3/2; background: var(--raised); }
.cye-event-story .event-story-related-photo img { width: 100%; height: 100%; object-fit: cover; }
.cye-event-story .event-story-related-copy { display: flex; flex-direction: column; flex: 1; gap: 24px; padding: var(--card-pad); }
.cye-event-story .event-story-related-copy h3 { font-size: var(--heading-card); line-height: 1.25; }
.cye-event-story .event-story-related-copy .text-link { margin-top: auto; }
.cye-event-story .event-story-closing { background: var(--surface); }
.cye-event-story .event-story-closing-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.cye-event-story .event-story-closing-inner > div { max-width: 780px; }
.cye-event-story .event-story-closing-inner > div > p:last-child { margin-top: 20px; max-width: 640px; }
.cye-event-story .event-story-closing-inner > .button { flex-shrink: 0; }
.cye-event-story :is(a,button):focus-visible { outline: 1px solid var(--green); outline-offset: 3px; }

/* Full-screen photo viewer: contain the whole image and keep touch controls outside it. */
.cye-event-viewer { width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; inset: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: #04110f; color: var(--white); overflow: hidden; }
.cye-event-viewer[open] { display: flex; flex-direction: column; }
.cye-event-viewer::backdrop { background: rgba(0,0,0,.9); }
.cye-event-viewer [hidden] { display: none !important; }
.cye-event-viewer .event-viewer-head { display: flex; align-items: center; flex: 0 0 auto; gap: 16px; padding: max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.cye-event-viewer .event-viewer-head h2 { font-size: 18px; line-height: 1.3; }
.cye-event-viewer .event-viewer-head .event-viewer-count { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.cye-event-viewer button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 48px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 5px; font: inherit; font-size: 14px; background: var(--surface); }
.cye-event-viewer .event-viewer-close { padding: 10px; flex-shrink: 0; }
.cye-event-viewer button:hover { border-color: var(--green); }
.cye-event-viewer button:disabled { opacity: .4; cursor: default; }
.cye-event-viewer :is(a,button):focus-visible { outline: 1px solid var(--green); outline-offset: 2px; }
.cye-event-viewer .event-viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 0; min-height: 0; min-width: 0; padding: 16px 24px; touch-action: pan-y pinch-zoom; }
.cye-event-viewer .event-viewer-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; user-select: none; -webkit-user-select: none; }
.cye-event-viewer .event-viewer-status { text-align: center; padding: 24px; }
.cye-event-viewer .event-viewer-footer { flex: 0 0 auto; padding: 8px max(20px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
.cye-event-viewer .event-viewer-footer .event-viewer-caption { max-width: 900px; max-height: 15dvh; overflow: auto; margin: 0 auto 12px; text-align: center; font-size: 14px; line-height: 1.5; }
.cye-event-viewer .event-viewer-original { display: block; width: fit-content; margin: 0 auto 12px; color: var(--green); text-decoration: underline; }
.cye-event-viewer .event-viewer-navigation { display: flex; justify-content: center; gap: 12px; }

@media(max-width:1000px) {
    .cye-event-story .event-story-closing-inner { display: block; }
    .cye-event-story .event-story-closing-inner > .button { margin-top: 28px; }
}
@media(max-width:900px) {
    .cye-event-story .event-story-hero-inner { min-height: 560px; }
    .cye-event-story .event-story-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:800px) {
    .cye-event-story .event-story-hero-inner { min-height: 0; align-items: flex-start; }
}
@media(max-width:700px) {
    .cye-event-story .event-story-body h2 { font-size: 28px; }
    .cye-event-story .event-story-body h3 { font-size: 24px; }
    .cye-event-story .event-story-body h4 { font-size: 20px; }
    .cye-event-story .event-story-body > .event-story-gallery { margin-block: 32px; }
    .cye-event-story .event-story-gallery-grid { gap: 12px; }
    .cye-event-story .event-story-related-grid { grid-template-columns: 1fr; }
    .cye-event-story .event-story-closing-inner > .button { width: 100%; }
    .cye-event-viewer .event-viewer-head { gap: 12px; padding-inline: max(16px,env(safe-area-inset-left)); }
    .cye-event-viewer .event-viewer-head h2 { font-size: 16px; }
    .cye-event-viewer .event-viewer-stage { padding: 8px; }
    .cye-event-viewer .event-viewer-navigation > button { flex: 1; max-width: 220px; }
    .cye-event-viewer .event-viewer-footer { padding-inline: max(16px,env(safe-area-inset-left)); }
}
@media(prefers-reduced-motion:reduce) {
    .cye-event-story .event-story-photo-link img { transition: none; }
}
