/**
 * Cyberagentur Dashboard — global stylesheet
 *
 * Structure (top to bottom; order is cascade-sensitive — avoid moving blocks blindly):
 *   1. Fonts, keyframes, design tokens (:root)
 *   2. Reset, base elements, fullscreen scroll lock
 *   3. Preloader, header / navigation, homescreen grid
 *   4. Fullscreen module strip (#fullscreen-overlay, columns, video, stages)
 *   5. Stages, programs, UI chrome, popups
 *   6. Developer HUD, category / module chrome
 *   7. Responsive: orientation → tablet height → max-width 1280px → max-width 767px
 */

@font-face {
  font-family: 'Noto Sans';
  src: url('../assets/fonts/NotoSans-VariableFont_wdth,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ----- Keyframes ----- */
@keyframes buttonBlink {
    0%, 100% {
        background-color: var(--purple-light);
        color: white;
    }
    50% {
        background-color: white;
        color: var(--purple-dark);
    }
}

:root {
  --purple-dark: rgb(70,34,130);
  --pink: #E31EE6;
  --white: #FFFFFF;
  --black: #000000;
  --purple-mid: #482683;
  --pink-light: #B843BA;
  --purple-light: #7B41E7;
  --category-blue-light: #1DB9DE;
  --category-pink: #CC27DF;
  --category-purple: #7B41E7;
  --category-grey: #B6BFC5;
  --category-grey-dark: #8d8b8f;
  --button-border-radius: 15px;
}

:root {
  --standard-padding: 1.5rem;
}

@media (max-width: 767px) {
  :root {
    --button-border-radius: 7px;
  }
}

/* ----- Reset & base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

a {
    text-decoration: none;
    color: var(--purple-mid);
}
a:hover {
    color: var(--purple-light);
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--black);
    color: var(--white);
    overflow: hidden; /* Temporarily allow scrolling to see grid */
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    user-select: none;
}

/* Fullscreen open: block scroll on the homescreen grid and on the document — do not use
   position:fixed on <html> (that kills scrolling inside #fullscreen-overlay too). */
html.fullscreen-scroll-locked {
    overflow: hidden;
    overscroll-behavior: none;
}

html.fullscreen-scroll-locked .grid-container {
    overflow: hidden !important;
    overscroll-behavior: none;
}

/* ----- Preloader ----- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.preloader .logo {
    margin-bottom: 2rem;
    text-align: center;
}

.preloader .logo img {
    height: 60px;
    width: auto;
    max-width: 100%;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--purple-dark), var(--pink));
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
}

/* ----- Header & navigation ----- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 3rem;
    flex-shrink: 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    background-color: var(--white);
}

.header {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    background: #ffffff;
    background: rgba(255, 255, 255, .15);
    
    background: linear-gradient(90deg, rgb(255 255 255 / 15%), rgb(255 255 255 / 20%) 50%, hsl(0deg 0% 100% / 15%));
    border-bottom: 1px solid #ffffff0f;

}

.header.purple {
  
  background: #000;
  background: rgba(196, 106, 255, .2);
  
  /*background: linear-gradient(90deg, rgba(177, 82, 241, .2), rgba(255, 85, 85, .2) 50%, hsla(35, 96%, 72%, .2));*/
  
  background: linear-gradient(90deg, rgb(187 65 253 / 32%), rgb(73 16 173 / 54%) 50%, hsl(178.34deg 100% 51.73% / 20%));
  border-bottom: 1px solid #591dc48f;

}

.header.visible {
    opacity: 1;
    visibility: visible;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 2.5rem;
    width: auto;
    max-width: 100%;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Fades in when module strip is at preview (video) or content snap; hidden on grid snap.
   Visual match: .sound-icon — purple artwork on header (white) background. */
.exit-session-nav-button {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.2s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.exit-session-nav-button:active {
    transform: scale(0.9);
}

.exit-session-nav-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

#fullscreen-overlay.active.fullscreen-overlay--snap-video ~ .header .exit-session-nav-button,
#fullscreen-overlay.active.fullscreen-overlay--snap-content ~ .header .exit-session-nav-button,
#fullscreen-overlay.active.fullscreen-overlay--snap-content-solo ~ .header .exit-session-nav-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.header .logo {
    transition: transform 0.2s ease;
    cursor: pointer;
}

.header .logo:active {
    transform: scale(0.9);
}

/* Homescreen filter: first child of .grid-container, absolute so it scrolls with the strip (not a grid cell) */
.interface-bottom-left {
    position: fixed;
    z-index: 600;
    left: 3rem;
    bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/*#fullscreen-overlay:not(.fullscreen-overlay--snap-grid) .interface-bottom-left,
#fullscreen-overlay:not(.fullscreen-overlay--snap-content) .interface-bottom-left */

/*#fullscreen-overlay.fullscreen-overlay--snap-content .interface-bottom-left.visible {
    opacity: 0;
    visibility: hidden;
}*/

/*#fullscreen-overlay:not(.fullscreen-overlay--snap-content) .interface-bottom-left.visible {
    opacity: 1;
    visibility: visible;
}*/


#fullscreen-overlay.fullscreen-overlay--snap-grid .interface-bottom-left.visible,
#fullscreen-overlay.fullscreen-overlay--snap-video .interface-bottom-left.visible {
  opacity: 1;
  visibility: visible;
}

.interface-bottom-left .grid-filter-wrap {
    position: relative;
    flex-shrink: 0;
    pointer-events: auto;
}

.grid-filter-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(61, 43, 122, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}



.grid-filter-btn:hover {
    background-color: var(--purple-light);
}

/* Menu open or category filter active: purple field + light icon like .close-btn.
   External <img> SVG cannot use fill/stroke CSS; filter recolors the asset. */
.grid-filter-btn[aria-expanded="true"],
.grid-filter-btn.grid-filter-btn--active {
    background-color: var(--purple-light);
}

.grid-filter-btn:hover img,
.grid-filter-btn[aria-expanded="true"] img,
.grid-filter-btn.grid-filter-btn--active img {
    filter: brightness(0) invert(1);
}

.grid-filter-btn:active {
    transform: scale(0.92);
}

.grid-filter-btn img {
    width: 22px;
    height: auto;
    display: block;
    pointer-events: none;
    transition: filter 0.2s ease;
}

.grid-filter-menu {
    position: absolute;
    left: calc(100% + 0.5rem);
    bottom: 0;
    z-index: 1001;
    min-width: min(22rem, calc(100vw - 8rem));
    max-width: calc(100vw - 5rem);
    padding: 0.65rem 0.5rem;
    border-radius: 18px;
    background: rgba(245, 245, 248, 0.94);
    box-shadow: 0 8px 32px rgba(61, 43, 122, 0.18);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.grid-filter-menu {

  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background: #ffffff;
  background: rgba(255, 255, 255, .15);
  
  background: linear-gradient(90deg, rgb(255 255 255 / 15%), rgb(255 255 255 / 20%) 50%, hsl(0deg 0% 100% / 15%));
  border-bottom: 1px solid #ffffff0f;

}





.grid-filter-menu[hidden] {
    display: none !important;
}

.grid-filter-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: none;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--purple-dark);
    color: var(--white);
    line-height: 1.25;
    transition: background-color 0.15s ease;
}

.grid-filter-option:hover,
.grid-filter-option:focus-visible {
    background: rgba(61, 43, 122, 0.2);
    outline: none;
}

.grid-filter-option--active {
    background: var(--purple-light);
}

.grid-filter-swatch {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.grid-filter-swatch--society {
    background: var(--category-blue-light);
}

.grid-filter-swatch--keytech {
    background: var(--category-pink);
}

.grid-filter-swatch--systems {
    background: var(--category-purple);
}

.grid-filter-swatch--supply {
    background: var(--category-grey-dark);
}

@media (max-width: 600px) {
    .grid-filter-menu {
        /*left: 0;
        top: calc(100% + 0.4rem);
        min-width: min(18rem, calc(100vw - 2.5rem));*/
    }
}

.sound-icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.sound-icon:active {
    transform: scale(0.9);
}



.sound-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.menu-icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--purple-mid);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.menu-icon.white {
  background-color: var(--white);
  
}

.menu-icon:hover {
  background-color: var(--purple-light);
}

.menu-icon:active {
    transform: scale(0.9);
}

.menu-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.menu-icon span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

.menu-icon.white span {
  background-color: var(--purple-dark);
}

/* ----- Homescreen grid ----- */
.grid-container {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    /*padding: 5rem 0 0 0;*/
    padding: 0 0 0 0;
    gap: 0rem;
    width: 100%;
    box-sizing: border-box;
    aspect-ratio: 16/9;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: repeat(16, 1fr);
    grid-auto-rows: unset;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.grid-container.visible {
    opacity: 1;
    visibility: visible;
}

/* During GSAP grid intro, CSS transitions on transform/opacity fight the tween (Safari jank). */
.grid-container.grid-intro-active .grid-item {
    transition: none !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.grid-item {
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255,255,255,0.1);
    background-color: var(--purple-light);
}

/* Category filter overlay: only while .grid-container--filter-active; opacity transitions for stagger */
.grid-container.grid-container--filter-active .grid-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.73);
    z-index: 12;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.grid-container.grid-container--filter-active .grid-item:not(.grid-item--filter-dimmed)::before {
    opacity: 0;
}


.grid-item.viewed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
   
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.grid-item-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
  z-index: 1;
  overflow: hidden;
}

.grid-item-bg.aligned-top {
  background-position: top;
}

.grid-item-bg.aligned-bottom {
  background-position: bottom;
}

.grid-item .grid-item-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 1.0);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 0.0;
}

.grid-item.touched .grid-item-bg::after {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.grid-item-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.grid-item-bg.aligned-top video {
  object-position: top !important;
}

.grid-item-bg.aligned-bottom video {
  object-position: bottom !important;
}

.grid-item.touched {
    /*transform: scale(1.025);*/
    
    z-index: 5;
    /*opacity: 0.5;*/
}

/* During GSAP titles intro: opacity transition fights the tween (esp. Safari). */
.grid-container.titles-intro-active .grid-item-content {
    transition: none !important;
}

.grid-item-content {
    color: rgba(255, 255, 255, 1.0);
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
    opacity: 0.01;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    width: 100%;
    position: relative;
    z-index: 3;
}

.grid-item.touched .grid-item-content {
    opacity: 1;
}

.item-1  { grid-column: 1 / 5;  /*grid-row: 1 / 5;*/ grid-row: 1 / 6; }   /* Top left, wide */
.item-2  { grid-column: 5 / 9;  grid-row: 1 / 9; }   /* Top center */
.item-3  { grid-column: 9 / 12;  /*grid-row: 1 / 4;*/ grid-row: 1 / 6; }   /* Top right, small */
.item-4  { grid-column: 12 / 17; grid-row: 1 / 5; }   /* Top right, small */
.item-5  { grid-column: 1 / 5;  /*grid-row: 5 / 13;*/ grid-row: 6 / 13; }   /* 2nd row, left */

.item-6  { grid-column: 9 / 12;  /*grid-row: 4 / 9;*/ grid-row: 6 / 9; }   /* 2nd row, center right */
.item-7  { grid-column: 12 / 17; grid-row: 5 / 9; }   /* 2nd row, right */
.item-8  { grid-column: 5 / 8;  grid-row: 9 / 13; }   /* 2nd row, center left */

.item-9  { grid-column: 8 / 11;  grid-row: 9 / 13; }   /* 3rd row, left */
.item-10 { grid-column: 11 / 17;  grid-row: 9 / 13; }   /* 3rd row, center */

.item-11 { grid-column: 1 / 4; grid-row: 13 / 17; }   /* 3rd row, right */
.item-12 { grid-column: 4 / 9;  grid-row: 13 / 17;  }   /* 4th row, left */
.item-13 { grid-column: 9 / 12;  grid-row: 13 / 17;  }   /* 4th row, center left */
.item-14 { grid-column: 12 / 14;  grid-row: 13 / 17;  }   /* 4th row, center right */
.item-15 { grid-column: 14 / 17; grid-row: 13 / 17;  }   /* 4th row, right */






/* Homescreen grid — mobile (≤767px) */
@media (max-width: 767px) {
    /* Keep the page to the viewport so the grid (not <html>) becomes the scroll container */
    body {
        height: 100dvh;
        max-height: 100dvh;
    }
}

/* Grid layout: applied when the modulestrip container itself is ≤768px wide (e.g. iPad Portrait) */
@container modulestrip (max-width: 768px) {
    .grid-item-content {
        font-size: 3vw;
    }

    .grid-container {
        aspect-ratio: auto;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        grid-auto-rows: 200px;
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        gap: 0.0rem;
        /*padding: 6rem 1rem 2rem 1rem;*/
    }

    .grid-container > .grid-item {
        grid-column: auto;
        grid-row: auto;
    }

    .grid-container > .grid-item.grid-item-wide-on-mobile {
        grid-column: span 2;
    }

    /* Same breakpoint as mobile grid: ignore top/bottom art alignment (use default center crop) */
    .grid-item-bg.aligned-top,
    .grid-item-bg.aligned-bottom {
        background-position: center;
    }

    .grid-item-bg.aligned-top video,
    .grid-item-bg.aligned-bottom video {
        object-position: center !important;
    }

    /* Allow vertical scrolling inside the grid column; desktop rule uses pan-x for strip gestures */
    #fullscreen-overlay #module-inner-x-scroll > .grid-container {
        touch-action: pan-x pan-y;
    }
}



