/* younity Live: Schrift, Grundlagen, Buttons und Einblendungen.
   Alle Farben, Radien und Schriftstile kommen aus dem Event-Theme (CSS-Variablen, siehe shared/theme.js).
   Die Seite setzt sie als <style id="theme"> in den Kopf, die Regie für ihre Vorschau auf .ev-theme. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url(/static/fonts/dm-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url(/static/fonts/dm-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent-hi);
}

[hidden] {
  display: none !important;
}

.i {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.15em;
}

:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons (alles Klickbare ist eine Pille) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0 1.4em;
  border: 0;
  border-radius: 999px;
  font-weight: var(--btn-weight);
  font-size: var(--btn-size);
  letter-spacing: var(--btn-track);
  text-transform: var(--btn-case);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease), background-color 0.25s var(--ease);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-gold,
.btn-cta {
  color: var(--on-accent);
  background: var(--accent-fill);
  background-size: 160% 100%;
  box-shadow: 0 10px 24px -10px var(--accent-55);
}
.btn-gold:hover,
.btn-cta:hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 28px -12px var(--accent-55);
}
.btn-ghost {
  color: var(--text);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover {
  background: var(--tint-2);
}
.btn-sm {
  min-height: 38px;
  padding: 0 1.1em;
  font-size: calc(var(--btn-size) * 0.88);
}

/* ---------- Countdown-Chip ---------- */

.cd {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-hi);
}
.cd.cd-hot {
  color: var(--hot-text);
}
.cd.cd-hot .i {
  animation: cd-pulse 1s ease-in-out infinite;
}
@keyframes cd-pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---------- Einblendungen (gemeinsam) ----------
   Drei Farbvarianten aus dem Theme: accent (Hauptfarbe), hot (Highlight), calm (ruhig). */

.ov {
  --ov-glow: var(--accent-28);
  position: relative;
  color: var(--text);
}
.ov.theme-hot {
  --ov-glow: var(--hot-35);
}
.ov.theme-calm {
  --ov-glow: var(--glow-55);
}

.ov-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 0.28em 0.75em;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: var(--label-weight);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent-fill);
}
.theme-hot .ov-badge {
  color: var(--on-hot);
  background: var(--hot-fill);
}
.theme-calm .ov-badge {
  color: var(--night-text);
  background: var(--tint-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ov-title {
  display: block;
  font-weight: var(--strong-weight);
  line-height: 1.15;
  letter-spacing: var(--head-track);
}
.ov-text {
  margin: 0;
  color: var(--text-2);
  line-height: 1.45;
}
.ov-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.ov-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ov-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: var(--veil-55);
  cursor: pointer;
}
.ov-close:hover {
  background: var(--veil-85);
}
.ov .btn-cta {
  align-self: stretch;
  margin-top: 0.25rem;
}
.theme-hot .btn-cta {
  color: var(--on-hot);
  background: var(--hot-fill);
  background-size: 160% 100%;
  box-shadow: 0 10px 24px -10px var(--hot-55);
}

/* Karte (Slot "side" und "player") */
.ov-side,
.ov-player {
  overflow: hidden;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--card-a), var(--card-b));
  box-shadow: 0 0 0 1px var(--line), var(--shadow), 0 0 60px -10px var(--ov-glow);
}
.ov-side .ov-img {
  aspect-ratio: 21 / 9;
}
.ov-side .ov-body {
  padding: 16px 18px 18px;
}
.ov-side .ov-title {
  font-size: 1.15rem;
}
.ov-side .ov-text {
  font-size: 0.92rem;
}

.ov-player {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
}
.ov-player .ov-img {
  width: 108px;
}
.ov-player .ov-body {
  padding: 14px 40px 14px 16px;
  gap: 0.4rem;
}
.ov-player .ov-title {
  font-size: 1.02rem;
}
.ov-player .ov-text {
  font-size: 0.84rem;
}
.ov-player .btn-cta {
  min-height: 38px;
  font-size: calc(var(--btn-size) * 0.84);
  align-self: flex-start;
}
.ov-player:not(:has(.ov-img)) {
  grid-template-columns: 1fr;
}

