    .theme-switch {
      position: relative; display: inline-block;
      width: 54px; height: 30px; cursor: pointer;
    }
    .theme-switch input { opacity: 0; width: 0; height: 0; }
    .theme-switch .slider {
      position: absolute; top: 0; left: 0; right: 0; bottom: 0;
      border-radius: 34px; transition: .4s; overflow: hidden;
      box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    }
    .theme-switch .light-bg {
      background: linear-gradient(120deg, #ffb3a7 0%, #a2cbf4 100%);
      position: absolute; inset: 0; transition: opacity .4s; z-index: 0;
    }
    .theme-switch .dark-bg {
      background: linear-gradient(120deg, #3d1b6e 0%, #c4297b 100%);
      position: absolute; inset: 0; transition: opacity .4s; z-index: 0; opacity: 0;
    }
    .theme-switch input:checked ~ .slider .dark-bg { opacity: 1; }
    .theme-switch input:checked ~ .slider .light-bg { opacity: 0; }

    .theme-switch .slider::before {
      content: ""; position: absolute; z-index: 2;
      height: 22px; width: 22px; left: 4px; bottom: 4px;
      background-color: white; border-radius: 50%;
      transition: .4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
      box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    .theme-switch input:checked ~ .slider::before { transform: translateX(24px); }

    .theme-switch .decorations { position: absolute; inset: 0; pointer-events: none; transition: .4s; z-index: 1; }
    .theme-switch .dec-light { opacity: 1; transition: .4s; }
    .theme-switch input:checked ~ .slider .dec-light { opacity: 0; transform: translateY(10px); }
    .theme-switch .cloud-1 { position: absolute; right: 8px; top: 10px; width: 12px; height: 12px; background: rgba(255,255,255,0.8); border-radius: 50%; box-shadow: -5px -2px 0 2px rgba(255,255,255,0.8), -10px 2px 0 0 rgba(255,255,255,0.8); }

    .theme-switch .dec-dark { opacity: 0; transition: .4s; transform: translateY(-10px); }
    .theme-switch input:checked ~ .slider .dec-dark { opacity: 1; transform: translateY(0); }
    .theme-switch .cloud-dark { position: absolute; left: 6px; bottom: -4px; width: 18px; height: 18px; background: rgba(211,59,138,0.5); border-radius: 50%; box-shadow: 6px -3px 0 2px rgba(118,36,155,0.5), 14px 2px 0 0 rgba(118,36,155,0.3); filter: blur(0.5px); }
    .theme-switch .star-1 { position: absolute; top: 5px; right: 8px; width: 3px; height: 3px; background: #fff; border-radius: 50%; box-shadow: 0 0 4px #fff; }
    .theme-switch .star-2 { position: absolute; top: 16px; right: 18px; width: 2px; height: 2px; background: #fff; border-radius: 50%; }


.theme-switch input:focus-visible ~ .slider { outline: 3px solid #65baf1; outline-offset: 3px; }
[data-theme="light"] .legal-page {
  --bg: #f5f3f7;
  --text: #1d1b29;
  --muted: #5f5c6b;
  --border: rgba(29,27,41,.15);
  --gold: #9c6500;
  --cyan: #096da2;
  color-scheme: light;
}
[data-theme="light"] .legal-page h1,
[data-theme="light"] .legal-page .back-btn { color: var(--text); }