/* Grid: fullscreen transition / inactive dimming */
.grid-container.inactive .grid-item:not(.active),
.grid-container.transitioning .grid-item {
    opacity: 0.2;
    pointer-events: none;
}

.grid-item.active {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: 100%;
    z-index: 2;
    border-radius: 0;
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: default;
}

.grid-item.active:hover {
    transform: none;
    background-color: #3a1a52;
}


.grid-item .grid-item-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.grid-item .grid-item-bg video.video-left {
  object-position: left;
}

.grid-item .grid-item-bg video.video-right {
  object-position: right;
}

.grid-item.touched .grid-item-bg video {
  opacity: 1.0;
}

.grid-item.playing .grid-item-bg video {
  opacity: 1.0;
}

.close-btn {
    position: absolute;
    top: 6.7rem;
    /*right: 3rem;*/
    right: 40px;
    width: 40px;
    height: 40px;
    /* background: rgba(0,0,0,0.3); */
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 400;
    opacity: 0;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.close-btn:active {
    transform: scale(0.9);
}

.close-btn:before,
.close-btn:after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    /*background-color: white;*/
    background-color: var(--purple-dark);
    border-radius: 2px;
}

.close-btn:before {
    transform: rotate(45deg);
}

.close-btn:after {
    transform: rotate(-45deg);
}

.close-btn:hover {
  background-color: var(--purple-light);
}

.close-btn:hover:before,
.close-btn:hover:after {
    background-color: var(--white);
}

/* ----- Fullscreen overlay & module strip ----- */
/* Full-width strip; scrollport pointer-events none; grid / video / content columns; native scroll + snap */
#fullscreen-overlay.fullscreen-overlay--sheet {
    --module-video-w: min(calc((100dvh - 9rem) * 9 / 16), 48vw, 92vw);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    visibility: visible;
    pointer-events: none;
    background: transparent;
    overflow: hidden;
    overscroll-behavior: none;
}

/* No darkening layer — reveal is via horizontal scroll, not a scrim */
#fullscreen-overlay .fullscreen-dim {
    display: none;
}

.module-sheet {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    position: relative;
    pointer-events: none;
}

/* Fill .popup-content height so #module-inner-x-scroll can stretch to the bottom of the viewport */
#fullscreen-overlay .module-sheet {
    flex: 1 1 0%;
    min-height: 0;
    height: 100%;
    align-self: stretch;
}

/* Horizontal strip: [grid] | [0-width snap anchor] | video (9:16) | stages — mandatory scroll-snap */

#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll {
    container-type: size;
    container-name: modulestrip;
    /* Strip height drives 9:16 width; cqh/cqw resolve on this scrollport (not #fullscreen-overlay) */
    --module-video-w: min(calc((100dvh - 9rem) * 9 / 16), 48vw, 92vw);
    /* Homescreen grid inset vs 9:16 column; overridden by main.js while scrolling (desktop) */
    --grid-pad-frac: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 1 1 0%;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    height: calc(100dvh + 11px);
    min-width: 0;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    scrollbar-width: thin;
    scroll-snap-type: x mandatory;
    -webkit-scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    /* Safari: avoid implicit snapport inset; keeps native snap math aligned with scrollLeft in JS */
    scroll-padding: 0;
    scroll-padding-inline: 0;
    /* Homescreen grid first; 1px anchor for grid|video boundary snap (WebKit ignores true 0-width snap boxes) */
    /*pointer-events: none;*/
    pointer-events: auto;
    cursor: grab;
}

/* Mouse click-drag pan: avoid snap fighting the finger/mouse during drag */
#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll.module-inner-x-scroll--dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    -webkit-scroll-snap-type: none;
    scroll-behavior: auto;
}

/* Programmatic scrollTo(smooth) from JS: Safari mandatory snap can otherwise resolve mid-animation back to grid */
#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll.module-inner-x-scroll--snap-suppress-js {
    scroll-snap-type: none;
    -webkit-scroll-snap-type: none;
}

/* closePreview: wallet buttons are inside the strip; opacity transition + buttonBlink keyframes fight WebKit smooth scroll */
#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll.module-inner-x-scroll--programmatic-close .next-module-button,
#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll.module-inner-x-scroll--programmatic-close .close-session-button {
    animation: none !important;
    transition: none !important;
}

#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll::-webkit-scrollbar-track {
    background: transparent;
}

#fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

@supports (height: 1cqh) {
    #fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll {
        --module-video-w: min(calc(100cqh * 9 / 16), 48cqw, 92cqw);
    }
}

@media (prefers-reduced-motion: reduce) {
    #fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll {
        scroll-behavior: auto;
    }
}

/* First snap: homescreen grid (full scrollport width, same geometry as former .fullscreen-scroll-lead) */
#fullscreen-overlay #module-inner-x-scroll > .grid-container {
    flex: 0 0 100cqw;
    width: 100cqw;
    max-width: 100cqw;
    min-height: 100%;
    height: 100%;
    align-self: stretch;
    flex-shrink: 0;
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    scroll-margin-inline: 0;
    pointer-events: auto;
    touch-action: pan-x;
    touch-action: pan-x pan-y;
    box-sizing: border-box;
    /* Scroll-synced inset: space beside 9:16 column (see --grid-pad-frac on #module-inner-x-scroll, main.js) */
    padding-left: calc(var(--module-video-w) * var(--grid-pad-frac, 0));
    transition: opacity 0.5s ease, visibility 0.5s ease, padding-left 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@container modulestrip (min-width: 769px) {
    #fullscreen-overlay #module-inner-x-scroll.module-strip-pad--tracking > .grid-container {
        transition: opacity 0.5s ease, visibility 0.5s ease, padding-left 0s linear;
    }
}

@media (prefers-reduced-motion: reduce) {
    #fullscreen-overlay #module-inner-x-scroll > .grid-container {
        transition: opacity 0.5s ease, visibility 0.5s ease, padding-left 0.05s linear;
    }
}

/* Snap-only: start of strip after grid (= video left edge). 1px box — WebKit often skips 0-width snap targets. */
#fullscreen-overlay #module-inner-x-scroll > .module-strip-snap-anchor {
    flex: 0 0 1px;
    width: 1px;
    min-width: 1px;
    max-width: 1px;
    min-height: 100%;
    height: 100%;
    align-self: stretch;
    flex-shrink: 0;
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    scroll-margin-inline: 0;
    pointer-events: none;
    box-sizing: border-box;
    overflow: hidden;
}

#fullscreen-overlay .module-stage01-inner {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 0.5rem 1.5rem 1rem 1.5rem;
    box-sizing: border-box;
    pointer-events: auto;
}

/* 9:16 frame is the column; video layer fills it (see .video-container below) */
#fullscreen-overlay .module-col--video {
    position: relative;
    flex: 0 0 var(--module-video-w);
    width: var(--module-video-w);
    min-width: var(--module-video-w);
    max-width: var(--module-video-w);
    flex-shrink: 0;
    aspect-ratio: 9 / 16;
    height: auto;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    align-self: flex-start;
    box-sizing: border-box;
    /* Right edge of player flush with viewport right (middle snap). Stays end — all-start would merge this stop with “content” in scroll math. */
    scroll-snap-align: end;
    -webkit-scroll-snap-align: end;
    scroll-snap-stop: always;
    scroll-margin: 0;
    scroll-margin-inline: 0;
    pointer-events: auto;
}



/* Touch-first (e.g. iPad): avoid scroll-behavior:smooth fighting inertia on horizontal strip;
   padding-left must not animate during finger pan — reflow + transition fights native strip scroll. */
   @media (hover: none) and (pointer: coarse) {
    #fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll {
        scroll-behavior: auto;
        /* Compositing hint for horizontal strip pan (WebKit/iPad); one scrollport — cheaper than will-change on whole grid. */
        will-change: transform;
    }
}



.module-col.module-col--video {
  /* This creates a shadow that extends to the left (-20px horizontal offset) */
  /* Parameters: offset-x | offset-y | blur-radius | color */
  box-shadow: 0px 0px 50px 50px rgba(0, 0, 0, 0.65);

  /* CRITICAL: To make the shadow overlay the neighboring grid container, 
     the element must have a higher z-index than its sibling. */
  position: relative; 
  z-index: 10; 
  overflow:visible !important;
}


.chevron-container {
   
  /* Layout and Centering */
display: flex;
align-items: center; /* Vertically centers the icon */
justify-content: start;

/* Positioning */

top: 0;
left: 0;
width: max-content;
height: 100%;
z-index: 10;

/* Spacing */
margin: 0;
padding: 0;

/* vw scales with screen; clamp keeps tablet/desktop in a sane range */
/*margin-left: clamp(-26vw, -25vw, -14vw);*/
transform: translateX(-80%);
transform-origin: left center;
z-index: 4; 

position: relative;

/* Unitless ratio: length/length (use 2200px not 2200 — vw/number is invalid for scale) */
/*--chevron-scale: clamp(0.28, calc(100vw / 2200px), 0.4);*/
--chevron-scale: 0.4;
scale: var(--chevron-scale);

pointer-events: none;
}


.chevron-container .chevron-animation-container {
   
     /* Layout and Centering */
  display: flex;
  align-items: center; /* Vertically centers the icon */
  justify-content: start;

  /* Positioning */
 
  top: 0;
  left: 0;
  width: max-content;
  height: 100%;
  z-index: 10;

  /* Spacing */
  margin: 0;
  padding: 0;

  position: relative;

}

@keyframes chevron-scroll-hint-hand {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-55px);
  }
}

/* Hand icon beside chevrons; 2s cadence matches runway animation. */
.chevron-scroll-hint {
  flex-shrink: 0;
  align-self: center;
  pointer-events: none;
  transform: translateX(-100%);
  transform-origin: left center;
}

.chevron-scroll-hint__icon {
  display: block;
  width: clamp(88px, 9vw, 120px);
  height: auto;
  opacity: 1.0;
  filter: brightness(0) invert(1);
  animation: chevron-scroll-hint-hand 2s ease-in-out infinite;
  
}

.chevron-container-02 {
  /*z-index: 10;
  flex-direction: row-reverse;*/
}

.chevron-container-02 .chevron-scroll-hint {
  
}

/* JS: after horizontal snap changes, chevrons stay hidden briefly then fade in (see main.js). */
.chevron-container.chevron-container--snap-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}


.fullscreen-overlay--snap-content .chevron-container-01 .chevron-scroll-hint {
   
  transform: translateX(-100%) rotate(180deg);
  transform-origin: center center;
}

.fullscreen-overlay--snap-content .chevron-container-01 {
   
  z-index: 10;
  scale: calc(-1 * var(--chevron-scale));
  /*transform: scaleX(calc(-1 * var(--chevron-scale))) scaleY(calc(-1 * var(--chevron-scale)));*/
}

.fullscreen-overlay--snap-content .chevron-container-02 {
  display: none;
}

/* contentSolo snap: stages fills full viewport, video is off-screen to the left. */
.fullscreen-overlay--snap-content-solo .chevron-container-02 .chevron-scroll-hint {
  transform: translateX(-100%) rotate(180deg);
  transform-origin: center center;
}

.fullscreen-overlay--snap-content-solo .chevron-container-02 {
  z-index: 11;
  scale: calc(-1 * var(--chevron-scale));
}

.fullscreen-overlay--snap-content-solo .chevron-container-01 {
  display: none;
}

.fullscreen-overlay--snap-video .chevron-container-01 {
  display: none;
}

/* Overlay “snap” can be grid from nearest-neighbor before scrollLeft reaches the homescreen column; keep the left chevrons hidden until then so the 4s post-snap cooldown is not undermined. */
#fullscreen-overlay.active.fullscreen-overlay--snap-grid:not(.fullscreen-overlay--strip-scroll-home) .chevron-container-01 {
  display: none;
}

/* Gentle horizontal nudge: suggests horizontal scroll without competing with the runway pulse. */
@keyframes chevron-scroll-hint-sway {
  
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-20vw);
  }
  
}

.chevron-container .chevron-animation-container{
  /*animation: chevron-scroll-hint-sway 2.0s ease-in-out infinite;*/
  animation: chevron-scroll-hint-sway 2.0s linear infinite;
}

/* Sequential “runway” pulse: chevrons chase 3 → 2 → 1 (dim baseline, brief bright + glow). */
@keyframes chevron-runway-chase {
  0% {
    opacity: 0.0;
    filter: brightness(0.5);
  }
  5% {
    opacity: 1;
    filter: brightness(1.22) drop-shadow(0 0 8px rgba(255, 255, 255, 0.95))
      drop-shadow(0 0 20px rgba(200, 225, 255, 0.55));
  }
  16%,
  100% {
    opacity: 0.0;
    filter: brightness(0.5);
  }
}

.chevron-container .chevron-single {
  flex-shrink: 0;
}

.chevron-container .chevron-single svg {
  display: block;
}

