:root{
  --color-primary: #e7bb2a;   /* gold/mustard */
  --color-primary-bright: #ffd23f;
  --color-accent-red: #de444c;
  --color-accent-yellow: #f2bf17;
  --color-accent-cyan: #1cb8e8;
  --color-accent-lime: #e0fa18;
  --color-warm-gray: #efe9e2; /* very light gray with a warm undertone, not a flat white */
  --color-link: #4f46e5;
  --color-ink: #111111;
  --color-white: #ffffff;
  --color-muted: rgba(17,17,17,0.62);
  --color-muted-on-dark: rgba(255,255,255,0.75);
  --line: rgba(17,17,17,0.14);
  --line-on-dark: rgba(255,255,255,0.22);
  --good: #2fbf71;
  --bad: #de444c;
  --font-display: 'Archivo', Arial, sans-serif;
  --font-display-condensed: 'Archivo Condensed', Arial, sans-serif;
  --font-display-expanded: 'Archivo Expanded', Arial, sans-serif;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/Archivo-VariableFont_wdth,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  font-style: italic;
  src: url('/fonts/Archivo-Italic-VariableFont_wdth,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

*{box-sizing:border-box;}
html{ scrollbar-width: thin; scroll-behavior: smooth; overflow-x: hidden; }
body{
  margin:0;
  /* full-bleed .section elements use 100vw, which in most browsers includes
     the scrollbar's own width — a few px wider than the true visible area.
     Without clipping that sliver, the page gets a permanent horizontal
     scrollbar and everything reads as shifted/off-center. */
  overflow-x: hidden;
  background: var(--color-white);
  color: var(--color-ink);
  font-family: var(--font-display);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
a{ color: inherit; }
h1, h2, h3{ font-weight: 800; }

/* PERSISTENT HEADER / HERO (video background, logo, nav) — lives in
   index.html, never touched by the router. Router-swapped content
   (#app) scrolls up over it. */
.site-header{
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--color-white);
}
/* The source hero clip is a portrait phone recording (9:16). On mobile we
   show it close to that original framing (plain full-viewport cover). On
   desktop, cropping a portrait clip to a landscape viewport with plain
   cover would zoom in absurdly — instead we force a stable 16:9 crop that
   always fully covers the viewport, regardless of the actual window shape,
   via the "oversize to the larger of vw/vh-scaled-to-ratio" technique.
   Background-color here (not on .site-header) is the fallback shown before
   the video has a frame ready — .site-header's own background would paint
   ABOVE this fixed, negative-z-index video per CSS stacking rules (a
   positioned z-index:auto element's background outranks negative-z-index
   descendants), permanently hiding it. */
.header-video{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--color-primary);
  z-index: -2;
}
@media (min-width: 701px){
  .header-video{
    inset: auto;
    top: 50%;
    left: 50%;
    width: max(100vw, calc(100vh * 16 / 9));
    height: max(100vh, calc(100vw * 9 / 16));
    transform: translate(-50%, -50%);
  }
}
.header-scrim{
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,0.35) 0%, rgba(17,17,17,0.15) 40%, rgba(17,17,17,0.55) 100%);
  z-index: -1;
}
/* One continuous shape — thin along the sides, smoothly bulging down to
   full height in the middle around the logo — clipped via the SVG path
   defined in index.html, instead of a flat rectangular bar plus a
   separate bump hanging below it. The box itself is tall enough (92px) to
   contain the full bulge; clip-path carves the thin-sided silhouette out
   of it, so the "thin" portions at the edges are genuinely transparent
   (the video shows through there) rather than just visually implied. */