/* Leiste (Slot "bar") */
.ov-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 6px 48px 6px 16px;
  color: var(--on-hot);
  background: var(--bar-hot);
  box-shadow: inset 0 -1px 0 var(--line-2);
}
.ov-bar.theme-hot .ov-badge {
  color: var(--hot);
  background: var(--on-hot);
}
.ov-bar.theme-hot .btn-cta {
  color: var(--hot);
  background: var(--on-hot);
  box-shadow: none;
}
.ov-bar.theme-hot .cd,
.ov-bar.theme-hot .cd.cd-hot {
  color: inherit;
}
.ov-bar.theme-accent {
  color: var(--on-accent);
  background: var(--accent-fill);
}
.ov-bar.theme-accent .ov-text,
.ov-bar.theme-accent .cd {
  color: var(--on-accent);
}
.ov-bar.theme-accent .ov-badge,
.ov-bar.theme-accent .btn-cta {
  color: var(--accent);
  background: var(--on-accent);
  box-shadow: none;
}
.ov-bar.theme-calm {
  color: #fff;
  background: var(--bar-calm);
}
.ov-bar.theme-calm .cd {
  color: inherit;
}
.ov-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  font-size: 0.92rem;
}
.ov-bar .ov-title {
  font-size: 0.95rem;
}
.ov-bar .ov-text {
  color: inherit;
  opacity: 0.9;
}
.ov-bar .btn-cta {
  align-self: center;
  min-height: 32px;
  margin: 0;
  padding: 0 1em;
  font-size: calc(var(--btn-size) * 0.8);
}
.ov-bar .ov-close {
  top: 50%;
  transform: translateY(-50%);
  color: inherit;
  background: rgba(0, 0, 0, 0.16);
}
.ov-bar .ov-badge {
  align-self: center;
}

@media (max-width: 600px) {
  .ov-bar {
    min-height: 40px;
    padding: 5px 40px 5px 12px;
  }
  .ov-bar-inner {
    flex-wrap: nowrap;
    gap: 8px;
    font-size: 0.8rem;
    min-width: 0;
  }
  .ov-bar .ov-text,
  .ov-bar .ov-badge {
    display: none;
  }
  .ov-bar .ov-title {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .ov-bar .cd {
    white-space: nowrap;
    font-size: 0.74rem;
  }
  .ov-bar .btn-cta {
    min-height: 28px;
    padding: 0 0.8em;
    font-size: 0.7rem;
  }
}

/* Popup (Slot "modal") */
.ov-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--scrim);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ov-modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--card-hi), var(--card-lo) 70%);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lg), 0 0 120px -20px var(--ov-glow);
}
.ov-modal .ov-img {
  aspect-ratio: 16 / 9;
}
.ov-modal .ov-body {
  padding: 24px 26px 22px;
  gap: 0.8rem;
}
.ov-modal .ov-title {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}
.ov-modal .ov-text {
  font-size: 1rem;
}
.ov-modal .cd {
  font-size: 1rem;
}
.ov-modal .btn-cta {
  min-height: 52px;
  font-size: var(--btn-size);
}
.ov-later {
  align-self: center;
  margin-top: 0.1rem;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 0.86rem;
  cursor: pointer;
}
.ov-later:hover {
  color: var(--text-2);
}

@media (prefers-reduced-motion: no-preference) {
  .ov-in {
    animation: ov-in 0.6s var(--ease) both;
  }
  .ov-modal.ov-in {
    animation: ov-fade 0.4s ease both;
  }
  .ov-modal.ov-in .ov-modal-card {
    animation: ov-pop 0.6s var(--ease) both;
  }
  .btn-cta {
    animation: cta-shine 4s ease-in-out infinite;
  }
}
@keyframes ov-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}
@keyframes ov-fade {
  from {
    opacity: 0;
  }
}
@keyframes ov-pop {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
}
@keyframes cta-shine {
  0%,
  70%,
  100% {
    background-position: 0% 0;
  }
  85% {
    background-position: 100% 0;
  }
}