.chevron-container .chevron-01,
.chevron-container .chevron-02,
.chevron-container .chevron-03 {
  animation: chevron-runway-chase 2.0s cubic-bezier(0.33, 0, 0.2, 1) infinite;
}

.chevron-container .chevron-01 {
  animation-delay: 0.5s;
}

.chevron-container .chevron-02 {
  animation-delay: 0.25s;
}

.chevron-container .chevron-03 {
  animation-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .chevron-container {
    animation: none;
    transform: none;
  }

  .chevron-container .chevron-01,
  .chevron-container .chevron-02,
  .chevron-container .chevron-03 {
    animation: none;
    opacity: 0.85;
    filter: none;
  }

  .chevron-scroll-hint {
    animation: none;
  }
}

/* Snap columns use tabindex=-1 so hint / stage flows can focus them into view (no scrollTo in JS). */
#fullscreen-overlay #module-inner-x-scroll > .grid-container:focus:not(:focus-visible),
#fullscreen-overlay #module-inner-x-scroll > .module-strip-snap-anchor:focus:not(:focus-visible),
#fullscreen-overlay .module-col--video:focus:not(:focus-visible),
#fullscreen-overlay .module-col--stages:focus:not(:focus-visible) {
    outline: none;
}

/* Stage-01 copy sits on top of the 9:16 column; aligned to the column’s left (= video player left) */
#fullscreen-overlay .module-video-stage01-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    box-sizing: border-box;
    pointer-events: none;
}

/* ——— Module video column: post-intro stage 2 (CTA over black) & stage 3 (hook for next iteration) ——— */
.module-video-stage2-number-badge {
    display: none;
    align-self: center;
    flex-shrink: 0;
    /* Slightly above vertical center: less top inset than equal flex spacing would give */
    margin-top: auto;
    margin-bottom: auto;
}

.module-video-stage2-number-badge__box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(5rem, 28vw, 7rem);
    min-height: clamp(5rem, 28vw, 7rem);
    padding: 0.5rem 1rem;
    border-radius: 14px;
    background-color: var(--black);
    box-sizing: border-box;
    transform-origin: 50% 50%;
}

.module-video-stage2-number-badge__box[data-category="category_secure_society"] {
    background-color: var(--category-blue-light);
}

.module-video-stage2-number-badge__box[data-category="category_secure_systems"] {
    background-color: var(--category-purple);
}

.module-video-stage2-number-badge__box[data-category="category_key_technologies"] {
    background-color: var(--category-pink);
}

.module-video-stage2-number-badge__box[data-category="category_trusted_supply_chains"] {
    background-color: var(--category-grey-dark);
}

/* Top-of-video header: compact number chip (same category colors as stage-2 hero badge) */
.module-video-stage2-number-badge__box--header {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
}

.module-video-stage2-number-badge__box--header .module-video-stage2-number-badge__digit {
    font-size: clamp(0.95rem, 3vw, 1.2rem);
}

.module-video-header-titles {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(0.45rem, 2vw, 0.85rem);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.module-video-header-titles__a11y {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#fullscreen-overlay .module-video-stage01-overlay .module-video-header-titles {
    padding: 0.55rem 1rem;
    /*margin-left: -1.5rem;
    margin-right: -1.5rem;*/
    margin-bottom: 0.35rem;
    width: calc(100%);
    max-width: none;
    /*background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 0 0 10px 10px;*/
}

#fullscreen-overlay .module-video-header-titles .stage-title-01 {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    text-transform: none;
}

#fullscreen-overlay .module-video-header-titles .stage-title-02 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(1.05rem, 3.2vw, 1.35rem);
    font-weight: 400;
    line-height: 1.3;
    color: var(--white, #fff);
    text-transform: none;
    letter-spacing: 0.01em;
}

.module-video-stage2-number-badge__digit {
    font-size: clamp(2rem, 10vw, 3.25rem);
    font-weight: 700;
    line-height: 1;
    color: var(--white, #fff);
    font-variant-numeric: tabular-nums;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 {
    background: #000;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .video-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s ease;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .module-video-stage01-overlay {
    background: #000;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .module-video-stage2-number-badge {
    display: flex;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .video-progress-bar {
    opacity: 0;
    pointer-events: none;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .chevron-container {
    opacity: 0;
    pointer-events: none;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .module-video-stage01-overlay .preview-stage-01.stage-holder {
    padding-top: clamp(2rem, 8vh, 4rem);
    padding-bottom: var(--standard-padding, 1.25rem);
    justify-content: flex-start;
    align-items: stretch;
    text-align: center;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .popup-title-02 {
    position: absolute;
    left: var(--standard-padding, 1.25rem);
    right: var(--standard-padding, 1.25rem);
    bottom: var(--standard-padding, 1.25rem);
    margin-top: 0;
    max-width: none;
    text-align: left;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-2 .popup-title-02 > div {
    display: inline;
    background-color: var(--purple-dark, #462286);
    color: var(--white, #fff);
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    font-size: inherit;
    line-height: 1.45;
    white-space: pre-line;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    max-width: 45ch;
}

/* Post-video stage: question title must not remain visible (GSAP often leaves opacity:1 inline). */
#fullscreen-overlay .module-col--video.module-col--video--stage-2 .popup-title-01 {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Stage 3: wallet UI in video column */
.module-video-wallet {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5.0rem;
    padding: var(--standard-padding, 1.25rem);
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .module-video-wallet {
    pointer-events: auto;
    visibility: visible;
    justify-content: center;
    align-items: center;
    padding: clamp(0.5rem, 2vmin, 1rem);
    max-height: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .module-stage01-inner {
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0.75rem 0.75rem;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 {
    background: #000;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .video-container {
    opacity: 0;
    pointer-events: none;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .module-video-stage01-overlay {
    background: #000;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .module-video-stage01-overlay .preview-stage-01.stage-holder {
    position: relative;
    height: 100%;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    padding-bottom: 0;
    text-align: center;
}

.module-video-wallet__panel {
    flex: 0 1 auto;
    width: 100%;
    max-width: min(21rem, 100%);
    max-height: min(72dvh, 28rem);
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    background: linear-gradient(180deg, rgba(72, 38, 131, 0.95) 0%, rgba(45, 24, 82, 0.98) 48%, rgba(35, 18, 65, 1) 100%);
}

.module-video-wallet__header {
    flex: 0 0 auto;
    padding: 0.85rem 1rem 0.65rem;
    text-align: center;
}

.module-video-wallet__title {
    display: block;
    font-size: clamp(0.85rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--white, #fff);
}

.module-video-wallet__count {
    display: block;
    margin-top: 0.35rem;
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

.module-video-wallet__hero {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem 1rem;
}

.module-video-wallet__hero-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(4.5rem, 22vw, 6rem);
    min-height: clamp(4.5rem, 22vw, 6rem);
    padding: 0.35rem 0.75rem;
    border-radius: 14px;
    background-color: var(--category-pink, #cc27df);
    box-sizing: border-box;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.module-video-wallet__hero-box[data-category="category_secure_society"] {
    background-color: var(--category-blue-light);
}

.module-video-wallet__hero-box[data-category="category_secure_systems"] {
    background-color: var(--category-purple);
}

.module-video-wallet__hero-box[data-category="category_key_technologies"] {
    background-color: var(--category-pink);
}

.module-video-wallet__hero-box[data-category="category_trusted_supply_chains"] {
    background-color: var(--category-grey-dark);
}

.module-video-wallet__hero-box:not([data-category]),
.module-video-wallet__hero-box[data-category=""] {
    background-color: #4a4a4e;
}

.module-video-wallet__hero-digit {
    font-size: clamp(1.75rem, 9vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    color: var(--white, #fff);
    font-variant-numeric: tabular-nums;
}

/* Horizontal scroll lives here so visited badges stay reachable when there are many */
.module-video-wallet__rail-wrap {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.65rem 0.35rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
    touch-action: pan-x pinch-zoom;
    cursor: grab;
    scroll-behavior: auto;
}

.module-video-wallet__rail-wrap:active,
.module-video-wallet__rail-wrap.module-video-wallet__rail-wrap--dragging {
    cursor: grabbing;
}

.module-video-wallet__rail-wrap::-webkit-scrollbar {
    height: 6px;
}

.module-video-wallet__rail-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}

.module-video-wallet__rail {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
    min-width: min-content;
    max-width: none;
    padding: 0.35rem 0.5rem;
    overflow: visible;
}

/* Same visual language as .module-video-wallet__hero-box, scaled down */
#fullscreen-overlay .module-video-wallet__rail .module-number {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /*width: clamp(2.35rem, 10.5vw, 2.85rem);
    height: clamp(2.35rem, 10.5vw, 2.85rem);*/
    width: 2rem;
    height: 2rem;
    margin-left: -1.0rem;
    padding: 0.15rem 0.35rem;
    /*font-size: clamp(0.68rem, 2.8vw, 0.82rem);*/
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--white, #fff);
    z-index: 1;
    border-radius: 6px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    background-color: var(--category-pink, #cc27df);
}

#fullscreen-overlay .module-video-wallet__rail .module-number:first-child {
    margin-left: 0;
}

#fullscreen-overlay .module-video-wallet__rail .module-number.module-video-wallet__rail-item--current {
    transform: scale(1.35);
    z-index: 10;
}

#fullscreen-overlay .module-video-wallet__rail .module-number[data-category="category_secure_society"] {
    background-color: var(--category-blue-light);
}

#fullscreen-overlay .module-video-wallet__rail .module-number[data-category="category_secure_systems"] {
    background-color: var(--category-purple);
}

#fullscreen-overlay .module-video-wallet__rail .module-number[data-category="category_key_technologies"] {
    background-color: var(--category-pink);
}

#fullscreen-overlay .module-video-wallet__rail .module-number[data-category="category_trusted_supply_chains"] {
    background-color: var(--category-grey-dark);
}

#fullscreen-overlay .module-video-wallet__rail .module-number:not([data-category]),
#fullscreen-overlay .module-video-wallet__rail .module-number[data-category=""] {
    background-color: #4a4a4e;
}

#fullscreen-overlay .module-video-wallet__rail .module-number-text {
    position: relative;
    z-index: 1;
    line-height: 1;
}

.module-video-wallet__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    max-width: min(21rem, 100%);
    padding-top: 0;
    pointer-events: auto;
}

.module-video-wallet__actions .next-module-button,
.module-video-wallet__actions .close-session-button {
    position: relative;
    width: 100%;
    animation: none;
    text-align: center;
}

/* Wallet completion: covers the wallet column only (layered above panel + actions; see main.js) */
.module-video-wallet__celebration {
    position: absolute;
    inset: 0;
    z-index: 25;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(0.75rem, 2.5vmin, 1.25rem);
    box-sizing: border-box;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.module-video-wallet__celebration.module-video-wallet__celebration--visible {
    visibility: visible;
    opacity: 1;
}

.module-video-wallet__confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.module-video-wallet__celebration-message {
    position: relative;
    z-index: 2;
    max-width: min(22rem, 100%);
    margin-top: min(18%, 10rem);
    padding: clamp(1rem, 3vw, 1.35rem) clamp(1.15rem, 3.5vw, 1.5rem);
    text-align: center;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(72, 38, 131, 0.92) 0%, rgba(35, 18, 65, 0.96) 100%);
    /*border: 1px solid rgba(123, 65, 231, 0.55);*/
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(123, 65, 231, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.module-video-wallet__celebration-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.35rem, 4.2vw, 1.85rem);
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: var(--white, #fff);
    text-shadow: 0 2px 20px rgba(123, 65, 231, 0.45);
    margin-bottom: 0.0rem !important;
}

.module-video-wallet__celebration-sub {
    margin: 0;
    font-size: clamp(0.9rem, 2.8vw, 1.05rem);
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.module-video-wallet__celebration.module-video-wallet__celebration--reduced .module-video-wallet__confetti-canvas {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .module-video-wallet__celebration {
        transition: opacity 0.2s ease;
    }
}

#fullscreen-overlay.fullscreen-overlay--video-wallet .lower-left-ui .next-module-button,
#fullscreen-overlay.fullscreen-overlay--video-wallet .lower-right-ui .close-session-button {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

#fullscreen-overlay.fullscreen-overlay--video-wallet .lower-left-ui .visited-modules-container {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .video-progress-bar,
#fullscreen-overlay .module-col--video.module-col--video--stage-3 .chevron-container {
    opacity: 0;
    pointer-events: none;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .stage-title,
#fullscreen-overlay .module-col--video.module-col--video--stage-3 .module-video-header-titles,
#fullscreen-overlay .module-col--video.module-col--video--stage-3 .popup-title-01 {
    display: none !important;
}

/* Stage 2 badge must not appear beside wallet (Image 01 duplicate) */
#fullscreen-overlay .module-col--video.module-col--video--stage-3 .module-video-stage2-number-badge {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

#fullscreen-overlay .module-col--video.module-col--video--stage-3 .popup-title-02,
#fullscreen-overlay .module-col--video.module-col--video--stage-3 .popup-title-02 > div {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#fullscreen-overlay .module-col--stages {
    flex: 0 0 100cqw;
    width: 100cqw;
    max-width: 100cqw;
    min-width: 0;
    min-height: 0;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    scroll-margin-inline: 0;
    pointer-events: auto;
    z-index: 10;
    box-shadow: 0px 0px 50px 50px rgba(0, 0, 0, 0.65);
    overflow: visible !important;
}

/* Hidden on desktop; mobile rules in @media (max-width: 767px) */
.module-stages-scroll-top-btn {
    display: none !important;
}

#fullscreen-overlay .module-col--stages .stage-holder {
  width: calc(100cqw - var(--module-video-w)) !important;
  flex: 0 0 calc(100cqw - var(--module-video-w)) !important;
}

 
#fullscreen-overlay .module-col--stages .stage-holder.content-stage-03,
#fullscreen-overlay .module-col--stages .stage-holder.imagefilm-holder {
  width: calc(100% - 380px) !important;
}

@media (max-width: 1280px) {
  #fullscreen-overlay .module-col--stages .stage-holder.imagefilm-holder {
    width: calc(100% - 300px) !important;
  }
}

.stage-holder.imagefilm-holder .stage-content {
  height: 100%;
  width: 100%;
  padding-right: 0;
}

.stage-holder.imagefilm-holder .imagefilm-intro {
  margin-bottom: 1.25rem;
}

.stage-holder.antworten-holder .vigilance-stage-content .vigilance-stage-hero,
.stage-holder.antworten-holder .dualuse-stage-content .dualuse-stage-hero {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  margin-bottom: 1.25rem;
}

video.program-video.imagefilm-video {
  width: 100%;
  height: auto;
  max-width:1200px;
}




/* Do not use width > 100% here: with overflow:visible on .module-col--stages (box-shadow),
   the extra pixels extend the #module-inner-x-scroll scrollWidth past the flex math so
   maxScrollLeft overshoots the contentSolo JS snap (~scrollbar width) and scroll-snap fights the strip. */
#fullscreen-overlay .module-col--stages .popup-content-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    box-sizing: border-box;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    z-index: 10;
}

/* Session / next-module controls must not steal clicks during the preview-stage-01 module video intro */
#fullscreen-overlay.preview-module-video .close-session-button,
#fullscreen-overlay.preview-module-video .next-module-button {
    /*pointer-events: none !important;
    cursor: default;*/
}

/* Let horizontal pans scroll the module strip from the 9:16 column; <video> otherwise steals the gesture */
#fullscreen-overlay.preview-module-video .module-col--video,
#fullscreen-overlay.preview-module-video .module-sheet .video-container,
#fullscreen-overlay.preview-module-video .video-player {
    touch-action: pan-x;
}

/* Playing: ignore hits on the native video layer so drags reach the scrollport (controls: progress bar, titles) */
#fullscreen-overlay.preview-module-video .video-container:not(.paused) .video-player {
    pointer-events: none;
}

.dropdown-menu {
    position: fixed;
    top: 3rem;
    right: 3rem;
    width: 200px;
    background: var(--white);
    color: var(--purple-dark);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 999;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(.77,0,.18,1), opacity 0.25s;
}

.dropdown-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0 0rem 0;
}