.header-navbar{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  /* 92px resting bulge + 16px of headroom so the dock "bounce" can overshoot
     past the resting depth without being clipped by the box. */
  height: 108px;
  background: rgba(17,17,17,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  clip-path: url(#headerBarClip);
}
/* The content column aligns to the same centered max-width as the rest of
   the page, but sits near the BOTTOM of the (taller, 92px) bar box — that
   bottom-center area is where the clipped shape is at its deepest, i.e.
   the only place with room for the logo; the thin side regions above it
   have no content. */
.header-navbar-inner{
  max-width: 900px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px 26px; /* 10px + the 16px headroom added to .header-navbar */
  position: relative;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap: 16px;
}
/* The logo itself is the menu button now — no separate hamburger icon.
   Reset it back to plain button styling so it still just looks like the
   logo sitting in the bar. */
.brand{
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.brand-logo{
  height: 74px;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.35));
  animation: pulse-logo 0.857s ease-in-out infinite; /* 70 bpm = 60/70s per beat */
  /* Hidden until app.js's dock logic crossfades it in. Without this default
     the docked logo shows next to the hero logo until the module script runs. */
  opacity: 0;
}
/* Heartbeat rhythm — a quick double "lub-dub" beat followed by a rest,
   instead of one smooth sine pulse, so it actually reads as a heartbeat. */
@keyframes pulse-logo{
  0%, 100%{ transform: scale(1); }
  14%{ transform: scale(1.3); }
  28%{ transform: scale(1); }
  42%{ transform: scale(1.18); }
  70%{ transform: scale(1); }
}
/* Pressing the logo pops open a loose cluster of small pill "bubbles"
   instead of a boxed dropdown — meant to read like little bursts of sound
   popping off the logo. position:fixed with top/left set from JS (see
   positionMenu() in app.js), not CSS-anchored to the nav bar, because the
   logo itself moves (hero position -> docked) while scrolling; the menu
   needs to track wherever it currently is, including mid-glide, or it
   visually detaches from its own trigger. transform:translateX(-50%)
   still does the horizontal centering against that JS-set left value. */
.main-nav{
  position: fixed;
  top: 0;
  left: 0;
  /* Explicit and higher than #heroLogo's 60 — without one, z-index:auto
     loses to ANY sibling with an explicit positive z-index (like
     .header-content's 2) regardless of DOM order or which one is visually
     "on top" of the other; an auto z-index always paints below the
     positive-z-index layer. Needs to win against everything, including
     the hero logo, since it opens on top of it. */
  z-index: 70;
  transform: translateX(-50%);
  width: 240px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 22px; /* extra room so the now-longer, individually-rotated tails (see below) have space to swing without overlapping neighboring bubbles */
  display: none;
}
.main-nav.open{ display:flex; }
.main-nav a{
  position: relative;
  text-decoration:none;
  color: var(--color-ink);
  background: var(--color-primary);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  opacity: 0;
  transform: scale(0.4) translateY(-6px);
  pointer-events: none;
}
/* Speech-bubble tail — long and individually rotated via the --tail-angle
   custom property (set per-bubble by updateTailAngles() in app.js, which
   measures this exact bubble's position against the logo's live rect) so
   every tail genuinely points at the logo's actual physical position, not
   just a blanket "up". transform-origin sits at the tail's base (where it
   meets the bubble), so rotating swings the tip while the base stays put. */
/* A real sized box clipped to a triangle, not the old 0x0 border-trick —
   transform-origin on a genuinely-zero-size box is ambiguous/inconsistent
   across browsers for rotation, which was leaving a visible gap between
   the rotated tail and its bubble instead of pivoting flush against it.
   Horizontal centering is done with a static `left` offset (not a
   translateX in the transform list) — `rotate()` has to be the ONLY
   transform function here, because multiple functions compose in order
   (translateX would shift the coordinate frame rotate() then pivots
   within), which was the actual bug: the rotation was happening around
   the right-seeming transform-origin but in the wrong, already-shifted
   frame, swinging the base away from the bubble instead of pivoting on it. */
.main-nav a::before{
  content: '';
  position: absolute;
  /* -12px (not -18px) so the base sits 8px INSIDE the bubble, not flush
     at its exact edge. Rotation pivots correctly around the base-center,
     but the base is a straight line meeting a slightly CURVED bubble
     top (border-radius:999px on a short pill) — at an angle, the base's
     two end-corners can drift past that curve while the center point
     stays put, leaving a sliver gap right at the seam. The extra overlap
     buries that seam under solid same-color fill regardless of angle. */
  top: -12px;
  left: calc(50% - 7px); /* 7px = half of the 14px width below */
  width: 14px;
  height: 20px;
  background: var(--color-primary);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  transform-origin: 50% 100%;
  transform: rotate(var(--tail-angle, 0deg));
}
.main-nav.open a{
  animation: bubble-pop .38s cubic-bezier(.34,1.56,.64,1) forwards;
  pointer-events: auto;
}
/* Staggered so the bubbles feel like they're popping off one after another,
   not all snapping in at once. */
.main-nav.open a:nth-child(1){ animation-delay: 0s; }
.main-nav.open a:nth-child(2){ animation-delay: .05s; }
.main-nav.open a:nth-child(3){ animation-delay: .1s; }
.main-nav.open a:nth-child(4){ animation-delay: .15s; }
.main-nav.open a:nth-child(5){ animation-delay: .2s; }
.main-nav.open a:nth-child(6){ animation-delay: .25s; }
.main-nav.open a:nth-child(7){ animation-delay: .3s; }
/* Language bubble: pulled out of the wrapped cluster and placed diagonally by
   positionLangBubble() in app.js; its tail angle is set like the others. */
.main-nav #langToggle{
  position: absolute;
  font-size: 11px;
  padding: 6px 12px;
  background: var(--color-accent-cyan);
}
.main-nav #langToggle::before{
  background: var(--color-accent-cyan);
  /* Small tail whose base pivots 3px inside the bubble's left edge, 8px
     down — positionLangBubble() in app.js aims it at the logo. */
  top: -4px;
  left: -1.5px;
  width: 9px;
  height: 12px;
}
@keyframes bubble-pop{
  0%{ opacity: 0; transform: scale(0.4) translateY(-6px); }
  60%{ opacity: 1; transform: scale(1.1) translateY(0); }
  100%{ opacity: 1; transform: scale(1) translateY(0); }
}
/* Idle nudge next to the logo (see showHint() in app.js): a "Psst..." bubble
   to the left, then a moment later "Du kan trycka på mig!" diagonally down-right.
   .logo-hint is an invisible box JS-sized to the logo's rect, so the bubbles
   are positioned in percentages of the logo and follow it. Each bubble plays
   the same pop as the menu bubbles. Between the hero logo (60) and the menu (70). */
