/* Achtergrond 3: rustige blauwe/roze golven met langzaam opstijgende emoticons. */
html body.cm-wave-background {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #18243a 0%, #1b3143 48%, #21192d 100%);
  background-attachment: fixed;
}

html body.cm-wave-background[data-theme="dark"],
html[data-chatmee-theme="night"] body.cm-wave-background {
  background: linear-gradient(135deg, #18243a 0%, #1b3143 48%, #21192d 100%);
  background-attachment: fixed;
}

html body.cm-wave-background::before {
  content: none !important;
  animation: none !important;
}

html body .cm-animated-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

html body .cm-background-wave {
  position: absolute;
  left: -24vw;
  width: 150vw;
  height: 46vh;
  min-height: 330px;
  border-radius: 46% 54% 48% 52%;
  border-top: 1px solid rgba(67, 181, 218, .45);
  background: linear-gradient(180deg, rgba(63, 170, 207, .13), transparent 72%);
  will-change: transform;
}

html body .cm-background-wave-one {
  top: 5vh;
  transform: rotate(-7deg);
  animation: cm-background-wave-one 25s ease-in-out infinite;
}

html body .cm-background-wave-two {
  top: 36vh;
  border-color: rgba(221, 103, 181, .38);
  background: linear-gradient(180deg, rgba(214, 92, 171, .11), transparent 72%);
  transform: rotate(7deg);
  animation: cm-background-wave-two 31s ease-in-out infinite;
}

html body .cm-background-wave-three {
  top: 68vh;
  border-color: rgba(118, 202, 226, .26);
  background: linear-gradient(180deg, rgba(76, 173, 201, .07), transparent 75%);
  transform: rotate(-4deg);
  animation: cm-background-wave-three 36s ease-in-out infinite;
}

html body .cm-floating-emoticon {
  position: absolute;
  left: var(--cm-emoji-x);
  bottom: -72px;
  display: block;
  font-size: var(--cm-emoji-size);
  line-height: 1;
  opacity: 0;
  filter: grayscale(.1) drop-shadow(0 0 8px rgba(93, 205, 239, .2));
  will-change: transform, opacity;
  animation: cm-emoticon-rise var(--cm-emoji-duration) linear infinite;
  animation-delay: var(--cm-emoji-delay);
}

html body .cm-floating-emoticon.cm-age-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 216, 107, .9);
  border-radius: 50%;
  background: rgba(30, 38, 59, .78);
  color: #ffe18a;
  font: 800 14px/1 Arial, sans-serif;
  box-shadow: 0 0 12px rgba(255, 216, 107, .24);
}

@keyframes cm-background-wave-one {
  0%, 100% { transform: translate3d(-3%, 0, 0) rotate(-7deg); }
  50% { transform: translate3d(6%, 24px, 0) rotate(-2deg); }
}

@keyframes cm-background-wave-two {
  0%, 100% { transform: translate3d(4%, 8px, 0) rotate(7deg); }
  50% { transform: translate3d(-5%, -20px, 0) rotate(2deg); }
}

@keyframes cm-background-wave-three {
  0%, 100% { transform: translate3d(-2%, 0, 0) rotate(-4deg); }
  50% { transform: translate3d(5%, -15px, 0) rotate(1deg); }
}

@keyframes cm-emoticon-rise {
  0% { transform: translate3d(0, 45px, 0) rotate(-7deg); opacity: 0; }
  10% { opacity: .25; }
  48% { transform: translate3d(20px, -52vh, 0) rotate(7deg); opacity: .34; }
  88% { opacity: .22; }
  100% { transform: translate3d(-14px, -112vh, 0) rotate(-5deg); opacity: 0; }
}

html body.cm-wave-background > header,
html body.cm-wave-background > main,
html body.cm-wave-background > footer {
  position: relative;
  z-index: 1;
}

html body.cm-wave-background[data-theme="light"] {
  background: linear-gradient(135deg, #edf5fb 0%, #e4eef5 48%, #f3e8f1 100%);
  background-attachment: fixed;
}


html body .rules-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

html body nav.rules-top-menu {
  border-color: transparent;
  background:
    linear-gradient(rgba(12, 16, 31, .72), rgba(12, 16, 31, .72)) padding-box,
    linear-gradient(90deg, var(--pink), var(--cyan), var(--gold), var(--pink)) border-box;
  background-size: 100% 100%, 220% 100%;
}

html body .rules-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 16, 31, .72);
}

html body .rules-theme-toggle button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

html body .rules-theme-toggle button:hover {
  background: var(--soft);
  color: var(--primary);
}

html body .rules-theme-toggle button.is-active {
  background: var(--primary);
  color: #06101a;
}

@media (max-width: 900px) {
  html body .rules-header-actions {
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  html body nav.rules-top-menu {
    flex: 1 1 100%;
  }
}


@media print {
  html body .cm-animated-background { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body .cm-background-wave,
  html body .cm-floating-emoticon { animation-play-state: paused !important; }
  html body .cm-floating-emoticon { opacity: .18; }
}