.dropdown-menu li {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-bottom: 1px solid rgba(70,34,130,0.07);
}

.dropdown-menu li a {
    text-decoration: none;
}

.dropdown-menu li:hover a {
    color: var(--white);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li:hover {
    background: var(--purple-light);
    color: var(--white);
}





/* Horizontal strip: scrollport (specificity in #fullscreen-overlay rules may override pointer-events) */
#module-inner-x-scroll {
  pointer-events: none;
  touch-action: pan-x;
}

/* 2. Restore interactivity for the columns that contain content */
#module-inner-x-scroll > .module-col {
  pointer-events: auto;
}

#module-inner-x-scroll > .grid-container {
  pointer-events: auto;
}

/* Zero-width snap anchor: no hit target */
#module-inner-x-scroll > .module-strip-snap-anchor {
  pointer-events: none;
}









/* ----- Overlay: popup shell (inside fullscreen) ----- */
.popup-content {
  position: absolute;
  /*top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);*/
  /*width: 90%;
  max-width: 1400px;*/
  width: 100%;
  height: calc(100% - 5rem);
  text-align: left;
  z-index: 310;
  padding: 0rem 0rem 0rem 0rem;
  
  

  top: 5rem; 
  left: 0; 
  /*width: 100vw; height: 100vh;
  z-index: 1000; */ 
  
}

/* Module sheet: full viewport width (100cqw = scrollport width for snap geometry) */
#fullscreen-overlay .popup-content {
  position: relative;
  top: 0;
  left: 0;
  flex: 1 1 0%;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
  padding-top: 0;
  pointer-events: none;
  align-self: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.popup-content-inner {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
}

.popup-title {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
  opacity: 1.0;
  /*transform: translateY(50px);*/
  line-height: 1.0;
  pointer-events: auto;
}

h2.popup-title  {
  font-size: 1.75rem !important;
  font-weight: 400 !important;
  line-height: 2.15em !important;
}

@media (max-width: 1280px) {
  h2.popup-title {
    font-size: 1.2rem !important;
    line-height: 2.5em !important;
  }
}

.video-container {
  position: absolute;
  width: 100%;
  height: 100%;
  /*max-width: 1200px;*/
  top: 0;
  left: 0;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fills module-col--video (column owns 9:16); no in-flow box so column sizes from aspect-ratio + width */
#fullscreen-overlay .module-sheet .video-container {
    position: absolute;
    inset: 0;
    opacity: 1;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    display: block;
    overflow: hidden;
    z-index: 4;
    transition: opacity 0.25s ease;
}

#fullscreen-overlay .video-player {
  object-fit: cover;
  margin: 0;
  box-shadow: none;
}

/* Paused: keep custom controls clickable; only the native <video> layer ignores hits */
.video-container.paused {
  pointer-events: auto;
}

.video-container.paused .video-player {
  pointer-events: none;
}

.video-container .video-overlay{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0.0;
}

.video-container.paused .video-overlay{
    opacity: 0.5;
}

.video-buffering-overlay {
  position: absolute;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.video-container.is-buffering .video-buffering-overlay {
  opacity: 1;
  visibility: visible;
}

.video-buffering-inner {
  text-align: center;
  padding: 1.25rem 1.75rem;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 12px;
  max-width: min(320px, 88vw);
}

.video-buffering-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.85rem;
  margin: 0 auto 0;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: video-buffer-spin 0.8s linear infinite;
}

@keyframes video-buffer-spin {
  to {
    transform: rotate(360deg);
  }
}

.video-buffering-bar-track {
  width: 200px;
  max-width: 100%;
  height: 6px;
  margin: 0 auto 0.65rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  display: none;
}

.video-buffering-bar-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 3px;
  transition: width 0.2s ease-out;
}

.video-buffering-text {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  display: none;
}

.video-progress-bar {
  position: fixed;
  top: 3.5rem;
  left: 0;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  /*border-radius: 2px;*/
  margin-bottom: 8px;
  overflow: hidden;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
}

/* Sibling after .module-video-stage01-overlay (z-index 6) so the bar stays above copy overlay hit targets */
#fullscreen-overlay .module-col--video > .video-progress-bar {
  position: absolute;
  top: 3.5rem;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 20;
}

.video-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--purple-mid);
  /*border-radius: 30px;*/
  transition: width 0.5s ease-out;
}

.video-player {
  width: 100%;
  height: 100%;
  /*max-width: 1200px;
  max-height: 70vh;*/
  display: block;
  margin: 0 auto;
  border-radius: 0px;
  box-shadow: 0 0 40px 10px rgba(0,0,0,0.4);
  background: #000;
  opacity: 1;
  /*transform: scale(0.95);*/
  object-fit: cover;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.video-play-pause-btn {
  position: absolute;
  bottom: 3rem;
  left: 3rem;
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.2s ease;
  pointer-events: auto;
  display: none;
}

.video-play-pause-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.video-play-pause-btn svg {
  width: 32px;
  height: 32px;
  color: white;
}

.video-play-pause-btn .play-icon {
  display: none;
}

.video-container.paused .video-play-pause-btn .play-icon {
  display: block;
}

.video-container.paused .video-play-pause-btn .pause-icon {
  display: none;
} 



.stage-bg-holder {
  padding: 4rem 3rem 3rem 3rem;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  text-align: left;
  opacity: 1.0;
  background: url('../images/bg-antwort-sceen.jpg') no-repeat center center;
  background-size: cover;
}

.stage-bg-holder::before {
  content: "";
  display: block; /* Or position: absolute; */
  position: absolute; /* This makes positioning with top/right/bottom/left work */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0.50;
  /*background-color: var(--purple-dark);*/ /* Semi-transparent black */
  background-color: black; /* Semi-transparent black */
  /* z-index: 1; */ /* Add if needed to ensure it's above the background */
}

  .stage-header {
      max-width: 1000px;
      /*margin: 0 auto;*/
    }

    .stage-header h2 {
      max-width: 80ch;
      /*margin: 0 auto;*/
    }

  .stage-header p {
    white-space: pre-line;
  }

/* Ensure other text elements with translations preserve whitespace */
[data-i18n] {
    white-space: pre-line;
}
  
  .stage-holder {
      padding: 6.5rem 3rem 3rem 3rem;
      pointer-events: none;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      height: 100%;
      text-align: left;
      opacity: 0;
  }

  
  .stage-holder.active {
      opacity: 1;
      pointer-events: none;
  }

  .stage-holder.active .interface-element {
    opacity: 1;
    pointer-events: auto;
  }
  
  .stage-holder h2 {
  
      color: var(--white);
    font-size: 1.4rem;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    line-height: 1.2;
    letter-spacing: 0.5px;
  
  }

  .stage-holder h3 {
    font-size: 1.2rem;
    font-weight: 500;
  }
  
  .stage-holder p {
  
      color: var(--white);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.6;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
    
    /*margin: 0 auto;*/
    opacity: 0.9;
    letter-spacing: 0.2px;
  
    margin-bottom: 2rem;
  
  }
  


  .stage-content {
    max-width: 1000px;
    padding-right: 1rem;
    height: auto;
    max-height: calc(100% - 6rem);
    /*max-height: calc(100vh - 34.5rem);*/
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-right: 3rem;
  }

  .stage-content.thinner {
    /*max-height: calc(100vh - 36rem);*/
  }

  .stage-holder.content-stage-01 .stage-content,
  .stage-holder.content-stage-02 .stage-content {
    /*max-height: calc(100vh - 38rem);*/
  }

  .stage-holder.active > .stage-content {
    pointer-events: all;
  }

  .stage-holder.active .program-content.active > .stage-content {
    pointer-events: all;
  }

  .stage-holder.active > .stage-content,
  .program-content.active > .stage-content {
    cursor: grab;
  }

  .stage-holder.active > .stage-content.stage-content--dragging,
  .program-content.active > .stage-content.stage-content--dragging {
    cursor: grabbing;
    user-select: none;
  }


  .stage-content::-webkit-scrollbar {
    width: 20px; /* Width of the scrollbar */
  }
  
  .stage-content::-webkit-scrollbar-track {
    background: #f1f1f114; /* Color of the track */
    border-radius: 5px;
  }
  
  .stage-content::-webkit-scrollbar-thumb {
    background: #ffffffa3; /* Color of the scrollbar thumb */
    border-radius: 5px; /* Roundness of the scrollbar thumb */
    transition: all 0.3s ease;
  }
  
  .stage-content::-webkit-scrollbar-thumb:hover {
    background: #ffffff; /* Color on hover */
  }


  .stage-content {
    scrollbar-width: thin; /* "auto" or "thin" */
    scrollbar-color: #ffffffa3 #f1f1f114; /* thumb color track color */
  }





  .stage-holder.antworten-holder, .program-content {
    display: flex !important;
    flex-direction: column;
    /* Ensure the parent has a defined height (already set to 100% in your case) */
}

.program-content.active {
  position: relative; /* Change from absolute */
  top: 0;             /* Reset the offset */
  height: 100%;       /* Now 100% means 100% of the space *inside* the padding */
  width: 100%;
}

/* Header */
.stage-header {
  flex: 0 0 auto; /* Don't grow, don't shrink, stay auto height */
}

/* Content */
.stage-content {
  flex: 1 1 auto;   /* Grow to fill space */
  min-height: 0;    /* Important for flex children to allow shrinking */
  overflow-y: auto; /* Adds scrollbar if content is too tall */
  max-height: none; /* Remove your existing hardcoded max-height */
}



/* 2. Content takes natural height (or whatever it needs) */
.content-stage-02 .stage-content {
  flex: 0 0 auto; 
  height: auto; 
}


/* 3. Overview Wrap takes all remaining space */
.content-stage-02 .programs-overview-wrap {
  /*flex: 1 1 auto;*/   /* Fill the rest of the container */
  flex: 0 1 auto;
  min-height: 0;    /* Essential for scrolling to work */
  overflow-y: auto; /* If the programs list is long, scroll here */
}


  .antworten-holder,
  .willkommen-holder {
    width: auto;
    max-width: 100%;
    min-width: 0;
  }



.antworten-holder h2,
.willkommen-holder h2 {
  
  color: var(--white);
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  margin-bottom: 2rem;
  line-height: 1.2;
  letter-spacing: 0.5px;
   margin-left: -0.15rem;
}

.antworten-holder h3,
.willkommen-holder h3 {
  font-size: 1.7rem !important;
  font-weight: 500 !important;
}

.antworten-holder p,
.willkommen-holder p,
.stage-content p {

  font-size: 1.2rem;
  font-weight: 400;

}
  

.program-content h2{
  margin-top: 0.5rem;
  font-size: 2.2rem !important;
  text-transform: none !important;
}


















/* --- Stage 01 --- */

.preview-stage-01 {
  opacity: 0;
  /*transition: opacity 0.5s ease;*/
  
}

.preview-stage-01.active {
  opacity: 1;
  
}

.preview-stage-01 .stage-title-01 {
  text-transform: uppercase;
}

.preview-stage-01 .stage-title-02 {
  text-transform: none;

}

.preview-stage-01 .module-video-header-titles {
  opacity: 0;
}

.preview-stage-01 .popup-title {
  /*display: none;*/
  text-transform: none;
  
  opacity: 1;
  /*padding: 0px 10px;
  max-width: 40ch;*/
  cursor: pointer;
  
}



.preview-stage-01 .popup-title-01 {
    position: absolute;

    /*bottom: var(--standard-padding);*/
    /*transform: translateX(-200%);*/
    max-width: 45ch;
}


@keyframes pulseText {
    0% {
      /*transform: scale(1.05);*/
      background-color: var(--purple-dark);
        color: var(--white);
        
    }
    50% {
        /*transform: scale(1);*/
        
        background-color: var(--white);
      color: var(--purple-dark);
    }
    100% {
      /*transform: scale(1.05);*/
      background-color: var(--purple-dark);
        color: var(--white);
        
    }
}

.preview-stage-01 .popup-title div {
    background-color: var(--purple-dark);
    display: inline;
    padding: 0.5rem 1rem;
    /*transition: all 0.3s ease;*/
    
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    
    max-width: 45ch;
    border-radius: 10px;
    white-space: pre-line;
}

/*.preview-stage-01 .popup-title.animated div {
    animation: pulseText 2s ease-in-out infinite;
}*/

/*.preview-stage-01 .popup-title:hover {
    transform: scale(1.05);
    background-color: var(--white);
    color: var(--purple-dark);
    animation: none; 
    transition: all 0.3s ease;
}

.preview-stage-01 .popup-title:active {
    transform: scale(0.95);
    animation: none;
}*/

.preview-stage-01 .popup-title-02 {
  position: absolute;
  /*bottom: 0rem;
  bottom: var(--standard-padding);*/
 
  
  /*display: flex;*/
  /*transform: translateX(200%);*/
}

/* Stage-01 titles over the 9:16 column (aligned to video’s left edge) */
#fullscreen-overlay .preview-stage-01 .popup-title-01,
#fullscreen-overlay .preview-stage-01 .popup-title-02 {
  position: absolute;
  
  /*right: auto;
  left: auto;*/
  /*margin-bottom: 1.25rem;*/
  max-width: 90%;
}