.logo-hint{
  position: fixed;
  top: 0;
  left: 0;
  z-index: 65;
  pointer-events: none;
}
.logo-hint-bubble{
  position: absolute;
  background: #fff;
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  padding: 9px 16px;
  border-radius: 18px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
  cursor: pointer;
}
.logo-hint-bubble.show{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: bubble-pop .38s cubic-bezier(.34,1.56,.64,1) both;
}
.logo-hint-bubble::before{
  content: '';
  position: absolute;
  background: #fff;
}
/* Left of the logo, tail pointing right at it. */
.logo-hint-psst{
  right: calc(100% + 10px);
  top: 18%;
  transform-origin: 100% 50%;
}
.logo-hint-psst::before{
  right: -8px;
  top: calc(50% - 7px);
  width: 11px;
  height: 14px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
/* Down-right of the logo, tail tilted up-left toward it. */
.logo-hint-press{
  left: 55%;
  top: 92%;
  transform-origin: 14px 0;
}
.logo-hint-press::before{
  left: 10px;
  top: -9px;
  width: 14px;
  height: 14px;
  clip-path: polygon(0 100%, 100% 100%, 0 0);
}
@media (prefers-reduced-motion: reduce){
  .logo-hint-bubble.show{ animation: none; }
}
.main-nav a:hover{ background: var(--color-primary-bright); }
.main-nav a:hover::before{ background: var(--color-primary-bright); }
.main-nav a.active{ background: var(--color-accent-yellow); }
.main-nav a.active::before{ background: var(--color-accent-yellow); }

.header-content{
  position: relative;
  z-index: 2;
  flex: 1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 20px 20px 60px;
}
/* Reserves the logo's layout space in the flex-centered hero. app.js
   switches #heroLogo to position:fixed (to physically glide it toward the
   nav bar on scroll — see the dock logic there), which takes it out of
   normal flow; without this slot reserving the same footprint, the tagline
   below would jump up to fill the gap. */
.hero-logo-slot{
  width: clamp(180px, 30vw, 282px);
  aspect-ratio: 4076 / 3080;
  margin: 0 auto 18px;
}
/* Lives at body level now (see index.html), always position:fixed — app.js
   positions it via inline top/left/width from the very first frame, this
   is just a sane default so there's no flash before JS runs. */
.hero-logo{
  position: fixed;
  top: 14vh;
  left: calc(50% - clamp(180px, 30vw, 282px) / 2); /* centered, matching the slot, so there's no jump when JS takes over */
  width: clamp(180px, 30vw, 282px);
  /* auto, not a fixed value — lets the image's own intrinsic aspect ratio
     (matching .hero-logo-slot's) size its height correctly at any width,
     including once app.js starts animating the width toward the docked
     size. */
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.4));
  /* Hidden until app.js measures the slot and sets its real top/left/width
     (it sets opacity inline in the same pass). The 14vh default above only
     approximates the slot's position, so showing it earlier causes a visible jump. */
  opacity: 0;
  z-index: 60; /* above .header-navbar (50) — see the comment in index.html on why this now actually works */
  animation: pulse-logo 0.857s ease-in-out infinite; /* 70 bpm = 60/70s per beat */
  cursor: pointer; /* it's the menu trigger at every scroll position — see app.js */
}

/* .wrap is the opaque canvas that scrolls up and permanently covers the
   fixed video/scrim (z-index -2/-1) — it must be genuinely full-bleed
   (100vw, no gaps) or the video shows through at the edges. .wrap-inner
   puts non-full-bleed content (login/privacy/terms pages, footer) back
   into a readable centered column; .section elements break back out to
   full-bleed on top of .wrap's own background. */
.wrap{
  position: relative;
  z-index: 10;
  width: 100vw;
  /* No transform here (or on .section below) — a transformed ancestor
     breaks background-attachment:fixed on any descendant in most browsers,
     which would kill the #parallax scroll effect. This margin-only
     full-bleed technique achieves the same centering without a transform. */
  margin-left: calc(50% - 50vw);
  background: var(--color-white);
  flex: 1;
  display:flex;
  flex-direction:column;
}
.wrap-inner{
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  flex: 1;
  display:flex;
  flex-direction:column;
}
#app{ flex: 1; }

/* PAGE HEAD (Login / Privacy / Terms — the only remaining routed pages).
   Home's sections have their own top padding and should butt right up
   against the header with no gap, so the top clearance from the fixed
   nav bar lives here instead of on the shared .wrap-inner. */
.page-head{ margin: 104px 0 30px; }
.page-title{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 42px);
  margin: 0 0 6px;
  color: var(--color-ink);
}
.page-sub{ color: var(--color-muted); font-size: 15px; margin:0; }

/* SECTIONS (home: event / media / parallax / kontakt — all one page).
   Each section breaks out of .wrap's centered column to a full-bleed,
   distinctly-colored band — gold leads as the main theme color, the other
   sections cycle through the brand's accent palette. .section-inner puts
   the actual content back into a readable centered column. */
.section{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 96px 20px 56px;
  scroll-margin-top: 104px;
  position: relative;
}
.section-inner{
  max-width: 860px;
  margin: 0 auto;
  padding: 8px 4px 24px;
}
/* Each section gets its own irregular diagonal top edge — different angle
   AND direction per section, so the page doesn't read as a repeating
   pattern. margin-top matches (at least) the cut's own depth so the angled
   edge overlaps seamlessly into whatever's above it, no seam/gap. */
#event{
  background: var(--color-primary);
  margin-top: -50px;
  clip-path: polygon(0 50px, 100% 0, 100% 100%, 0 100%);
}
#omoss{
  background: var(--color-link);
  margin-top: -38px;
  clip-path: polygon(0 38px, 100% 0, 100% 100%, 0 100%);
}
#omoss h2{ color: var(--color-white); text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
/* Two columns: text slides in from the left, photo from the right (both
   fade in via the shared .fade-in/.visible scroll-reveal). Stacks on narrow
   screens. overflow:hidden stops the sideways slide from adding a page
   scrollbar before the elements settle. */
