/* Card layout is isolated from legacy expandable-list styles. */
.events-page{max-width:1080px;margin:0 auto}.events-page h1{font-size:clamp(32px,5vw,48px);margin:12px 0 8px}.events-intro{margin:0 0 24px}
.events-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.events-grid .event-grid-card{position:relative;aspect-ratio:1/1;margin:0;min-width:0;overflow:hidden;border:1px solid var(--d-line,#BDCAD6);border-radius:14px;background:var(--d-paper,#fff);box-shadow:0 3px 10px #3c302c08;cursor:pointer;scroll-margin-top:100px}
.event-card-layout{position:absolute;inset:0;display:grid;grid-template-rows:26% minmax(0,1fr);overflow:hidden}
.event-card-image{display:block;position:relative;min-height:0;overflow:hidden;background:var(--d-soft,#D9E6EC)}.event-card-image>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.event-date-tile,.event-date-pending,.event-card-registered{position:absolute;z-index:1;top:7px;margin:0;min-height:23px;padding:5px 6px;border-radius:6px;line-height:1.1;box-sizing:border-box}
.event-date-tile{left:7px;display:flex;gap:3px;align-items:center;background:#fcfbf8f5;color:#3C302C;font-style:normal;max-width:54%}
.event-date-tile b{font-size:13px;color:inherit!important}.event-date-tile span{font-size:11px;font-weight:600}.event-date-tile small{display:none}
.event-date-pending{left:7px;max-width:56%;background:#fcfbf8f5;color:#3C302C;font-size:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.event-card-registered{right:7px;max-width:40%;background:#e2eddbf5;color:#375a30;font-size:10px;font-weight:700;white-space:nowrap}
.event-card-copy{display:grid;grid-template-rows:2.3em 2.3em minmax(30px,1fr);align-content:stretch;gap:4px;padding:8px;min-height:0;overflow:hidden;font-size:14px}
html .events-grid .event-card-copy>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;margin:0;font:700 14px/1.15 'Manrope','Nunito Sans',sans-serif;color:var(--d-ink,#2B3B50)}
.event-card-subtitle{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font:400 14px/1.15 'Manrope','Nunito Sans',sans-serif;color:var(--d-muted,#5D6C7E)}
html .events-grid .event-card-more,html[data-design] .events-grid .event-card-more{align-self:end;display:flex;align-items:center;justify-content:center;min-width:0;width:100%;height:32px;min-height:32px;margin:0;padding:5px;background:var(--d-primary,#365877)!important;color:#fff!important;border:0;border-radius:10px;font:600 14px/1.2 'Manrope','Nunito Sans',sans-serif;white-space:nowrap;box-shadow:none!important;transform:none!important}
.event-grid-card:hover .event-card-more{filter:brightness(.95)}.event-grid-card:focus-visible{outline:3px solid var(--d-primary,#365877);outline-offset:3px}
@media(min-width:720px){.events-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}}
@media(min-width:1200px){.events-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:500px){.event-card-layout{grid-template-rows:38% minmax(0,1fr)}.event-card-copy{padding:10px 12px;gap:6px}.event-card-registered{font-size:12px}.event-date-tile b{font-size:15px}.event-date-tile span{font-size:12px}html .events-grid .event-card-more{height:36px;min-height:36px;border-radius:11px}}
@media(max-width:380px){.events-grid{gap:10px}.event-card-copy{padding:6px;gap:3px;grid-template-rows:2.3em 2.3em minmax(28px,1fr)}.event-card-layout{grid-template-rows:20% minmax(0,1fr)}html .events-grid .event-card-more{height:28px;min-height:28px}.event-date-tile,.event-date-pending,.event-card-registered{top:5px;padding:4px;left:5px}.event-card-registered{left:auto;right:5px;font-size:9px}}
/* Content-sized detail panel leaves the event grid visible around it. */
#modal.event-expanded{position:fixed;inset:0;margin:auto;width:calc((100vw - 48px)*.9);max-width:738px;height:fit-content;min-height:0;max-height:calc(100dvh - 64px);border-radius:18px;padding:20px 22px 24px;border:1px solid var(--d-line,#BDCAD6);overflow-y:auto;backface-visibility:hidden;box-shadow:0 20px 70px #30251f33}
#modal.event-expanded::backdrop{background:rgba(35,28,24,.2);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
#modal.event-expanded>.full-content{margin:10px auto 0;max-width:100%}
html #modal.event-expanded>.close,html[data-design] #modal.event-expanded>.close{position:absolute;float:none;top:16px;right:16px;z-index:10;display:grid;place-items:center;width:38px;height:38px;min-width:38px;min-height:38px;padding:0;margin:0;border:0;border-radius:10px;background:#593326!important;color:#fff!important;font-size:19px;line-height:1;box-shadow:0 3px 9px #30251f20}
#modal.event-expanded h1{font-size:clamp(27px,5vw,40px);overflow-wrap:anywhere;line-height:1.15;margin-top:12px}
#modal.event-expanded .event-subtitle{font-size:16px;line-height:1.5}
#modal.event-expanded .full-content>button{min-height:44px;border-radius:11px;background:var(--d-primary,#365877);color:#fff}
@media(max-width:420px){#modal.event-expanded{width:calc((100vw - 36px)*.9);max-height:calc(100dvh - 44px);padding:16px 16px 20px}#modal.event-expanded .event-key-info>div{grid-template-columns:76px minmax(0,1fr);gap:8px}}
.event-flip-face{overflow:hidden;border-radius:14px;background:var(--d-paper,#fff);border:1px solid var(--d-line,#BDCAD6)}
.event-flip-face .event-card-layout{position:absolute;inset:0}.event-flip-face .event-card-copy{display:flex;flex-direction:column;padding:8px;gap:3px;overflow:hidden}.event-flip-face .event-card-more{color:white;background:var(--d-primary,#365877)}

@media(max-width:719px){.events-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.events-page{width:100%}}
html[data-design="7"] #modal.event-expanded h1{font-family:'Manrope',system-ui,sans-serif;font-weight:750;letter-spacing:-.025em}

/* Two real faces retain a visible reverse flip all the way into the source tile. */
#modal.event-closing{overflow:visible;background:transparent!important;border-color:transparent;box-shadow:none;transform-style:preserve-3d;backface-visibility:visible;pointer-events:none}
.event-close-front,.event-close-back{position:absolute;inset:0;box-sizing:border-box;border:1px solid var(--d-line,#BDCAD6);border-radius:18px;background:var(--d-paper,#fff);backface-visibility:hidden;overflow:hidden;box-shadow:0 12px 35px #30251f22}
.event-close-front{padding:inherit;transform:rotateY(0deg)}
.event-close-front>.full-content{margin:10px auto 0;max-width:100%}
.event-close-front>.close{display:none}
.event-close-back{transform:rotateY(-180deg);border-radius:14px}
.event-close-back .event-card-layout{position:absolute;inset:0}

/* Backdrop fades in lockstep with the 640 ms return to the source card. */
#modal.event-expanded.event-closing::backdrop{animation:event-backdrop-return 640ms cubic-bezier(.35,0,.2,1) forwards}
@keyframes event-backdrop-return{from{background:rgba(35,28,24,.2);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}to{background:rgba(35,28,24,0);backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px)}}

.reservation-grid{margin:18px 0 24px}
#modal.reservation-expanded .reservation-detail-content{padding-top:22px}
#modal.reservation-expanded .reservation-detail-content>h2{font-size:clamp(24px,4vw,32px);margin:12px 0}
#modal.reservation-expanded .booking-edit-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#modal.reservation-expanded .booking-edit-actions button{border-radius:11px;white-space:normal}
#modal.reservation-expanded .contribution{gap:12px}
#modal.reservation-expanded input{max-width:100%;box-sizing:border-box}

.account-page.show-reservations{max-width:1080px}
.event-type-tabs{display:flex;gap:28px;margin:20px 0 14px;border-bottom:1px solid var(--d-line,#DECEC3)}
html .event-type-tabs button{display:flex;align-items:center;gap:8px;position:relative;background:transparent;color:var(--d-muted,#5D6C7E);border:0;border-radius:0;padding:10px 0 12px;font-size:16px;box-shadow:none;white-space:nowrap}
html .event-type-tabs button[aria-selected=true]{font-weight:750;color:var(--d-ink,#3C302C)}
.event-type-tabs button::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:var(--d-primary,#99563F);transform:scaleX(0);transition:transform .24s ease}
.event-type-tabs button[aria-selected=true]::after{transform:scaleX(1)}
.event-type-choice{padding:12px;border:1px solid var(--d-line,#DECEC3);border-radius:12px;margin:12px 0 20px}
.event-type-choice legend{font-size:14px;font-weight:700}.event-type-choice>div{display:flex;gap:8px}.event-type-choice label{flex:1;cursor:pointer}.event-type-choice input{position:absolute;opacity:0;width:1px;height:1px}.event-type-choice label span{display:flex;align-items:center;justify-content:center;min-height:46px;padding:8px;border:1px solid var(--d-line,#DECEC3);border-radius:9px;text-align:center;font-size:14px}.event-type-choice input:checked+span{background:var(--d-primary,#99563F);color:white;border-color:transparent}.event-type-choice input:focus-visible+span{outline:3px solid var(--d-primary,#99563F);outline-offset:2px}.event-type-choice small{display:block;margin-top:9px;font-size:12px}
@media(prefers-reduced-motion:reduce){.event-type-tabs button::after{transition:none}}

/* A two-line description preview beneath the title and subtitle. */
.events-grid .event-grid-card{min-height:260px}
.events-grid .event-card-copy{grid-template-rows:2.3em 2.3em minmax(2.6em,1fr) auto}
.event-card-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere;align-self:start;max-height:2.6em;font:400 13px/1.3 'Manrope','Nunito Sans',sans-serif;color:var(--d-muted,#5D6C7E)}
@media(min-width:500px){.events-grid .event-grid-card{min-height:300px}}

/* Grid items and nested tracks must shrink to their assigned column. */
html .events-grid{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
html .events-grid .event-grid-card{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
html .event-card-layout{width:100%;max-width:100%;min-width:0;grid-template-columns:minmax(0,1fr);box-sizing:border-box}
html .event-card-copy{min-width:0;max-width:100%;box-sizing:border-box;grid-template-columns:minmax(0,1fr)}
html .event-card-copy>*{min-width:0;max-width:100%;box-sizing:border-box}
/* Stacked labels leave room for five public tabs, including Occasions. */
@media(max-width:1099px){
 html .bottom-nav,html[data-design] .bottom-nav{width:calc(100% - 24px);max-width:600px;box-sizing:border-box;gap:2px;padding:6px}
 html .bottom-nav>button,html[data-design] .bottom-nav>button{flex:1 1 0;min-width:0;max-width:none;padding:8px 2px;min-height:58px;font-size:12px;gap:4px;flex-direction:column}
 html .bottom-nav>button[hidden]{display:none}
 html .bottom-nav .nav-content{flex-direction:column;gap:4px;width:100%;min-width:0}
 html .bottom-nav .nav-label{font-size:12px;line-height:1.2;text-align:center}
 html .bottom-nav svg{width:22px;height:22px;flex-shrink:0}
 html .bottom-nav:has(#nav-members:not([hidden])) .nav-label{font-size:10px}
}

/* Floating dock: 15% shorter than the previous 72px outer height. */
@media(max-width:1099px){
 html .bottom-nav,html[data-design] .bottom-nav{height:61.2px;padding:5px 6px}
 html .bottom-nav>button,html[data-design] .bottom-nav>button{height:100%;min-height:0;box-sizing:border-box;padding:4px 2px}
}

/* Override legacy admin selectors so all seven tabs share the compact dock. */
@media(max-width:1099px){
 html body .bottom-nav,html[data-design] body .bottom-nav,
 html body .bottom-nav:has(#nav-members:not([hidden])){
  height:61.2px!important;min-height:61.2px!important;max-height:61.2px!important;
  width:calc(100% - 24px)!important;max-width:600px!important;
  display:flex!important;align-items:stretch!important;gap:2px!important;
  padding:5px 6px!important;box-sizing:border-box!important;overflow:hidden;
 }
 html body .bottom-nav>button,html[data-design] body .bottom-nav>button,
 html body .bottom-nav:has(#nav-members:not([hidden]))>button{
  flex:1 1 0!important;min-width:0!important;width:0;max-width:none!important;
  height:auto!important;min-height:0!important;margin:0!important;padding:3px 1px!important;
  display:flex;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;gap:0!important;line-height:1.2!important;
 }
 html body .bottom-nav>button[hidden]{display:none!important}
 html body .bottom-nav .nav-content{display:flex;flex-direction:column!important;align-items:center;justify-content:center;gap:3px!important;width:100%;min-width:0;height:100%}
 html body .bottom-nav .nav-label{display:block;max-width:100%;font-size:11px!important;line-height:13px!important;text-align:center;white-space:nowrap}
 html body .bottom-nav:has(#nav-members:not([hidden])) .nav-label{font-size:clamp(8px,2.5vw,11px)!important}
 html body .bottom-nav svg{width:21px!important;height:21px!important;flex-shrink:0}
 html body .bottom-nav .nav-indicator{border-radius:23px!important;box-shadow:none!important}
}