.preview-stage-01 .popup-title-01,
  .preview-stage-01 .popup-title-02 {
    bottom: var(--standard-padding);
    left: var(--standard-padding);
  }

#fullscreen-overlay .preview-stage-01 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-bottom: 1rem;
}

#fullscreen-overlay .module-video-stage01-overlay .preview-stage-01.stage-holder {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  max-width: 100%;

  min-height: 0;
  height: 100%;
  opacity: 1;

  padding: 4.5rem 0 2rem 0;
  padding-top: 5.0rem;
  text-align: left;
  pointer-events: auto;
}

/* Push question + hint row to the bottom of the 9:16 copy column */
#fullscreen-overlay .module-video-stage01-overlay .preview-stage-01.stage-holder .module-video-question-title-row {
  margin-top: auto;
  width: 100%;
  max-width: 100%;
  padding-left: var(--standard-padding);
  padding-right: var(--standard-padding);
  box-sizing: border-box;
}

/* Hint anchor sits on the title’s top edge (bottom: 100%) and nudges slightly above; left-aligned with the title block. */
#fullscreen-overlay .module-video-stage01-overlay .preview-stage-01.stage-holder .module-video-question-title-with-hint {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#fullscreen-overlay .module-video-stage01-overlay .preview-stage-01.stage-holder .module-video-question-title-with-hint .popup-title-01 {
  position: relative;
  left: auto;
  bottom: auto;
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.module-video-question-hint-anchor {
  position: absolute;
  left: 0;
  bottom: calc(100% + 1.5rem);
  z-index: 2;
  width: max-content;
  max-width: 100%;
  pointer-events: none;
}

.module-video-question-hint-offset {
  transform: translate(0, 0);
  pointer-events: none;
}

.module-video-question-hint-anchor:not(.feature-hint-anchor--suppressed) .module-video-question-hint-offset,
.module-video-question-hint-anchor:not(.feature-hint-anchor--suppressed) .feature-hint-trigger {
  pointer-events: auto;
}

.module-video-question-hint-anchor.feature-hint-anchor--suppressed .feature-hint-trigger__pulse {
  animation: none;
}


/* Centered in the overlay so hints stay clear of the fixed header (was first flex row at top). */
#fullscreen-overlay .module-scroll-hints {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 350;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.75rem 0.25rem;
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
  pointer-events: none;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  display: none;
}

#fullscreen-overlay.preview-module-video .module-scroll-hint {
  opacity: 0.92;
  pointer-events: auto;
}

#fullscreen-overlay .module-scroll-hint {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  color: var(--purple-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

#fullscreen-overlay .module-scroll-hint .module-scroll-hint-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  overflow: visible;

}

#fullscreen-overlay .module-scroll-hint--next .module-scroll-hint-icon {
  transform: translateX(2px);
}

#fullscreen-overlay .module-scroll-hint--prev .module-scroll-hint-icon {
  transform: translateX(-2px);
}

#fullscreen-overlay .module-scroll-hint:disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

#fullscreen-overlay .module-scroll-hint:hover:not(:disabled) {
  background: var(--white);
}

#fullscreen-overlay .module-scroll-hint-copy {
  flex: 1 1 12rem;
  text-align: center;
  min-width: 0;
  
}

#fullscreen-overlay .module-scroll-hint-text {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
  line-height: 1.25;
  pointer-events: none;
  display: none;
}

/* --- Stage 01 --- */

.content-stage-01 {
  opacity: 0;
}

.content-stage-01.active {
  opacity: 1;
}

/* --- Stage 02 --- */

.content-stage-02 {
  opacity: 0;
  /*transition: opacity 0.5s ease;*/
  
}

.content-stage-02.active {
  opacity: 1;
}

.content-stage-08 {
  opacity: 0;
}

.content-stage-08.active {
  opacity: 1;
}




  .button-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 2rem;
    /*max-width: 700px;*/
    max-width: 1200px;
  }
  
  .topic-button, .text-button {
    background-color: var(--purple-light);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--button-border-radius);
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
  }

  .center-right-ui .topic-button, 
  .center-right-ui .text-button {
    min-width: 350px;
  }

@media (max-width: 1280px) {
  .center-right-ui .topic-button, 
  .center-right-ui .text-button {
    min-width: 250px;
  }
}

  button {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  }

  
  .topic-button:hover, .text-button:hover {
    background-color: var(--white);
    color: var(--purple-light);
    /*transform: translateY(-2px);*/
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }

  /* Matches hover while the matching content stage is active (see syncWelcomeTopicButtonSelection in main.js). */
  .topic-button.topic-button--stage-active,
  .text-button.text-button--stage-active {
    background-color: var(--white);
    color: var(--purple-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  
  .topic-button:active, .text-button:active {
    transform: scale(0.9);
  }
  
  .close-session-button {
    /*position: absolute;
    bottom: 0rem;
    right: 0rem;*/
    z-index: 1000;
    pointer-events: auto;
    opacity: 0.0;
    transition: all 0.3s ease;
  }

  .close-session-button.active {
    opacity: 1.0;
    pointer-events: auto;
    transition: all 0.3s ease;
  }

.next-module-button {
    background-color: var(--black);
    /*position: absolute;
    bottom: 3rem;
    left: 3rem;*/
    z-index: 1000;
    pointer-events: auto;
    opacity: 0.0;
    transition: all 0.3s ease;
    animation: buttonBlink 2s ease-in-out infinite;
}


.next-module-button.active {
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
    animation: buttonBlink 2s ease-in-out infinite;
}

.next-module-button:hover {
    animation: none;
    background-color: white;
    color: var(--purple-dark);
}




/*.next-module-button:hover {
    background-color: var(--purple-dark);
    transform: translateY(-2px);
}

.next-module-button:active {
    transform: translateY(0);
}*/

/* --- Stage 03 --- */


.content-stage-03 {
    opacity: 0.0;
}

.content-stage-03.active {
  opacity: 1;
}
  
  
  
  

  /* Wrapper: edge fades live here so they stay fixed while .programs-overview scrolls. */
  .programs-overview-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
  }

  .programs-overview {
    display: flex;
    gap: 2rem;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
    cursor: grab;
    padding-bottom: 0.75rem;
    touch-action: pan-x;
  }

  /* Scroll hints: subtle edge fades when more content exists (classes on wrap; toggled in main.js). */
  .programs-overview-wrap::before,
  .programs-overview-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0.75rem;
    width: min(2.25rem, 7vw);
    max-width: 48px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
  }

  .programs-overview-wrap::before {
    left: 0;
    background: linear-gradient(
      to right,
      rgba(22, 18, 38, 0.56) 0%,
      rgba(22, 18, 38, 0.05) 52%,
      transparent 100%
    );
  }

  .programs-overview-wrap::after {
    right: 0;
    background: linear-gradient(
      to left,
      rgba(22, 18, 38, 0.56) 0%,
      rgba(22, 18, 38, 0.05) 52%,
      transparent 100%
    );
  }

  .programs-overview-wrap.programs-overview-wrap--edge-left::before {
    opacity: 1;
  }

  .programs-overview-wrap.programs-overview-wrap--edge-right::after {
    opacity: 1;
  }

  @media (prefers-reduced-motion: reduce) {
    .programs-overview-wrap::before,
    .programs-overview-wrap::after {
      transition: opacity 0.12s ease;
    }
  }

  .programs-overview:active,
  .programs-overview.programs-overview--dragging {
    cursor: grabbing;
    scroll-behavior: auto;
  }

  .programs-overview::-webkit-scrollbar {
    height: 6px;
    background: transparent;
  }

  .programs-overview::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
  }

  .programs-overview::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .program-card {
    background: #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.0;
    scale: 1.0;
    transform: scale(0.8);
    touch-action: pan-x;
}

.program-card.visible {
    opacity: 1.0;
    transform: scale(1.0);
    /*transition: transform 0.15s cubic-bezier(.59,1.46,.65,1);*/
    transition: transform 0.15s ease-out;
}

.program-card:hover {
    /*transform: translateY(-4px);*/
}

.program-card:active {
    transform: scale(0.98);
}

.program-card.intro {
    scale: 0.25;
    opacity: 0.0;
}

/* Make the button look integrated with the card */
.program-detail-btn {
    pointer-events: none; /* Let the parent card handle the click */
    /*opacity: 0.7;*/
}

.program-card:hover .program-detail-btn {
   /*opacity: 1;*/
    color: var(--purple-light);
}
  
  .program-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }
  
  .program-info {
    padding: 1.0rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.3rem;
    height: 100%;
  }
  
  .program-category {
    color: #8d4be4;
    font-weight: 500;
    font-size: 1rem;
  }
  
  .program-title {
    color: #2d1a4d;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
  }
  
  .program-detail-btn {
    background: none;
    border: none;
    color: var(--black);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    padding: 0;
    margin-top: auto;
    transition: color 0.2s;
  }
  
  .program-detail-btn:hover {
    color: #e31ee6;
  }

.program-content {
    display: block;
    position: absolute;
    /*display: none;*/
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 100%;
    /* Inactive panels stack later in DOM above earlier ones; opacity alone still captures hits. */
    pointer-events: none;
}

.program-content.active {
    opacity: 1;
    pointer-events: auto;
}

.program-content .program-video {
  pointer-events: none;
  
}

.program-video {
  width:100%;
  max-width:800px;
  display:block;
}
@media (max-height: 1000px) {
  .program-video {
    max-width: 550px !important;
  }
}

.program-content.active .program-video {
  pointer-events: auto;
}

.content-stage-04 {
    opacity: 0;
}

.content-stage-04.active {
    opacity: 1;
}









.content-stage-03 .close-btn,
.content-stage-05 .close-btn,
.content-stage-06 .close-btn,
.content-stage-08 .close-btn  {
  display: none;
}

/*
.content-stage-04 .program-content[style*="display: block"] {
    opacity: 1;
}*/

/*.content-stage-04 .close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  opacity: 1;
  pointer-events: auto;
}*/
/*.content-stage-04 .stage-header {
  max-width: 1200px;
  margin: 0 auto;
}
.content-stage-04 h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.content-stage-04 h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.content-stage-04 p {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}*/

/* Small Popups (Contact, Imprint, etc.) */
.small-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--purple-dark);
}