#omoss{ overflow: hidden; }
.omoss-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start; /* bio text lines up with the top of its photo */
  margin-top: 40px;
}
.omoss-bio{
  color: rgba(255,255,255,0.88);
  font-size: 16px;
  line-height: 1.6;
}
.omoss-bio strong{
  display: block;
  color: var(--color-white);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}
.omoss-bio span{ display: block; }
.omoss-bio em{ display: block; margin-top: 10px; opacity: 0.85; }
.omoss-photo img{
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.3);
}
@media (max-width: 700px){
  .omoss-grid{ grid-template-columns: 1fr; gap: 28px; }
  /* Photo-left row: when stacked, the text goes above the photo. */
  .omoss-grid-photo-first .omoss-bio{ order: -1; }
  .omoss-photo img{ max-height: 420px; }
}
.omoss-text{
  max-width: 640px;
  margin: 0;
  color: rgba(255,255,255,0.88);
  font-size: 16px;
  line-height: 1.7;
}
#media{
  background: var(--color-accent-cyan);
  margin-top: -74px;
  clip-path: polygon(0 0, 100% 74px, 100% 100%, 0 100%);
}
/* Parallax — JS-driven (see initParallax() in home.js), not CSS
   background-attachment:fixed. That technique is unreliable across mobile
   browsers generally (not just iOS Safari — Chrome on Android, including
   Samsung devices, resizes/omits it too as the address bar shows/hides, or
   simply never engages it on touch viewports depending on engine version),
   so there's no reliable mobile-only fallback to reach for; a JS transform
   on an inner layer works identically on every browser/device instead.
   #parallax clips and positions that inner layer; the image/gradient live
   on .parallax-bg, not here. */
#parallax{
  position: relative;
  overflow: hidden;
  margin-top: -32px;
  clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
}
/* Deliberately taller than its container (-18%/-18% inset) so it has room
   to translate up/down a bit as the section scrolls through the viewport
   without ever revealing an edge. will-change hints the browser to use a
   compositor layer for the transform, keeping it smooth on mobile. */
.parallax-bg{
  position: absolute;
  top: -30%;
  left: 0;
  right: 0;
  bottom: -30%;
  background-image: linear-gradient(160deg, rgba(222,68,76,0.82) 0%, rgba(231,187,42,0.82) 100%), url('/images/parallax-dj.webp');
  background-position: center;
  background-size: cover;
  will-change: transform;
}
#partners{
  background: var(--color-warm-gray);
  margin-top: -44px;
  clip-path: polygon(0 0, 100% 44px, 100% 100%, 0 100%);
}
#kontakt{
  background: var(--color-accent-red);
  margin-top: -60px;
  clip-path: polygon(0 0, 100% 60px, 100% 100%, 0 100%);
}

.section h2{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: clamp(26px, 5vw, 36px);
  margin: 0 0 32px;
  line-height: 1.2;
  color: var(--color-ink);
}
#kontakt .section h2{ color: var(--color-white); text-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.eventContainer{
  display:flex;
  flex-direction:column;
  gap: 18px;
  background: var(--color-white);
  border-radius: 20px;
  padding: 20px;
  color: var(--color-ink);
}
.eventContainer img{
  width:100%;
  border-radius: 16px 16px 0 0;
  display:block;
  object-fit: cover;
  max-height: 320px;
}
.event-info{ text-align:center; }
.event-title{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: clamp(20px, 3.4vw, 26px);
  margin: 0 0 6px;
  color: var(--color-ink);
}
.event-date{ font-weight: 800; font-size: 17px; margin: 0 0 6px; }
.event-desc{
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}
.event-map{ border-radius: 14px; overflow:hidden; }
.event-map iframe{ width:100%; height: 240px; border:0; display:block; }
.eventAction{ display:flex; flex-direction:column; align-items:center; gap: 6px; }
.eventAction label{ font-size: 12px; color: var(--color-ink); opacity: 0.7; }

.eventCalendar{
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--color-accent-cyan);
  color: var(--color-white);
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.eventCalendar:hover{ background-color: var(--color-accent-lime); color: var(--color-ink); }

.teaser-empty, .empty-note-text{ color: var(--color-muted); font-size: 14px; }
.link-btn.see-all{ display:inline-block; margin-top: 16px; }

/* PARALLAX BANNER */
#parallax{
  min-height: 320px;
  display:flex;
  align-items:center;
  justify-content:center;
}
/* The photo is portrait (1333x2000). On a wide screen "cover" scales it to
   the full width, making it ~1.5x taller than wide, and a short section
   then shows only a thin, hugely zoomed middle strip (torso + laptop, no
   face). A taller section plus a focal point on cap-to-hands (~42% down)
   shows the actual subject. Phones are narrow enough that it already
   frames well, so this is desktop-only. */
@media (min-width: 900px){
  #parallax{ min-height: clamp(420px, 62vh, 640px); }
  .parallax-bg{ background-position: center 42%; }
}
.parallax-content{ position: relative; z-index: 1; text-align:center; padding: 40px 20px; }
.parallax-content h2{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 44px);
  color: var(--color-white);
  margin: 0;
  text-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

