/* LoadTronic – Mitteilungen wie auf dem iPhone und das Rabatt-Fenster.
   Gemeinsam für Startseite und Shop (Logik: lt-notes.js). */
    /* ---------- Mitteilungen wie auf dem iPhone ----------
       Desktop und Tablet: mittig unter der Leiste (oben 26 px, Kreise 53 px hoch), gleiten unter ihr hervor.
       Handy: oben zwischen Logo- und Such-Knopf (siehe unten).
       Links das Vorschaubild (Beat-Cover bzw. Video), daneben die NEW-Pill wie im Karussell, Titel und Infos. */
    .lt-note-wrap{
      position: fixed;
      z-index: 990;                                             /* unter der Navigation (999) */
      top: calc(var(--pillTop, 26px) + 63px);
      left: 0;
      right: 0;
      width: min(420px, calc(100vw - 24px));
      margin: 0 auto;
      opacity: 0;
      transform: translateY(-22px) scale(.94);
      transform-origin: 50% 0;
      transition: transform .6s cubic-bezier(.2, 1.12, .3, 1), opacity .3s ease;
      pointer-events: none;
    }
    .lt-note-wrap.is-in{ opacity: 1; transform: none; pointer-events: auto; }
    .lt-note-wrap.is-drag{ transition: none; }
    @media (prefers-reduced-motion: reduce){
      .lt-note-wrap, .lt-note-wrap.is-in{ transform: none; transition: opacity .25s ease; }
    }
    .lt-note{
      --note-media: 64px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 12px;
      padding: 10px 16px 10px 10px;
      border-radius: 24px;
      text-decoration: none;
      color: var(--ink);
      /* dasselbe Glas wie die Navigationsleiste (.pillnav) */
      background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.32));
      backdrop-filter: blur(22px);
      -webkit-backdrop-filter: blur(22px);
      border: 1px solid rgba(11,18,32,.10);
      box-shadow: var(--shadow2, 0 12px 36px rgba(10,15,25,.10));
      touch-action: none;
      -webkit-tap-highlight-color: transparent;
    }
    .lt-note:focus-visible{ outline: 3px solid rgba(32,181,225,.8); outline-offset: 3px; }
    .lt-note-media{
      width: var(--note-media);
      height: var(--note-media);
      border-radius: 14px;
      overflow: hidden;
      background: #e9edf3;
      box-shadow: 0 2px 8px rgba(10,15,25,.12);
    }
    .lt-note-wrap[data-kind="video"] .lt-note-media{ width: calc(var(--note-media) * 16 / 9); }   /* Video im Querformat */
    .lt-note-media[hidden]{ display: none; }
    .lt-note-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }
    .lt-note-body{ min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
    .lt-note-head{ align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    /* dieselbe Pill wie „NEW“ im Beat-Karussell */
    .lt-note-badge{
      background: linear-gradient(135deg, #E06853, #F2BA44);
      color: #fff;
      font-size: 10px; font-weight: 950; line-height: 1;
      padding: 4px 8px; border-radius: 6px;
      letter-spacing: .07em; text-transform: uppercase;
      white-space: nowrap;
      box-shadow: 0 2px 10px rgba(224,104,83,.35);
    }
    .lt-note-time{ font-size: 12px; font-weight: 700; color: rgba(11,18,32,.45); }
    .lt-note-title{
      max-width: 100%;
      font-size: 15px; font-weight: 850; line-height: 1.25; letter-spacing: -.01em;
      display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    }
    .lt-note-text{
      max-width: 100%; font-size: 13px; line-height: 1.3; color: rgba(11,18,32,.6);
      display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    }
    .lt-note-wrap[data-kind="video"] .lt-note-text{ -webkit-line-clamp: 1; }   /* beim Video braucht der Titel den Platz */
    .lt-note-text:empty{ display: none; }
    .lt-note-short{ display: none; }
    @media (max-width: 740px){
      .lt-note-long{ display: none; }
      .lt-note-short{ display: inline; }
      /* Handy: oben zwischen Logo- und Such-Knopf (je 48 px breit, 16 px vom Rand, 8 px Luft), bündig mit ihrer
         Oberkante – braucht der Text mehr Platz, wächst sie nach unten (wie die Dynamic Island) */
      .lt-note-wrap{
        top: calc(14px + env(safe-area-inset-top, 0px));
        left: calc(max(16px, env(safe-area-inset-left, 0px)) + 56px);
        right: calc(max(16px, env(safe-area-inset-right, 0px)) + 56px);
        width: auto;
        max-width: 440px;
      }
      .lt-note{ --note-media: 44px; gap: 9px; min-height: 48px; padding: 7px 12px 7px 7px; border-radius: 22px; }
      .lt-note-media{ border-radius: 12px; }
      .lt-note-wrap[data-kind="video"] .lt-note-media{ width: var(--note-media); }   /* wenig Platz: auch das Video-Bild quadratisch */
      .lt-note-body{ gap: 2px; }
      .lt-note-badge{ font-size: 9px; padding: 3px 6px; letter-spacing: .06em; }
      .lt-note-time{ font-size: 11px; }
      .lt-note-title{ font-size: 13.5px; line-height: 1.2; }
      .lt-note-text{ font-size: 12px; line-height: 1.25; }
    }
    /* am Desktop: Schließen-Knopf beim Drüberfahren (wie am Mac); am Handy wischt man nach oben */
    .lt-note-close{
      position: absolute; top: -8px; left: -8px;
      width: 24px; height: 24px; padding: 0;
      border: 0; border-radius: 50%;
      background: rgba(11,18,32,.72); color: #fff;
      font-size: 15px; line-height: 24px; font-weight: 700;
      cursor: pointer;
      opacity: 0; transition: opacity .15s ease;
    }
    .lt-note-wrap:hover .lt-note-close, .lt-note-close:focus-visible{ opacity: 1; }
    @media (hover: none){ .lt-note-close{ display: none; } }

    /* Rabatt-Mitteilung: statt eines Fotos eine Kachel „−10 %“ in den Markenfarben */
    .lt-note-media--tile{
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(135deg, var(--hero1, #20B5E1), var(--hero2, #3F68AE));
    }
    .lt-note-media--tile img{ display: none; }
    .lt-note-media--tile::after{
      content: attr(data-tile);
      color: #fff; font-weight: 950; font-size: 17px; letter-spacing: -.02em; white-space: nowrap;
    }
    @media (max-width: 740px){ .lt-note-media--tile::after{ font-size: 13px; } }

/* ---------- Rabatt-Fenster (.dp-*) ---------- */
    .dp-overlay{
      position: fixed;
      inset: 0;
      background: rgba(10,15,25,.22);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 10060;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      opacity: 0;
      pointer-events: none;
      transition: opacity .35s ease, display .35s allow-discrete;
    }
    .dp-overlay.dp-visible{ display: flex; opacity: 1; pointer-events: all; }
    /* iPhone (Safari 26) färbt seine Leisten oben und unten nach Vollbild-Ebenen – auch nach unsichtbaren (opacity 0).
       Geschlossen deshalb ganz weg (display: none); Ein- und Ausblenden bleibt über @starting-style / allow-discrete. */
    @starting-style{
      .dp-overlay.dp-visible{ opacity: 0; }
      .dp-overlay.dp-visible .dp-modal{ transform: translateY(24px) scale(.97); }
    }
    .dp-modal{
      background: #fff;
      border-radius: 24px;
      padding: 36px 32px 28px;
      max-width: 460px;
      width: 100%;
      /* auf niedrigen Laptop-Bildschirmen scrollt das Fenster selbst, statt oben (samt ×) herauszuragen */
      max-height: calc(100vh - 32px);
      max-height: calc(100dvh - 32px);
      overflow-y: auto;
      overscroll-behavior: contain;
      position: relative;
      box-shadow: 0 32px 80px rgba(0,0,0,.25);
      transform: translateY(24px) scale(.97);
      transition: transform .35s cubic-bezier(.22,1,.36,1);
    }
    .dp-overlay.dp-visible .dp-modal{ transform: translateY(0) scale(1); }
    .dp-close{
      position: absolute;
      top: 14px; right: 16px;
      background: none; border: none;
      font-size: 22px; color: rgba(11,18,32,.4);
      cursor: pointer; line-height: 1;
      padding: 4px 8px; border-radius: 8px;
      transition: color .15s, background .15s;
    }
    .dp-close:hover{ color: rgba(11,18,32,.8); background: rgba(11,18,32,.06); }
    .dp-badge{
      display: inline-block; padding: 4px 12px; border-radius: 999px;
      font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
      background: linear-gradient(135deg, var(--hero1), var(--hero2));
      color: #fff; margin-bottom: 14px;
    }
    .dp-modal h2{
      font-size: 28px; font-weight: 980; letter-spacing: -.03em;
      color: #0b1220; margin: 0 0 8px; line-height: 1.1;
    }
    .dp-modal h2 span{
      background: linear-gradient(135deg, var(--hero1), var(--hero2));
      -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    }
    .dp-modal > p{ font-size: 14px; color: rgba(11,18,32,.55); margin: 0 0 24px; line-height: 1.6; }

    /* Tasks */
    .dp-tasks{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
    .dp-task{
      display: flex; align-items: center; gap: 12px;
      padding: 10px 12px; border-radius: 12px;
      background: rgba(11,18,32,.04); border: 1px solid rgba(11,18,32,.08);
      transition: background .25s, border-color .25s;
    }
    .dp-task.dp-done{
      background: rgba(32,181,225,.07);
      border-color: rgba(32,181,225,.3);
    }
    /* Avatar */
    .dp-avatar-wrap{
      position: relative; flex-shrink: 0;
      width: 40px; height: 40px;
    }
    .dp-avatar{
      width: 40px; height: 40px;
      border-radius: 50%; object-fit: cover;
      display: block;
    }
    .dp-app-icon{
      position: absolute;
      bottom: -3px; right: -3px;
      width: 18px; height: 18px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 0 0 1.5px #fff;
      object-fit: cover;
    }
    .dp-avatar-wrap--newsletter{
      flex-shrink: 0;
      width: auto;
      min-width: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .dp-newsletter-avatar{
      margin: 0;
      padding: 0;
      border: none;
      background: none;
      border-radius: 0;
      font-size: 26px;
      line-height: 1;
      display: block;
    }
    /* Link */
    .dp-task-link{
      display: flex; align-items: center; gap: 0;
      flex: 1; font-size: 13px; font-weight: 700;
      color: #0b1220; text-decoration: none;
      transition: color .15s;
    }
    .dp-task-link:hover{ color: var(--hero1); }
    /* der Link ums Profilbild bleibt so schmal wie das Bild – der Text steht direkt daneben */
    .dp-task > .dp-task-link:first-child{ flex: 0 0 auto; }
    .dp-task--disabled{
      opacity: .5;
      cursor: default;
    }
    .dp-task--disabled .dp-task-link{
      color: rgba(11,18,32,.56);
      cursor: default;
    }
    .dp-task--disabled .dp-task-link:hover{
      color: rgba(11,18,32,.56);
    }
    /* Check indicator */
    .dp-check-icon{
      flex-shrink: 0; width: 26px; height: 26px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--hero1), var(--hero2));
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-size: 13px; font-weight: 900;
      opacity: 0; transform: scale(0);
      transition: opacity .3s ease, transform .35s cubic-bezier(.22,1,.36,1);
    }
    .dp-task.dp-done .dp-check-icon{ opacity: 1; transform: scale(1); }

    /* Progress */
    .dp-progress-section{
      margin-bottom: 20px;
    }
    .dp-progress-head{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }
    .dp-progress-label{
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .06em;
      text-transform: uppercase;
      color: rgba(11,18,32,.45);
    }
    .dp-progress-pct{
      font-size: 13px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      color: rgba(11,18,32,.75);
    }
    .dp-progress-wrap{
      height: 8px;
      background: rgba(11,18,32,.08);
      border-radius: 999px;
      overflow: hidden;
    }
    .dp-progress-bar{
      height: 100%; border-radius: 999px;
      background: linear-gradient(90deg, var(--hero1), var(--hero2));
      width: 0%; transition: width .4s cubic-bezier(.22,1,.36,1);
    }

    /* nach allen Schritten: Hinweis, dass der Code mit der Willkommens-Mail kommt */
    .dp-mail-wrap{
      display: none; flex-direction: column; align-items: center; gap: 8px;
      padding: 18px 20px; border-radius: 16px;
      background: linear-gradient(135deg, rgba(32,181,225,.08), rgba(62,130,230,.08));
      border: 1.5px solid rgba(32,181,225,.3);
      margin-bottom: 16px; text-align: center;
    }
    .dp-mail-wrap.dp-show{ display: flex; }
    .dp-mail-label{ margin: 0; font-size: 13px; font-weight: 700; color: rgba(11,18,32,.6); text-transform: uppercase; letter-spacing: .06em; }
    .dp-mail-text{ margin: 0; font-size: 14px; line-height: 1.5; color: #0b1220; }
    .dp-mail-link{ font-size: 13px; font-weight: 700; color: var(--hero2); text-decoration: underline; }

    .dp-later{
      display: block; width: 100%; text-align: center;
      font-size: 12px; color: rgba(11,18,32,.35);
      background: none; border: none; cursor: pointer;
      padding: 4px; transition: color .15s;
    }
    .dp-later:hover{ color: rgba(11,18,32,.6); }

    @media (max-width: 520px){
      .dp-overlay{
        align-items: flex-end;
        padding: 0 0 max(0px, env(safe-area-inset-bottom));
      }
      .dp-modal{
        width: 100%;
        max-width: 100%;
        max-height: 96dvh;
        min-height: min(82dvh, 600px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 28px 20px max(22px, env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
      }
      .dp-close{
        top: max(10px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
      }
      .dp-modal h2{ font-size: 22px; }
      .dp-modal > p{ font-size: 13px; margin-bottom: 16px; }
      /* avatar anchor should not steal flex space from text */
      .dp-task > .dp-task-link:first-child{
        flex: 0 0 auto;
      }
      .dp-task-link{
        font-size: 13px;
        white-space: normal;
        line-height: 1.3;
      }
      .dp-task{
        min-height: 48px;
        padding: 10px 10px;
        gap: 10px;
        align-items: center;
      }
      .dp-mail-link{
        display: inline-block;
        padding: 10px 0;
      }
    }