.small-popup .popup-content {
    position: relative;
    background-color: white;
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform-origin: center;
    pointer-events: auto;
    height: fit-content;
    top: 0px;
    min-height: 40%;
    display: flex;
    flex-direction: column;
}

/* Animation classes */
.small-popup.fade-in {
    animation: fadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.small-popup.fade-out {
    animation: fadeOut 0.2s ease-in-out;
}

.small-popup.fade-in .popup-content {
    animation: scaleIn 0.75s cubic-bezier(.27,1.67,.29,1);
}

.small-popup.fade-out .popup-content {
    animation: scaleOut 0.2s ease-in-out;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0;
    }
    to { 
        opacity: 1;
    }
}

@keyframes fadeOut {
    from { 
        opacity: 1;
    }
    to { 
        opacity: 0;
    }
}

@keyframes scaleIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scaleOut {
    from { 
        transform: scale(1);
        opacity: 1;
    }
    to { 
        transform: scale(0.8);
        opacity: 0;
    }
}

/* Popup Content Styles */

.small-popup .close-btn {
  background-color: var(--purple-dark);
  opacity: 1.0;
  pointer-events: auto;
  transition: all 0.3s ease;
  top: 1.5rem;
  right: 1.5rem;
}

.small-popup .close-btn:hover {
  background-color: var(--purple-light);
}

.small-popup .close-btn:before,
.small-popup .close-btn:after {
  background-color: var(--white);
}

.small-popup .close-btn:hover:before,
.small-popup .close-btn:hover:after {
  background-color: var(--white);
}