/* PARTNERS MARQUEE — an infinite scrolling logo strip. The track renders
   each logo twice back-to-back (see renderPartnersMarquee in home.js) and
   animates exactly -50% (one full set's width), so the loop never visibly
   jumps at the wrap-around. Masked edges fade the strip in/out instead of
   hard-cutting logos off mid-image. */
.partners-marquee{
  overflow: hidden;
  width: 100%;
  /* Vertical breathing room so a logo scaled up on hover (see .partner-logo:hover)
     doesn't get its top/bottom clipped by this container's own overflow:hidden —
     that's only meant to clip horizontally, for the infinite-loop illusion. */
  padding: 14px 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}
.partners-track{
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: partners-scroll 28s linear infinite;
}
.partners-marquee:hover .partners-track{ animation-play-state: paused; }
@keyframes partners-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.partner-logo{
  height: 40px;
  max-width: 120px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  transition: transform .2s ease;
}
.partner-logo:hover{ transform: scale(1.15); position: relative; z-index: 1; }
.partner-logo-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  height: 52px;
  padding: 0 24px;
  border: 2px dashed rgba(17,17,17,0.3);
  border-radius: 12px;
  font-family: var(--font-display-expanded);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

/* SCROLL REVEAL */
.fade-in{ opacity: 0; transform: translateY(20px); transition: opacity .8s ease-out, transform .8s ease-out; }
.fade-in.visible{ opacity: 1; transform: translateY(0); }
.fade-in.from-left{ transform: translateX(-60px); }
.fade-in.from-right{ transform: translateX(60px); }
.fade-in.from-left.visible, .fade-in.from-right.visible{ transform: translateX(0); }
.delay-1.visible{ transition-delay: .12s; }
.delay-2.visible{ transition-delay: .24s; }
.delay-3.visible{ transition-delay: .36s; }

/* MEDIA SECTION */
.media-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 0;
}
/* Each column spans 3 shared rows (title, profile card, post grid) so
   the three profile cards line up and match the tallest one's height —
   no fixed height, so no dead space inside the card. */
.media-col{
  display:grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  margin-bottom: 24px;
}
.media-col > div[id$="Profile"]{ display:flex; }
@media (max-width: 900px){
  .media-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px){
  .media-grid{ grid-template-columns: 1fr; }
}
.media-col-title{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: 18px;
  color: var(--color-accent-red);
  margin: 0 0 14px;
}

.social-profile{
  display:flex;
  flex-direction:column;
  gap: 10px;
  flex: 1;
  box-sizing: border-box;
  background: var(--color-primary);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  color: var(--color-ink);
}
.social-profile-main{
  display:flex;
  align-items:flex-start;
  gap: 14px;
}
.social-profile-avatar{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-ink);
}
.social-profile-info{ min-width: 0; }
.social-profile-name{
  font-weight:800;
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-ink);
  display:-webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.social-profile-username{ font-size: 12px; color: rgba(17,17,17,0.7); margin-bottom: 4px; }
.social-profile-stats{ display:flex; flex-wrap:wrap; gap: 2px 12px; font-size: 12px; color: rgba(17,17,17,0.75); }
.social-profile-stats span{ white-space: nowrap; }
.social-profile-stats b{ color: var(--color-ink); }
.social-follow-btn{
  align-self: flex-start;
  margin-top: auto;
  display:inline-block;
  background: var(--color-ink);
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
  text-decoration:none;
  border-radius: 999px;
  padding: 9px 22px;
  transition: background-color .15s ease, color .15s ease;
}
.social-follow-btn:hover{ background: var(--color-white); color: var(--color-ink); }
.media-note{ font-size: 14px; color: var(--color-muted); }
.media-note a{ color: var(--color-link); font-weight:600; }

