#replay-regio-app {
      --gb-passion-red: #b61f34;
      --gb-pink: #ef1957;
      --gb-red-soft: #8d1926;
      --gb-white: #ffffff;
      --gb-black: #000000;
      --gb-black-soft-1: #575757;
      --gb-black-soft-2: #878787;
      --gb-black-soft-3: #b2b2b2;
      --gb-black-soft-4: #dadada;
      --gb-ui-gray: #9e9e9e;
      --gb-background-light: #f2f2f2;
      --replay-selected: var(--gb-passion-red);
      --replay-green: var(--replay-selected);
      --replay-dark: var(--gb-black);
      --replay-border: var(--gb-black-soft-4);
      --replay-muted: var(--gb-black-soft-1);
      --wemf-11: #eeeeee;
      --wemf-12: #dddddd;
      --wemf-13: #c8c8c8;
      --wemf-14: #a8a8a8;
      --wemf-15: #888888;
      --wemf-16: #666666;
      --wemf-21: #6d0b39;
      --wemf-22: #8b1649;
      --wemf-23: #4d0028;
      --wemf-24: #bf2f5d;
      --wemf-25: #d44d74;
      --wemf-26: #fdc1b6;
      --wemf-27: #f08eaf;
      --wemf-28: #f5a9c1;
      --wemf-29: #f7bfd1;
      --wemf-31: #e8b7c7;
      --wemf-32: #cc5a82;
      --wemf-33: #b43d6a;
      --wemf-34: #d97f9d;
      --wemf-41: #f3c8d7;
      --wemf-42: #df5a77;
      --wemf-43: #ec91a3;
      --wemf-44: #f5d9e0;
      --wemf-51: #bdbdbd;
      --wemf-61: #f8e8ef;
      font-family: inherit;
      max-width: 1200px;
      width: 100%;
      margin: 0;
      color: var(--replay-dark);
    }
    #replay-map-wrap {
      position: relative;
      height: clamp(430px, 50vw, 540px);
      border: 1px solid var(--replay-border);
      border-radius: 4px;
      background: var(--gb-white);
      overflow: hidden;
      touch-action: none;
    }
    #replay-map {
      display: block;
      width: 100%;
      height: 100%;
      cursor: grab;
      user-select: none;
      overflow: visible;
    }
    #replay-map.dragging { cursor: grabbing; }
    .replay-region {
      stroke: #ffffff;
      stroke-width: 0.4; /* Linienstärke der Clustergrenzen */
      cursor: pointer;
      transition: fill 120ms ease;
      vector-effect: non-scaling-stroke;
      outline: none;
    }
    .replay-region:hover { fill: var(--gb-ui-gray); }

    .replay-region:focus,
    .replay-region:focus-visible {
      outline: none !important;
    }
    .replay-region.selected,
    .replay-region.selected:hover {
      fill: var(--replay-selected);
      stroke: var(--gb-black);
      stroke-width: 1.1;
    }
    #replay-legend-title {
      margin-bottom: 6px;
      font-family: var(--gb-font-brand, Inter, Arial, sans-serif);
      font-size: 14px;
      font-weight: 700;
      color: var(--gb-black);
    }
    
    #replay-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 10px;
    }

    .wemf-chip {
      position: relative;
      width: 30px;
      height: 24px;
      border: 1px solid var(--gb-black-soft-3);
      border-radius: 4px;
      font-family: var(--gb-font-brand, Inter, Arial, sans-serif);
      font-size: 13px;
      font-weight: 700;
      padding: 0;
      cursor: pointer;
      background: var(--gb-white);
      color: var(--gb-black);
      transition: border-color 120ms ease, box-shadow 120ms ease;
    }

    .wemf-chip.active {
      z-index: 1;
      border-color: var(--gb-black);
      box-shadow: 0 0 0 2px var(--gb-white), 0 0 0 4px var(--gb-black);
    }

    .wemf-chip:focus-visible {
      outline: 2px solid var(--gb-black);
      outline-offset: 3px;
    }
        #replay-zoom {
          position: absolute;
          right: 12px;
          top: 12px;
          display: flex;
          flex-direction: column;
          gap: 4px;
    }
    #replay-zoom button,
    #replay-panel button,
    #replay-radius-apply,
    .replay-radius-result,
    .replay-remove {
      font: inherit;
      cursor: pointer;
    }
    #replay-zoom button {
      width: 34px;
      height: 32px;
      background: var(--gb-white);
      border: 1px solid var(--gb-black-soft-3);
      border-radius: 4px;
      font-size: 18px;
      line-height: 1;
    }
    #replay-tooltip {
      position: absolute;
      z-index: 2;
      max-width: 320px;
      display: none;
      pointer-events: none;
      background: rgba(32, 32, 32, 0.72);
      backdrop-filter: blur(2px);
      color: #fff;
      border-radius: 4px;
      padding: 8px 10px;
      font-size: 13px;
      line-height: 1.35;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    }
    #replay-tooltip strong {
      display: block;
      margin-bottom: 2px;
    }
    #replay-wg-tooltip {
      position: fixed;
      z-index: 9999;
      display: none;
      pointer-events: none;
      background: rgba(0, 0, 0, 0.88);
      color: var(--gb-white);
      border-radius: 4px;
      padding: 7px 9px;
      font-size: 13px;
      line-height: 1.35;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
      white-space: nowrap;
    }
    #replay-panel {
      margin-top: 16px;
      background: var(--gb-background-light);
      border-radius: 4px;
      padding: 18px;
    }
    #replay-panel h3 {
      margin: 0 0 12px;
      font-family: var(--gb-font-brand, Inter, Arial, sans-serif);
      font-size: 20px;
      line-height: 1.25;
    }
    #replay-panel button {
      margin: 0 8px 10px 0;
      min-height: 39px;
      padding: 10px 20px;
      border: 0;
      border-radius: 4px;
      background: var(--gb-white);
      color: var(--replay-dark);
      box-shadow: none;
      font-family: var(--gb-font-brand, Inter, Arial, sans-serif);
      font-size: 16px;
      font-weight: 700;
      line-height: 1.2;
      transition: color .2s, background-color .2s;
    }
    #replay-export {
      background: var(--gb-passion-red) !important;
      color: var(--gb-white) !important;
    }
    #replay-export:hover {
      background: var(--gb-pink) !important;
    }
    #replay-copy:hover {
      background: var(--gb-black-soft-4);
    }
    #replay-reset {
      background: var(--gb-white);
    }
    #replay-reset:hover {
      background: var(--gb-black-soft-4);
    }
    #replay-count {
      font-weight: 700;
      margin: 6px 0 12px;
    }
    .replay-item {
      position: relative;
      margin: 8px 0;
      padding: 10px 42px 10px 12px;
      background: var(--gb-white);
      border: 1px solid var(--gb-black-soft-4);
      border-radius: 4px;
      line-height: 1.4;
    }
    .replay-item strong {
      display: block;
      margin-bottom: 3px;
    }
    .replay-item small {
      color: var(--replay-muted);
      display: block;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .replay-remove {
      position: absolute;
      right: 8px;
      top: 8px;
      width: 28px;
      height: 28px;
      border: 0;
      background: transparent;
      font-size: 20px;
      line-height: 1;
    }
    #replay-note {
      color: var(--gb-black-soft-1);
      font-size: 14px;
    }
    #replay-radius-panel {
      margin: 0 0 14px;
      padding: 14px;
      border: 1px solid var(--replay-border);
      border-radius: 4px;
      background: var(--gb-background-light);
    }
    #replay-radius-panel h3 {
      margin: 0 0 10px;
      font-family: var(--gb-font-brand, Inter, Arial, sans-serif);
      font-size: 17px;
      line-height: 1.25;
    }
    .replay-radius-grid {
      display: grid;
      grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) auto;
      gap: 12px;
      align-items: end;
    }
    .replay-radius-field {
      position: relative;
      min-width: 0;
    }
    .replay-radius-field label,
    .replay-radius-options label {
      display: block;
      margin-bottom: 5px;
      color: var(--replay-muted);
      font-size: 13px;
      font-weight: 700;
    }
    #replay-radius-query {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid var(--gb-black-soft-3);
      border-radius: 4px;
      padding: 9px 10px;
      font: inherit;
    }
    #replay-radius-results {
      position: absolute;
      z-index: 5000;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      display: none;
      max-height: 260px;
      overflow: auto;
      border: 1px solid var(--gb-black-soft-4);
      border-radius: 4px;
      background: var(--gb-white);
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    }
    .replay-radius-result {
      display: block;
      width: 100%;
      margin: 0;
      padding: 9px 10px;
      border: 0;
      border-bottom: 1px solid var(--gb-black-soft-4);
      border-radius: 0;
      background: var(--gb-white);
      color: var(--replay-dark);
      text-align: left;
    }
    .replay-radius-result:hover,
    .replay-radius-result:focus {
      background: var(--gb-background-light);
      color: var(--gb-passion-red);
      outline: none;
    }
    .replay-radius-result small {
      display: block;
      color: var(--replay-muted);
      font-size: 12px;
    }
    .replay-radius-slider-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    #replay-radius-km {
      width: 100%;
      accent-color: var(--gb-passion-red);
    }
    #replay-radius-value {
      min-width: 48px;
      text-align: right;
      font-weight: 700;
    }
    .replay-radius-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }
    #replay-radius-apply {
      margin: 0;
      min-height: 39px;
      padding: 10px 20px;
      border: 0;
      border-radius: 4px;
      background: var(--gb-passion-red);
      color: var(--gb-white);
      font-family: var(--gb-font-brand, Inter, Arial, sans-serif);
      font-weight: 700;
      white-space: nowrap;
      box-shadow: none;
      font-size: 16px;
      line-height: 1.2;
      transition: color .2s, background-color .2s;
    }
    #replay-radius-apply:hover {
      background: var(--gb-pink);
    }
    .replay-radius-replace {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--replay-muted);
      font-size: 13px;
      white-space: nowrap;
    }
    .replay-radius-replace input {
      accent-color: var(--gb-passion-red);
    }
    #replay-radius-status {
      margin-top: 10px;
      color: var(--replay-muted);
      font-size: 14px;
      min-height: 20px;
    }
    @media (max-width: 820px) {
      .replay-radius-grid { grid-template-columns: 1fr; }
      .replay-radius-actions { align-items: flex-start; }
      #replay-radius-apply { width: 100%; }
    }
    @media (max-width: 700px) {
      #replay-map-wrap { height: 410px; }
      #replay-panel button { width: 100%; }
    }