.small-popup .contact-title {
    color: var(--purple-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.small-popup .contact-subtitle {
    color: var(--purple-dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.small-popup .contact-subheading {
    color: var(--purple-dark);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.small-popup .contact-text {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.small-popup .contact-info {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.small-popup .contact-info p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.small-popup .contact-info a {
    color: var(--purple-dark);
    text-decoration: none;
}

.small-popup .contact-footer {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    font-size: 0.9rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

.imprint-popup .contact-footer {
    justify-content: flex-end;
}

.small-popup .contact-footer a {
    color: var(--text-color);
    text-decoration: none;
}

.small-popup .contact-footer .copyright {
    color: var(--text-color);
}

.small-popup .imprint-btn {
  transition: all 0.3s ease;
}

.small-popup .imprint-btn:hover {
  color: var(--purple-light);
}

.small-popup .popup-scroll-content {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 2rem;
}

.small-popup .popup-scroll-content p {
  margin-bottom: 1.1rem;
}

.small-popup .popup-scroll-content p {
  color: var(--text-color);
  line-height: 1.6;
}

.small-popup .popup-scroll-content h5 {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 2.0rem;
}

.small-popup .popup-scroll-content h3.accessibility-declaration-heading {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
  text-align: left;
  color: var(--purple-dark);
}

.small-popup .popup-scroll-content a {
  color: var(--purple-dark);
  text-decoration: underline;
}

.small-popup .popup-scroll-content::-webkit-scrollbar {
  width: 20px; /* Width of the scrollbar */
}

.small-popup .popup-scroll-content::-webkit-scrollbar-track {
  background: rgb(70 34 130 / 4%); /* Color of the track */
  border-radius: 5px;
}

.small-popup .popup-scroll-content::-webkit-scrollbar-thumb {
  background: rgba(70, 34, 130, 0.9); /* Color of the scrollbar thumb */
  border-radius: 5px; /* Roundness of the scrollbar thumb */
  transition: all 0.3s ease;
}

.small-popup .popup-scroll-content::-webkit-scrollbar-thumb:hover {
  background: rgba(97, 55, 166, 0.9); /* Color on hover */
}


.small-popup .popup-scroll-content {
  scrollbar-width: auto; /* "auto" or "thin" */
  scrollbar-color: rgba(70, 34, 130, 0.9) rgb(70 34 130 / 4%); /* thumb color track color */
}

/* Feedback questionnaire popup (layout aligned with accessibility / contact: title → scroll → footer) */
.feedback-popup__content {
    min-height: min(52vh, 520px);
    min-width: 0;
}

.feedback-popup__panels {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: min(44vh, 420px);
    min-width: 0;
}

/* Scroll only the question blocks / thanks body; titles stay fixed like .accessibility-popup */
.feedback-popup .feedback-panel--form > .popup-scroll-content,
.feedback-popup .feedback-panel--thanks > .popup-scroll-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.feedback-popup__subtitle {
    margin-top: 0;
    margin-bottom: 1rem;
}

.feedback-panel--form > .contact-title {
    flex-shrink: 0;
}

.feedback-panel--form > .contact-subtitle {
    flex-shrink: 0;
}

.feedback-question {
    margin-bottom: 1.5rem;
}

.feedback-question:last-child {
    margin-bottom: 0;
}

.feedback-question__label {
    color: var(--purple-dark);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 0.65rem 0;
}

.feedback-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feedback-option {
    appearance: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    padding: 0.55rem 0.85rem;
    border-radius: var(--button-border-radius, 4px);
    border: 2px solid var(--purple-dark);
    background: #fff;
    color: var(--purple-dark);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.feedback-option:hover {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

.feedback-option.is-selected,
.feedback-option[aria-pressed="true"] {
    background-color: var(--purple-dark);
    color: #fff;
    border-color: var(--purple-dark);
}

.feedback-option.is-selected:hover,
.feedback-option[aria-pressed="true"]:hover {
    background-color: var(--purple-light);
    border-color: var(--purple-light);
    color: #fff;
}

.feedback-complete-hint {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    display: none;
}

.feedback-complete-hint.is-visible {
    display: block;
}

.feedback-popup__form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.feedback-popup .feedback-popup__form-footer.contact-footer {
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
}

.feedback-popup .feedback-popup__form-footer .copyright {
    margin: 0;
    text-align: left;
}

.feedback-submit {
    align-self: flex-start;
    margin: 0;
    background-color: var(--purple-dark);
    color: #fff;
    padding: 0.65rem 1.35rem;
    border-radius: var(--button-border-radius, 4px);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.3s ease, opacity 0.25s ease;
}

.feedback-submit:hover:not(:disabled) {
    background-color: var(--purple-light);
}

.feedback-submit:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.feedback-panel--form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    opacity: 1;
    transition: opacity 0.28s ease;
}

.feedback-panel--thanks {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.38s ease, visibility 0.38s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.feedback-panel--thanks > .contact-title,
.feedback-panel--thanks > .contact-subtitle {
    flex-shrink: 0;
}

.feedback-popup--show-thanks .feedback-panel--thanks {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.feedback-popup--show-thanks .feedback-panel--form {
    opacity: 0;
    pointer-events: none;
}

.feedback-panel--thanks .contact-footer {
    flex-shrink: 0;
    justify-content: flex-end;
}

.feedback-thanks-body {
    margin-top: 0;
    margin-bottom: 0;
}


/* ----- Developer mode HUD ----- */
.dev-timer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(70, 34, 130, 0.9);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    z-index: 9999;
    min-width: 120px;
    display: none; /* Hidden by default */
    pointer-events: none;
}

.dev-timer.visible {
    display: block;
}

.dev-timer .timer-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dev-timer .timer-count {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.dev-timer .timer-stats {
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.dev-timer.warning .timer-count {
    color: #ff9900;
}

.dev-timer.danger .timer-count {
    color: #ff3300;
}

.dev-timer.paused {
    opacity: 0.5;
}

.dev-timer.paused .timer-count::after {
    content: ' (paused)';
    font-size: 12px;
    opacity: 0.8;
}

.dev-viewed-modules {
    position: fixed;
    bottom: 20px;
    /*left: 20px;*/
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(70, 34, 130, 0.9);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    z-index: 9999;
    min-width: 200px;
    max-width: 300px;
    display: none; /* Hidden by default */
    pointer-events: none;
}

.dev-viewed-modules.visible {
    display: block;
}



.ui-holder {
  opacity: 0;
}

.ui-holder.active {
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.upper-right-ui {
  position: absolute;
  top: 7rem;
  right: 3rem;
  
  pointer-events: none;
  transition: all 0.3s ease;
}


.center-right-ui {
  position: absolute;
  top: 17rem;
  right: 3rem;
  
  pointer-events: none !important;
  opacity: 0 !important;
  transition: all 1.0s ease;
}

.center-right-ui .button-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.center-right-ui .button-container button {
width: 100%;
}

.module-col--stages.module-col--stages--stage-3 .center-right-ui,
.module-col--stages.module-col--stages--stage-4 .center-right-ui,
.module-col--stages.module-col--stages--stage-5 .center-right-ui,
.module-col--stages.module-col--stages--stage-6 .center-right-ui,
.module-col--stages.module-col--stages--stage-8 .center-right-ui {
  opacity: 1 !important;
  pointer-events:auto !important;
  transition: all 0.3s ease;
}

/* Program detail opened from Die Antworten (stage 2): hide duplicate topic strip (see `program-detail-from-antworten` in main.js). */
#fullscreen-overlay.preview-module-video.program-detail-from-antworten .center-right-ui {
  opacity: 0 !important;
  pointer-events: none !important;
}


.center-right-ui.ui-holder.active {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 3rem; /* Preserving your original right spacing */
  margin-top: auto;
  margin-bottom: auto;
  height: fit-content;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min-content;
}



/* 1. The Container */
/*.popup-content-inner {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
}*/

/* 2. The Content Stage (Takes remaining width) */
/*.stage-holder {
  position: relative !important;
  flex: 1 1 auto !important;
  width: auto !important;
  left: auto !important;
  right: auto !important;
}*/

/* 3. The Right UI (Takes content width) */
/*.center-right-ui {
  position: relative !important;
  flex: 0 0 auto !important;
  width: auto !important;
  left: auto !important;
  right: auto !important;
  margin-left: auto !important; 
  padding-right: 3rem !important; 
}*/

/*.stage-holder.active {
  width: calc(100% - 261.5px) !important;
  left: 0 !important;
  right: auto !important;
}*/


.speechbubble-icon {
  width: 130px;
  height: 130px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.speechbubble-icon:active {
  transform: scale(0.9);
}



.speechbubble-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.upper-left-ui {
    position: absolute;
    top: 7rem;
    left: 3rem;
    
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Module title chip: after subtitle → Antworten for program tiles; for empty data-programs use .module-preview-no-program-cards and show the chip on stage 2 only (not Willkommen), including .antworten-entering and .content-stage--animating-in. */
#fullscreen-overlay.preview-module-video .upper-left-ui .module-title-container {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.active) .upper-left-ui .module-title-container,
#fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .upper-left-ui .module-title-container,
#fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.content-stage--animating-in) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.active .program-card.active) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.antworten-entering .program-card.active) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.active) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-04 .program-content.active) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.active) .upper-left-ui .module-title-container,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.content-stage--animating-in) .upper-left-ui .module-title-container {
    visibility: visible;
    opacity: 1;
}

.upper-left-ui .module_title {
  color: var(--white);
  font-size: 1.0rem;
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.3;
}

/* Antworten (stage 2): reclaim top inset when the module title chip is hidden */
#fullscreen-overlay.preview-module-video .stage-holder.content-stage-02 {
    padding-top: clamp(5rem, 11vh, 7rem);
}

#fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.active .program-card.active) .stage-holder.content-stage-02,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.antworten-entering .program-card.active) .stage-holder.content-stage-02,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.active) .stage-holder.content-stage-02,
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .stage-holder.content-stage-02,
#fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.active) .stage-holder.content-stage-02,
#fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .stage-holder.content-stage-02,
#fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.content-stage--animating-in) .stage-holder.content-stage-02 {
    padding-top: 10rem;
}

/* While returning from program detail, `program-detail-from-antworten` stays set until the fade-in completes, but `.active` on stage 2 is added only in completeContentTransition (after GSAP). Without this, stage 2 keeps the tight clamp() padding during the fly-in and then jumps to 10rem. */
#fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten .stage-holder.content-stage-02 {
    padding-top: 10rem;
}

/* Program detail / Nachwuchsförderung opened from Die Antworten: same top inset as module title row (see `program-detail-from-antworten` in main.js). */
#fullscreen-overlay.preview-module-video.program-detail-from-antworten .stage-holder.content-stage-04,
#fullscreen-overlay.preview-module-video.program-detail-from-antworten .stage-holder.content-stage-07 {
    padding-top: 10rem;
}

.lower-right-ui {

  pointer-events: none;
  transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 3rem;
    right: 3rem;
    gap: 1.5rem;
    align-items:center;
}

.lower-left-ui {

  pointer-events: none;
  transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    gap: 1.5rem;
    align-items: flex-start;
}

.viewed-modules-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.viewed-modules-title {
    font-size: 0.6rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.viewed-modules-list {
    font-size: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.viewed-module-item {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.viewed-module-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.viewed-module-number {
    color: var(--purple-light);
    min-width: 30px;
}

.viewed-module-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visited-modules-container {
    /*position: absolute;
    bottom: 3rem;
    left: 3rem;*/
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    gap: 0.1rem;
    display: flex;
    flex-direction: column;
    font-weight: 600;
    display: none !important;
}

.visited-modules-container.active {
    opacity: 1;
}

.visited-modules-container h2 {
    color: var(--white);
    font-size: 1.0rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: none;
    line-height: 1.3;
}

.visited-modules-container .visited-modules-list {
  display: flex;
  flex-direction: row;
  gap:0.25rem;
  margin-bottom: 1rem;
}

.visited-modules-container .module-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    /*max-width: 1000px;*/
    
}

.visited-modules-container .module-number {
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--white);
    /*clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);*/
    transition: transform 0.3s ease;
    position: relative;
    z-index: 20;
}

.visited-modules-container .module-number::before, .grid-item .module-number::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;

  position: absolute;
  top: 0;
  left: 0;

  z-index: 10;
}

.visited-modules-container .module-number::before, .grid-item .module-number::before {
  background-color: var(--black);
}

.visited-modules-container .module-number[data-category="category_secure_society"]::before, .grid-item .module-number[data-category="category_secure_society"]::before {
    background-color: var(--category-blue-light);
    border-radius: 6px;
    /*clip-path: polygon(50% 0%, 0% 100%, 100% 100%);*/
}

.visited-modules-container .module-number[data-category="category_secure_systems"]::before, .grid-item .module-number[data-category="category_secure_systems"]::before {
    background-color: var(--category-purple);
    border-radius: 6px;
    /*clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);*/
}

.visited-modules-container .module-number[data-category="category_key_technologies"]::before,.grid-item .module-number[data-category="category_key_technologies"]::before {
    background-color: var(--category-pink);
    border-radius: 6px;
    /*clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);*/
}

.visited-modules-container .module-number[data-category="category_trusted_supply_chains"]::before,
.grid-item .module-number[data-category="category_trusted_supply_chains"]::before {
    background-color: var(--category-grey-dark);
    border-radius: 6px;
}

.visited-modules-container .module-number-text, .grid-item .module-number-text {
  position: relative;
  z-index: 20;
}

.visited-modules-container .visited-modules-list .category_secure_society {
  color: var(--category-pink);
}

.visited-modules-container .visited-modules-list .category_secure_systems {
  color: var(--category-grey);
}

.visited-modules-container .visited-modules-list .category_key_technologies {
  color: var(--category-blue-light);
  
}

.visited-modules-container .visited-modules-list .category_trusted_supply_chains {
  color: #9e9e9e;
}



.grid-item .module-number {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--white);
  transition: transform 0.3s ease, opacity 0.4s ease;
  opacity: 0;
  z-index: 5;
}

.grid-item.touched .module-number {
    opacity: 1;
}

/* While a category filter is active: show badges on matching (non-dimmed) tiles */
.grid-container.grid-container--filter-active .grid-item:not(.grid-item--filter-dimmed) .module-number {
    opacity: 1;
}

/*.grid-item .module-number[data-category="category_secure_society"] {
  background-color: var(--category-pink);
}

.grid-item .module-number[data-category="category_secure_systems"] {
  background-color: var(--category-purple);
}

.grid-item .module-number[data-category="category_key_technologies"] {
  background-color: var(--category-blue-light);
}

.grid-item .module-number .module-number-text {
  transform: translateY(-1px);
}
*/
.grid-item.viewed .module-number {
    opacity: 1;
}

/* Let's Talk Popup Specific Styles */
.lets-talk-popup {
    position: fixed;
    top: 7rem;
    right: 3rem;
    width: 400px;
    z-index: 1000;
    transform: translateX(140%);
    transition: transform 0.3s ease-in;
}

.lets-talk-popup.active {
    transform: translateX(0);
    transition: transform 0.5s cubic-bezier(.23,.83,.39,.99);
}

.lets-talk-popup .info-popup-content {
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 0px;
    padding: 22px;
    position: relative;
}

.lets-talk-popup .info-popup-title {
    color: var(--purple-dark);
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 600;
}

.lets-talk-popup .info-popup-text {
    color: var(--purple-dark);
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 60px;
}

.lets-talk-popup .ok-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: var(--purple-dark);
    color: white;
    padding: 10px 20px;
    border-radius: var(--button-border-radius);
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.lets-talk-popup .ok-button:hover {
    background-color: var(--purple-light);
}







/* ----- Responsive breakpoints ----- */

/* Landscape: constrain grid to viewport */
@media (orientation: landscape) {
  body {
      justify-content: center;
  }
  .grid-container {
      flex-grow: 0;
      /*width: calc((100vh - 11rem) * (16 / 9));*/
      width: calc((100vw));
      height: calc(100dvh);
      max-width: calc(100vw);
      /*grid-template-columns: repeat(8, 1fr);
      grid-auto-rows: minmax(50px, 1fr);*/
  }
}

/* Tablet: hide visited-modules in short viewports */
@media (max-height: 1024px) {

  .lower-left-ui .visited-modules-container {
    display: none;
  }

}

@media (max-width: 1280px) {
  :root {
    --standard-padding: 1.5rem;
  }

  .header {
    padding: 0.5rem var(--standard-padding);
  }

  .interface-bottom-left {
    left: var(--standard-padding);
  }

  .navigation {
    display: flex;
    align-items: center;
    gap: 0.85rem;
  }

  .dropdown-menu {
    right: 0;
  }

  .upper-right-ui {
    right: var(--standard-padding);
    display: none;
  }

  .close-btn {
    right: var(--standard-padding);
  }

  .stage-holder {
    /*padding: 7rem var(--standard-padding) var(--standard-padding) var(--standard-padding);*/
  }

  .upper-left-ui {
    /*top: var(--standard-padding);
    left: var(--standard-padding);*/
    padding-right: var(--standard-padding);
  }

  .lower-left-ui {
    left: var(--standard-padding);
    padding-right: var(--standard-padding);
  }

  .lower-right-ui {
    right: var(--standard-padding);
  }

  /*video.program-video.imagefilm-video {
    
    max-width:800px;
  }*/

  .stage-header {
    max-width: auto;
    padding-right: 2.5rem;
  }

  .stage-content {
    max-width: auto;
    /*max-height: calc(100dvh - 32rem);*/
    padding-right: var(--standard-padding);
  }

  .stage-content.thinner {
    /*max-height: calc(100dvh - 32rem);*/
  }

  .stage-holder.content-stage-01 .stage-content,
  .stage-holder.content-stage-02 .stage-content {
    /*max-height: calc(100dvh - 32rem);*/
  }

  .preview-stage-01 .popup-title-01,
  .preview-stage-01 .popup-title-02 {
    /*bottom: var(--standard-padding);
    left: var(--standard-padding);*/
  }


  .antworten-holder,
  .willkommen-holder {
    width: auto;
    min-width: auto;
  }

  .programs-overview .program-card {
    flex-shrink: 0 !important;
    width: 220px;
  }

  .program-title {
    font-size: 0.8rem;
    margin-bottom: 0;
  }

  .stage-holder h2 {
    font-size: 1.2rem;
  }

  .stage-holder h3 {
    font-size: 1.1rem;
  }

  .stage-holder p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }


  .antworten-holder h2,
  .willkommen-holder h2 {
    font-size: 2rem !important;
    margin-bottom: 1rem;
    margin-left: -0.15rem;
  }

  .antworten-holder h3,
  .willkommen-holder h3 {
    font-size: 1.2rem !important;
  }

  .antworten-holder p,
  .willkommen-holder p,
  .stage-content p {
    font-size: 0.85rem;
  }

  .program-content h2 {
    margin-top: 0.5rem;
    font-size: 2rem !important;
    text-transform: none !important;
  }

  .topic-button,
  .text-button {
    font-size: 1.1rem;
  }

  .program-card img {
    height: auto;
  }

  .program-detail-btn {
    display: none;
  }
}

/* Mobile (≤767px): horizontal module strip, stacked stages */
@media (max-width: 767px) {

  

  :root {
    --standard-padding: 1rem;
    /* .header is fixed above #fullscreen-overlay (1000 vs 900); keep module content below bar */
    --fullscreen-fixed-header-clearance: calc(env(safe-area-inset-top, 0px) + clamp(3.5rem, 10vw, 4.25rem) + var(--standard-padding));
  }
  
header .logo img {

    max-width: 140px;

}

.navigation {
  gap: 0.35rem;
}
.navigation > *{
scale: 0.8;
}

#fullscreen-overlay.fullscreen-overlay--snap-video .interface-bottom-left.visible,
#fullscreen-overlay.fullscreen-overlay--snap-content-solo .interface-bottom-left.visible {
  opacity: 0;
  visibility: hidden;
}


  #fullscreen-overlay.fullscreen-overlay--sheet {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
  }

  #fullscreen-overlay .popup-content {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    align-self: stretch;
  }

  #fullscreen-overlay .module-scroll-hints {
    max-width: 100%;
    width: 100%;
  }

  .module-sheet {
    flex-direction: row;
  }

  #fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll {
    max-width: none;
    flex: 1 1 0%;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    width: 100%;
    /* One scrollport-wide column each: grid lead | video | stages */
    --module-video-w: 100cqw;
  }

  #module-inner-x-scroll,
  #fullscreen-overlay #module-inner-x-scroll > .grid-container,
  #fullscreen-overlay #module-inner-x-scroll > .module-strip-snap-anchor {
    outline: none !important;
  }

  @supports (height: 1cqh) {
    #fullscreen-overlay .module-sheet #module-inner-x-scroll.module-inner-x-scroll {
      --module-video-w: 100cqw;
    }
  }

  /* Full scrollport: video column (no 9:16 pillar) */
  #fullscreen-overlay .module-col.module-col--video {
    box-shadow: none;
  }

  #fullscreen-overlay .module-col--video {
    flex: 0 0 100cqw;
    width: 100cqw;
    min-width: 100cqw;
    max-width: 100cqw;
    aspect-ratio: unset;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
  }

  /* Full scrollport: vertical scroll on the whole stages column */
  #fullscreen-overlay .module-col--stages {
    flex: 0 0 100cqw;
    width: 100cqw;
    min-width: 100cqw;
    max-width: 100cqw;
    min-height: 100%;
    height: 100%;
    align-self: stretch;
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    scroll-snap-stop: always;
    scroll-margin: 0;
    scroll-margin-inline: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-x pan-y;
  }

  /* Chevron hint overlays the column without adding scroll height */
  #fullscreen-overlay .module-col--stages > .chevron-container-02 {
    position: absolute;
    left: 0;
    top: 50%;
    height: auto;
    width: max-content;
    transform: translateY(-50%) translateX(-80%);
    transform-origin: left center;
    z-index: 6;
    pointer-events: none;
  }

  /* FAB: scroll `.module-col--stages` (mobile vertical scrollport) back to top after ~72px scroll */
  #fullscreen-overlay.active.preview-module-video .module-stages-scroll-top-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    right: max(var(--standard-padding), env(safe-area-inset-right, 0px));
    width: 46px;
    height: 46px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: var(--white);
    color: var(--purple-dark);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
    cursor: pointer;
    z-index: 940;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #fullscreen-overlay.active.preview-module-video .module-stages-scroll-top-btn.module-stages-scroll-top-btn--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #fullscreen-overlay.active.preview-module-video .module-stages-scroll-top-btn:active {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  }

  #fullscreen-overlay.active.preview-module-video .module-stages-scroll-top-btn:focus-visible {
    outline: 2px solid var(--purple-light);
    outline-offset: 3px;
  }

  .module-stages-scroll-top-btn__icon {
    display: block;
    margin-top: -3px;
  }

  /* Stack topic strip + active stage in normal flow so one vertical scroll fits all */
  #fullscreen-overlay .module-col--stages .popup-content-inner {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    flex: 0 0 auto;
    min-height: 100%;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    display: flex;
    flex-direction: column;
    touch-action: pan-y;
    z-index: 1;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url("../images/bg-antwort-sceen.jpg") no-repeat center center;
    background-size: cover;
  }

  /* Topic strip + stage: clear fixed .header + safe-area + site gutter */
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-3 .popup-content-inner,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-4 .popup-content-inner,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-5 .popup-content-inner,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-6 .popup-content-inner,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-7 .popup-content-inner,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-8 .popup-content-inner {
    padding-top: var(--fullscreen-fixed-header-clearance);
    gap: var(--standard-padding);
    row-gap: var(--standard-padding);
  }

  /* Stage 2 + in-flow module chip: no topic-strip row on inner — pad column so chip/ui clears fixed .header (same token as 3–8). */
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.active .program-card.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.antworten-entering .program-card.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.content-stage--animating-in) .module-col--stages.module-col--stages--stage-2 .popup-content-inner {
    padding-top: var(--fullscreen-fixed-header-clearance);
  }

  /* Program detail or youth detail close → Antworten: —stage-2 applies immediately but .content-stage-02.active / antworten-entering are not set until fade-in ends — avoid inner losing clearance while detail flags + stage still match. */
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-04 .program-content.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.content-stage--animating-in) .module-col--stages.module-col--stages--stage-2 .popup-content-inner {
    padding-top: var(--fullscreen-fixed-header-clearance);
  }

  /* Welcome / Antworten: full top inset (no in-flow topic strip) — same gutters as 1280px rules */
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-1 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-1 .popup-content-inner > .stage-holder.content-stage--animating-in,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage--animating-in {
    padding: clamp(4.25rem, 11vw, 5.75rem) var(--standard-padding) 2.5rem !important;
  }

  /* Stages with topic strip: strip carries top air; stage block uses gutters only (no 6.5rem stack) */
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-3 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-3 .popup-content-inner > .stage-holder.content-stage--animating-in,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-4 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-4 .popup-content-inner > .stage-holder.content-stage--animating-in,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-5 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-5 .popup-content-inner > .stage-holder.content-stage--animating-in,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-6 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-6 .popup-content-inner > .stage-holder.content-stage--animating-in,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-7 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-7 .popup-content-inner > .stage-holder.content-stage--animating-in,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-8 .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-8 .popup-content-inner > .stage-holder.content-stage--animating-in {
    padding: 0 var(--standard-padding) 2.5rem !important;
  }

  #fullscreen-overlay .module-col--stages .popup-content-inner > .stage-bg-holder {
    display: none !important;
  }

  #fullscreen-overlay .module-col--stages .popup-content-inner > .stage-holder:not(.active):not(.content-stage--animating-in) {
    display: none !important;
  }

  #fullscreen-overlay .module-col--stages .popup-content-inner > .stage-holder.active,
  #fullscreen-overlay .module-col--stages .popup-content-inner > .stage-holder.content-stage--animating-in {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    flex: 0 0 auto !important;
    box-sizing: border-box;
  }

  #fullscreen-overlay .module-col--stages .stage-holder.content-stage-03,
  #fullscreen-overlay .module-col--stages .stage-holder.imagefilm-holder {
    width: 100% !important;
  }

  /* Stages 1–2: strip stays off-layout (opacity/pointer-events from global rules); do not use display:none — it could stick via cascade while —stage-3+ is active. */

  /* Topic strip only for explicit stages 3–8 (matches desktop; avoids flash when no —stage-N class) */
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-3 .center-right-ui,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-4 .center-right-ui,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-5 .center-right-ui,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-6 .center-right-ui,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-8 .center-right-ui {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    order: -1;
    z-index: 2;
    flex-shrink: 0;
    padding: 0 var(--standard-padding);
    margin: 0 !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.65rem;
  }

  #fullscreen-overlay .module-col--stages.module-col--stages--stage-3 .center-right-ui.ui-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-4 .center-right-ui.ui-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-5 .center-right-ui.ui-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-6 .center-right-ui.ui-holder.active,
  #fullscreen-overlay .module-col--stages.module-col--stages--stage-8 .center-right-ui.ui-holder.active {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    justify-content: flex-start;
    align-items: stretch;
  }

  #fullscreen-overlay.preview-module-video.program-detail-from-antworten .module-col--stages .center-right-ui {
    display: none !important;
  }

  /* Module title chip: desktop uses absolute top + stage padding; mobile flex column needs chip in-flow or it overlaps Antworten (stage-2 padding !important also overwrote the 10rem inset). */
  #fullscreen-overlay .module-col--stages .popup-content-inner > .upper-left-ui {
    display: none;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    max-width: 100%;
    padding: 0 var(--standard-padding);
    margin: 0 0 var(--standard-padding);
    box-sizing: border-box;
    flex-shrink: 0;
    order: -11;
    pointer-events: none;
    z-index: 4;
    align-self: stretch;
  }

  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.active .program-card.active) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.antworten-entering .program-card.active) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.active) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.content-stage--animating-in) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.active) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-04 .program-content.active) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.active) .module-col--stages .popup-content-inner > .upper-left-ui,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.content-stage--animating-in) .module-col--stages .popup-content-inner > .upper-left-ui {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
  }

  #fullscreen-overlay .module-col--stages .upper-left-ui .module_title {
    max-width: 100%;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  /* Chip sits above stage — remove legacy absolute-layout top pad */
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.active .program-card.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.antworten-entering .program-card.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle:has(.content-stage-02.antworten-entering .program-card.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.content-stage--animating-in,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.content-stage--animating-in,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.active) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.content-stage--animating-in) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.active,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.antworten-entering) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.content-stage--animating-in,
  #fullscreen-overlay.active.preview-module-video.module-preview-no-program-cards:has(.content-stage-02.content-stage--animating-in) .module-col--stages.module-col--stages--stage-2 .popup-content-inner > .stage-holder.content-stage-02.content-stage--animating-in {
    padding-top: var(--standard-padding) !important;
  }

  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-04 .program-content.active) .module-col--stages .popup-content-inner > .stage-holder.content-stage-04.active,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.active) .module-col--stages .popup-content-inner > .stage-holder.content-stage-07.active,
  #fullscreen-overlay.preview-module-video.antworten-from-subtitle.program-detail-from-antworten:has(.content-stage-07.content-stage--animating-in) .module-col--stages .popup-content-inner > .stage-holder.content-stage-07.content-stage--animating-in {
    padding-top: var(--standard-padding) !important;
  }

  #fullscreen-overlay .module-col--stages .center-right-ui .button-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    gap: 0.65rem 0.75rem;
    margin-top: 0;
    margin-bottom: 0;
  }

  #fullscreen-overlay .module-col--stages .center-right-ui .button-container button,
  #fullscreen-overlay .module-col--stages .center-right-ui .topic-button {
    min-width: 0 !important;
    flex: 1 1 12rem;
    max-width: 100%;
    width: auto;
  }

  #fullscreen-overlay .module-col--stages .program-content:not(.active) {
    display: none !important;
  }

  #fullscreen-overlay .module-col--stages .program-content.active {
    position: relative !important;
    height: auto !important;
    width: 100% !important;
  }

  #fullscreen-overlay .module-col--stages .stage-holder.active .stage-header,
  #fullscreen-overlay .module-col--stages .stage-holder.content-stage--animating-in .stage-header {
    flex: 0 0 auto !important;
  }

  #fullscreen-overlay .module-col--stages .stage-holder.active .stage-content,
  #fullscreen-overlay .module-col--stages .stage-holder.content-stage--animating-in .stage-content {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    min-height: auto !important;
    height: auto !important;
  }

  #fullscreen-overlay .module-col--stages .stage-holder.active .button-container,
  #fullscreen-overlay .module-col--stages .stage-holder.content-stage--animating-in .button-container {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
  }

  #fullscreen-overlay .module-col--stages .stage-holder.active .interface-element,
  #fullscreen-overlay .module-col--stages .stage-holder.content-stage--animating-in .interface-element {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #fullscreen-overlay .module-col--stages .stage-content {
    max-height: none !important;
    overflow-y: visible !important;
  }

  #fullscreen-overlay .module-col--stages .programs-overview-wrap {
    overflow-y: visible !important;
    flex: 0 1 auto !important;
    min-height: 0 !important;
  }

  .close-btn {
    top: 6.2rem;
  }

  /* Program detail: absolute top was measured vs full holder; in-flow .program-content + column scroll made the X sit mid-body — pin to viewport below fixed .header */
  #fullscreen-overlay.active .module-col--stages .content-stage-04.active > .close-btn,
  #fullscreen-overlay.active .module-col--stages .content-stage-04.content-stage--animating-in > .close-btn,
  #fullscreen-overlay.active .module-col--stages .content-stage-07.active > .close-btn,
  #fullscreen-overlay.active .module-col--stages .content-stage-07.content-stage--animating-in > .close-btn {
    position: fixed;
    top: var(--fullscreen-fixed-header-clearance);
    right: max(var(--standard-padding), env(safe-area-inset-right, 0px));
    left: auto;
    margin: 0;
    z-index: 950;
  }

  #fullscreen-overlay.active .module-col--stages .content-stage-04.active .program-content.active .stage-header {
    padding-right: calc(var(--standard-padding) + 3rem);
  }

  #fullscreen-overlay.active .module-col--stages .content-stage-07.active .stage-header {
    padding-right: calc(var(--standard-padding) + 3rem);
  }

  .stage-content {
    max-width: auto;
    /*max-height: calc(100dvh - 23rem);*/
    padding-right: var(--standard-padding);  
  }
  
  .stage-content.thinner {
    /*max-height: calc(100dvh - 23rem);*/
  }
  
  .stage-holder.content-stage-01 .stage-content,
  .stage-holder.content-stage-02 .stage-content {
    /*max-height: calc(100dvh - 23rem);*/
  }



  .stage-holder h2 {
    font-size: 1.2rem;
  }

  .stage-holder h3 {
    font-size: 1.1rem;
  }

  .stage-holder p {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .antworten-holder h2,
  .willkommen-holder h2 {
    font-size: 1.3rem !important;
    margin-bottom: 1rem;
    margin-left: -0.15rem;
  }

  .antworten-holder h3,
  .willkommen-holder h3 {
    font-size: 1.1rem !important;
  }

  .antworten-holder p,
  .willkommen-holder p,
  .stage-content p {
    font-size: 0.9rem;
  }

  .program-content h2 {
    margin-top: 0.5rem;
    font-size: 1.3rem !important;
    text-transform: none !important;
  }

  .topic-button,
  .text-button {
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
  }

  .program-info {
    padding: 0.75rem;
  }

  .program-title {
    font-size: 0.7rem;
    margin-bottom: 0;
  }

  .button-container {
    gap: 1rem;
    margin-top: 1rem;
  }

  .lower-left-ui .visited-modules-container {
    display: none;
  }

  .content-stage-03.stage-holder {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .stage-header {
    flex-shrink: 0 !important;
  }

  .programs-overview {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    gap: 1rem !important;
    width: 100% !important;
    height: auto !important;
    flex: 0 0 auto !important;
    padding-bottom: 1rem;
    padding-right: 0;
  }

  .programs-overview .program-card {
    flex-shrink: 0 !important;
    width: 180px !important;
    min-height: unset !important;
  }
}


.module-col.module-col--video {
  /* Forces the element to take up the full height of the flex container */
  height: 100% !important;
}

/* Ensure the video container and video itself fill the new space */
.module-col.module-col--video .video-container {
  height: 100%;
  width: 100%;
}

.module-col.module-col--video video {
  object-fit: cover; /* This prevents black edges by filling the area */
  height: 100%;
  width: 100%;
}

@media (max-width: 1024px) and (orientation: portrait) {
  .module-col.module-col--video {
    height: 100%;
  }
}

.grid-item-content {
  font-size: clamp(0.6rem, 1.2vw, 0.85rem) !important;
}

/* ----- Feature assistant (grid welcome + reusable hint dialog) ----- */
/* Anchor is inside .grid-container (CSS grid). Full-area layer; icon sits slightly up-right of grid center (offset on .feature-hint-offset so GSAP can own the button transform). */
.grid-container > .feature-hint-anchor {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  pointer-events: none;
}

/* Nudge from geometric center toward top-right (viewport-relative feel uses clamp for different grid sizes). */
.feature-hint-offset {
  transform: translate(clamp(0.65rem, 33.2vw, 33.5rem), clamp(-19.75rem, -22.5vh, -2.85rem));
  pointer-events: none;
}

.feature-hint-anchor:not(.feature-hint-anchor--suppressed) .feature-hint-trigger {
  pointer-events: auto;
}

.feature-hint-anchor--suppressed {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.feature-hint-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(3rem, 5.5vw, 4.25rem);
  height: clamp(3rem, 5.5vw, 4.25rem);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.feature-hint-trigger img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes feature-hint-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.92;
  }
}