/* Swipeable carousel: one horizontal row, CSS scroll-snap, next post peeks in */
.social-grid{
  display:flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.social-grid .media-note{ flex: 0 0 100%; }
.social-post{
  position:relative;
  display:block;
  flex: 0 0 44%;
  scroll-snap-align: start;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow:hidden;
  background: var(--line);
  -webkit-touch-callout: none; /* no iOS link/image sheet on long-press */
  -webkit-user-select: none;
  user-select: none;
}
.social-post img{
  -webkit-user-drag: none;
  pointer-events: none; /* so long-press targets the link, not the image menu */
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
@media (max-width: 720px){
  /* Mobile: one post in view, the next one peeking in from the right */
  .social-post{ flex: 0 0 80%; }
}
.social-post-badge{
  position:absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  color: var(--color-white);
  font-size: 10px;
  padding: 3px 5px;
  border-radius: 4px;
}
.social-post-preview{
  position:absolute;
  inset: 0;
  width:100%;
  height:100%;
  object-fit: cover;
  border: none;
  background: #000;
}

/* FORMS (shared: booking + login + event editor) */
.card-form{
  background: var(--color-white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
}
/* On the red Kontakt section, the form card takes the original design's
   yellow accent instead of white, for contrast against the section bg. */
#kontakt .card-form{
  background: var(--color-accent-yellow);
  border: none;
}
.card-form h3{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: 18px;
  margin: 0 0 4px;
  color: var(--color-accent-red);
}
.card-form .desc{ font-size:13px; color:var(--color-muted); margin:0 0 18px; line-height:1.5; }

.field-label{
  display:block;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.field-label.small{ flex:1; }
.event-editor-row{ display:flex; gap: 12px; }
@media (max-width: 500px){
  .event-editor-row{ flex-direction: column; gap:0; }
}

.text-input, .writeBar{
  width:100%;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--color-ink);
  font-family: inherit;
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 4px;
}
.text-input:focus, .writeBar:focus{ outline: 2px solid var(--color-primary); outline-offset: 1px; }
.text-input::placeholder, .writeBar::placeholder{ color: var(--color-muted); }
.textarea{ min-height: 90px; resize: vertical; border-radius: 18px; }

.broadcast-btn, .button{
  width:100%;
  padding: 16px;
  border-radius: 999px;
  border: none;
  font-family: var(--font-display-expanded);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.3px;
  cursor:pointer;
  transition: transform .15s ease, background .2s ease;
  margin-top: 6px;
}
.broadcast-btn:disabled{ opacity: 0.6; cursor: not-allowed; }
.broadcast-btn:active{ transform: scale(0.98); }
.broadcast-btn.start, .button{
  background: var(--color-primary);
  color: var(--color-ink);
}
.broadcast-btn.start:hover, .button:hover{ background: var(--color-primary-bright); }
.broadcast-btn.stop{ background: var(--color-white); color: var(--color-ink); border: 1px solid var(--line); }
.broadcast-btn.stop:hover{ background: var(--bad); color: var(--color-white); }

.link-btn{
  background:none;
  border:none;
  color: var(--color-link);
  font-size: 13px;
  text-decoration: underline;
  cursor:pointer;
  font-family: inherit;
  padding: 0;
}
.link-btn:hover{ color: var(--color-ink); }

.error-box{
  margin-top: 14px;
  background: rgba(222,68,76,0.1);
  border: 1px solid rgba(222,68,76,0.35);
  color: var(--color-accent-red);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height:1.5;
  display:none;
}
.error-box.show{ display:block; }

.success-box{
  margin-top: 14px;
  background: rgba(47,191,113,0.1);
  border: 1px solid rgba(47,191,113,0.35);
  color: var(--good);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height:1.5;
  display:none;
}
.success-box.show{ display:block; }

/* Live start/end → requested hours readout on the booking form */
.booking-duration{
  display:none;
  margin: -6px 0 16px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
}
.booking-duration.show{ display:block; }
.booking-duration.error{ background: var(--color-accent-red); color: var(--color-white); }

/* LOCATION AUTOCOMPLETE + MINI MAPS */
.location-field-wrap{ position: relative; }
.g-recaptcha{ margin: 4px 0 16px; max-width: 100%; overflow: hidden; }
.location-suggestions{
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  background: var(--color-white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 2px;
}
.location-suggestion{
  display:block;
  width:100%;
  text-align:left;
  background:none;
  border:none;
  color: var(--color-ink);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 14px;
  cursor:pointer;
  border-bottom: 1px solid var(--line);
}
.location-suggestion:last-child{ border-bottom: none; }
.location-suggestion:hover{ background: #fafafa; color: var(--color-accent-red); }

.event-editor-map, .event-card-map{
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--line);
  height: 160px;
  margin: 10px 0;
  background: #eee;
}

/* FLATPICKR (date/time picker) — light re-skin to match Lunchbeat's theme */
.flatpickr-calendar{
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(17,17,17,0.18);
  font-family: var(--font-display);
}
.flatpickr-day.selected, .flatpickr-day.selected:hover{ background: var(--color-primary); border-color: var(--color-primary); color: var(--color-ink); }
.flatpickr-day.today{ border-color: var(--color-primary); }
.flatpickr-day.selected.startRange, .flatpickr-day.selected.endRange{ background: var(--color-primary); border-color: var(--color-primary); color: var(--color-ink); }
.flatpickr-day.inRange{ background: rgba(0,0,0,0.06); border-color: transparent; box-shadow: -5px 0 0 rgba(0,0,0,0.06), 5px 0 0 rgba(0,0,0,0.06); }

/* Booking form: single date-range field with calendar icon + time panel */
.date-field-wrap{ position: relative; }
.date-field-wrap .text-input{ padding-right: 46px; cursor: pointer; }
.date-field-icon{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  background:none; border:none; padding:8px; cursor:pointer;
  color: var(--color-ink); display:flex;
}
.booking-time-panel{
  display:flex; flex-wrap:wrap; gap:10px; padding:12px; border-top:1px solid var(--line);
}
.booking-time-panel label{ flex:1; min-width:100px; font-size:12px; color: var(--color-muted); }
.booking-time-panel .text-input{ margin-top:4px; width:100%; box-sizing:border-box; }
.booking-time-done{
  flex-basis:100%; border:none; border-radius:999px; padding:10px;
  background: var(--color-ink); color: var(--color-primary);
  font-family: inherit; font-weight:800; font-size:14px; cursor:pointer;
}

/* PAST EVENTS (home) — carousel of small greyed-out cards, 4 across on desktop */
.past-events{ margin: 40px 0 0; }
.past-events-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; }
.past-events-title{ font-family: var(--font-display-expanded); font-weight: 900; font-size: 18px; margin: 0; color: var(--color-ink); }
.past-nav{ display:flex; gap: 8px; }
.past-nav-btn{
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--color-ink); color: var(--color-primary); font-size: 22px; line-height: 1; padding: 0 0 3px;
}
.past-carousel{
  display:flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
}
.past-carousel::-webkit-scrollbar{ display:none; }
.past-card{
  flex: 0 0 calc((100% - 3 * 14px) / 4); scroll-snap-align: start;
  display:flex; flex-direction:column; text-align:left; padding: 8px; gap: 8px;
  background: rgba(255,255,255,0.7); border: none; border-radius: 14px; cursor: pointer;
  font-family: inherit; color: var(--color-ink);
  filter: grayscale(1); opacity: .8; transition: opacity .15s ease, filter .15s ease, transform .15s ease;
}
.past-card:hover{ opacity: 1; filter: grayscale(.3); transform: translateY(-2px); }
.past-card{ min-width:0; box-sizing:border-box; }
/* No long-press image menu (save/share/Lens) on event cards and event images */
.past-card, .eventContainer img{ -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.past-card img, .eventContainer img{ pointer-events: none; -webkit-user-drag: none; }
.past-card-img{ max-width:100%; width:100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; background:#ddd; display:block; }
.past-card-title{ font-weight: 800; font-size: 13px; line-height: 1.25; }
.past-card-date, .past-card-loc{ font-size: 11px; color: rgba(17,17,17,0.65); margin-top: 2px; }
@media (max-width: 900px){ .past-card{ flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 520px){ .past-card{ flex-basis: 72%; } }
.past-modal{
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.6);
  display:flex; align-items:center; justify-content:center; padding: 20px; overflow-y:auto;
}
.past-modal-card{ position: relative; max-width: 560px; width: 100%; max-height: 90vh; overflow-y:auto; }
.past-modal-close{
  position:absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border:none; background: var(--color-ink); color:#fff; font-size: 22px; cursor:pointer; line-height:1;
}

/* ADMIN EVENT EDITOR + LIST (login.js) */
.event-editor{ margin-top: 4px; }
.admin-events-list h3{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: 18px;
  color: var(--color-accent-red);
  margin: 0 0 14px;
}
.admin-event-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
/* The footer overlaps the last 44px above it (negative margin + diagonal),
   so the admin content needs bottom clearance to stay inside the white area. */
#adminBlock{ padding-bottom: 90px; }
.admin-group{ margin-bottom: 22px; }
.admin-group-title, .admin-group summary{
  font-weight: 800; font-size: 14px; margin: 0 0 10px; color: var(--color-ink);
}
.admin-group summary{
  cursor: pointer; padding: 10px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; list-style: none;
}
.admin-group summary::-webkit-details-marker{ display:none; }
.admin-group summary::after{ content:'▾'; float:right; transition: transform .15s ease; }
.admin-group[open] summary::after{ transform: rotate(180deg); }
.admin-group[open] summary{ margin-bottom: 10px; }
.admin-event-row.is-past{ opacity: .6; }
.admin-event-title{ font-weight:700; font-size: 14px; margin-bottom: 2px; }
.admin-event-date{ font-size: 12px; color: var(--color-muted); }
.admin-event-actions{ display:flex; gap: 14px; flex-shrink:0; }

.admin-feeds-row{ display:flex; gap: 12px; }
.admin-feed-action{ flex:1; min-width: 0; }
.feed-update-btn{
  width:100%;
  padding: 11px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--color-ink);
  font-family: inherit;
  font-weight:700;
  font-size: 13px;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.feed-update-btn:hover{ border-color: var(--color-primary); color: var(--color-accent-red); }
.feed-update-btn:disabled{ opacity: .6; cursor: not-allowed; }
@media (max-width: 420px){
  .admin-feeds-row{ flex-direction: column; }
}

/* FOOTER */
/* Footer joins the same full-bleed diagonal-section treatment as the home
   page's color blocks — its own distinct angle/direction, dark background
   so it reads as a clear close to the page. */
footer{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -44px;
  clip-path: polygon(0 44px, 100% 0, 100% 100%, 0 100%);
  background: var(--color-ink);
  text-align:center;
  padding-top: 110px;
  padding-bottom: 56px;
  color: var(--color-muted-on-dark);
  font-size: 12px;
}
.footer-inner{
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-columns{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  margin-bottom: 32px;
}
.footer-divider{
  width: 240px;
  max-width: 60%;
  height: 1px;
  background: var(--line-on-dark);
  margin: 0 auto 28px;
}
.footer-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding: 0 20px;
}
@media (max-width: 600px){
  .footer-columns{ grid-template-columns: 1fr; gap: 24px; }
  .footer-col:first-child{ padding-bottom: 24px; }
}
.footer-newsletter p{ margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--color-muted-on-dark); }
.footer-newsletter p.newsletter-privacy{ margin: -10px 0 18px; font-size: 12px; opacity: .7; }
.newsletter-form{ display:flex; gap: 10px; max-width: 360px; margin: 0 auto; }
.newsletter-form input{
  flex:1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fafafa;
  color: var(--color-ink);
  font-family: inherit;
  font-size: 13px;
}
.newsletter-form input::placeholder{ color: var(--color-muted); }
.newsletter-form input:focus{ outline: 2px solid var(--color-primary); outline-offset: 1px; }
.newsletter-form button{
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: var(--color-ink);
  font-family: inherit;
  font-weight:700;
  font-size: 13px;
  cursor:pointer;
  white-space:nowrap;
  transition: background .15s ease;
}
.newsletter-form button:hover{ background: var(--color-primary-bright); }
.newsletter-form button:disabled{ opacity: .6; cursor: not-allowed; }
@media (max-width: 420px){
  .newsletter-form{ flex-direction: column; }
}
.newsletter-msg{ margin-top: 10px; font-size: 12px; display:none; }
.newsletter-msg.show{ display:block; }
.newsletter-msg.success{ color: var(--good); }
.newsletter-msg.error{ color: var(--bad); }
.footer-social{ display:flex; justify-content:center; align-items:center; gap: 14px; margin-bottom: 18px; }
.footer-social-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-on-dark);
  color: var(--color-muted-on-dark);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.footer-social-link:hover{ color: var(--color-primary); border-color: var(--color-primary); background: rgba(255,255,255,0.06); }
.footer-social-link svg{ width: 18px; height: 18px; fill: currentColor; }
.footer-contact{ margin-bottom: 18px; }
.footer-contact a{ display:inline-flex; align-items:center; gap: 6px; color: var(--color-muted-on-dark); text-decoration:none; font-size: 13px; }
.footer-contact a:hover{ color: var(--color-primary); }
.footer-contact svg{ width: 15px; height: 15px; flex-shrink:0; }
.booking-intro{ max-width: 640px; margin: 0 0 24px; text-align: left; }
.booking-intro p{ margin: 0 0 14px; line-height: 1.6; }
.footer-admin{ margin-bottom: 18px; }
.footer-admin a{ color: var(--color-muted-on-dark); opacity:.5; text-decoration:none; font-size: 12px; }
.footer-admin a:hover{ opacity:1; color: var(--color-primary); }
.footer-links{ margin-top: 8px; display:flex; justify-content:center; align-items:center; gap: 8px; }
.footer-links a{ color: var(--color-muted-on-dark); text-decoration:none; }
.footer-links a:hover{ color: var(--color-white); text-decoration:underline; }
.footer-copy{ margin-top: 14px; }

/* LEGAL PAGES (Privacy / Terms) */
.legal-content{ max-width: 680px; }
.legal-content p{ color: var(--color-muted); font-size: 14px; line-height: 1.7; margin: 0 0 16px; }
.legal-content ul{ color: var(--color-muted); font-size: 14px; line-height: 1.7; margin: 0 0 16px; padding-left: 20px; }
.legal-content li{ margin-bottom: 8px; }
.legal-content b{ color: var(--color-ink); }
.legal-content a{ color: var(--color-link); font-weight: 600; }
.legal-content h2{
  font-family: var(--font-display-expanded);
  font-weight: 900;
  font-size: 18px;
  color: var(--color-accent-red);
  margin: 28px 0 10px;
}

.upcoming-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.upcoming-card{ filter:none; opacity:1; background: var(--color-white); }
.upcoming-card:hover{ filter:none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.upcoming-card .past-card-title{ font-size: 15px; }
.upcoming-card .past-card-date, .upcoming-card .past-card-loc{ font-size: 12px; }
/* modal: show the whole image, uncropped */
.past-modal-card img{ max-height:none; height:auto; object-fit: contain; border-radius: 16px; }

/* exactly two upcoming events: fill the row side by side, bigger */
.upcoming-grid.two{ grid-template-columns: repeat(2, 1fr); gap: 20px; }
.upcoming-grid.two .past-card{ padding: 12px; gap: 12px; border-radius: 18px; }
.upcoming-grid.two .past-card-img{ border-radius: 12px; }
.upcoming-grid.two .past-card-title{ font-size: 20px; }
.upcoming-grid.two .past-card-date, .upcoming-grid.two .past-card-loc{ font-size: 14px; }
@media (max-width: 520px){ .upcoming-grid.two{ grid-template-columns: 1fr; } }

/* admin: current / new image preview in the event editor */
.ev-image-preview{ margin: 4px 0 14px; }
.ev-image-preview img{ display:block; max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--line); }
.ev-image-preview-actions{ display:flex; gap: 14px; align-items:center; margin-top: 6px; font-size: 12px; color: var(--color-muted); }

/* past events: one row per year */
.past-events-title{ margin-bottom: 4px; }
.past-year-row{ margin-top: 14px; }
.past-year-row .past-year{ margin: 0; font-size: 15px; font-weight: 800; color: rgba(17,17,17,0.7); }

/* upcoming: exactly 3 fill the row */
.upcoming-grid.three{ grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px){ .upcoming-grid.three{ grid-template-columns: 1fr; } }

/* upcoming: more than 3 -> swipeable carousel (desktop/tablet) */
.upcoming-nav{ justify-content:flex-end; margin-top: 14px; }
.upcoming-grid.many{
  display:flex; gap: 14px; overflow-x:auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.upcoming-grid.many::-webkit-scrollbar{ display:none; }
.upcoming-grid.many .past-card{ flex: 0 0 calc((100% - 28px) / 3); }
@media (max-width: 900px){ .upcoming-grid.many .past-card{ flex-basis: calc((100% - 14px) / 2); } }
.upcoming-more{
  display:none; margin: 14px auto 0; background:none; border:none; padding: 6px;
  font-family: inherit; font-weight: 800; font-size: 15px; color: var(--color-ink);
  text-decoration: underline; cursor: pointer;
}
/* phones: first 3 stacked, rest behind "Show more" instead of a carousel */
@media (max-width: 600px){
  .upcoming-nav{ display:none !important; }
  .upcoming-grid.many{ display:grid; grid-template-columns: 1fr; overflow: visible; }
  .upcoming-grid.many .past-card{ flex-basis:auto; }
  .upcoming-grid.many:not(.expanded) .is-extra{ display:none; }
  .upcoming-more{ display:block; }
}
