  @font-face {
    font-family: "NewEdge666";
    src: url("../font/NewEdge666-RegularRounded.woff2");
    font-style: normal;
    font-weight: normal;
    ascent-override: 90%;
    descent-override: 10%;
    line-gap-override: 0%;
  }
  @font-face {
    font-family: "Rosart";
    src: url("../font/Rosart-Regular.woff2");
    font-style: normal;
    font-weight: normal;
  }
 
  * { margin: 0; padding: 0; box-sizing: border-box; }
 
  html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background-color: #ffffff;
    font-family: NewEdge666;
    color: black;
    cursor: default;
  }

  #canvas {
    position: absolute;
    width: 2600px;
    height: 1900px;
    top: 0;
    left: 0;
    will-change: transform;
  }
 
  .box {
    position: absolute;
    width: min(760px, 90vw);
    padding: clamp(20px, 2.6vw, 32px) clamp(24px, 3vw, 38px);
    border: none;
    border-radius: 64px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    z-index: 10;
    background: #ffffff;
    transition: background 0.4s ease, box-shadow 0.3s ease;
    touch-action: none;
    will-change: transform, z-index;
  }

  .box:active { cursor: grabbing; }

  .box-link {
    display: none;
    margin-top: 4px;
    font-family: NewEdge666;
    font-size: clamp(16px, 1.9vw, 21px);
    letter-spacing: 0.03em;
    color: #0000FF;
    text-decoration: none;
    text-align: left;
  }

  .box.active .box-link { display: block; }

  .box-link .link-arrow { text-decoration: none; }
  .box-link .link-text { text-decoration: underline; }

  .box-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 16px;
    font-family: NewEdge666;
    font-size: clamp(16px, 1.9vw, 21px);
    letter-spacing: 0.03em;
    color: #000000;
  }

  .box p {
    font-size: 34px;
    line-height: 1.1;
    color: black;
    font-family: NewEdge666;
  }

  .hl {
    color: #fff500;
    -webkit-text-stroke: 4px black;
    paint-order: stroke fill;
  }

  .box.yellow.active .hl {
    color: #b3b3b3;
  }

  .box.grey p {
    text-align: center;
  }

  .box.yellow {
    box-shadow: inset 0 0 30px 30px #fff500, 0 4px 24px rgba(0, 0, 0, 0.06);
  }

  .box.yellow.active {
    background: #fff500;
    box-shadow: none;
  }

  .box.grey {
    width: fit-content;
    white-space: nowrap;
    box-shadow: inset 0 0 18px 16px #b3b3b3, 0 4px 24px rgba(0, 0, 0, 0.06);
  }

  .box.grey.active {
    background: #b3b3b3;
    box-shadow:
      0 8px 40px rgba(179, 179, 179, 0.4),
      0 12px 48px rgba(0, 0, 0, 0.08);
  }
 
  .top-btn {
    position: fixed;
    top: 0;
    z-index: 10000;
    cursor: pointer;
    font-family: NewEdge666;
    transition: background 0.25s ease;
  }

  #menu-btn {
    right: 20px;
    background: #000000;
    color: #ffffff;
    font-size: 20px;
    letter-spacing: 0.03em;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 6px 14px 8px;
  }

  #menu-btn:hover { background: #000000; color: #ffffff; }

  #top-bar-bg {
    display: none;
  }

  #menu-nav {
    position: fixed;
    top: 0;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
  }

  .menu-item {
    background: #000000;
    color: #ffffff;
    font-family: NewEdge666;
    font-size: 20px;
    letter-spacing: 0.03em;
    border-radius: 0;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px 8px;
    box-shadow: none;
    line-height: 1;
    transition: background 0.25s ease;
  }

  .menu-item:hover { background: #000000; color: #ffffff; }

  #shuffle-btn {
    left: 20px;
    top: 0;
    background: #000000;
    color: #ffffff;
    font-size: 20px;
    letter-spacing: 0.03em;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 6px 14px 8px;
    transition: background 0.25s ease;
  }

  #shuffle-btn:hover {
    background: #000000;
    color: #ffffff;
  }

  #shuffle-btn-corner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    width: clamp(46px, 7.5vw, 80px);
    height: clamp(46px, 7.5vw, 80px);
    border-radius: 50%;
    background: #000000;
    color: #ffffff;
    font-family: NewEdge666;
    font-size: clamp(22px, 3.2vw, 40px);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
  }

  #shuffle-q {
    display: inline-block;
    margin-left: 0;
    transition: margin-left 0.2s ease;
  }

  #shuffle-btn:hover #shuffle-q {
    margin-left: 120px;
  }

  .dialect-word {
    position: absolute;
    font-family: NewEdge666;
    font-size: 20px;
    white-space: nowrap;
    pointer-events: auto;
    cursor: grab;
    z-index: 50;
    color: #000000;
    background: #ffffff;
    padding: 6px 14px 8px;
    border-radius: 40px;
    box-shadow: inset 0 0 10px 8px #b3b3b3, 0 4px 16px rgba(0, 0, 0, 0.06);
    touch-action: none;
  }
  @supports (background: -webkit-named-image(i)) {
    .dialect-word { padding-top: 10px; padding-bottom: 4px; }
  }


  #title-text {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    font-family: NewEdge666;
    font-size: 20px;
    letter-spacing: 0.03em;
    line-height: 1;
    color: #ffffff;
    white-space: nowrap;
    pointer-events: none;
    background: #000000;
    border: none;
    border-radius: 0;
    padding: 6px 14px 8px;
    box-shadow: none;
  }

  /* ─── Persistent audio bar (top, next to shuffle) ─── */
  .top-left-bar {
    position: fixed;
    top: 20px;
    left: calc(20px + clamp(46px, 7.5vw, 80px) + 12px);
    z-index: 10000;
    display: none;
  }
 
  .top-left-bar.visible {
    display: flex;
  }
 
  .persistent-bar {
    background: #000000;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 16px);
    height: 52px;
    padding: 0 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  }
 
  .bar-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s ease;
  }
 
  .bar-btn:hover { opacity: 0.6; }
 
  .bar-btn svg { width: 18px; height: 18px; }
  .bar-btn.play-pause svg { fill: #ffffff; }
  .bar-btn.close svg { stroke: #ffffff; fill: none; width: 22px; height: 22px; }
 
  .persistent-bar .speaker-name {
    color: #ffffff;
    font-family: NewEdge666;
    font-size: clamp(16px, 2vw, 19px);
    white-space: nowrap;
  }
 
  .persistent-bar .time-display {
    color: rgba(255, 255, 242, 0.5);
    font-family: NewEdge666;
    font-size: clamp(14px, 1.8vw, 17px);
    white-space: nowrap;
    width: 130px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
 
  #audio-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: none;
    max-width: 90vw;
  }
 
  #audio-bar.visible {
    display: block;
  }
 
  #audio-bar a {
    background: #000000;
    color: #ffffff;
    font-family: NewEdge666;
    font-size: clamp(20px, 2.3vw, 27px);
    letter-spacing: 0.03em;
    border-radius: 40px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(4px, 0.5vw, 6px) 18px;
  }

  #audio-bar a:hover { background: #000000; color: #ffffff; }

  #cursor-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    background: #000000;
    color: #ffffff;
    font-family: NewEdge666;
    font-size: 20px;
    letter-spacing: 0.03em;
    padding: 6px 14px 8px;
    border-radius: 40px;
    border-radius: 0;
    white-space: nowrap;
    display: none;
    transform: translate(14px, -50%);
  }

  @media (max-width: 768px) {
    #title-text { display: none; }
  }

  /* Safari-only fix: NewEdge666 font renders with extra descender space in Safari */
  @supports (background: -webkit-named-image(i)) {
    #menu-btn { padding: calc(clamp(6px, 0.75vw, 9px) + 4px) 16px calc(clamp(6px, 0.75vw, 9px) - 4px); }
    #title-text { padding: calc(clamp(4px, 0.5vw, 6px) + 4px) 24px calc(clamp(4px, 0.5vw, 6px) - 4px); }
    #audio-bar a { padding: calc(clamp(4px, 0.5vw, 6px) + 4px) 24px calc(clamp(4px, 0.5vw, 6px) - 4px); }
    .persistent-bar { padding-top: 4px; }
    #cursor-tooltip { padding: calc(clamp(6px, 0.75vw, 9px) + 4px) 16px calc(clamp(6px, 0.75vw, 9px) - 4px); }
    .menu-item { padding: calc(clamp(6px, 0.75vw, 9px) + 4px) 16px calc(clamp(6px, 0.75vw, 9px) - 4px); }
    #shuffle-btn { padding: calc(clamp(6px, 0.75vw, 9px) + 4px) 16px calc(clamp(6px, 0.75vw, 9px) - 4px); }
    #shuffle-btn-corner { padding-top: 8px; padding-bottom: 0; }
    #menu-close-btn { padding-top: 6px; padding-bottom: 0; }
  }

  /* ─── Mobile hamburger menu (Startseite only) ─── */
  #menu-toggle-wrap { display: none; }
  #menu-close-wrap { display: none; }
  #mobile-menu-overlay { display: none; }

  /* ─── Responsive (Handy) ─── */
  @media (max-width: 600px) {
    #shuffle-btn-corner {
      width: clamp(60px, 16vw, 90px);
      height: clamp(60px, 16vw, 90px);
      font-size: clamp(28px, 8vw, 44px);
      bottom: auto;
      top: calc(100dvh - 20px - clamp(60px, 16vw, 90px));
    }
    .box-link {
      font-size: clamp(19px, 5vw, 23px);
    }
    .box-meta {
      font-size: clamp(19px, 5vw, 23px);
      row-gap: 4px;
    }
    .box {
      padding: clamp(26px, 6vw, 36px) clamp(28px, 6vw, 40px);
    }
    .box p {
      font-size: clamp(28px, 7.7vw, 30px);
    }
    #shuffle-btn:hover #shuffle-q {
      margin-left: 0;
    }
    #shuffle-btn {
      font-size: 16px;
      padding: 7px 14px 7px;
    }

    #menu-nav { display: none; }

    #menu-toggle-wrap {
      display: flex;
      justify-content: flex-end;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      padding-right: 20px;
      z-index: 10001;
      pointer-events: none;
    }
    #menu-toggle-btn {
      pointer-events: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #000000;
      color: #ffffff;
      border: none;
      border-radius: 0;
      line-height: 1;
      padding: 7px 14px 7px;
      cursor: pointer;
    }
    #menu-label-text {
      font-family: NewEdge666;
      letter-spacing: 0.03em;
      font-size: 16px;
    }

    body.menu-open #menu-toggle-wrap { display: none; }
    body.menu-open #shuffle-btn-corner { display: none; }

    #menu-close-wrap {
      justify-content: center;
      position: fixed;
      top: calc(100dvh - 20px - clamp(60px, 16vw, 90px));
      left: 0;
      width: 100vw;
      z-index: 10001;
      pointer-events: none;
    }
    body.menu-open #menu-close-wrap {
      display: flex;
    }
    #menu-close-btn {
      pointer-events: auto;
      width: clamp(60px, 16vw, 90px);
      height: clamp(60px, 16vw, 90px);
      border-radius: 50%;
      background: #000000;
      border: none;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-family: NewEdge666;
      color: #ffffff;
      font-size: clamp(28px, 8vw, 44px);
      line-height: 1;
    }

    #mobile-menu-overlay.open {
      display: block;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100dvh;
      background: #fff500;
      z-index: 9998;
      padding: 54px 20px 20px;
    }
    #mobile-menu-overlay nav {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
    }
    .mobile-menu-item {
      font-family: NewEdge666;
      color: #000000;
      text-decoration: none;
      font-size: clamp(28px, 7.7vw, 30px);
      line-height: 1.1;
    }
    .mobile-menu-credit {
      display: block;
      font-family: NewEdge666;
      color: #000000;
      font-size: 20px;
      line-height: 1.2;
      margin-top: 36px;
    }
  }