.feature-hint-trigger__pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  animation: feature-hint-pulse 2.5s ease-in-out infinite;
}

.feature-hint-anchor--suppressed .feature-hint-trigger__pulse {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .feature-hint-trigger__pulse {
    animation: none;
  }
}

.feature-assistant-dialog-root[hidden] {
  display: none !important;
}

.feature-assistant-dialog-root:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  background: transparent;
}

.feature-assistant-dialog-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.feature-assistant-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 30rem;
  padding: 3rem;
  box-sizing: border-box;
  background: #fff;
  border-radius: 4px;
  color: var(--purple-dark);
  font-family: inherit;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.feature-assistant-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.feature-assistant-dialog__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--purple-dark);
}

.feature-assistant-dialog__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--purple-dark);
}

.feature-assistant-dialog__body {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--purple-dark);
}

.feature-assistant-dialog__close {
  transform: translate(1rem, -1rem);
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--purple-dark);
  cursor: pointer;
  position: relative;
}

.feature-assistant-dialog__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.feature-assistant-dialog__close-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translate(-50%, -50%);
}

.feature-assistant-dialog__close-icon::before,
.feature-assistant-dialog__close-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.feature-assistant-dialog__close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.feature-assistant-dialog__close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 767px) {
  .feature-hint-offset {
    transform: translate(clamp(0.5rem, 25vw, 15rem), clamp(-25rem, -25vh, -0.65rem));
  }
}

/* ----- Glossary (inline terms + shared popover) ----- */
button.glossary-term {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.12em;
  vertical-align: baseline;
}

button.glossary-term:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 2px;
}

#glossary-popover.glossary-popover {
  position: fixed;
  inset: auto;
  max-width: min(22rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: var(--purple-dark);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  font-size: 0.875rem;
  line-height: 1.45;
  font-family: 'Noto Sans', sans-serif;
  z-index: 10060;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

#glossary-popover.glossary-popover:popover-open,
#glossary-popover.glossary-popover.glossary-popover--open {
  opacity: 1;
  pointer-events: auto;
}

.glossary-popover__inner {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  #glossary-popover.glossary-popover {
    transition: none;
  }
}