/* Automatisch erzeugt durch npm run build:css. Nicht manuell bearbeiten. */
/* CSS entrypoint. Feature styles live in the imported modules below. */
/* Quelle: base-shell.css */
/* Shared styles for Bro Streak and Games. */
:root {
      --bg: #0b1020;
      --card: #151b2f;
      --card2: #10172a;
      --text: #f5f7fb;
      --muted: #9aa4bf;
      --line: rgba(255,255,255,.11);
      --good: #33d17a;
      --bad: #ff5c7a;
      --today: #8ab4ff;
      --warn: #f6c177;
      --new-indicator-color: #f4cb57;
      --shadow: 0 22px 60px rgba(0,0,0,.35);
      --radius: 24px;
      --radius-pill: 999px;
      --control-pad: 13px 14px;
      --control-radius: 16px;
      --page-content-width: 1180px;
      --page-gutter: 12px;
      --toast-bottom-offset: max(22px, calc(12px + env(safe-area-inset-bottom)));
      --badge-sheet: url("../assets/achievement-badges/sprite-sheet.png");
}

* {
      scrollbar-width: thin;
      scrollbar-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 40%, var(--line)) transparent;
}

html {
      scrollbar-gutter: stable;
      min-height: 100%;
      background-color: var(--bg);
}

.app-version-label {
      position: fixed;
      z-index: 5;
      right: max(8px, env(safe-area-inset-right));
      bottom: max(5px, env(safe-area-inset-bottom));
      color: var(--muted);
      font-size: 10px;
      line-height: 1;
      opacity: .7;
      pointer-events: none;
      user-select: none;
}

*::-webkit-scrollbar {
      width: 8px;
      height: 8px;
}

*::-webkit-scrollbar-track {
      background: transparent;
}

*::-webkit-scrollbar-thumb {
      border: 2px solid transparent;
      border-radius: 999px;
      background:
        linear-gradient(
          color-mix(in srgb, var(--active-profile-color, var(--today)) 38%, var(--line)),
          color-mix(in srgb, var(--active-profile-color, var(--today)) 38%, var(--line))
        )
        padding-box;
}

*::-webkit-scrollbar-thumb:hover {
      background:
        linear-gradient(
          color-mix(in srgb, var(--active-profile-color, var(--today)) 56%, rgba(255,255,255,.22)),
          color-mix(in srgb, var(--active-profile-color, var(--today)) 56%, rgba(255,255,255,.22))
        )
        padding-box;
}

@media (max-width: 620px) {
  .admin-storage-card {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-storage-toggle {
    width: 100%;
  }

  .admin-storage-toggle button {
    flex: 1;
  }

  .achievement-admin-lab {
    align-items: stretch;
    flex-direction: column;
  }

  .achievement-admin-controls {
    justify-content: stretch;
  }

  .achievement-admin-select {
    width: 100%;
  }
}

.admin-lab-shell {
  margin-bottom: 18px;
}

.admin-lab-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 34%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 9%, rgba(255,255,255,.045));
  box-shadow: var(--shadow);
}

.admin-lab-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(180px, 1.4fr) auto auto auto;
  gap: 10px;
  align-items: end;
}

.admin-lab-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-lab-field input,
.admin-lab-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  color: var(--text);
  background: rgba(255,255,255,.06);
}

.admin-lab-grid button,
.zen-admin-lab button {
  min-height: 40px;
}

.admin-reset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 107, 107, .32);
  border-radius: 14px;
  background: rgba(255, 107, 107, .08);
}

.admin-test-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 7%, rgba(255,255,255,.035));
}

.admin-test-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.admin-test-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-reset-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.admin-reset-title {
  color: #ffd1d1;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-reset-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-reset-row.is-confirming {
  border-color: rgba(255, 107, 107, .58);
  background: rgba(255, 107, 107, .13);
}

.zen-admin-lab {
  box-shadow: none;
}

.achievements-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.achievement-admin-lab {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line));
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(246,193,119,.11), rgba(255,255,255,.035));
  box-shadow: var(--shadow);
}

.achievement-admin-lab > * { min-width: 0; }

.achievement-admin-controls {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.achievement-admin-select {
  display: grid;
  gap: 6px;
  min-width: min(100%, 360px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.achievement-admin-select select {
  width: 100%;
  min-height: 42px;
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  border-radius: 12px;
  padding: 10px 38px 10px 12px;
  color: var(--text);
  background:
    linear-gradient(45deg, transparent 50%, var(--warn) 50%) calc(100% - 17px) 17px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--warn) 50%, transparent 50%) calc(100% - 11px) 17px / 6px 6px no-repeat,
    rgba(8,12,25,.62);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}

.achievement-admin-select select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--warn) 72%, white);
  box-shadow: 0 0 0 3px rgba(246,193,119,.16);
}

.achievement-admin-controls > button {
  min-height: 42px;
}

.achievement-preview-tests {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.achievement-preview-tests > strong { font-size: 13px; }

.achievement-preview-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.achievement-preview-actions > button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border-color: color-mix(in srgb, var(--rarity-color, var(--line)) 45%, var(--line));
}

.achievement-preview-actions .bro-icon { width: 15px; height: 15px; }

.achievement-admin-content-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.achievement {
  position: relative;
}

.achievement-admin-edit {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
  background: color-mix(in srgb, var(--card2) 88%, transparent);
}

.achievement-admin-edit .bro-icon {
  width: 16px;
  height: 16px;
}

.achievement-admin-content-editor > label {
  display: grid;
  gap: 6px;
}

.achievement-admin-fixed-target {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--card2);
}

.achievement-admin-fixed-target > span { color: var(--muted); font-size: .8rem; font-weight: 800; }

.achievement-admin-condition-error {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--bad) 55%, var(--line));
  border-radius: var(--control-radius);
  color: color-mix(in srgb, var(--bad) 76%, white);
  background: color-mix(in srgb, var(--bad) 10%, transparent);
  font-size: .84rem;
  font-weight: 800;
}

.achievement-admin-content-editor textarea,
.achievement-admin-content-editor input {
  width: 100%;
  resize: vertical;
}

.achievement-admin-rewards {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  align-content: start;
  align-self: start;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.achievement-admin-reward-add {
  width: fit-content;
  min-height: var(--control-height);
}

.achievement-admin-reward-summary { color: var(--muted); }

.achievement-admin-reward-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, .65fr) auto;
  gap: 8px;
  align-items: center;
}

.achievement-admin-reward-row select {
  min-width: 0;
}

.achievement-admin-image-editor { grid-column: 1 / -1; min-width: 0; }

@media (max-width: 640px) {
  .achievement-admin-content-editor { grid-template-columns: 1fr; }
  .achievement-admin-content-editor > label,
  .achievement-admin-rewards,
  .achievement-admin-image-editor { grid-column: 1; }

  .achievement-admin-reward-row { grid-template-columns: minmax(0, 1fr) minmax(76px, .65fr); }
  .achievement-admin-reward-row .danger { grid-column: 1 / -1; width: fit-content; }
}

.achievement-filter-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 34%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 9%, rgba(255,255,255,.045));
  box-shadow: var(--shadow);
}
.achievement-manage-streak { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 9px 12px; border: 1px dashed color-mix(in srgb,var(--accent) 55%,var(--line)); border-radius: var(--control-radius); background: color-mix(in srgb,var(--accent) 7%,transparent); color: var(--text); text-align: left; }
.achievement-manage-streak:hover { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 12%,transparent); }
.achievement-manage-streak-plus { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: color-mix(in srgb,var(--accent) 18%,transparent); font-size: 22px; }
.achievement-manage-streak > span:last-child { display: grid; gap: 2px; }
.achievement-manage-streak small { color: var(--muted); }

.achievement-filter-stack,
.achievement-filter-row {
  display: grid;
  gap: 6px;
}

.achievement-filter-stack {
  gap: 12px;
}

.achievement-filter-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.achievement-filter-row-primary > span {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
}

.achievement-reward {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 28%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  color: color-mix(in srgb, var(--profile-color, var(--today)) 72%, white);
  background: color-mix(in srgb, var(--profile-color, var(--today)) 10%, rgba(255,255,255,.035));
  font-size: 11px;
  font-weight: 900;
}

.achievement-reward {
  color: var(--warn);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.achievement-reward-part {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.achievement-reward-part img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.achievement-toast {
  position: fixed;
  top: max(84px, 10vh);
  left: 50%;
  z-index: 1200;
  overflow: hidden;
  display: grid;
  width: min(92vw, 500px);
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  transform: translateX(-50%) translateY(-24px) scale(.9);
  border: 1px solid rgba(250,204,21,.62);
  border-radius: 24px;
  padding: 17px 20px 17px 16px;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 40%, rgba(250,204,21,.28), transparent 34%),
    linear-gradient(120deg, rgba(139,92,246,.28), rgba(255,79,200,.2), rgba(56,189,248,.16)),
    #10182d;
  box-shadow: 0 0 42px rgba(250,204,21,.2), 0 24px 70px rgba(0,0,0,.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .34s cubic-bezier(.2,.9,.25,1.2);
}

html[data-shop-theme="theme-night-market"] {
      --bg: #090615;
      --card: #17102a;
      --card2: #100b20;
      --text: #fff5ff;
      --muted: #c1acd2;
      --line: rgba(95, 235, 255, .2);
      --today: #5febff;
      --good: #74f7bd;
      --warn: #ff70d2;
}

html[data-shop-theme="theme-royal-eden"] {
      --bg: #07130f;
      --card: #10271d;
      --card2: #0b1d16;
      --text: #fff8df;
      --muted: #b9c8af;
      --line: rgba(238, 202, 104, .2);
      --today: #eeca68;
      --good: #7bdda0;
      --warn: #f2b35f;
}

.achievement-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.achievement-toast-media {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(174,139,255,.3);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 45%, rgba(123,92,246,.36) 0%, rgba(72,40,145,.24) 42%, transparent 72%),
    linear-gradient(145deg, #18102f, #090716 72%);
  box-shadow: inset 0 0 24px rgba(139,92,246,.18), 0 0 20px rgba(105,67,214,.24);
  filter: drop-shadow(0 0 14px rgba(250,204,21,.4));
}

.achievement-toast-media img { width: 100%; height: 100%; object-fit: contain; }

.achievement-toast-copy { display: grid; min-width: 0; gap: 4px; }
.achievement-toast-copy small { color: #fde68a; font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.achievement-toast-copy strong { color: #fff; font-size: clamp(20px, 4vw, 27px); line-height: 1.08; }
.achievement-toast-copy > span { color: rgba(255,255,255,.72); font-size: 13px; font-weight: 800; }

.achievement-toast-stack {
  position: fixed;
  top: max(72px, 8vh);
  left: 50%;
  z-index: 1200;
  display: grid;
  gap: 8px;
  width: min(92vw, 440px);
  max-height: calc(100dvh - 90px);
  transform: translateX(-50%);
  pointer-events: none;
}
.achievement-toast-stack .achievement-toast {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  border-radius: 16px;
  padding: 10px 12px 13px;
  transform: translateY(-12px) scale(.97);
  text-align: left;
  pointer-events: auto;
}
.achievement-toast-stack .achievement-toast.show { transform: translateY(0) scale(1); }
.achievement-toast-stack .achievement-toast-media { width: 54px; height: 54px; }
.achievement-toast-stack .achievement-toast-copy { gap: 2px; }
.achievement-toast-stack .achievement-toast-copy strong { font-size: 17px; }
.achievement-toast-stack .achievement-toast-copy > span { font-size: 11px; }
.achievement-toast-timebar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(250,204,21,.9);
  transform-origin: left;
  animation: achievement-toast-time var(--toast-duration, 2500ms) linear forwards;
}
.achievement-toast:hover .achievement-toast-timebar,
.achievement-toast:focus-within .achievement-toast-timebar { animation-play-state: paused; }
@keyframes achievement-toast-time { to { transform: scaleX(0); } }
.sticker-xp-toast { cursor: pointer; font: inherit; }
.sticker-xp-toast:focus-visible { outline: 2px solid #fde68a; outline-offset: 2px; }
.sticker-xp-toast .sticker-xp-toast-media { border-radius: 12px; font-size: 28px; }
.sticker-xp-toast .sticker-xp-toast-media img { clip-path: none; }
.sticker-xp-toast .sticker-xp-toast-media::before,
.sticker-xp-toast .sticker-xp-toast-media::after { display: none; }
.sticker-xp-toast-track {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.2);
}
.sticker-xp-toast-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #a7e8c1;
  transition: width .7s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .sticker-xp-toast-fill { transition: none; }
  .achievement-toast-stack .achievement-toast { transition: none; }
}

@media (max-width: 520px) {
  .achievement-toast { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .achievement-toast-media { width: 72px; height: 72px; }
  .achievement-toast-stack { top: max(58px, env(safe-area-inset-top)); }
  .achievement-toast-stack .achievement-toast { grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 8px 10px 12px; }
  .achievement-toast-stack .achievement-toast-media { width: 46px; height: 46px; }
}

.achievement-owner-avatar,
.journal-person,
.message-title,
.highscore-player,
.inventory-owner-line,
.event-person,
.event-person-chip,
.event-person-btn,
.quote-person-label,
#gamePlayer,
#dodgerPlayer,
#zenPlayer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.achievement-owner-avatar .game-avatar.compact,
.journal-person .game-avatar.compact,
.message-title .game-avatar.compact,
.highscore-player .game-avatar.compact,
.inventory-owner-line .game-avatar.compact,
.event-person .game-avatar.compact,
.event-person-btn .game-avatar.compact,
.quote-person-label .game-avatar.compact,
#gamePlayer .game-avatar.compact,
#dodgerPlayer .game-avatar.compact,
#zenPlayer .game-avatar.compact {
  width: 28px;
  height: 28px;
}

.event-person,
.event-person-chip {
  flex-wrap: wrap;
  row-gap: 4px;
}

@media (max-width: 820px) {
  .admin-lab-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-reset-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-reset-actions {
    justify-content: flex-start;
  }

}

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background-color: var(--bg);
      color: var(--text);
      min-height: 100vh;
      min-height: 100dvh;
      padding: 24px;
      position: relative;
      isolation: isolate;
    }

    /* Ein eigener viewportgroßer Dekor-Layer statt Gradients direkt auf dem
       Body. Fixed-Body-Backgrounds können zusammen mit WebGL-Canvas in
       Chromium gekachelt werden und diese Compositor-Artefakte über einen
       SPA-Routenwechsel hinweg behalten. Diese Ebene hat eine feste Fläche,
       kann nicht wiederholen und der unbegrenzt hohe Body darunter bleibt
       immer einfarbig. */
    body::before {
      content: "";
      position: fixed;
      z-index: -1;
      inset: 0;
      pointer-events: none;
      background-image:
        radial-gradient(circle at top left, color-mix(in srgb, var(--active-profile-color, #8ab4ff) 22%, transparent), transparent 35%),
        radial-gradient(circle at top right, rgba(51,209,122,.12), transparent 30%);
      background-position: top left, top right;
      background-size: 100% 100%, 100% 100%;
      background-repeat: no-repeat, no-repeat;
    }

    .app {
      max-width: 1180px;
      margin: 0 auto;
    }

    body:not(.og-design) {
      padding-inline: var(--page-gutter);
    }

    body:not(.og-design) .app {
      max-width: var(--page-content-width);
    }

    .bro-icon {
      width: 1em;
      height: 1em;
      display: block;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex: 0 0 auto;
    }

    header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 20px;
      margin-bottom: 22px;
      border-top: 3px solid color-mix(in srgb, var(--active-profile-color, transparent) 72%, transparent);
      padding-top: 14px;
    }

    h1 {
      margin: 0;
      font-size: clamp(32px, 6vw, 56px);
      letter-spacing: -.06em;
      line-height: .95;
    }

    .subtitle {
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 16px;
      max-width: 680px;
    }

    .pill {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      color: var(--muted);
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 13px;
      white-space: nowrap;
    }

    .header-actions {
      display: grid;
      justify-items: end;
      gap: 10px;
    }

    .header-top-actions,
    .session-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .profile-switch {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .profile-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 999px;
      color: var(--muted);
      font-size: 13px;
    }

    .profile-btn.active {
      color: var(--text);
      background: rgba(138,180,255,.16);
      border-color: rgba(138,180,255,.45);
    }

    [data-profile-person] {
      --profile-color: var(--today);
    }

    .profile-dot {
      width: .72em;
      height: .72em;
      display: inline-block;
      flex: 0 0 auto;
      margin-right: 7px;
      border-radius: 999px;
      background: var(--profile-color);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-color) 16%, transparent);
      vertical-align: -.03em;
    }

    .game-avatar {
      width: 72px;
      height: 72px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border-radius: 20px;
      background:
        radial-gradient(circle at 35% 24%, rgba(255,255,255,.18), transparent 28%),
        color-mix(in srgb, var(--profile-color) 20%, rgba(255,255,255,.045));
      border: 1px solid color-mix(in srgb, var(--profile-color) 42%, var(--line));
      box-shadow: 0 12px 28px rgba(0,0,0,.18), 0 0 0 4px color-mix(in srgb, var(--profile-color) 10%, transparent);
      overflow: hidden;
    }

    .game-avatar.compact {
      width: 30px;
      height: 30px;
      border-radius: 10px;
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-color) 12%, transparent);
    }

    .game-avatar svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .profile-btn[data-profile-person],
    .event-person-btn[data-profile-person],
    .pill[data-profile-person] {
      border-color: color-mix(in srgb, var(--profile-color) 42%, var(--line));
      background: color-mix(in srgb, var(--profile-color) 12%, rgba(255,255,255,.045));
    }

    .profile-btn[data-profile-person].active,
    .event-person-btn[data-profile-person].active {
      border-color: color-mix(in srgb, var(--profile-color) 72%, white);
      background: color-mix(in srgb, var(--profile-color) 24%, rgba(255,255,255,.05));
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 16%, transparent) inset;
    }

    .site-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 18px;
    }

    .nav-link {
      position: relative;
      min-width: 138px;
      min-height: 44px;
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr) auto;
      align-items: center;
      gap: 9px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, var(--line));
      border-radius: 16px;
      padding: 9px 11px;
      color: var(--muted);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 7%, transparent), transparent 70%),
        rgba(255,255,255,.04);
      font-size: 13px;
      font-weight: 900;
      text-align: left;
      text-decoration: none;
      box-shadow: 0 10px 24px rgba(0,0,0,.08);
      overflow: hidden;
      transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease, color .14s ease;
    }

    /* "Mehr"-Overflow nur in der mobilen Bottom-Bar; Desktop zeigt alle Tabs. */
    .nav-more-toggle {
      font-family: inherit;
      cursor: pointer;
    }

    .spa-nav .nav-more-toggle {
      display: none;
    }

    .nav-icon {
      width: 24px;
      height: 24px;
      display: grid;
      place-items: center;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 74%, white);
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, rgba(255,255,255,.055));
      font-size: 12px;
      font-weight: 950;
      line-height: 1;
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
      transition: transform .14s ease, background .14s ease, color .14s ease;
    }

    .nav-icon .bro-icon {
      width: 16px;
      height: 16px;
    }

    .nav-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .nav-link.active {
      color: var(--text);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, rgba(255,255,255,.06)), rgba(255,255,255,.045) 72%),
        rgba(138,180,255,.12);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 64%, white);
      box-shadow:
        0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent) inset,
        0 12px 28px color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, transparent);
    }

    .nav-link:hover {
      color: color-mix(in srgb, var(--text) 86%, var(--muted));
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 36%, var(--line));
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 13%, transparent), transparent 70%),
        rgba(255,255,255,.06);
      transform: translateX(2px);
    }

    .nav-link:hover .nav-icon,
    .nav-link.active .nav-icon {
      color: #fff;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 36%, rgba(255,255,255,.08));
      transform: scale(1.04);
    }

    .nav-link:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
      outline-offset: 3px;
    }

    .nav-link.active::before {
      content: "";
      position: absolute;
      inset: 8px auto 8px 0;
      width: 3px;
      border-radius: 0 999px 999px 0;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
    }

    .nav-link.has-unread {
      border-color: color-mix(in srgb, var(--good) 58%, var(--line));
    }

    .spa-page {
      min-height: 100vh;
    }

    .spa-app {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: auto minmax(0, 1fr);
      min-height: calc(100vh - 48px);
    }

    /* Grid-Items dürfen nicht über ihre Spaltenbreite hinauswachsen
       (min-width:auto würde sie auf ihre Min-Content-Breite aufblähen und
       so horizontalen Overflow erzeugen – v. a. im Header auf dem Handy). */
    .spa-app > * {
      min-width: 0;
    }

    .spa-header {
      margin-bottom: 16px;
    }

    .spa-vue-mount {
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: auto minmax(0, 1fr);
    }

    .spa-view-shell {
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr);
    }

    .spa-frame {
      width: 100%;
      min-height: 760px;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .spa-frame-stack {
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
    }

    /* Verschachtelte Layout-Grids: Items dürfen ihre Spalte nicht sprengen. */
    .spa-vue-mount > *,
    .spa-view-shell > *,
    .spa-frame-stack > * {
      min-width: 0;
    }

    .spa-frame[hidden] {
      display: none;
    }

    .spa-navigation-pending {
      position: fixed;
      z-index: 60;
      left: var(--spa-pending-left, 0);
      top: var(--spa-pending-top, 0);
      bottom: 0;
      width: var(--spa-pending-width, 100vw);
      height: auto;
      display: none;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: var(--muted);
      background: var(--bg);
      font-size: 13px;
      font-weight: 850;
      pointer-events: none;
    }

    .spa-navigation-pending.show {
      display: flex;
    }

    .spa-route-loading,
    .achievement-page-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 180px;
      border: 1px solid var(--line);
      border-radius: 18px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
      font-size: 13px;
      font-weight: 850;
    }

    .achievement-page-loading {
      position: sticky;
      z-index: 4;
      top: 8px;
      min-height: 42px;
      margin-bottom: 10px;
      border-style: dashed;
      background: rgba(11,16,32,.88);
      backdrop-filter: blur(8px);
      pointer-events: none;
    }

    .achievement {
      content-visibility: auto;
      contain-intrinsic-size: auto 360px;
    }

    .spa-route-loading {
      min-height: max(320px, calc(100dvh - 250px));
      border: 0;
      border-radius: 0;
      background: var(--bg);
    }

    .games-page {
      position: relative;
    }

    .games-page-loading {
      position: absolute;
      z-index: 5;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 260px;
      border: 1px solid var(--line);
      border-radius: 18px;
      color: var(--muted);
      background: rgba(11,16,32,.88);
      font-size: 13px;
      font-weight: 850;
    }

    .games-page.is-loading > :not(.spa-route-loading),
    .achievements-page.is-initial-loading > :not(.spa-route-loading) {
      visibility: hidden;
    }

    .spa-route-spinner {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
      border: 2px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 24%, transparent);
      border-top-color: var(--active-profile-color, var(--today));
      border-radius: 999px;
      animation: spa-route-spin .75s linear infinite;
    }

    @keyframes spa-route-spin {
      to { transform: rotate(360deg); }
    }

    .nav-badge {
      min-width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 0 6px;
      color: #07120c;
      background: var(--good);
      font-size: 11px;
      font-weight: 950;
      line-height: 1;
      box-shadow: 0 0 0 3px rgba(51,209,122,.12);
    }

    .changelog-button {
      position: relative;
      width: 42px;
      min-width: 42px;
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      background: rgba(255,255,255,.055);
      border: 1px solid var(--line);
    }

    .session-icon-btn {
      position: relative;
      width: 42px;
      min-width: 42px;
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      background: rgba(255,255,255,.055);
      border: 1px solid var(--line);
    }

    .header-route-shortcut {
      text-decoration: none;
    }

    .header-route-icon,
    .header-route-icon .bro-icon {
      width: 19px;
      height: 19px;
      display: inline-flex;
    }

    .header-route-badge {
      position: absolute;
      top: -6px;
      right: -7px;
      min-width: 18px;
      height: 18px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      padding: 0 4px;
      color: #07120c;
      background: var(--good);
      font-size: 10px;
      font-weight: 950;
      line-height: 1;
      box-shadow: 0 0 0 3px rgba(51,209,122,.12);
    }

    .header-route-badge[hidden],
    .header-route-shortcut .changelog-new[hidden] {
      display: none;
    }

    .header-route-shortcut.has-unread {
      color: var(--text);
      border-color: color-mix(in srgb, var(--good) 58%, var(--line));
      background: color-mix(in srgb, var(--good) 12%, rgba(255,255,255,.055));
    }

    .header-route-shortcut.has-new {
      color: var(--text);
      border-color: rgba(246,193,119,.45);
      background: rgba(246,193,119,.1);
    }

    .session-icon-btn svg {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .user-hub {
      position: relative;
      --profile-color: var(--active-profile-color, var(--today));
    }

    .user-hub-trigger {
      position: relative;
      min-height: 44px;
      display: grid;
      grid-template-columns: 34px minmax(0, auto) 14px;
      align-items: center;
      gap: 9px;
      border-radius: 999px;
      padding: 4px 10px 4px 5px;
      color: var(--text);
      border-color: color-mix(in srgb, var(--profile-color) 56%, var(--line));
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color) 24%, rgba(255,255,255,.04)), rgba(255,255,255,.045)),
        rgba(255,255,255,.055);
      box-shadow:
        0 0 0 2px color-mix(in srgb, var(--profile-color) 14%, transparent) inset,
        0 14px 30px color-mix(in srgb, var(--profile-color) 14%, transparent);
      transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
    }

    .user-hub-trigger-new {
      position: absolute;
      top: -7px;
      right: -10px;
      pointer-events: none;
    }

    .user-hub-trigger.has-new {
      border-color: color-mix(in srgb, var(--warn) 58%, var(--line));
    }

    .user-hub-trigger:hover {
      border-color: color-mix(in srgb, var(--profile-color) 74%, white);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color) 32%, rgba(255,255,255,.05)), rgba(255,255,255,.07)),
        rgba(255,255,255,.07);
    }

    .user-hub-avatar {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      overflow: hidden;
    }

    .user-hub-avatar .profile-dot {
      width: 16px;
      height: 16px;
      margin: 0;
    }

    .user-hub-avatar .game-avatar {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      box-shadow: none;
    }

    .user-hub-name {
      max-width: 112px;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 950;
    }

    .user-hub-caret {
      position: relative;
      width: 14px;
      height: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: color-mix(in srgb, var(--profile-color) 72%, white);
      font-size: 0;
      transition: transform .14s ease;
    }

    .user-hub-caret .bro-icon {
      width: 14px;
      height: 14px;
    }

    .user-hub.is-open .user-hub-caret {
      transform: rotate(180deg);
    }

    .user-hub.is-open .user-hub-trigger {
      border-color: color-mix(in srgb, var(--profile-color) 74%, white);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color) 34%, rgba(255,255,255,.06)), rgba(255,255,255,.08)),
        rgba(255,255,255,.08);
      box-shadow:
        0 0 0 2px color-mix(in srgb, var(--profile-color) 20%, transparent) inset,
        0 18px 36px color-mix(in srgb, var(--profile-color) 18%, transparent);
    }

    .user-hub-menu {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      z-index: 50;
      width: 240px;
      max-height: min(540px, calc(100vh - 120px));
      display: grid;
      gap: 6px;
      border: 1px solid color-mix(in srgb, var(--profile-color) 38%, var(--line));
      border-radius: 16px;
      padding: 8px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--profile-color) 12%, rgba(21,27,47,.96)), rgba(16,23,42,.96)),
        var(--card2);
      box-shadow: 0 24px 60px rgba(0,0,0,.34);
      overflow-y: auto;
    }

    .user-hub-menu[hidden] {
      display: none;
    }

    .user-hub-menu::before {
      content: "";
      position: absolute;
      top: -6px;
      right: 22px;
      width: 10px;
      height: 10px;
      border-left: 1px solid color-mix(in srgb, var(--profile-color) 38%, var(--line));
      border-top: 1px solid color-mix(in srgb, var(--profile-color) 38%, var(--line));
      background: color-mix(in srgb, var(--profile-color) 10%, rgba(21,27,47,.98));
      transform: rotate(45deg);
    }

    .user-hub-menu-account {
      min-width: 0;
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      margin: 0 2px 4px;
      border-bottom: 1px solid var(--line);
      padding: 7px 8px 11px;
    }

    .user-hub-menu-avatar {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 50%;
    }

    .user-hub-menu-avatar .game-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      box-shadow: none;
    }

    .user-hub-menu-avatar .profile-dot {
      margin: 0;
    }

    .user-hub-menu-account-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .user-hub-menu-account-copy strong,
    .user-hub-menu-account-copy small {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .user-hub-menu-account-copy strong {
      font-size: 13px;
    }

    .user-hub-menu-account-copy small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }

    .user-hub-menu-link {
      position: relative;
      min-height: 42px;
      width: 100%;
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      border: 0;
      border-radius: 12px;
      padding: 8px 10px;
      color: var(--text);
      background: transparent;
      text-decoration: none;
      font-size: 13px;
      font-weight: 900;
      text-align: left;
    }

    .user-hub-menu-new {
      position: absolute;
      right: 9px;
    }

    .user-hub-desktop-links {
      display: grid;
      gap: 4px;
      margin-bottom: 2px;
      border-bottom: 1px solid var(--line);
      padding-bottom: 6px;
    }

    .user-hub-menu-link:hover {
      background: color-mix(in srgb, var(--profile-color) 16%, rgba(255,255,255,.055));
    }

    .user-hub-menu-link.active {
      background: color-mix(in srgb, var(--profile-color) 22%, rgba(255,255,255,.06));
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color) 18%, transparent) inset;
    }

    .user-hub-logout {
      cursor: pointer;
      color: color-mix(in srgb, var(--bad) 72%, white);
    }

    .user-hub-menu-icon {
      width: 26px;
      height: 26px;
      display: grid;
      place-items: center;
      border-radius: 10px;
      color: color-mix(in srgb, var(--profile-color) 78%, white);
      background: color-mix(in srgb, var(--profile-color) 16%, rgba(255,255,255,.06));
      font-size: 12px;
      font-weight: 950;
    }

    .user-hub-menu-icon .bro-icon {
      width: 15px;
      height: 15px;
    }

    .feedback-mute-toggle {
      margin-right: 10px;
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 48%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, rgba(255,255,255,.055));
    }

    .feedback-mute-toggle::after {
      content: "";
      position: absolute;
      top: 9px;
      right: -10px;
      width: 1px;
      height: 24px;
      background: var(--line);
      pointer-events: none;
    }

    .feedback-mute-toggle.muted {
      color: var(--muted);
      border-color: rgba(255,92,122,.45);
      background: rgba(255,92,122,.1);
    }

    .changelog-button.has-new {
      color: var(--text);
      border-color: rgba(246,193,119,.45);
      background: rgba(246,193,119,.1);
    }

    .changelog-button-icon {
      width: 20px;
      height: 20px;
      display: inline-flex;
    }

    .changelog-button-icon svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .changelog-new {
      position: absolute;
      top: -7px;
      right: -9px;
    }

    .changelog-backdrop {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(3,6,14,.72);
      backdrop-filter: blur(10px);
    }

    .changelog-modal {
      width: min(100%, 680px);
      max-height: min(720px, 88vh);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(21,27,47,.96);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .changelog-modal-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      padding: 18px;
      border-bottom: 1px solid var(--line);
    }

    .changelog-kicker {
      color: var(--warn);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .changelog-modal h2 {
      margin: 3px 0 0;
      font-size: 30px;
      line-height: 1;
      letter-spacing: -.04em;
    }

    .changelog-close {
      width: 38px;
      height: 38px;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      background: rgba(255,255,255,.055);
    }

    .changelog-list {
      display: grid;
      gap: 10px;
      padding: 14px;
      overflow: auto;
    }

    .changelog-archive {
      display: grid;
      justify-content: center;
      padding: 6px 0 2px;
    }

    .changelog-archive-button {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 9px 18px;
      background: rgba(255,255,255,.05);
      color: var(--muted);
      font-weight: 800;
      cursor: pointer;
    }

    .changelog-archive-button:hover:not(:disabled) {
      color: var(--warn);
      border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
    }

    .changelog-archive-button:disabled {
      opacity: .6;
      cursor: default;
    }

    .changelog-entry {
      display: grid;
      gap: 0;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 0;
      background: rgba(255,255,255,.045);
      overflow: visible;
    }

    .changelog-entry-minor,
    .changelog-entry-major {
      background: rgba(255,255,255,.055);
      border-color: color-mix(in srgb, var(--today) 22%, var(--line));
      box-shadow: 0 14px 34px rgba(0,0,0,.16);
    }

    .changelog-entry-major {
      border-color: rgba(255,92,122,.28);
      background:
        linear-gradient(90deg, rgba(255,92,122,.075), transparent 68%),
        rgba(255,255,255,.06);
    }

    .changelog-entry-fix {
      background: rgba(255,255,255,.03);
      border-color: rgba(255,255,255,.08);
    }

    .changelog-entry-top {
      width: 100%;
      min-height: 86px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto 18px;
      justify-content: space-between;
      align-items: start;
      gap: 12px;
      border: 0;
      border-radius: 12px;
      padding: 16px 18px;
      text-align: left;
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--today) 13%, transparent), transparent 62%),
        rgba(255,255,255,.035);
      cursor: pointer;
      list-style: none;
      overflow: visible;
    }

    .changelog-entry-fix .changelog-entry-top {
      min-height: 58px;
      padding: 12px 16px;
      background: rgba(255,255,255,.018);
    }

    .changelog-entry-fix[open] .changelog-entry-top {
      background: rgba(255,255,255,.032);
    }

    .changelog-entry-top::-webkit-details-marker {
      display: none;
    }

    .changelog-entry.is-new .changelog-entry-top {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--warn) 18%, transparent), transparent 64%),
        rgba(246,193,119,.055);
    }

    .changelog-entry-top:hover .changelog-title {
      color: var(--warn);
    }

    .changelog-entry-top::after {
      content: "";
      width: 9px;
      height: 9px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      color: var(--muted);
      font-weight: 950;
      transform: rotate(45deg);
      transition: transform .15s ease;
      align-self: center;
      justify-self: center;
      margin-top: 4px;
    }

    .changelog-entry[open] .changelog-entry-top::after {
      transform: rotate(-135deg);
    }

    .changelog-version {
      color: var(--today);
      font-size: 12px;
      font-weight: 950;
    }

    .changelog-entry-new {
      margin-left: 7px;
      vertical-align: 1px;
    }

    .changelog-title {
      margin-top: 4px;
      color: var(--text);
      font-size: 22px;
      font-weight: 950;
      line-height: 1.15;
      letter-spacing: 0;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .changelog-entry-fix .changelog-version {
      color: color-mix(in srgb, var(--today) 72%, var(--muted));
      font-size: 11px;
      font-weight: 850;
    }

    .changelog-entry-fix .changelog-title {
      color: color-mix(in srgb, var(--text) 86%, var(--muted));
      font-size: 17px;
      font-weight: 820;
      line-height: 1.2;
    }

    .changelog-meta {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 5px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      white-space: nowrap;
      padding-top: 36px;
    }

    .changelog-entry-fix .changelog-meta {
      padding-top: 22px;
      opacity: .82;
    }

    .changelog-type {
      border-radius: 999px;
      padding: 4px 7px;
      color: var(--text);
      background: rgba(138,180,255,.14);
      border: 1px solid rgba(138,180,255,.28);
      font-weight: 950;
      text-transform: uppercase;
    }

    .changelog-type.major {
      background: rgba(255,92,122,.14);
      border-color: rgba(255,92,122,.34);
    }

    .changelog-type.fix {
      background: rgba(51,209,122,.12);
      border-color: rgba(51,209,122,.3);
      color: color-mix(in srgb, var(--text) 82%, var(--muted));
      font-weight: 760;
    }

    .changelog-entry ul {
      margin: 0;
      padding-left: 18px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .changelog-entry > ul {
      display: grid;
      gap: 10px;
      padding: 14px 18px 16px 36px;
      border-top: 1px solid rgba(255,255,255,.08);
    }

    .changelog-entry-fix > ul {
      padding-top: 12px;
      padding-bottom: 13px;
      border-top-color: rgba(255,255,255,.055);
    }

    .changelog-change-group {
      list-style: none;
      margin-left: -18px;
    }

    .changelog-change-group-title {
      width: fit-content;
      margin-bottom: 5px;
      border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line));
      border-radius: 999px;
      padding: 3px 8px;
      color: var(--warn);
      background: rgba(246,193,119,.08);
      font-size: 11px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .changelog-change-group ul {
      padding-left: 18px;
    }

    @media (max-width: 560px) {
      .changelog-entry-top {
        grid-template-columns: minmax(0, 1fr) 18px;
      }

      .changelog-meta {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 0;
      }

      .changelog-entry-top::after {
        grid-column: 2;
        grid-row: 1;
      }

    }

    .welcome-page {
      display: grid;
      place-items: center;
      padding: 20px;
    }

    .welcome-shell {
      width: min(100%, 460px);
    }

    .welcome-card {
      background: rgba(21,27,47,.82);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 28px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .welcome-card h1 {
      margin-top: 12px;
    }

    .welcome-badge {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(138,180,255,.38);
      border-radius: 999px;
      padding: 8px 11px;
      color: var(--today);
      background: rgba(138,180,255,.12);
      font-size: 13px;
      font-weight: 900;
    }

    .access-form {
      display: grid;
      gap: 10px;
      margin-top: 22px;
    }

    .access-form[hidden] {
      display: none;
    }

    .welcome-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 52px;
      margin-top: 18px;
      border: 1px solid var(--line);
      border-radius: 16px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
      font-size: 13px;
      font-weight: 850;
    }

    .welcome-loading[hidden] {
      display: none;
    }

    .welcome-card.is-loading .access-form {
      pointer-events: none;
      opacity: .54;
    }

    .access-form label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .access-picker {
      display: grid;
      gap: 8px;
    }

    .access-picker[hidden] {
      display: none;
    }

    .access-picker-toggle {
      width: 100%;
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px 12px;
      color: var(--text);
      background: rgba(255,255,255,.045);
      font: inherit;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .access-picker-toggle:hover,
    .access-picker-toggle:focus-visible {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 46%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 12%, rgba(255,255,255,.045));
      outline: none;
    }

    .access-picker-caret {
      transition: transform .16s ease;
    }

    .access-picker.is-open .access-picker-caret {
      transform: rotate(180deg);
    }

    .access-section-label {
      margin-top: 6px;
      color: var(--text);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .access-mode-note {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .access-mode-note[hidden],
    .access-profile-options[hidden] {
      display: none;
    }

    .access-profile-options {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 6px;
      background: rgba(255,255,255,.045);
    }

    .access-profile-btn {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 42px;
      border: 1px solid transparent;
      border-radius: 12px;
      padding: 10px 12px;
      color: var(--muted);
      background: transparent;
      font: inherit;
      font-weight: 850;
      cursor: pointer;
      transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease, opacity .16s ease, filter .16s ease;
    }

    .access-profile-btn small {
      color: color-mix(in srgb, var(--muted) 88%, white);
      font-size: 11px;
      font-weight: 700;
    }

    .access-profile-btn.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
      background: linear-gradient(135deg,
        color-mix(in srgb, var(--active-profile-color, var(--today)) 30%, rgba(255,255,255,.08)),
        color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255,255,255,.05))
      );
      box-shadow:
        0 0 0 2px color-mix(in srgb, var(--active-profile-color, var(--today)) 20%, transparent) inset,
        0 10px 22px color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, rgba(0,0,0,.28));
    }

    .access-profile-btn[data-profile-person] {
      border-color: color-mix(in srgb, var(--profile-color) 38%, transparent);
      background: color-mix(in srgb, var(--profile-color) 12%, transparent);
    }

    .access-profile-btn[data-profile-person].muted-account {
      filter: saturate(.45);
      opacity: .58;
    }

    .access-profile-btn[data-profile-person].active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--profile-color) 82%, white);
      background: linear-gradient(135deg,
        color-mix(in srgb, var(--profile-color) 34%, rgba(255,255,255,.08)),
        color-mix(in srgb, var(--profile-color) 18%, rgba(255,255,255,.05))
      );
      box-shadow:
        0 0 0 2px color-mix(in srgb, var(--profile-color) 24%, transparent) inset,
        0 10px 22px color-mix(in srgb, var(--profile-color) 18%, rgba(0,0,0,.28));
    }

    .access-form input {
      width: 100%;
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px 14px;
      color: var(--text);
      background: rgba(255,255,255,.06);
      font: inherit;
      outline: none;
    }

    .access-form input:focus {
      border-color: rgba(138,180,255,.6);
      box-shadow: 0 0 0 3px rgba(138,180,255,.12);
    }

    .access-password-field {
      position: relative;
      width: 100%;
    }

    .access-password-field > input {
      padding-right: 56px;
    }

    .access-password-toggle {
      position: absolute;
      z-index: 2;
      top: 50%;
      right: 4px;
      width: 40px;
      min-width: 40px;
      height: 40px;
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 0;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      background: transparent;
      transform: translateY(-50%);
    }

    .access-password-toggle:hover,
    .access-password-toggle:focus-visible {
      color: var(--text);
      background: rgba(138,180,255,.14);
      outline: none;
    }

    .access-password-toggle:focus-visible {
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--today) 70%, white);
    }

    .access-password-toggle-icon,
    .access-password-toggle-icon .bro-icon {
      width: 20px;
      height: 20px;
      display: block;
      pointer-events: none;
    }

    .access-password-toggle-label {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      clip-path: inset(50%);
      white-space: nowrap;
    }

    .access-password-match {
      min-height: 18px;
      margin: -4px 0 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .access-password-match.matches {
      color: var(--good);
    }

    .access-password-match.mismatch {
      color: var(--bad);
    }

    @media (pointer: coarse) {
      .access-password-field > input {
        padding-right: 58px;
      }

      .access-password-toggle {
        right: 2px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        touch-action: manipulation;
      }
    }

    .access-form .access-remember {
      display: flex;
      align-items: center;
      gap: 9px;
      color: var(--text);
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
    }

    .access-form .access-remember input {
      width: 18px;
      min-height: 18px;
      flex: 0 0 auto;
      accent-color: var(--today);
    }

    .access-error {
      color: var(--bad);
      font-size: 13px;
      font-weight: 900;
    }

    .access-success {
      display: grid;
      gap: 8px;
      padding: var(--control-pad);
      border: 1px solid color-mix(in srgb, var(--good) 48%, transparent);
      border-radius: var(--control-radius);
      color: var(--text);
      background: color-mix(in srgb, var(--good) 12%, transparent);
      font-size: 13px;
      line-height: 1.5;
    }

    .access-success[hidden] {
      display: none;
    }

    .access-success strong {
      color: var(--good);
    }

    .access-toolbox {
      margin-top: 8px;
      padding-top: 6px;
      border-top: 1px solid rgba(255,255,255,.08);
    }

    .access-tool-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-top: 8px;
    }

/* Quelle: components.css */
/* Geteilte UI-Primitiven: Buttons, Tabs, Toasts, Abschnitts-Header, Leerzustände.
   Einzige Quelle für das Basis-Aussehen dieser Bausteine. Feature-Stylesheets
   (css/<feature>.css) definieren keine unprefixten Selektoren mehr – sie
   überschreiben nur noch mit feature-eigenen Klassen (.shop-…, .journal-…). */

body {
  -webkit-user-select: none;
  user-select: none;
}

.new-banner {
  min-width: 30px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--warn) 68%, white);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  color: #161006;
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 14%, transparent);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.new-banner[hidden] { display: none; }

.ui-section-switcher {
  --switcher-accent: var(--active-profile-color, var(--today));
  --switcher-height: 42px;
  --switcher-icon-size: 24px;
  width: max-content;
  max-width: 100%;
}

/* Die doppelte Klassen-Spezifität hält alte Feature-Klassen davon ab, wieder
   eigene Pillen, Radien oder aktive Zustände über die gemeinsame Basis zu legen. */
.ui-section-switcher.ui-section-switcher {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  max-width: min(100%, calc(100vw - (2 * var(--page-gutter))));
  gap: 4px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--switcher-accent) 22%, var(--line));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--switcher-accent) 5%, rgba(255,255,255,.035));
}

.ui-section-switcher.ui-section-switcher > button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: var(--switcher-height);
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.ui-section-switcher.ui-section-switcher > button:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--switcher-item-accent, var(--switcher-accent)) 30%, var(--line));
  background: rgba(255,255,255,.055);
  box-shadow: none;
  transform: none;
}

.ui-section-switcher.ui-section-switcher > button.active,
.ui-section-switcher.ui-section-switcher > button[aria-selected="true"] {
  color: var(--text);
  border-color: color-mix(in srgb, var(--switcher-item-accent, var(--switcher-accent)) 52%, var(--line));
  background: color-mix(in srgb, var(--switcher-item-accent, var(--switcher-accent)) 17%, rgba(255,255,255,.055));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--switcher-item-accent, var(--switcher-accent)) 10%, transparent);
}

.ui-section-switcher.ui-section-switcher.is-compact {
  --switcher-height: 36px;
  --switcher-icon-size: 20px;
  padding: 3px;
}

.ui-section-switcher.ui-section-switcher.is-prominent {
  --switcher-height: 48px;
  --switcher-icon-size: 27px;
  padding: 5px;
}

.ui-section-switcher.ui-section-switcher.is-prominent > button {
  padding: 10px 17px;
  font-size: 15px;
  font-weight: 950;
}

.ui-section-switcher.ui-section-switcher.is-compact > button {
  padding: 6px 11px;
  font-size: 12px;
}

.ui-section-switcher-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--switcher-icon-size);
  height: var(--switcher-icon-size);
}

.ui-section-switcher-icon img,
.ui-section-switcher-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ui-section-switcher-label {
  min-width: 0;
}

.ui-section-switcher-indicator {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--good);
}

.ui-section-switcher-badge {
  min-width: 20px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-pill);
  padding: 2px 6px;
  color: var(--text);
  background: rgba(255,255,255,.12);
  font-size: 10px;
  font-weight: 950;
}

.ui-tab-group .ui-section-switcher-button {
  position: relative;
}

.ui-tab-new {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--new-indicator-color);
  pointer-events: none;
}

input,
textarea,
[contenteditable="true"],
.ui-prompt-guide,
.ui-prompt-guide *,
[data-selectable],
[data-selectable] * {
  -webkit-user-select: text;
  user-select: text;
}

/* Basis für alle Buttons. Größen kommen aus den Tokens in base-shell.css. */
button {
  appearance: none;
  border: 1px solid var(--line);
  cursor: pointer;
  border-radius: var(--control-radius);
  padding: var(--control-pad);
  font-weight: 900;
  color: var(--text);
  background: rgba(255,255,255,.08);
  transition: transform .12s ease, background .12s ease, border-color .12s ease, filter .12s ease;
}

/* Bewegungsfreies Hover-Feedback: ein translateY-Lift wird in Scroll-
   Containern (overflow) an der Kante abgeschnitten. brightness wirkt auch
   auf Varianten mit eigenem Hintergrund (.good/.bad, Feature-Buttons).
   Keine transform-Hover auf Buttons einführen – siehe AGENTS.md. */
button:hover {
  background: rgba(255,255,255,.12);
  filter: brightness(1.1);
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: none;
}

button.good {
  background: rgba(51,209,122,.15);
  border-color: rgba(51,209,122,.45);
}

button.bad {
  background: rgba(255,92,122,.14);
  border-color: rgba(255,92,122,.45);
}

/* Dezenter Sekundär-Button (pillenförmig). */
.ghost-btn {
  min-height: 34px;
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255,255,255,.045);
}

.ghost-btn.danger {
  color: var(--bad);
  border-color: rgba(255,92,122,.34);
  background: rgba(255,92,122,.08);
}

.ghost-btn.accept {
  color: var(--good);
  border-color: rgba(51,209,122,.38);
  background: rgba(51,209,122,.1);
}

.ghost-btn[hidden] {
  display: none;
}

/* Tab-/Umschalt-Button in Button-Gruppen (role="group"). */
.toggle-btn {
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 13px;
}

.toggle-btn.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--warn) 52%, var(--line));
  background: rgba(246,193,119,.12);
}

/* Abschnitts-Header (Titel + Untertitel) am Kopf jeder View. */
.section-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.section-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* Leerzustand für Listen/Grids. `.empty-achievements` ist der Alt-Name und
   bleibt als Alias, bis alle Templates auf `.empty-state` umgestellt sind. */
.empty-state,
.empty-achievements {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 14px;
  font-size: 13px;
}

/* Default-Look für <modal-dialog> (js/components/vue-ui.js), wenn keine
   backdrop-class/card-class übergeben wird. Features mit eigenem Look
   (music-modal, inbox-dialog, …) stylen weiter ihre eigenen Klassen. */
.dialog-backdrop-default {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5,8,18,.62);
  backdrop-filter: blur(6px);
}

.bro-app-dialog-backdrop { z-index: 2000; }

.dialog-card-default {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  width: min(92vw, 460px);
  max-height: 85vh;
  overflow: auto;
  display: grid;
  gap: 14px;
}

/* App-weiter Toast (`<div class="toast" id="…Toast">`). */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--toast-bottom-offset);
  width: max-content;
  max-width: min(92vw, 520px);
  transform: translateX(-50%);
  background: #0e1628;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.toast.has-action {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.toast-action {
  border: 0;
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  color: #07120c;
  background: var(--good);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.toast-action:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--good) 70%, white);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .toast {
    max-width: calc(100vw - 24px);
  }

  .toast.has-action {
    justify-content: space-between;
    text-align: left;
  }
}

@media (pointer: coarse) {
  .toast-action {
    min-height: 44px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding-inline: 14px;
    touch-action: manipulation;
  }
}
.modal-scroll-locked {
  position: fixed;
  inset-inline: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
.ui-dropdown {
  position: relative;
}
.ui-dropdown.open { z-index: 121; }

.ui-dropdown-trigger {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(14, 20, 36, .92);
  cursor: pointer;
}

.ui-dropdown-chevron {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 140ms ease, color 140ms ease;
}

.ui-dropdown-chevron .bro-icon {
  width: 100%;
  height: 100%;
}

.ui-dropdown.open .ui-dropdown-chevron,
.ui-dropdown-chevron.open {
  color: var(--text);
  transform: rotate(180deg);
}

.ui-dropdown-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(11, 16, 30, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
}

.ui-dropdown-menu[hidden] {
  display: none;
}

.ui-dropdown-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: calc(var(--control-radius) - 4px);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ui-dropdown-option:hover,
.ui-dropdown-option:focus-visible,
.ui-dropdown-option.selected {
  border-color: color-mix(in srgb, var(--today) 38%, var(--line));
  background: color-mix(in srgb, var(--today) 12%, rgba(255, 255, 255, .035));
}

.ui-dropdown-option:disabled {
  color: var(--muted);
  opacity: .52;
  cursor: not-allowed;
}

.ui-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--control-height);
  padding: var(--control-pad);
  border-radius: var(--control-radius);
  font-weight: 900;
  text-align: left;
}

.ui-select-check {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-size: 13px;
}

.ui-dropdown-option.selected .ui-select-check {
  color: rgba(11, 16, 30, .98);
  background: var(--text);
}

.ui-icon-button,
.ui-close-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text) 28%, var(--line));
  border-radius: 50%;
  color: var(--muted);
  background: var(--card2);
  cursor: pointer;
  line-height: 0;
  transition: color .14s ease, background .14s ease, border-color .14s ease, filter .14s ease;
}

.ui-icon-button-small, .ui-close-button-small { width: 30px; height: 30px; min-width: 30px; min-height: 30px; }
.ui-icon-button-large, .ui-close-button-large { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.ui-icon-button-glyph { display: grid; place-items: center; width: 20px; height: 20px; line-height: 0; pointer-events: none; }
.ui-icon-button-small .ui-icon-button-glyph { width: 16px; height: 16px; }
.ui-icon-button-large .ui-icon-button-glyph { width: 24px; height: 24px; }
.ui-icon-button-glyph > svg, .ui-icon-button > svg { display: block; width: 100%; height: 100%; margin: 0; }
.ui-icon-button-danger { color: var(--bad); border-color: color-mix(in srgb,var(--bad) 60%,var(--line)); background: color-mix(in srgb,var(--bad) 17%,rgba(12,14,24,.92)); }
.ui-close-button svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ui-icon-button:hover,
.ui-close-button:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 58%, var(--line)); background: color-mix(in srgb, var(--text) 10%, var(--card2)); }
.ui-icon-button-danger:hover { color: var(--bad); }
.ui-icon-button:focus-visible,
.ui-close-button:focus-visible { outline: 2px solid var(--today); outline-offset: 2px; }

.ui-modal-header {
  display: flex;
  flex-direction: row;
  margin: 0;
  border-top: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--control-pad);
  padding-bottom: var(--control-pad);
  border-bottom: 1px solid var(--line);
}
.ui-modal-header-actions { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; min-width: 0; }
.ui-modal-header-actions .ui-section-switcher { --switcher-height: 36px; }

.ui-modal-heading { min-width: 0; flex: 1 1 0; overflow-wrap: anywhere; }
.ui-modal-heading .section-title { margin: 0; }
.ui-modal-heading .section-subtitle { margin-top: 4px; }
.ui-form-dialog-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; width: min(92vw, 520px); padding: 0; overflow: hidden; }
.ui-form-dialog-small { width: min(92vw, 400px); }
.ui-form-dialog-large { width: min(92vw, 720px); }
.ui-form-dialog-card > .ui-modal-header { position: sticky; z-index: 2; top: 0; padding: 18px; background: var(--card); }
.ui-form-dialog-body { display: grid; gap: 12px; min-width: 0; padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.ui-modal-actions { position: sticky; z-index: 2; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid var(--line); background: var(--card); box-shadow: 0 -10px 24px rgba(0,0,0,.14); }
@media (max-width: 620px) {
  .ui-modal-header { flex-wrap: wrap; }
  .ui-modal-header-actions { order: 3; flex-basis: 100%; justify-content: flex-start; }
}

.ui-bottom-sheet-backdrop { position: fixed; inset: 0; z-index: 180; display: flex; align-items: flex-end; justify-content: center; padding: max(8px, env(safe-area-inset-top)) 0 0; background: rgba(3, 6, 14, .66); backdrop-filter: blur(12px); overscroll-behavior: contain; }
.ui-bottom-sheet { width: min(100%, 620px); max-height: calc(100dvh - max(8px, env(safe-area-inset-top))); display: flex; flex-direction: column; margin: 0; padding: 0 18px max(14px, env(safe-area-inset-bottom)); overflow: hidden auto; border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line)); border-bottom: 0; border-radius: 24px 24px 0 0; color: var(--text); background: color-mix(in srgb, var(--card) 94%, #0b1020); box-shadow: 0 -22px 70px rgba(0,0,0,.42); will-change: transform; }
.ui-bottom-sheet-handle-zone { flex: 0 0 30px; min-height: 30px; display: grid; place-items: center; margin: 0 -18px; touch-action: none; cursor: grab; user-select: none; }
.ui-bottom-sheet-handle-zone:active { cursor: grabbing; }
.ui-bottom-sheet-handle { width: 42px; height: 5px; border-radius: var(--radius-pill); background: rgba(255,255,255,.26); }
.ui-prompt-guide { display: grid; gap: 7px; border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line)); border-radius: var(--control-radius); padding: 10px 12px; }
.ui-prompt-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-weight: 900; }
.ui-prompt-copy { width: 34px; min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border-radius: var(--control-radius); }
.ui-prompt-guide p { margin: 0; color: var(--muted); font-size: 12px; }
.ui-prompt-guide textarea { width: 100%; resize: vertical; }
.ui-profile-multi-picker { position: relative; min-width: min(280px, 100%); }
.ui-profile-multi-picker > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--control-height); padding: var(--control-pad); border: 2px solid color-mix(in srgb, var(--text) 62%, var(--line)); border-radius: var(--control-radius); color: var(--text); background: rgba(255,255,255,.055); font-weight: 950; cursor: pointer; list-style: none; }
.ui-profile-multi-picker > summary::-webkit-details-marker { display: none; }
.ui-profile-multi-picker > summary::after { content: "⌄"; flex: 0 0 auto; }
.ui-profile-multi-picker[open] > summary::after { content: "⌃"; }
.ui-profile-multi-picker > summary small { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ui-profile-multi-options { display: grid; gap: 6px; max-height: 220px; margin-top: 6px; padding: 7px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--card2); box-shadow: 0 14px 30px rgba(0,0,0,.32); }
.ui-profile-multi-option { display: flex; align-items: center; width: 100%; min-height: 40px; gap: 9px; border: 2px solid color-mix(in srgb, var(--text) 32%, var(--line)); color: var(--text); background: transparent; text-align: left; opacity: .72; }
.ui-profile-multi-option.active { border-color: var(--text); background: color-mix(in srgb, var(--profile-color, var(--text)) 32%, var(--card2)); box-shadow: inset 4px 0 0 var(--text); opacity: 1; }
.ui-profile-multi-option.locked:disabled { cursor: default; opacity: 1; filter: none; }
.ui-profile-multi-check { display: inline-grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 5px; color: var(--text); font-size: 14px; line-height: 1; }
.ui-profile-multi-option.active .ui-profile-multi-check { color: var(--bg); background: var(--text); }
.ui-profile-multi-avatar { display: inline-grid; width: 28px; height: 28px; place-items: center; }
.ui-profile-multi-avatar svg { width: 100%; height: 100%; }
.ui-image-draft-editor { display: grid; grid-template-columns: minmax(180px, 300px) minmax(180px, 1fr); gap: 12px; min-width: 0; align-items: stretch; }
.ui-image-draft-preview-column { display: grid; align-content: start; gap: 9px; min-width: 0; }
.ui-image-draft-stage { position: relative; display: grid; width: 100%; aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: var(--control-radius); background-color: #b9bdc8; background-image: linear-gradient(45deg, #e6e8ee 25%, transparent 25%), linear-gradient(-45deg, #e6e8ee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e6e8ee 75%), linear-gradient(-45deg, transparent 75%, #e6e8ee 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; touch-action: none; user-select: none; }
.ui-image-draft-stage.editable { cursor: grab; }
.ui-image-draft-stage.editable:active { cursor: grabbing; }
.ui-image-draft-motif { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ui-image-draft-frame-backdrop { position: absolute; z-index: 0; inset: 0; border-radius: inherit; background: radial-gradient(circle at 38% 30%, rgba(38,52,75,.28), rgba(9,13,24,.16) 72%); pointer-events: none; }
.ui-image-draft-stage .ui-image-draft-image { width: 100%; height: 100%; object-fit: contain; transform-origin: center; pointer-events: none; }
.ui-image-draft-stage.has-fixed-frame:not(.allows-frame-overlap) .ui-image-draft-motif { overflow: hidden; clip-path: circle(43% at 50% 50%); }
.ui-image-draft-stage.allows-frame-overlap .ui-image-draft-motif { z-index: 3; }
.ui-image-draft-fixed-frame { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ui-image-draft-reference { position: absolute; inset: 0; display: grid; place-items: stretch; pointer-events: none; }
.ui-image-draft-reference.underlay { z-index: 0; }
.ui-image-draft-reference.overlay { z-index: 2; }
.ui-image-draft-reference svg { width: 100%; height: 100%; display: block; }
.ui-image-draft-edit { position: absolute; z-index: 4; top: 9px; right: 9px; display: grid; place-items: center; width: 38px; height: 38px; min-height: 0; padding: 0; border: 1px solid color-mix(in srgb, white 42%, var(--line)); border-radius: 50%; color: white; background: rgba(10,15,29,.88); box-shadow: 0 6px 18px rgba(0,0,0,.35); font-size: 20px; cursor: pointer; }
.ui-image-draft-edit:hover, .ui-image-draft-edit:focus-visible { border-color: white; background: color-mix(in srgb, var(--accent) 35%, #0a0f1d); filter: brightness(1.08); }
.ui-image-draft-guide { position: absolute; z-index: 3; display: block; background: color-mix(in srgb, white 60%, var(--accent)); opacity: .48; pointer-events: none; }
.ui-image-draft-guide.snapped { background: color-mix(in srgb, var(--accent) 80%, white); box-shadow: 0 0 7px var(--accent); opacity: 1; }
.ui-image-draft-guide.vertical { top: 0; bottom: 0; left: 50%; width: 1px; }
.ui-image-draft-guide.horizontal { top: 50%; right: 0; left: 0; height: 1px; }
.ui-image-draft-scale { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 850; }
.ui-image-draft-scale input { width: 100%; min-width: 0; accent-color: var(--accent); }
.ui-image-draft-scale strong { min-width: 42px; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.ui-image-draft-dropzone { display: grid; min-height: 100%; place-items: center; align-content: center; gap: 7px; padding: 20px; border: 3px dashed color-mix(in srgb, var(--accent) 82%, white 18%); border-radius: var(--control-radius); color: var(--text); background: color-mix(in srgb, var(--accent) 14%, var(--card2)); box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--accent) 5%, transparent); text-align: center; cursor: pointer; }
.ui-image-draft-dropzone:hover, .ui-image-draft-dropzone.drag-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 17%, var(--card2)); filter: brightness(1.06); }
.ui-image-draft-dropzone small { color: var(--muted); }
.ui-image-draft-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ui-image-draft-editor > small { grid-column: 1 / -1; color: var(--muted); line-height: 1.4; }
.ui-image-draft-prompt { grid-column: 1 / -1; }
@media (max-width: 620px) { .ui-image-draft-editor { grid-template-columns: minmax(0, 1fr); } .ui-image-draft-stage { width: min(100%, 300px); } .ui-image-draft-dropzone { min-height: 120px; } .ui-image-draft-editor > small { grid-column: 1; } }

@media (max-width: 560px) {
  .ui-modal-actions { flex-direction: column-reverse; }
  .ui-modal-actions button { width: 100%; }
}
/* Projektweiter Dialog für imperative und nicht an Vue gebundene Bereiche. */
.bro-app-dialog {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
}
.bro-app-dialog h2,
.bro-app-dialog p { margin: 0; }
.bro-app-dialog p { color: var(--muted); line-height: 1.5; white-space: pre-line; }
.bro-app-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.bro-app-dialog-actions button { width: auto; min-width: 96px; }
.bro-app-dialog-confirm.danger { border-color: rgba(231,90,112,.62); background: rgba(158,38,61,.78); }

.ui-emoji-picker { display: grid; gap: 7px; width: max-content; max-width: min(310px, calc(100vw - 20px)); padding: 7px; border: 1px solid rgba(151,130,208,.44); border-radius: 12px; color: #46345f; background: rgba(248,245,255,.98); box-shadow: 0 12px 30px rgba(30,20,55,.24); }
.ui-emoji-picker.expanded { width: min(310px, calc(100vw - 20px)); }
.ui-emoji-picker-strip,
.ui-emoji-picker-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.ui-emoji-picker-section { display: grid; gap: 5px; padding-top: 7px; border-top: 1px solid rgba(113,88,174,.16); }
.ui-emoji-picker-section:first-child { padding-top: 0; border-top: 0; }
.ui-emoji-picker-favorites .ui-emoji-picker-strip { max-height: 82px; overflow-y: auto; }
.ui-emoji-picker-grid { max-height: 210px; overflow-y: auto; }
.ui-emoji-picker-label { color: #76698c; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.ui-emoji-picker-option,
.ui-emoji-picker-more { display: grid; place-items: center; width: 34px; height: 34px; min-width: 34px; min-height: 34px; border: 1px solid transparent; border-radius: 8px; padding: 4px; color: #46345f; background: rgba(113,88,174,.08); font-size: 20px; line-height: 1; cursor: pointer; }
.ui-emoji-picker-option:hover,
.ui-emoji-picker-option:focus-visible,
.ui-emoji-picker-more:hover,
.ui-emoji-picker-more:focus-visible { border-color: rgba(113,88,174,.35); background: rgba(113,88,174,.17); }
.ui-emoji-picker-option img { width: 100%; height: 100%; object-fit: contain; }
.ui-emoji-picker-more { border-style: dashed; font-size: 24px; font-weight: 800; }
.ui-emoji-picker-empty { max-width: 220px; padding: 5px 7px; color: #76698c; font-size: 12px; }
.ui-emoji-picker-sheet { gap: 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.ui-emoji-picker-sheet-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.ui-emoji-picker-sheet-section { display: grid; gap: 9px; }
.ui-emoji-picker-sheet-section + .ui-emoji-picker-sheet-section { padding-top: 14px; border-top: 1px solid var(--line); }
.ui-emoji-picker-sheet-section h3 { margin: 0; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.ui-emoji-picker-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.ui-emoji-picker-sheet-grid .ui-emoji-picker-option { width: 100%; height: 46px; min-width: 44px; min-height: 46px; border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, var(--line)); border-radius: 12px; background: rgba(255,255,255,.055); font-size: 24px; }
.ui-emoji-picker-sheet-grid .ui-emoji-picker-option img { width: 32px; height: 32px; }

/* Wiederverwendbarer On/Off-Schalter für native Checkboxen. */
.ui-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.ui-switch > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ui-switch-track { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: color-mix(in srgb, var(--muted) 25%, var(--card2)); transition: background .18s ease, border-color .18s ease; }
.ui-switch-track i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); box-shadow: 0 2px 5px rgba(0,0,0,.28); transition: transform .18s ease, background .18s ease; }
.ui-switch > input:checked + .ui-switch-track { border-color: color-mix(in srgb, var(--good) 72%, var(--line)); background: color-mix(in srgb, var(--good) 62%, var(--card2)); }
.ui-switch > input:checked + .ui-switch-track i { transform: translateX(18px); background: #fff; }
.ui-switch > input:focus-visible + .ui-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-switch > input:disabled + .ui-switch-track { opacity: .48; }
.ui-select-value { display: inline-flex; align-items: center; gap: 7px; }
.ui-select-option-icon { width: 22px; height: 22px; flex: 0 0 auto; object-fit: contain; }
.ui-currency-amount-picker { display: grid; grid-template-columns: minmax(128px, auto) minmax(96px, 1fr) auto; gap: 8px; align-items: center; }
.ui-currency-amount-picker > input { width: 100%; min-width: 0; }
.ui-rejection-field { display: grid; gap: 7px; color: var(--muted); font-weight: 800; }
.ui-rejection-field textarea { width: 100%; resize: vertical; }
.ui-rejection-field small { font-weight: 600; line-height: 1.4; }
@media (max-width: 560px) { .ui-currency-amount-picker { grid-template-columns: minmax(0, 1fr) minmax(90px, .65fr); } .ui-currency-amount-picker > button { grid-column: 1 / -1; } }

.streak-seal-burst { position: fixed; z-index: 10000; width: 28px; height: 28px; pointer-events: none; object-fit: contain; animation: streak-seal-claim 680ms cubic-bezier(.16,.8,.3,1) forwards; }
@keyframes streak-seal-claim { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.45) rotate(0deg); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--seal-x)),calc(-50% + var(--seal-y))) scale(.9) rotate(var(--seal-r)); } }
@media (prefers-reduced-motion: reduce) { .streak-seal-burst { animation-duration: 180ms; } }
.ui-link-preview {
  position: relative;
  width: min(100%, 460px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.06);
}
.ui-link-preview-link {
  display: grid;
  grid-template-columns: minmax(78px, 30%) minmax(0, 1fr);
  width: 100%;
  height: 78px;
  color: inherit;
  text-decoration: none;
}
.ui-link-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  background: rgba(0,0,0,.12);
}
.ui-link-preview-link:not(:has(.ui-link-preview-image)) { grid-template-columns: 1fr; }
.ui-link-preview-copy { display: grid; align-content: center; gap: 1px; min-width: 0; overflow: hidden; padding: 6px 10px; }
.ui-link-preview-copy small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.ui-link-preview-copy small { display: flex; align-items: center; gap: 6px; }
.ui-link-preview-copy small img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.ui-link-preview-copy strong { overflow: hidden; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ui-link-preview-copy > span { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ui-link-preview-link:hover { filter: brightness(1.1); }
.ui-link-preview-remove { position: absolute; top: 7px; right: 7px; background: var(--card); box-shadow: var(--shadow); }
.ui-link-preview-loading { padding: 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.ui-tab-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ui-tab-strip::-webkit-scrollbar { display: none; }

.ui-tab-strip > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ui-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  min-width: 0;
  padding-block: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ui-pagination-range { white-space: nowrap; }
.ui-pagination-pages { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ui-pagination-pages .ghost-btn { display: inline-grid; place-items: center; width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; }
.ui-pagination-pages .bro-icon { width: 17px; height: 17px; }
.ui-pagination-prev .bro-icon { transform: rotate(90deg); }
.ui-pagination-next .bro-icon { transform: rotate(-90deg); }
.ui-pagination-size { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ui-pagination-size select { min-width: 64px; min-height: 34px; border: 1px solid var(--line); border-radius: var(--control-radius); padding: 4px 7px; color: var(--text); background: var(--card2); }
.ui-add-tile.ui-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  border: 1px dashed color-mix(in srgb, var(--active-profile-color, var(--accent)) 48%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--active-profile-color, var(--accent)) 5%, transparent);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  font: inherit;
}
.ui-add-tile.ui-add-tile:hover:not(:disabled) {
  border-color: var(--active-profile-color, var(--accent));
  background: color-mix(in srgb, var(--active-profile-color, var(--accent)) 11%, transparent);
  color: var(--text);
}
.ui-add-tile:focus-visible { outline: 2px solid var(--active-profile-color, var(--accent)); outline-offset: 2px; }
.ui-add-tile:disabled { cursor: wait; opacity: .65; }
.ui-add-tile-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; border: 1px solid currentColor; border-radius: 50%; }
.ui-add-tile-icon .bro-icon { width: 29px; height: 29px; }
.ui-add-tile-copy { display: grid; justify-items: center; gap: 3px; min-width: 0; max-width: 100%; }
.ui-add-tile-copy strong { font-size: 14px; line-height: 1.25; }
.ui-add-tile-copy small { color: var(--muted); font-size: 11px; line-height: 1.3; }

.achievement-rarity-common { --rarity-color: #d5a66f; --rarity-deep: #4c2f20; --rarity-material: #745039; --rarity-progress-start: #6f4327; --rarity-progress-end: #c28a50; --achievement-frame: url("../assets/achievement-frames/common.png"); }
.achievement-rarity-uncommon { --rarity-color: #4f8fff; --rarity-deep: #6f421f; --rarity-material: #ae7447; --rarity-progress-start: #82502b; --rarity-progress-end: #d99a58; --achievement-frame: url("../assets/achievement-frames/uncommon.png"); }
.achievement-rarity-rare { --rarity-color: #67df91; --rarity-deep: #59636c; --rarity-material: #b9c4ca; --rarity-progress-start: #7f8c94; --rarity-progress-end: #eef3f5; --achievement-frame: url("../assets/achievement-frames/rare.png"); }
.achievement-rarity-epic { --rarity-color: #ff5b62; --rarity-deep: #8f641e; --rarity-material: #d5a548; --rarity-progress-start: #a36916; --rarity-progress-end: #ffd36a; --achievement-frame: url("../assets/achievement-frames/epic.png"); }
.achievement-rarity-legendary { --rarity-color: #ffd486; --rarity-deep: #8b6b55; --rarity-material: #e5d6d4; --rarity-progress-start: #c9af92; --rarity-progress-end: #fff0d9; --achievement-frame: url("../assets/achievement-frames/legendary.png"); }
.achievement-rarity-secret { --rarity-color: #f05cff; --rarity-deep: #351044; --rarity-material: #19101f; --rarity-progress-start: #120d18; --rarity-progress-end: #8d43bc; --achievement-frame: url("../assets/achievement-frames/secret.png"); }
.achievement-rarity-glitch { --rarity-color: #8dfbff; --rarity-deep: #020104; --rarity-material: #08080c; --rarity-progress-start: #020104; --rarity-progress-end: #a65cff; --achievement-frame: none; }
.ui-achievement-badge-art.achievement-rarity-glitch::before { clip-path: circle(47% at 50% 50%); background: #020104; }
.ui-achievement-badge-art.achievement-rarity-glitch > .ui-achievement-badge-image { animation: achievement-glitch-image 7s steps(1, end) infinite; }
@keyframes achievement-glitch-image { 0%, 92%, 96%, 100% { transform: none; filter: none; } 93% { transform: translate(1.5%, -.5%); filter: hue-rotate(28deg); } 94% { transform: translate(-1%, .5%); filter: contrast(1.8); } }
@media (prefers-reduced-motion: reduce) { .ui-achievement-badge-art.achievement-rarity-glitch > .ui-achievement-badge-image { animation: none; } }

.ui-achievement-badge-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  flex: 0 0 auto;
  overflow: visible;
  border-radius: 8px;
  background: transparent;
  isolation: isolate;
}
.ui-achievement-badge-art::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  clip-path: circle(43% at 50% 50%);
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 2px, color-mix(in srgb, var(--rarity-color) 5%, transparent) 2px 3px),
    radial-gradient(circle at 50% 50%, var(--rarity-deep) 0 70%, #080b14 100%);
  pointer-events: none;
}
.ui-achievement-badge-art > img { position: absolute; display: block; width: 100%; height: 100%; object-fit: contain; }
.ui-achievement-badge-art > img { filter: saturate(calc(1 - var(--medal-dust, 0) * .84)) brightness(calc(1 - var(--medal-dust, 0) * .52 + var(--badge-hover-exposure, 0))); transition: filter .22s ease; }
.ui-achievement-badge-art > .ui-achievement-badge-clean { z-index: 2; filter: brightness(calc(1 + var(--badge-hover-exposure, 0))); -webkit-mask-image: var(--medal-clean-mask); mask-image: var(--medal-clean-mask); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.ui-achievement-badge-art::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 1%;
  border-radius: 50%;
  clip-path: circle(39% at 50% 50%);
  pointer-events: none;
  opacity: calc(var(--medal-dust, 0) * .94);
  -webkit-mask-image: var(--medal-dirt-mask);
  mask-image: var(--medal-dirt-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  background:
    radial-gradient(circle at 38% 32%, rgba(171, 175, 178, .2), transparent 64%),
    rgba(125, 130, 134, .25);
}
.ui-achievement-badge-art.is-polished { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--rarity-color) 45%, white)); }
.ui-achievement-polish-glints { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.ui-achievement-polish-glints i { position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, white 0 8%, rgba(223, 239, 255, .65) 15%, transparent 65%); mix-blend-mode: screen; opacity: .15; animation: achievement-polished-glint 3.8s ease-in-out infinite; }
.ui-achievement-polish-glints i:nth-child(1) { left: 18%; top: 17%; }
.ui-achievement-polish-glints i:nth-child(2) { right: 9%; top: 46%; animation-delay: -1.3s; }
.ui-achievement-polish-glints i:nth-child(3) { left: 30%; bottom: 9%; animation-delay: -2.6s; }
@keyframes achievement-polished-glint { 0%, 70%, 100% { opacity: .08; } 84% { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .ui-achievement-polish-glints i { animation: none; opacity: .5; } }
.ui-achievement-badge-image { z-index: 1; clip-path: circle(43% at 50% 50%); }
.ui-achievement-badge-art > .ui-achievement-badge-frame { z-index: 3; pointer-events: none; filter: saturate(calc(1 - var(--medal-frame-dust, 0) * .84)) brightness(calc(1 - var(--medal-frame-dust, 0) * .52 + var(--badge-hover-exposure, 0))); }
.ui-achievement-badge-art > .ui-achievement-badge-frame-clean { z-index: 5; filter: brightness(calc(1 + var(--badge-hover-exposure, 0))); -webkit-mask-image: var(--medal-frame-clean-mask); mask-image: var(--medal-frame-clean-mask); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.ui-achievement-badge-art > .ui-achievement-badge-frame { transition: filter .22s ease; }
.ui-achievement-badge-art.achievement-frame-overlap .ui-achievement-badge-image { z-index: 3; clip-path: none; }
.ui-rich-text { min-width: 0; min-height: min-content; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ui-rich-text-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.ui-rich-text-toolbar .jtb-btn { width: 36px; height: 36px; font-size: 16px; }
.ui-rich-text-toolbar .jtb-color-dot { width: 28px; height: 28px; margin: 4px; padding: 0; border: 1px solid var(--line); border-radius: 50%; }
.ui-rich-text-content { min-height: 130px; max-height: 260px; overflow-y: auto; padding: 12px; outline: none; overflow-wrap: anywhere; line-height: 1.5; user-select: text; -webkit-user-select: text; }
.ui-rich-text-content:focus { box-shadow: inset 0 0 0 1px var(--today); }
.ui-rich-text-long-emoji-run { line-break: anywhere; }
.ui-rich-text-content:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.ui-rich-text-content p, .ui-rich-text-content div { margin: 0; }
.ui-rich-text-content ul, .ui-rich-text-content ol { margin: 6px 0; padding-left: 24px; }
.ui-rich-text-count { padding: 6px 12px; color: var(--muted); font-size: 12px; text-align: right; }
.ui-rich-text-count.is-error { color: var(--bad); }
.ui-rich-text.is-disabled { opacity: .6; }
.ui-inline-emoji, .ui-rich-text-content img[data-journal-emoji] { display: inline-block; width: 1.6em; height: 1.6em; object-fit: contain; vertical-align: middle; }
.ui-rich-text > .ui-emoji-picker { padding: 8px; border-bottom: 1px solid var(--line); }
.ui-gif-picker { display: grid; gap: 10px; min-width: 0; }
.ui-gif-picker > input { width: 100%; }
.ui-gif-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.ui-gif-results button { min-width: 0; padding: 0; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid transparent; border-radius: 6px; }
.ui-gif-results button.selected { border-color: var(--today); }
.ui-gif-results img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ui-gif-status, .ui-gif-attribution { color: var(--muted); font-size: 12px; }
.ui-sort-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ui-sort-control .ui-select { min-width: 0; flex: 1; }
.sticker-art { position: relative; display: inline-grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; padding: 0; container-type: size; background: transparent; }
.ui-variant-picker { display: flex; align-items: center; gap: var(--page-gutter); flex-wrap: wrap; }
.ui-variant-picker .ui-select { flex: 1; min-width: 120px; }
.ui-select-icon-only { width: max-content; }
.ui-select-icon-only .ui-dropdown-menu { left: auto; right: 0; min-width: 210px; }
.ui-variant-picker > button:not(.ui-icon-button) { display: inline-flex; align-items: center; gap: 6px; }
.sticker-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: brightness(calc(1 + var(--sticker-hover-exposure, 0))) drop-shadow(0 1px 1px #0003); transition: filter .22s ease; }
.sticker-art > span { font-size: 78cqw; line-height: 1; }
.sticker-art .sticker-art-sheen { position: absolute; inset: 0; pointer-events: none; mask-image: var(--sticker-print-mask); -webkit-mask-image: var(--sticker-print-mask); mask-size: contain; -webkit-mask-size: contain; mask-position: center; -webkit-mask-position: center; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; background: linear-gradient(115deg, transparent 20%, #ff97ce50 37%, #ffffff80 43%, #9bddff60 49%, transparent 65%); background-size: 230% 230%; background-position: 80% 50%; opacity: .16; transition: background-position .65s ease, opacity .3s ease; }
.sticker-art-silver .sticker-art-sheen { opacity: .22; }
.sticker-art-gold .sticker-art-sheen { opacity: .26; }
.sticker-art-pearl .sticker-art-sheen { opacity: .38; }
.sticker-art:hover .sticker-art-sheen, button:focus-visible .sticker-art-sheen { background-position: 20% 50%; }
@media (prefers-reduced-motion: reduce) { .sticker-art .sticker-art-sheen { transition: none; } }
.sticker-inline { border-radius: 20%; padding: 2px; box-sizing: content-box; }
.ui-material-tuning { display: grid; gap: 8px; }
.ui-material-tuning label { display: grid; gap: 4px; font-size: 12px; }
.ui-material-tuning label > span { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ui-material-tuning output { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ui-material-tuning input { width: 100%; min-width: 0; margin: 0; accent-color: var(--accent); touch-action: auto; }
.ui-material-tuning > button { width: 100%; justify-content: center; font-size: 12px; }
.ui-scene-navigation { position: absolute; z-index: 4; top: 50%; left: 10px; right: 10px; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
.ui-scene-navigation > button { pointer-events: auto; background: rgba(9, 13, 24, .82); }
.ui-scene-previous .ui-icon-button-glyph { transform: rotate(90deg); }
.ui-scene-next .ui-icon-button-glyph { transform: rotate(-90deg); }

.ui-collectible-scene-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-height: 88px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(9,13,24,.96);
}
.ui-collectible-scene-header > :first-child { flex: 1 1 auto; min-width: 0; }
.ui-collectible-scene-header .ui-close-button { flex: 0 0 auto; }
.ui-collectible-scene-kicker { color: #acc0d7; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.ui-collectible-scene-header h2 { min-width: 0; margin: 2px 0 0; overflow-wrap: anywhere; font-size: clamp(20px, 3vw, 28px); line-height: 1.15; }
.ui-collectible-scene-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; font-weight: 800; line-height: 1.3; text-align: center; pointer-events: none; }

/* Quelle: tracker.css */
    .tracker-tabs {
      --switcher-accent: var(--active-profile-color, var(--today));
      margin-bottom: 16px;
    }

    .tracker-hub-nav {
      --switcher-accent: var(--today);
      margin-bottom: 18px;
    }

    .tracker-overview { display: grid; gap: 18px; }
    .tracker-overview-hero {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      padding: clamp(20px, 4vw, 34px);
      border: 1px solid color-mix(in srgb, var(--today) 34%, var(--line));
      border-radius: 24px;
      background: radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--today) 24%, transparent), transparent 48%), var(--card);
    }
    .tracker-overview-checkin-alert {
      order: -2;
      border-color: color-mix(in srgb, var(--today) 58%, var(--line));
      background:
        radial-gradient(circle at 8% 15%, color-mix(in srgb, var(--today) 34%, transparent), transparent 36%),
        linear-gradient(135deg, color-mix(in srgb, var(--today) 13%, var(--card)), var(--card));
      box-shadow: 0 14px 38px color-mix(in srgb, var(--today) 13%, transparent);
    }
    .tracker-overview-alert-main { min-width: 0; display: flex; align-items: center; gap: clamp(14px, 3vw, 24px); }
    .tracker-overview-alert-copy { min-width: 0; }
    .tracker-overview-alert-icon {
      width: clamp(58px, 8vw, 76px);
      height: clamp(58px, 8vw, 76px);
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      border: 2px solid color-mix(in srgb, var(--today) 72%, white 12%);
      border-radius: 22px;
      color: #fff;
      background: color-mix(in srgb, var(--today) 72%, #111827);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 8px 24px color-mix(in srgb, var(--today) 24%, transparent);
      font-size: clamp(36px, 6vw, 52px);
      font-weight: 1000;
      line-height: 1;
    }
    .tracker-overview-kicker { color: var(--today); font-size: 12px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
    .tracker-overview-hero h2 { margin: 5px 0 6px; font-size: clamp(26px, 4vw, 40px); }
    .tracker-overview-hero p { margin: 0; color: var(--muted); }
    .tracker-checkin-cta {
      min-width: min(280px, 100%);
      padding: 16px 20px;
      border: 1px solid color-mix(in srgb, var(--today) 65%, white 10%);
      border-radius: 18px;
      background: color-mix(in srgb, var(--today) 24%, var(--card));
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }
    .tracker-checkin-cta span, .tracker-checkin-cta small { display: block; }
    .tracker-checkin-cta span { font-size: 18px; font-weight: 950; }
    .tracker-checkin-cta small { margin-top: 3px; color: var(--muted); }
    .tracker-checkin-cta:hover { filter: brightness(1.13); }

    .tracker-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
    .tracker-overview-card,
    .tracker-overview-card:hover {
      display: grid;
      gap: 14px;
      height: 236px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background:
        radial-gradient(circle at 88% 8%, var(--tracker-progress-soft, rgba(255,255,255,.04)), transparent 48%),
        linear-gradient(var(--tracker-progress-fill, rgba(118,160,72,.12)), var(--tracker-progress-fill, rgba(118,160,72,.12))),
        var(--card);
      color: var(--text);
      text-align: left;
      cursor: pointer;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.035),
        0 12px var(--tracker-shadow-size, 18px) rgba(0,0,0,.16);
      transition: filter .18s ease, border-color .18s ease, background .3s ease, box-shadow .3s ease;
    }
    .tracker-overview-card:hover { filter: brightness(1.12); border-color: color-mix(in srgb, var(--tracker-progress-color, var(--today)) 55%, var(--line)); }
    .tracker-overview-card.status-completed { border-color: color-mix(in srgb, var(--tracker-progress-color, var(--good)) 42%, var(--line)); }
    .tracker-overview-card.status-failed {
      border-color: color-mix(in srgb, var(--bad) 38%, var(--line));
    }
    .tracker-overview-card.status-fixed {
      border-color: color-mix(in srgb, #7398ff 58%, var(--line));
    }
    .tracker-overview-card.is-zero-streak,
    .tracker-overview-card.is-zero-streak:hover {
      background:
        radial-gradient(circle at 88% 8%, rgba(255,255,255,.035), transparent 48%),
        linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,.025)),
        var(--card);
      border-color: color-mix(in srgb, var(--muted) 28%, var(--line));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
    }
    .tracker-overview-card-head {
      display: grid;
      grid-template-rows: 44px 22px;
      align-items: start;
      gap: 6px;
      min-height: 72px;
    }
    .tracker-overview-card-head strong {
      min-width: 0;
      overflow: hidden;
      display: -webkit-box;
      line-height: 1.25;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      font-size: 17px;
    }
    .tracker-overview-name { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
    .tracker-overview-name > img { width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; }
    .tracker-overview-name > strong { min-width: 0; }
    .tracker-overview-card-head > span { color: var(--muted); font-size: 12px; font-weight: 800; }
    .tracker-overview-card.status-completed .tracker-overview-card-head > span { color: var(--good); }
    .tracker-overview-card.status-failed .tracker-overview-card-head > span { color: var(--bad); }
    .tracker-overview-card.status-fixed .tracker-overview-card-head > span { color: #9bb5ff; }
    .tracker-overview-status { display: inline-flex; align-items: center; justify-content: flex-start; gap: 5px; white-space: nowrap; }
    .tracker-overview-status b { font-size: 15px; line-height: 1; }
    .tracker-overview-status img { width: 22px; height: 22px; object-fit: contain; }
    .tracker-overview-card-streak { display: flex; align-items: center; gap: 10px; }
    .tracker-overview-streak-value { display: flex; align-items: baseline; gap: 8px; }
    .tracker-overview-card-streak b { font-size: 42px; line-height: 1; }
    .tracker-overview-card-streak small, .tracker-overview-card-meta { color: var(--muted); }
    .tracker-overview-card-meta { font-size: 13px; }
    .tracker-overview-flame {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      min-height: 50px;
      flex: 0 0 42px;
    }
    .tracker-overview-flame .streak-flame { transform: scale(.92); }
    .tracker-fixer-balance { display: inline-flex; align-items: center; gap: 7px; color: #b9c9ff; font-size: 13px; font-weight: 900; }
    .tracker-fixer-balance img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 3px 7px rgba(28,79,255,.32)); }
    .tracker-overview-fixer { min-height: 28px; margin-top: auto; }
    .tracker-overview-fixer-icon { position: relative; display: inline-flex; width: 26px; height: 26px; flex: 0 0 26px; }
    .tracker-overview-fixer.is-unavailable { color: var(--muted); opacity: .7; }
    .tracker-overview-fixer.is-unavailable img { filter: grayscale(1); opacity: .5; }
    .tracker-overview-fixer.is-unavailable .tracker-overview-fixer-icon::after {
      content: "";
      position: absolute;
      inset: 2px;
      border: 2px solid currentColor;
      border-radius: 50%;
      background: linear-gradient(45deg, transparent 44%, currentColor 45% 55%, transparent 56%);
    }
    .tracker-overview-card.is-dormant { opacity: .72; }
    .tracker-overview-market-card {
      place-content: center;
      justify-items: center;
      gap: 8px;
      border-style: dashed;
      border-color: color-mix(in srgb, var(--today) 48%, var(--line));
      background: color-mix(in srgb, var(--today) 7%, var(--card));
      text-align: center;
    }
    .tracker-overview-market-card:hover {
      text-align: center;
    }
    .tracker-overview-market-plus {
      display: grid;
      place-items: center;
      width: 62px;
      height: 62px;
      border-radius: 50%;
      color: var(--text);
      background: color-mix(in srgb, var(--today) 22%, rgba(255,255,255,.06));
      font-size: 46px;
      font-weight: 500;
      line-height: 1;
    }
    .tracker-overview-market-card strong { font-size: 18px; }
    .tracker-overview-market-card > span:last-child { color: var(--muted); font-size: 13px; }

    .tracker-overview-secondary { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(190px, 1fr)); gap: 12px; }
    .tracker-overview-secondary-quote-only { grid-template-columns: minmax(0, 1fr); }
    .tracker-overview-quote-shell { order: -1; }
    .tracker-overview-quote, .tracker-overview-action {
      min-height: 150px;
      padding: 20px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: var(--card);
      color: var(--text);
      text-align: left;
    }
    .tracker-overview-quote > span { color: var(--today); font-size: 12px; font-weight: 950; text-transform: uppercase; }
    .tracker-overview-quote blockquote { margin: 12px 0; font-size: 18px; font-weight: 750; }
    .tracker-overview-quote small { color: var(--muted); }
    .tracker-overview-action { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; cursor: pointer; }
    .tracker-overview-action strong { font-size: 20px; }
    .tracker-overview-action span { color: var(--muted); }
    .tracker-overview-action:hover { filter: brightness(1.12); border-color: color-mix(in srgb, var(--today) 45%, var(--line)); }

    @media (max-width: 760px) {
      .tracker-overview-hero { align-items: stretch; flex-direction: column; }
      .tracker-overview-alert-main { align-items: flex-start; }
      .tracker-overview-alert-icon { width: 54px; height: 54px; border-radius: 17px; font-size: 36px; }
      .tracker-overview-secondary { grid-template-columns: 1fr; }
      .tracker-overview { gap: 14px; }
      .tracker-overview-grid { grid-template-columns: 1fr; gap: 10px; }
      .tracker-overview-card,
      .tracker-overview-card:hover {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        gap: 9px 12px;
        height: auto;
        min-height: 136px;
        padding: 14px 16px;
        border-radius: 18px;
        box-shadow:
          inset 0 1px 0 rgba(255,255,255,.035),
          0 8px var(--tracker-shadow-size, 14px) rgba(0,0,0,.13);
      }
      .tracker-overview-card-head {
        grid-column: 1 / -1;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        min-height: 36px;
      }
      .tracker-overview-name { align-items: center; gap: 8px; }
      .tracker-overview-name > img { width: 32px; height: 32px; flex-basis: 32px; }
      .tracker-overview-card-head strong {
        display: block;
        overflow: hidden;
        font-size: 16px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .tracker-overview-card-head > .tracker-overview-status {
        flex: 0 0 auto;
        justify-content: flex-end;
        min-height: 28px;
        color: var(--muted);
        font-size: 11px;
      }
      .tracker-overview-status b { font-size: 14px; }
      .tracker-overview-status img { width: 20px; height: 20px; }
      .tracker-overview-card-streak { min-width: 0; gap: 7px; }
      .tracker-overview-card-streak b { font-size: 36px; }
      .tracker-overview-streak-value { gap: 6px; }
      .tracker-overview-card-streak small { font-size: 12px; font-weight: 800; }
      .tracker-overview-flame { width: 36px; min-height: 42px; flex-basis: 36px; }
      .tracker-overview-flame .streak-flame { transform: scale(.78); transform-origin: center; }
      .tracker-overview-card-meta {
        align-self: center;
        justify-self: end;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
      }
      .tracker-overview-fixer {
        grid-column: 1 / -1;
        min-height: 24px;
        margin-top: 0;
        font-size: 12px;
      }
      .tracker-overview-fixer-icon,
      .tracker-overview-fixer img { width: 22px; height: 22px; flex-basis: 22px; }
      .tracker-overview-market-card,
      .tracker-overview-market-card:hover {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-rows: auto auto;
        place-content: center stretch;
        justify-items: start;
        gap: 2px 12px;
        min-height: 104px;
        text-align: left;
      }
      .tracker-overview-market-plus {
        grid-row: 1 / 3;
        width: 42px;
        height: 42px;
        align-self: center;
        font-size: 32px;
      }
      .tracker-overview-market-card strong { align-self: end; font-size: 16px; }
      .tracker-overview-market-card > span:last-child { align-self: start; font-size: 12px; }
    }

    .tracker-controls {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 16px;
    }

    .tracker-controls .tracker-tabs {
      margin-bottom: 0;
    }
    .tracker-tab { display: inline-flex; align-items: center; gap: 7px; }
    .tracker-tab-icon { width: 24px; height: 24px; object-fit: contain; }
    .tracker-detail-identity { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
    .tracker-detail-identity > img { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; }
    .tracker-detail-identity > div { min-width: 0; }
    .tracker-detail-identity strong { font-size: 22px; }
    .tracker-detail-identity .tracker-flavor-text { margin: 4px 0 0; }

    .tracker-view-switch {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      min-width: max-content;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, var(--line));
      border-radius: 999px;
      padding: 6px;
      background: rgba(255,255,255,.035);
    }

    .tracker-view-label {
      padding-left: 8px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .tracker-view-switch .profile-switch {
      gap: 6px;
      justify-content: flex-end;
    }

    .tracker-view-switch .profile-btn {
      min-height: 32px;
      padding: 7px 10px;
      font-size: 12px;
    }

    .tracker-tab {
      min-height: 44px;
      padding: 10px 16px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.04);
      color: var(--muted);
      font-size: 15px;
      font-weight: 800;
      cursor: pointer;
      transition: none;
    }

    .tracker-tab:hover {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 34%, var(--line));
    }

    .tracker-tab.active,
    .tracker-tab.active:hover {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 58%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 16%, rgba(255,255,255,.04));
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--active-profile-color, #8ab4ff) 14%, transparent) inset;
    }

    .tracker-start-gate[hidden],
    .quote-shell[hidden],
    .achievements-shell[hidden],
    .inventory-shell[hidden],
    .calendar-shell[hidden],
    .players[hidden],
    .top-grid[hidden],
    .streak-hero[hidden] {
      display: none;
    }

    .daily-checkin-backdrop {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(5,8,18,.64);
      backdrop-filter: blur(10px);
    }

    .daily-checkin-card {
      position: relative;
      overflow: hidden;
      width: calc(100% - 30px);
      display: grid;
      gap: 12px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 46%, var(--line));
      border-radius: 20px;
      padding: 18px;
      background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--active-profile-color, var(--today)) 26%, transparent), transparent 48%),
        linear-gradient(135deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, transparent), transparent 62%),
        #151b2f;
      box-shadow: 0 24px 70px rgba(0,0,0,.44), 0 0 0 4px color-mix(in srgb, var(--active-profile-color, var(--today)) 10%, transparent);
      transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
    }

    .daily-checkin-stack {
      position: relative;
      width: min(390px, 100%);
      display: grid;
      align-items: center;
    }

    .daily-checkin-stack > .daily-checkin-card {
      grid-area: 1 / 1;
    }

    .daily-checkin-stack > .daily-checkin-card:not(.daily-checkin-preview) {
      z-index: 10;
    }

    .daily-checkin-preview {
      z-index: calc(8 - var(--daily-stack-index));
      min-height: 132px;
      align-self: stretch;
      align-content: end;
      pointer-events: none;
      opacity: 1;
      background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, transparent), transparent 48%),
        #151b2f;
      transform: translate(calc(var(--daily-stack-index) * 16px), calc(var(--daily-stack-index) * 13px)) scale(calc(1 - var(--daily-stack-index) * .025));
      transform-origin: center left;
      animation: none;
    }

    .daily-checkin-card.is-completed {
      border-color: color-mix(in srgb, var(--good) 78%, white);
      background:
        radial-gradient(circle at 18% 10%, rgba(51,209,122,.42), transparent 42%),
        linear-gradient(135deg, rgba(51,209,122,.26), #151b2f 64%);
      box-shadow: 0 24px 70px rgba(0,0,0,.44), 0 0 0 5px rgba(51,209,122,.2);
    }

    .daily-checkin-card.is-failed {
      border-color: color-mix(in srgb, var(--bad) 70%, #23050b);
      background:
        linear-gradient(135deg, rgba(255,92,122,.22), #2f0c14 56%),
        #151b2f;
      box-shadow: 0 20px 58px rgba(0,0,0,.5), 0 0 0 5px rgba(255,92,122,.14);
    }

    .daily-checkin-card.is-failed::before {
      content: "LOSS";
      position: absolute;
      right: -18px;
      top: 24px;
      z-index: 1;
      width: 124px;
      padding: 7px 0;
      border: 2px solid rgba(255,255,255,.26);
      color: rgba(255,255,255,.78);
      background: rgba(255,92,122,.2);
      font-size: 15px;
      font-weight: 950;
      letter-spacing: 0;
      text-align: center;
      transform: rotate(18deg);
      box-shadow: 0 10px 24px rgba(0,0,0,.24);
      animation: daily-checkin-loss-stamp .36s cubic-bezier(.18,.9,.24,1);
    }

    .daily-checkin-card.is-completed::after {
      content: "";
      position: absolute;
      inset: -28px;
      pointer-events: none;
      opacity: 0;
      background:
        radial-gradient(circle, currentColor 0 2px, transparent 3px) 12% 24% / 48px 48px,
        radial-gradient(circle, currentColor 0 2px, transparent 3px) 78% 18% / 58px 58px,
        radial-gradient(circle, currentColor 0 1.5px, transparent 3px) 62% 82% / 52px 52px;
      animation: daily-checkin-pop .42s ease-out;
      color: var(--good);
    }

    .daily-checkin-card.is-failed::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0;
      background:
        linear-gradient(118deg, transparent 0 43%, rgba(255,255,255,.18) 44% 46%, rgba(255,92,122,.46) 47% 53%, rgba(255,255,255,.16) 54% 56%, transparent 57%),
        radial-gradient(circle at 50% 100%, rgba(255,92,122,.24), transparent 42%);
      animation: daily-checkin-loss-mark .46s ease-out;
    }

    .daily-checkin-card.is-fixed {
      border-color: color-mix(in srgb, #63b3ed 72%, var(--line));
      background:
        radial-gradient(circle at 50% 25%, rgba(99,179,237,.3), transparent 44%),
        linear-gradient(135deg, rgba(42,116,160,.25), #121f30 62%);
      box-shadow: 0 22px 64px rgba(0,0,0,.48), 0 0 0 5px rgba(99,179,237,.16);
      animation: daily-checkin-fixer-shield .42s ease-out;
    }

    .daily-checkin-card.is-fixed::before {
      content: "FIXER";
      position: absolute;
      top: 20px;
      right: 18px;
      padding: 6px 9px;
      border: 2px solid rgba(202,235,255,.7);
      border-radius: var(--radius-pill);
      color: #e9f8ff;
      background: rgba(34,119,171,.72);
      font-size: 11px;
      font-weight: 950;
      letter-spacing: .06em;
      animation: daily-checkin-feedback-pop .24s cubic-bezier(.18,.9,.24,1);
    }

    .daily-checkin-card h2 {
      margin: 0;
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 82%, white);
      font-size: 13px;
      line-height: 1.05;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .daily-checkin-step {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      letter-spacing: .02em;
    }

    /* Quote-Stufe: bewusst anders als die Streak-Fenster – warmer Goldton. */
    .daily-checkin-card.daily-quote-card {
      border-color: rgba(230,201,146,.5);
      background:
        radial-gradient(circle at top left, rgba(230,201,146,.2), transparent 52%),
        linear-gradient(135deg, rgba(150,120,205,.14), transparent 62%),
        #131626;
      box-shadow: 0 24px 70px rgba(0,0,0,.46), 0 0 0 4px rgba(230,201,146,.1);
    }

    .daily-quote-kicker {
      color: #e6c992;
      font-size: 12px;
      font-weight: 950;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .daily-quote-text {
      margin: 2px 0;
      color: var(--text);
      font-size: 19px;
      font-weight: 800;
      font-style: italic;
      line-height: 1.34;
    }

    .daily-quote-source {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .daily-quote-hint {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .daily-quote-rating {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 6px;
    }

    .daily-quote-rating-btn {
      min-height: 38px;
      padding: 0;
      border: 1px solid rgba(230,201,146,.28);
      border-radius: 10px;
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 14px;
      font-weight: 900;
      cursor: pointer;
      transition: background .12s ease, border-color .12s ease, transform .1s ease;
    }

    .daily-quote-rating-btn:hover:not(:disabled) {
      border-color: rgba(230,201,146,.7);
      background: rgba(230,201,146,.16);
      transform: translateY(-1px);
    }

    .daily-quote-rating-btn:disabled {
      opacity: .55;
      cursor: default;
    }

    .daily-checkin-focus {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 30%, var(--line));
      border-radius: 16px;
      padding: 16px;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 9%, rgba(255,255,255,.04));
      animation: daily-checkin-focus-in .22s cubic-bezier(.18,.9,.24,1) both;
    }

    .daily-checkin-focus-copy {
      display: grid;
      gap: 7px;
      min-width: 0;
    }

    .daily-checkin-tracker-icon {
      width: 54px;
      height: 54px;
      margin-right: 5px;
      border-radius: 14px;
      object-fit: contain;
      filter: drop-shadow(0 5px 12px rgba(0,0,0,.3));
    }

    .daily-checkin-focus span {
      color: var(--text);
      font-size: 22px;
      font-weight: 950;
      line-height: 1.05;
    }

    .daily-checkin-focus strong,
    .daily-checkin-next {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .daily-checkin-save-error {
      color: var(--text);
      font-size: 13px;
      line-height: 1.5;
      margin: 0;
    }

    .daily-checkin-feedback {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      justify-self: center;
      height: 34px;
      min-height: 34px;
      border-radius: 999px;
      padding: 6px 11px;
      color: #07120c;
      background: var(--good);
      font-size: 12px;
      font-weight: 950;
      animation: daily-checkin-feedback-pop .24s cubic-bezier(.18,.9,.24,1);
    }

    .daily-checkin-feedback.is-hidden { visibility: hidden; animation: none; }

    .daily-checkin-card.is-failed .daily-checkin-feedback {
      color: #fff7f9;
      background: var(--bad);
    }

    .daily-checkin-fixers {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
    }

    .daily-checkin-fixers strong { color: var(--text); }

    .daily-checkin-streak-count {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      color: var(--text);
      font-size: 13px;
    }

    .daily-checkin-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      animation: daily-checkin-actions-in .24s cubic-bezier(.18,.9,.24,1) .02s both;
    }

    .daily-checkin-feedback-fixer {
      width: 22px;
      height: 22px;
      object-fit: contain;
      animation: daily-checkin-fixer-icon .42s cubic-bezier(.18,.9,.24,1);
    }

    @keyframes daily-checkin-fixer-icon {
      from { rotate: -110deg; scale: .55; opacity: 0; }
      to { rotate: 0deg; scale: 1; opacity: 1; }
    }

    .daily-checkin-actions button,
    .daily-checkin-later {
      min-height: 42px;
    }

    .daily-checkin-actions button:not(:disabled) {
      cursor: pointer;
    }

    .daily-checkin-card > .tracker-fixer-card-celebration {
      left: auto;
      right: 10px;
      top: 62px;
      translate: none;
      scale: .72;
      transform-origin: top right;
    }

    .daily-checkin-later {
      border: 0;
      color: var(--muted);
      background: transparent;
      font: inherit;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .daily-checkin-later:hover,
    .daily-checkin-later:focus-visible {
      color: var(--text);
      outline: none;
    }

    .daily-checkin-debug {
      justify-self: end;
      min-height: 28px;
      padding: 4px 8px;
      border-color: transparent;
      color: var(--muted);
      background: transparent;
      font-size: 10px;
      font-weight: 800;
    }

    @keyframes daily-checkin-pop {
      0% { opacity: 0; transform: scale(.82) rotate(0deg); }
      35% { opacity: .7; }
      100% { opacity: 0; transform: scale(1.16) rotate(8deg); }
    }

    @keyframes daily-checkin-loss-stamp {
      0% { opacity: 0; transform: translateY(-18px) scale(1.28) rotate(24deg); }
      62% { opacity: 1; transform: translateY(0) scale(.94) rotate(18deg); }
      100% { opacity: 1; transform: translateY(0) scale(1) rotate(18deg); }
    }

    @keyframes daily-checkin-loss-mark {
      0% { opacity: 0; transform: translateX(-36px); }
      35% { opacity: .95; }
      100% { opacity: 0; transform: translateX(28px); }
    }

    @keyframes daily-checkin-fixer-shield {
      0% { filter: brightness(1); box-shadow: 0 22px 64px rgba(0,0,0,.48), 0 0 0 0 rgba(99,179,237,.5); }
      45% { filter: brightness(1.18); box-shadow: 0 22px 64px rgba(0,0,0,.48), 0 0 0 12px rgba(99,179,237,.08); }
      100% { filter: none; box-shadow: 0 22px 64px rgba(0,0,0,.48), 0 0 0 5px rgba(99,179,237,.16); }
    }

    @keyframes daily-checkin-focus-in {
      0% { opacity: 0; transform: translateY(10px) scale(.985); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes daily-checkin-actions-in {
      0% { opacity: 0; transform: translateY(12px); }
      100% { opacity: 1; transform: translateY(0); }
    }

    @keyframes daily-checkin-feedback-pop {
      0% { opacity: 0; transform: translateY(6px) scale(.85); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    @media (prefers-reduced-motion: reduce) {
      .daily-checkin-card,
      .daily-checkin-card.is-completed,
      .daily-checkin-card.is-failed,
      .daily-checkin-card.is-fixed,
      .daily-checkin-card.is-completed::after,
      .daily-checkin-card.is-failed::before,
      .daily-checkin-card.is-failed::after,
      .daily-checkin-card.is-fixed::before,
      .daily-checkin-focus,
      .daily-checkin-actions,
      .daily-checkin-feedback {
        animation: none;
      }

    }

    .tracker-start-gate {
      margin-bottom: 16px;
    }

    .tracker-members-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21,27,47,.64);
    }

    .tracker-member-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .tracker-member-button {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 38px;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.035);
      color: var(--muted);
      cursor: pointer;
      font-weight: 800;
    }

    .tracker-member-button > span:first-child {
      display: inline-flex;
      width: 20px;
      height: 20px;
    }

    .tracker-member-button small {
      color: inherit;
      font-size: 11px;
      opacity: .78;
    }

    .tracker-member-button.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--profile-color, var(--active-profile-color, #8ab4ff)) 58%, var(--line));
      background: color-mix(in srgb, var(--profile-color, var(--active-profile-color, #8ab4ff)) 16%, rgba(255,255,255,.04));
    }

    .tracker-friends-strip {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
      padding: 8px 10px 8px 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(21,27,47,.5);
    }

    .tracker-friends-strip-main {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      min-width: 0;
      flex: 1 1 auto;
    }

    .tracker-friends-strip-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .tracker-friend-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      max-width: 100%;
      padding: 3px 10px 3px 4px;
      border: 1px solid color-mix(in srgb, var(--profile-color, #8ab4ff) 30%, rgba(255,255,255,.1));
      border-radius: 999px;
      background: rgba(255,255,255,.045);
    }

    .tracker-friend-chip-avatar {
      display: inline-flex;
      flex: 0 0 auto;
    }

    .tracker-friend-chip-avatar .game-avatar.compact {
      width: 22px;
      height: 22px;
      border-radius: 7px;
    }

    .tracker-friend-chip strong {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 12px;
      font-weight: 800;
    }

    .tracker-friend-chip-streak {
      display: inline-grid;
      place-items: center;
      min-width: 20px;
      padding: 0 5px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--profile-color, #8ab4ff) 26%, rgba(255,255,255,.06));
      font-size: 12px;
      font-weight: 900;
    }

    .tracker-friend-chip-best {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
    }

    .tracker-friend-chip-dot {
      width: 9px;
      height: 9px;
      flex: 0 0 auto;
      border-radius: 999px;
      background: var(--muted);
    }

    .tracker-friend-chip.status-completed .tracker-friend-chip-dot { background: #22c55e; }
    .tracker-friend-chip.status-failed .tracker-friend-chip-dot { background: #f87171; }
    .tracker-friend-chip.status-open .tracker-friend-chip-dot {
      background: transparent;
      border: 1px solid var(--muted);
    }

    .tracker-selfcheck {
      display: grid;
      gap: 10px;
      margin-bottom: 16px;
      padding: 12px 14px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--active-profile-color, #8ab4ff)) 34%, var(--line));
      border-radius: var(--radius);
      background: rgba(21,27,47,.5);
    }

    .tracker-selfcheck-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .tracker-selfcheck-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .tracker-selfcheck-title {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 3px 10px;
      min-width: 0;
    }

    .tracker-selfcheck-meta {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .streak-members {
      margin-top: 2px;
      color: var(--text);
      font-size: 14px;
      font-weight: 800;
      opacity: .85;
    }

    .tracker-streaks {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }

    .tracker-streak-card {
      display: grid;
      align-content: start;
      gap: 3px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21,27,47,.55);
    }

    .tracker-streak-card.is-friend {
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 22%, var(--line));
    }

    .tracker-streak-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .tracker-streak-title {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .tracker-streak-dot {
      width: 10px;
      height: 10px;
      flex: 0 0 auto;
      border-radius: 999px;
      background: var(--muted);
    }

    .tracker-streak-card.status-completed .tracker-streak-dot { background: #22c55e; }
    .tracker-streak-card.status-failed .tracker-streak-dot { background: #f87171; }
    .tracker-streak-card.status-open .tracker-streak-dot {
      background: transparent;
      border: 1px solid var(--muted);
    }

    .tracker-streak-number {
      font-size: 34px;
      font-weight: 900;
      line-height: 1.04;
    }

    .tracker-streak-number span {
      margin-left: 5px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .tracker-streak-sub {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    /* ---- Streak-Flamme: wächst und verwandelt sich mit der Streak-Länge ---- */
    .tracker-streak-body {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 50px;
    }

    .streak-flame {
      position: relative;
      display: inline-flex;
      width: 34px;
      height: 44px;
      flex: none;
    }

    .streak-flame svg {
      width: 100%;
      height: 100%;
      overflow: visible;
      transform-origin: 50% 92%;
      animation: streak-flame-flicker 1.6s ease-in-out infinite;
    }

    /* Stufe 0: kalte Glut - keine Bewegung, gedeckte Farben */
    .streak-flame-tier-0 { width: 26px; height: 34px; opacity: .55; }
    .streak-flame-tier-0 svg { animation: none; }
    .streak-flame-tier-0 .flame-outer { fill: #4b5266; }
    .streak-flame-tier-0 .flame-inner { fill: #6b7288; }

    /* Stufe 1 (1-6 Tage): kleine, zaghafte Flamme */
    .streak-flame-tier-1 { width: 28px; height: 36px; }
    .streak-flame-tier-1 .flame-outer { fill: #f6913d; }
    .streak-flame-tier-1 .flame-inner { fill: #ffd166; }

    /* Stufe 2 (ab 7 Tagen): volle Flamme mit Glow */
    .streak-flame-tier-2 .flame-outer { fill: #f6913d; }
    .streak-flame-tier-2 .flame-inner { fill: #ffd166; }
    .streak-flame-tier-2 svg { filter: drop-shadow(0 0 7px rgba(246, 145, 61, .55)); animation-duration: 1.2s; }

    /* Stufe 3 (ab 30 Tagen): blauer Kern */
    .streak-flame-tier-3 .flame-outer { fill: #f6913d; }
    .streak-flame-tier-3 .flame-inner { fill: #6cb7ff; }
    .streak-flame-tier-3 svg { filter: drop-shadow(0 0 9px rgba(108, 183, 255, .6)); animation-duration: 1.1s; }

    /* Stufe 4 (ab 90 Tagen): goldene Flamme, Funkenflug */
    .streak-flame-tier-4 { width: 38px; height: 50px; }
    .streak-flame-tier-4 .flame-outer { fill: #f6c177; }
    .streak-flame-tier-4 .flame-inner { fill: #fff3d6; }
    .streak-flame-tier-4 svg { filter: drop-shadow(0 0 11px rgba(246, 193, 119, .75)); animation-duration: 1s; }

    .flame-spark {
      position: absolute;
      bottom: 30%;
      left: 50%;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: #ffd166;
      opacity: 0;
      animation: streak-spark-rise 1.8s ease-out infinite;
    }

    .streak-flame-tier-3 .flame-spark { background: #6cb7ff; }
    .flame-spark.s1 { animation-delay: 0s; margin-left: -8px; }
    .flame-spark.s2 { animation-delay: .6s; margin-left: 3px; }
    .flame-spark.s3 { animation-delay: 1.1s; margin-left: -2px; }

    @keyframes streak-flame-flicker {
      0%, 100% { transform: scaleY(1) scaleX(1); }
      30% { transform: scaleY(1.05) scaleX(.97) rotate(-1.2deg); }
      55% { transform: scaleY(.96) scaleX(1.03) rotate(1deg); }
      75% { transform: scaleY(1.04) scaleX(.98); }
    }

    @keyframes streak-spark-rise {
      0% { transform: translateY(0) scale(1); opacity: 0; }
      15% { opacity: .9; }
      100% { transform: translateY(-34px) scale(.4); opacity: 0; }
    }

    @media (prefers-reduced-motion: reduce) {
      .streak-flame svg { animation: none; }
      .flame-spark { display: none; }
    }

    /* ---- Doppel-Check-in-Feier --------------------------------------------- */
    .duo-celebration {
      position: fixed;
      inset: 0;
      z-index: 5100;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(5, 8, 18, .62);
      backdrop-filter: blur(6px);
      animation: duo-overlay-in .25s ease both;
      cursor: pointer;
    }

    .duo-celebration-card {
      display: grid;
      justify-items: center;
      gap: 10px;
      max-width: 340px;
      padding: 26px 30px;
      border-radius: 22px;
      border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line));
      background: color-mix(in srgb, var(--good) 9%, #0d1428);
      box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .05);
      text-align: center;
      animation: duo-card-pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
    }

    .duo-celebration-avatars {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .duo-celebration-avatar .game-avatar {
      width: 74px;
      height: 74px;
    }

    .duo-celebration-avatar.from-left { animation: duo-slide-left .5s cubic-bezier(.2, 1.3, .4, 1) both .1s; }
    .duo-celebration-avatar.from-right { animation: duo-slide-right .5s cubic-bezier(.2, 1.3, .4, 1) both .1s; }

    .duo-celebration-fist {
      font-size: 30px;
      animation: duo-fist-bump .7s ease both .45s;
    }

    .duo-celebration-title {
      font-size: 22px;
      font-weight: 950;
      letter-spacing: .3px;
    }

    .duo-celebration-sub {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.45;
    }

    @keyframes duo-overlay-in { from { opacity: 0; } }
    @keyframes duo-card-pop { from { transform: scale(.7); opacity: 0; } }
    @keyframes duo-slide-left { from { transform: translateX(-46px); opacity: 0; } }
    @keyframes duo-slide-right { from { transform: translateX(46px); opacity: 0; } }
    @keyframes duo-fist-bump {
      0% { transform: scale(.6); opacity: 0; }
      45% { transform: scale(1.5); opacity: 1; }
      70% { transform: scale(.92); }
      100% { transform: scale(1); }
    }

    @media (prefers-reduced-motion: reduce) {
      .duo-celebration,
      .duo-celebration-card,
      .duo-celebration-avatar.from-left,
      .duo-celebration-avatar.from-right,
      .duo-celebration-fist { animation: none; }
    }

    /* ---- Lebendiger Avatar: pulsierende Aura bei Check-in ------------------- */
    .game-avatar.avatar-mood-happy svg,
    .game-avatar.avatar-mood-crown svg {
      animation: avatar-mood-glow 2.4s ease-in-out infinite;
    }

    @keyframes avatar-mood-glow {
      0%, 100% { filter: drop-shadow(0 0 3px rgba(246, 193, 119, .35)); }
      50% { filter: drop-shadow(0 0 9px rgba(246, 193, 119, .7)); }
    }

    @media (prefers-reduced-motion: reduce) {
      .game-avatar.avatar-mood-happy svg,
      .game-avatar.avatar-mood-crown svg { animation: none; }
    }

    .tracker-streak-friend {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      opacity: .82;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .tracker-weekly-progress {
      display: grid;
      gap: 7px;
      margin-top: 9px;
      padding: 10px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 22%, var(--line));
      border-radius: calc(var(--control-radius) - 4px);
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 6%, transparent);
    }

    .tracker-weekly-progress.is-reached {
      border-color: color-mix(in srgb, var(--good) 38%, var(--line));
      background: color-mix(in srgb, var(--good) 7%, transparent);
    }

    .tracker-weekly-progress-head,
    .tracker-weekly-progress-foot {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .tracker-weekly-progress-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tracker-weekly-progress-head strong {
      color: var(--text);
      white-space: nowrap;
    }

    .tracker-weekly-days {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 4px;
    }

    .tracker-weekly-days.is-placeholder { opacity: .38; }

    .tracker-weekly-day {
      display: grid;
      min-height: 23px;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(255,255,255,.025);
      color: var(--muted);
      font-size: 9px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .tracker-weekly-day.is-completed {
      border-color: color-mix(in srgb, var(--good) 58%, var(--line));
      background: color-mix(in srgb, var(--good) 22%, transparent);
      color: var(--good);
    }

    .tracker-weekly-day.is-missed {
      background: color-mix(in srgb, var(--muted) 9%, transparent);
      opacity: .7;
    }

    .tracker-weekly-day.is-fixed {
      border-color: color-mix(in srgb, #7398ff 66%, var(--line));
      background: color-mix(in srgb, #477cff 24%, transparent);
      color: #b9c9ff;
      opacity: 1;
    }

    .tracker-weekly-day.is-fixed img { width: 19px; height: 19px; object-fit: contain; }

    .tracker-weekly-day.is-open {
      border-style: dashed;
    }

    .tracker-streak-add {
      align-content: center;
      justify-items: center;
      gap: 6px;
      position: relative;
      border-style: dashed;
      color: var(--text);
      font-weight: 900;
      cursor: pointer;
      text-align: center;
    }

    .tracker-streak-add:hover,
    .tracker-streak-add.active {
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 54%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 12%, rgba(255,255,255,.04));
    }

    .tracker-streak-add-icon {
      font-size: 24px;
      line-height: 1;
    }

    .tracker-streak-card.is-self {
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 40%, var(--line));
    }

    .tracker-streak-check {
      display: grid;
      align-items: center;
      box-sizing: border-box;
      height: 64px;
      margin-top: 8px;
      padding-top: 10px;
      border-top: 1px solid rgba(255,255,255,.08);
    }

    .tracker-streak-check .review-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }

    .tracker-streak-check .review-actions.is-open {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tracker-streak-check .review-actions button {
      width: 100%;
      height: 42px;
      min-height: 42px;
      box-sizing: border-box;
    }

    .tracker-streak-check .review-compact {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      height: 42px;
      min-height: 42px;
      box-sizing: border-box;
      flex-wrap: nowrap;
    }

    .tracker-streak-check .review-compact > span:first-child {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    @media (max-width: 560px) {
      /* Die Streak-Karten brauchen auf schmalen Displays eine echte
         Einspaltenansicht. Mit dem generischen auto-fit-Raster passten zwei
         168-px-Spalten gerade noch nebeneinander; das 7-Tage-Fenster ragte
         dadurch sichtbar in die Freundeskarte. */
      .tracker-streaks { grid-template-columns: minmax(0, 1fr); }
      .tracker-streak-card { min-width: 0; }

      .tracker-streak-check .review-actions,
      .tracker-streak-check .review-actions.is-open { grid-template-columns: 1fr; }
      /* Offene Aktionen bestimmen ihre Höhe selbst. Der bisher feste Wert
         erzeugte beim kompakten Status ("Schon abgehakt") einen großen,
         leeren Kartenbereich. */
      .tracker-streak-check { height: auto; min-height: 64px; }
      .tracker-streak-add { min-height: 108px; }
    }

    .tracker-visibility {
      display: grid;
      gap: 12px;
      margin-top: 16px;
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21,27,47,.5);
    }

    .tracker-visibility-head {
      display: grid;
      gap: 3px;
    }

    .tracker-visibility-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
    }

    .tracker-visibility-item {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 8px 12px;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 10px;
      background: rgba(255,255,255,.04);
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }

    .tracker-visibility-item:hover {
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 45%, var(--line));
    }

    .tracker-visibility-box {
      display: inline-grid;
      place-items: center;
      width: 22px;
      height: 22px;
      flex: 0 0 auto;
      border-radius: 6px;
      border: 1px solid rgba(34,197,94,.5);
      background: rgba(34,197,94,.22);
      color: #eafff1;
      font-size: 13px;
      font-weight: 900;
      line-height: 1;
    }

    .tracker-visibility-name {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 800;
    }

    .tracker-visibility-item small {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .tracker-visibility-item.off {
      opacity: .72;
    }

    .tracker-visibility-item.off .tracker-visibility-box {
      border-style: dashed;
      border-color: rgba(255,255,255,.25);
      background: transparent;
    }

    .tracker-friends-add {
      position: relative;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.14);
      background: rgba(255,255,255,.05);
      color: var(--text);
      font-size: 20px;
      font-weight: 900;
      line-height: 1;
      cursor: pointer;
    }

    .tracker-friends-add:hover,
    .tracker-friends-add.active {
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 54%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 14%, rgba(255,255,255,.04));
    }

    .tracker-friends-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      display: inline-grid;
      place-items: center;
      min-width: 18px;
      height: 18px;
      padding: 0 4px;
      border-radius: 999px;
      background: #f87171;
      color: #1b0d0d;
      font-size: 11px;
      font-weight: 900;
      line-height: 1;
    }

    .tracker-friends-panel {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 10px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(21,27,47,.5);
    }

    .calendar-caption {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .tracker-friends-column {
      display: grid;
      align-content: start;
      gap: 8px;
      min-width: 0;
    }

    .tracker-friends-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .tracker-friend-row,
    .tracker-friend-request {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 44px;
      padding: 9px 10px;
      border: 1px solid rgba(255,255,255,.09);
      border-radius: 8px;
      background: rgba(255,255,255,.035);
      color: var(--text);
      text-align: left;
    }

    .tracker-friend-row > div:first-child,
    .tracker-friend-request > span {
      min-width: 0;
    }

    .tracker-friend-row strong,
    .tracker-friend-request span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 900;
    }

    .tracker-friend-row span,
    .tracker-friend-request small,
    .tracker-friends-empty {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .tracker-friend-request {
      cursor: pointer;
      font-weight: 900;
    }

    .tracker-friend-request:not(:disabled):hover {
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 54%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 12%, rgba(255,255,255,.04));
    }

    .tracker-friend-request:disabled {
      cursor: default;
      opacity: .68;
    }

    .tracker-friend-request {
      border-left: 3px solid color-mix(in srgb, var(--profile-color, transparent) 60%, transparent);
    }

    .tracker-friend-request-avatar {
      flex: 0 0 auto;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      overflow: hidden;
      background: rgba(255,255,255,.06);
    }

    .tracker-friend-request-avatar svg {
      width: 100%;
      height: 100%;
    }

    .tracker-friend-request-label {
      flex: 1;
    }

    .tracker-friend-request.is-in-tracker {
      border-color: color-mix(in srgb, var(--good) 45%, var(--line));
      border-left-color: color-mix(in srgb, var(--good) 65%, var(--profile-color, transparent));
      background: color-mix(in srgb, var(--good) 10%, rgba(255,255,255,.035));
    }

    .tracker-friend-request.is-in-tracker small {
      color: var(--good);
      font-weight: 900;
    }

    .tracker-friend-actions {
      display: inline-flex;
      gap: 6px;
      flex: 0 0 auto;
    }

    .tracker-friend-icon {
      display: inline-grid;
      place-items: center;
      width: 32px;
      height: 32px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.12);
      color: var(--text);
      font-size: 18px;
      font-weight: 900;
      line-height: 1;
      cursor: pointer;
    }

    .tracker-friend-icon.accept {
      background: rgba(34,197,94,.18);
      border-color: rgba(34,197,94,.42);
    }

    .tracker-friend-icon.decline {
      background: rgba(248,113,113,.16);
      border-color: rgba(248,113,113,.38);
    }

    .tracker-start-card {
      border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 36%, var(--line));
      border-radius: var(--radius);
      padding: 20px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--active-profile-color, #8ab4ff) 12%, transparent), rgba(255,255,255,.025)),
        rgba(21,27,47,.82);
      box-shadow: var(--shadow);
    }

    .tracker-start-kicker {
      color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 82%, white);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .tracker-start-title {
      font-size: 28px;
      font-weight: 900;
      letter-spacing: 0;
    }

    .tracker-start-copy {
      margin: 10px 0 16px;
      max-width: 700px;
      color: var(--muted);
      line-height: 1.5;
    }

    .tracker-start-button {
      min-height: 46px;
      padding: 11px 16px;
      border-radius: 999px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 56%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 18%, rgba(255,255,255,.04));
      color: var(--text);
      font-size: 14px;
      font-weight: 900;
      cursor: pointer;
    }

    .tracker-start-admin-note {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .review-lock {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .top-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap: 16px;
      margin-bottom: 16px;
    }

    .stat {
      background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: var(--shadow);
    }

    .stat .label {
      color: var(--muted);
      font-size: 13px;
      margin-bottom: 8px;
    }

    .stat .value {
      font-size: 28px;
      font-weight: 800;
      letter-spacing: -.04em;
    }

    .stat .value.small {
      font-size: 20px;
      letter-spacing: 0;
    }

    .players {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 16px;
      margin-bottom: 16px;
    }

    .players.single-player {
      grid-template-columns: minmax(0, 1fr);
    }

    .streak-hero {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 18px;
      margin-bottom: 16px;
      border: 1px solid rgba(51,209,122,.4);
      border-radius: var(--radius);
      padding: 18px;
      background:
        linear-gradient(90deg, rgba(51,209,122,.18), rgba(138,180,255,.12)),
        rgba(21,27,47,.82);
      box-shadow: 0 24px 70px rgba(0,0,0,.32);
    }

    .streak-kicker {
      color: var(--good);
      font-size: 13px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .streak-title {
      display: flex;
      align-items: baseline;
      gap: 10px;
      margin-top: 2px;
    }

    .streak-number {
      font-size: 58px;
      line-height: .9;
      font-weight: 950;
      letter-spacing: 0;
    }

    .streak-unit {
      color: var(--text);
      font-size: 20px;
      font-weight: 900;
    }

    .quote-shell {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 16px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 36%, var(--line));
      border-radius: 18px;
      padding: 16px 18px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--active-profile-color, #8ab4ff) 16%, transparent), rgba(255,255,255,.025)),
        rgba(16,23,42,.82);
      box-shadow: 0 16px 45px rgba(0,0,0,.22);
    }

    .quote-copy {
      flex: 1 1 520px;
      min-width: 0;
    }

    .quote-kicker {
      color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 78%, white);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
      letter-spacing: 0;
      margin-bottom: 8px;
    }

    .quote-shell blockquote {
      margin: 0;
      color: var(--text);
      font-size: 20px;
      line-height: 1.35;
      font-weight: 850;
    }

    .quote-source-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .quote-source {
      margin-top: 10px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
    }

    .quote-meta {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
      min-width: 132px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .quote-meta span {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 9px;
      background: rgba(255,255,255,.045);
      white-space: nowrap;
    }

    .quote-details-toggle {
      min-height: 32px;
      border-radius: 999px;
      padding: 7px 10px;
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 42%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 14%, rgba(255,255,255,.045));
      font-size: 12px;
      font-weight: 950;
      white-space: nowrap;
    }

    .quote-rating-panel,
    .quote-archive {
      flex: 1 0 100%;
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .quote-rating-head,
    .quote-archive-top,
    .quote-admin-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .quote-rating-head {
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .quote-rating-buttons {
      display: grid;
      grid-template-columns: repeat(11, minmax(34px, 1fr));
      gap: 6px;
    }

    .quote-person-ratings {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .quote-person-rating {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 10px;
      color: var(--muted);
      background: rgba(255,255,255,.04);
      font-size: 12px;
      font-weight: 850;
    }

    .quote-person-rating strong {
      color: var(--text);
      font-size: 12px;
    }

    .quote-rating-btn,
    .quote-tab {
      min-height: 36px;
      border-radius: 10px;
      font-weight: 900;
    }

    .quote-rating-btn.active,
    .quote-tab.active {
      color: #07120c;
      border-color: var(--good);
      background: var(--good);
    }

    .quote-archive-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .quote-archive-count {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .quote-list {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }

    .quote-list-item {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 12px;
      background: rgba(255,255,255,.035);
    }

    .quote-rank {
      width: 30px;
      height: 30px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      color: #07120c;
      background: var(--good);
      font-size: 13px;
      font-weight: 950;
    }

    .quote-list-main {
      min-width: 0;
    }

    .quote-list-kicker {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      margin-bottom: 4px;
    }

    .quote-list-text {
      color: var(--text);
      font-size: 14px;
      line-height: 1.35;
      font-weight: 780;
    }

    .quote-score {
      min-width: 64px;
      text-align: right;
      color: var(--text);
      font-size: 22px;
      font-weight: 950;
    }

    .quote-score span {
      display: block;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
    }

    .quote-empty {
      border: 1px dashed var(--line);
      border-radius: 12px;
      padding: 14px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
    }

    .quote-admin-form {
      display: grid;
      gap: 10px;
      margin-top: 14px;
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .quote-admin-title {
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .quote-admin-form textarea,
    .quote-admin-form input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 11px 12px;
      color: var(--text);
      background: rgba(5,12,22,.45);
      font: inherit;
    }

    .quote-admin-row input {
      min-width: 0;
    }

    @media (max-width: 850px) {
      /* Auf iOS kann flex-basis: 100% in einer Flex-Spalte als Höhe statt als
         Breite aufgelöst werden. Das bläht Rating und Archiv auf und schiebt
         sie seitlich aus der Tracker-Karte. Ein einspaltiges Grid ist hier
         eindeutig und hält alle Quote-Bereiche im mobilen Viewport. */
      .quote-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
      }

      .quote-copy,
      .quote-meta,
      .quote-rating-panel,
      .quote-archive {
        width: 100%;
        min-width: 0;
      }

      .quote-rating-panel,
      .quote-archive {
        flex: none;
      }
    }

    .streak-status,
    .streak-helper {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.4;
    }

    .streak-status {
      margin-top: 8px;
    }

    .streak-signature {
      margin-top: 10px;
      color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 72%, var(--text));
      font-size: 13px;
      font-weight: 800;
      letter-spacing: .01em;
    }

    .streak-side {
      min-width: 230px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 14px;
    }

    .streak-ring {
      width: 86px;
      height: 86px;
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      border-radius: 50%;
      border: 8px solid rgba(51,209,122,.85);
      background: rgba(5,12,22,.42);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(0,0,0,.26);
    }

    .streak-ring span {
      font-size: 30px;
      font-weight: 950;
    }

    .streak-best {
      font-size: 16px;
      font-weight: 900;
    }

    .player-card {
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 16px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .player-card[data-profile-person] {
      border-color: color-mix(in srgb, var(--profile-color) 42%, var(--line));
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color) 12%, transparent) inset, var(--shadow);
    }

    .player-card.active {
      border-color: rgba(138,180,255,.58);
      box-shadow: 0 0 0 2px rgba(138,180,255,.12) inset, var(--shadow);
    }

    .player-card[data-profile-person].active {
      border-color: color-mix(in srgb, var(--profile-color) 72%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 18%, transparent) inset, var(--shadow);
    }

    .player-head {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
    }

    .player-name {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -.04em;
      display: inline-flex;
      align-items: center;
    }

    .player-meta {
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .mini-stats {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 10px;
      margin: 14px 0;
    }

    .mini {
      background: rgba(255,255,255,.04);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 12px;
    }

    .mini span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 4px;
    }

    .mini strong {
      font-size: 24px;
    }

    .actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .review-actions.is-open {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .review-compact {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 8px 10px;
      color: var(--muted);
      background: rgba(255,255,255,.04);
      font-size: 12px;
      font-weight: 800;
    }

    /* Button-Basis liegt in css/components.css. */

    .achievements-shell,
    .inventory-shell {
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 16px;
      margin-bottom: 16px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .inventory-shell {
      border-color: color-mix(in srgb, var(--warn) 24%, var(--line));
      background:
        linear-gradient(135deg, rgba(246,193,119,.06), rgba(255,255,255,.025)),
        rgba(21,27,47,.78);
    }

    .achievements-top,
    .inventory-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 14px;
    }

    .achievements-actions,
    .inventory-tabs {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .achievements-content[hidden] {
      display: none;
    }

    /* .toggle-btn, .section-title und .section-subtitle liegen in css/components.css. */

    .achievement-controls {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin: 6px 0 14px;
    }

    .achievement-filter-panel,
    .achievement-filter-stack,
    .achievement-filter-row {
      grid-template-columns: minmax(0, 1fr);
      min-width: 0;
    }

    .achievement-search {
      flex: 1 1 200px;
      min-width: 0;
      padding: 9px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 14px;
    }

    .achievement-sort {
      flex: 0 1 220px;
      min-width: 180px;
      max-width: 100%;
    }

    .achievement-sort-direction {
      flex: 0 0 auto;
    }

    .achievement-search:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, var(--line));
    }

    .achievements-page .achievements-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 280px));
      justify-content: space-between;
      gap: 10px;
    }

    .achievement-layout-toolbar {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin: 0 0 10px;
    }

    .achievement-layout-grid .achievement {
      cursor: grab;
      padding-top: 42px;
    }

    .achievement-layout-grid .achievement:active {
      cursor: grabbing;
    }

    .achievement-layout-grid .achievement-layout-dragging {
      opacity: .55;
    }

    .achievement-layout-actions {
      position: absolute;
      z-index: 2;
      top: 6px;
      right: 7px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .achievement-layout-position {
      min-width: 24px;
      text-align: right;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .achievement-layout-arrow {
      display: grid;
      place-items: center;
      width: 30px;
      min-height: 30px;
      padding: 0;
    }

    .achievement-layout-arrow .bro-icon {
      width: 16px;
      height: 16px;
    }

    .achievement-layout-up .bro-icon {
      transform: rotate(180deg);
    }

    .inventory-summary {
      margin-bottom: 10px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .inventory-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 10px;
    }

    .locked-achievements {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
    }

    .locked-achievements[hidden] {
      display: none;
    }

    .locked-title {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
      margin-bottom: 10px;
      text-transform: uppercase;
    }

    /* Leerzustand (.empty-state / .empty-achievements) liegt in css/components.css. */

    .achievement {
      position: relative;
      min-height: 88px;
      display: flex;
      align-items: stretch;
      gap: 10px;
      overflow: hidden;
      background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 9px;
      box-shadow: 0 14px 34px rgba(0,0,0,.22);
      scroll-margin-block: 120px;
    }

    .inventory-item {
      position: relative;
      min-height: 178px;
      display: grid;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 14px;
      background: rgba(255,255,255,.045);
      box-shadow: 0 14px 34px rgba(0,0,0,.18);
    }

    .inventory-item-new {
      position: absolute;
      z-index: 3;
      top: 7px;
      right: 7px;
      margin: 0;
      box-shadow: 0 3px 9px rgba(0,0,0,.3);
    }

    .inventory-item-new-corner {
      top: -5px;
      right: 8px;
    }

    .inventory-item.reward.unlocked {
      border-color: rgba(51,209,122,.38);
      background:
        linear-gradient(135deg, rgba(51,209,122,.1), transparent 58%),
        rgba(255,255,255,.045);
    }

    .inventory-item.penalty.unlocked {
      border-color: rgba(255,92,122,.36);
      background:
        linear-gradient(135deg, rgba(255,92,122,.1), transparent 58%),
        rgba(255,255,255,.045);
    }

    .inventory-item.locked {
      opacity: .68;
      filter: saturate(.7);
    }

    .inventory-item.used {
      opacity: .58;
    }

    .inventory-item-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }

    .inventory-kicker {
      color: var(--warn);
      font-size: 11px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .inventory-page,
    .inventory-shell,
    .inventory-catalog-grid { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
    .inventory-catalog-item .shop-item-body { min-width: 0; align-content: start; }
    .inventory-catalog-item.is-equipped { border-color: color-mix(in srgb, var(--good) 62%, var(--line)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 24%, transparent); }
    .inventory-equipped-state { width: fit-content; display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: color-mix(in srgb, var(--good) 75%, white); font-size: 11px; font-weight: 900; }
    .inventory-equipped-state .bro-icon { width: 15px; height: 15px; }

    .inventory-avatar-editor {
      display: grid;
      grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }

    .inventory-avatar-preview {
      position: sticky;
      top: 0;
      display: grid;
      justify-items: center;
      gap: 10px;
      border: 1px solid color-mix(in srgb, var(--profile-color) 32%, var(--line));
      border-radius: 8px;
      padding: 16px;
      background: color-mix(in srgb, var(--profile-color) 8%, rgba(255,255,255,.035));
      text-align: center;
    }

    .inventory-avatar-preview-image { width: min(180px, 100%); aspect-ratio: 1; }
    .inventory-avatar-preview-image .game-avatar { width: 100%; height: 100%; }
    .inventory-avatar-preview > strong { font-size: 18px; }
    .inventory-avatar-preview > small { color: var(--muted); }
    .inventory-avatar-quick-actions { display: flex; gap: 7px; }
    .inventory-avatar-options { min-width: 0; display: grid; gap: 14px; }
    .inventory-avatar-category-tabs { max-width: 100%; }
    .inventory-avatar-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 9px; }
    .inventory-avatar-choice {
      min-width: 0;
      min-height: 142px;
      display: grid;
      place-items: center;
      align-content: center;
      gap: 8px;
      border-radius: 8px;
      padding: 10px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
    }
    .inventory-avatar-choice.active { color: var(--text); border-color: color-mix(in srgb, var(--profile-color) 62%, white); background: color-mix(in srgb, var(--profile-color) 15%, rgba(255,255,255,.04)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--profile-color) 12%, transparent); }
    .inventory-avatar-choice.is-changed { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--warn) 72%, white); }
    .inventory-avatar-choice small { color: var(--muted); font-size: 10px; font-weight: 850; }
    .inventory-avatar-choice-meta { display: flex; min-height: 18px; align-items: center; justify-content: center; line-height: 18px; }
    .inventory-avatar-choice-meta .spx-coin { width: 1.2em; height: 1.2em; }
    .inventory-avatar-choice-preview { width: 88px; height: 88px; }
    .inventory-avatar-choice-preview .game-avatar { width: 100%; height: 100%; }
    .inventory-avatar-choice-emoji { font-size: 48px; line-height: 1; }
    .inventory-avatar-choice-empty { width: 58px; height: 58px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 50%; font-size: 12px; }
    .inventory-avatar-slot-group { grid-column: 1 / -1; display: grid; gap: 8px; }
    .inventory-avatar-slot-group h3 { margin: 0; font-size: 13px; }
    .inventory-avatar-color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
    .inventory-avatar-color-grid label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 850; }
    .inventory-avatar-color-grid input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 5px; background: rgba(255,255,255,.05); }
    .inventory-draft-changed { color: color-mix(in srgb, var(--warn) 78%, white) !important; }
    .inventory-editor-status { min-height: 18px; white-space: nowrap; }
    .inventory-editor-mode-tabs { justify-self: center; width: fit-content; max-width: 100%; }
    .inventory-try-on-buy { min-width: 150px; white-space: nowrap; }
    .inventory-try-on-buy .spx-coin { width: 1.1em; height: 1.1em; }
    .inventory-gear-canvas { width: min(210px, 100%); aspect-ratio: 1; display: block; touch-action: none; }
    .inventory-gear-preview { align-content: start; }
    .inventory-avatar-options > .ui-pagination { margin-top: auto; }
    .ui-form-dialog-card:has(.inventory-avatar-editor) { width: min(94vw, 980px); height: min(92dvh, 760px); max-height: min(92dvh, 760px); }
    .ui-form-dialog-card:has(.inventory-avatar-editor) .ui-form-dialog-body { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
    .ui-form-dialog-card:has(.inventory-avatar-editor) .inventory-avatar-editor { min-height: 0; height: 100%; }
    .ui-form-dialog-card:has(.inventory-avatar-editor) .inventory-avatar-options { min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
    .ui-form-dialog-card:has(.inventory-avatar-editor) .inventory-avatar-choice-grid { min-height: 0; align-content: start; overflow: hidden; }

    @media (max-width: 680px) {
      .inventory-avatar-editor { grid-template-columns: 1fr; }
      .inventory-avatar-preview { position: static; grid-template-columns: 76px minmax(0, 1fr); justify-items: start; text-align: left; padding: 10px; }
      .inventory-avatar-preview-image, .inventory-gear-canvas { width: 76px; grid-row: 1 / span 4; }
      .inventory-avatar-quick-actions { flex-wrap: wrap; }
      .inventory-avatar-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
      .inventory-avatar-choice { min-height: 104px; padding: 6px; }
      .inventory-avatar-choice-preview { width: 62px; height: 62px; }
      .inventory-avatar-choice-emoji { font-size: 36px; }
      .ui-form-dialog-card:has(.inventory-avatar-editor) { height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
    }

    .inventory-title {
      margin-top: 4px;
      color: var(--text);
      font-size: 18px;
      font-weight: 950;
      line-height: 1.15;
    }

    .inventory-status {
      flex: 0 0 auto;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 8px;
      color: var(--muted);
      background: rgba(255,255,255,.045);
      font-size: 11px;
      font-weight: 950;
      white-space: nowrap;
    }

    .inventory-description {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .inventory-progress {
      display: grid;
      gap: 7px;
      align-self: end;
    }

    .achievement.unlocked {
      background:
        linear-gradient(90deg, rgba(51,209,122,.16), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
      border-color: rgba(51,209,122,.38);
    }

    .achievement.is-new {
      border-color: rgba(246,193,119,.5);
      box-shadow: 0 0 0 2px rgba(246,193,119,.12) inset, 0 14px 34px rgba(0,0,0,.18);
    }

    .achievement.is-new::after {
      content: "";
      position: absolute;
      z-index: 0;
      inset: 0;
      background:
        radial-gradient(circle at 16% 28%, color-mix(in srgb, var(--warn) 8%, transparent), transparent 46%),
        linear-gradient(105deg, color-mix(in srgb, var(--warn) 4%, transparent), transparent 72%);
      border-radius: inherit;
      pointer-events: none;
    }

    .achievement.is-new > .achievement-media,
    .achievement.is-new > .achievement-body { position: relative; z-index: 1; }

    .achievement[data-profile-person] {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color) 18%, transparent), transparent 48%),
        linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
      border-color: color-mix(in srgb, var(--profile-color) 36%, var(--line));
    }

    .achievement[data-profile-person].unlocked {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color) 24%, transparent), transparent 52%),
        linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.032));
      border-color: color-mix(in srgb, var(--profile-color) 58%, white);
    }

    .achievement[data-profile-team] {
      background:
        linear-gradient(135deg,
          color-mix(in srgb, var(--profile-color) 18%, transparent) 0 25%,
          color-mix(in srgb, var(--profile-color-2) 18%, transparent) 25% 50%,
          color-mix(in srgb, var(--profile-color) 14%, transparent) 50% 75%,
          color-mix(in srgb, var(--profile-color-2) 14%, transparent) 75% 100%),
        linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.028));
      border-color: color-mix(in srgb, var(--profile-color) 30%, var(--profile-color-2));
    }

    .achievement[data-profile-team].unlocked {
      background:
        linear-gradient(135deg,
          color-mix(in srgb, var(--profile-color) 24%, transparent) 0 25%,
          color-mix(in srgb, var(--profile-color-2) 24%, transparent) 25% 50%,
          color-mix(in srgb, var(--profile-color) 18%, transparent) 50% 75%,
          color-mix(in srgb, var(--profile-color-2) 18%, transparent) 75% 100%),
        linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.032));
      border-color: color-mix(in srgb, var(--profile-color) 50%, var(--profile-color-2));
    }

    .achievement.focused {
      border-color: rgba(138,180,255,.5);
      box-shadow: 0 0 0 2px rgba(138,180,255,.1) inset;
    }

    .achievement[data-profile-person].focused {
      border-color: color-mix(in srgb, var(--profile-color) 72%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 16%, transparent) inset;
    }

    .achievement[data-profile-team].focused {
      border-color: color-mix(in srgb, var(--profile-color) 50%, var(--profile-color-2));
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 10%, var(--profile-color-2)) inset;
    }

    .achievement.is-deep-linked {
      outline: 3px solid color-mix(in srgb, var(--warn) 82%, white);
      outline-offset: 3px;
      animation: achievement-deep-link-pulse 1.15s ease-in-out 2;
    }

    .achievement:focus-visible {
      outline: 3px solid color-mix(in srgb, var(--warn) 82%, white);
      outline-offset: 3px;
    }

    @keyframes achievement-deep-link-pulse {
      0%, 100% {
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 16%, transparent), 0 14px 34px rgba(0,0,0,.22);
      }
      50% {
        box-shadow: 0 0 0 7px color-mix(in srgb, var(--warn) 28%, transparent), 0 14px 34px rgba(0,0,0,.22);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .achievement.is-deep-linked {
        animation: none;
      }
    }

    .achievement.locked {
      opacity: .72;
    }

    .achievement-media {
      position: relative;
      width: 58px;
      height: 58px;
      flex: 0 0 auto;
      overflow: visible;
      isolation: isolate;
      border-radius: 8px;
      background:
        radial-gradient(circle at 50% 45%, rgba(123,92,246,.36) 0%, rgba(72,40,145,.24) 42%, transparent 72%),
        linear-gradient(145deg, #18102f, #090716 72%);
      border: 1px solid rgba(174,139,255,.3);
      box-shadow: inset 0 0 18px rgba(139,92,246,.18), 0 0 16px rgba(105,67,214,.2), 0 10px 22px rgba(0,0,0,.28);
    }

    .achievement-media img {
      position: relative;
      z-index: 1;
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      clip-path: circle(43% at 50% 50%);
    }

    .achievement-medal-trigger {
      appearance: none;
      padding: 0;
      border: 0;
      color: inherit;
      font: inherit;
    }
    .achievement-medal-trigger:not(:disabled) { cursor: pointer; }
    .achievement-medal-trigger:disabled { cursor: default; }
    .achievement-medal-trigger:not(:disabled):hover { filter: brightness(1.16); }
    .achievement-medal-trigger:focus-visible { outline: 2px solid var(--rarity-color, var(--accent)); outline-offset: 5px; }

    .achievement-medal-dialog {
      width: min(94vw, 760px);
      height: min(88dvh, 720px);
      max-height: 720px;
      padding: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      background: #090d18;
      border: 1px solid rgba(255,255,255,.16);
    }
    .achievement-medal-dialog.is-admin-testing { width: min(96vw, 1050px); }
    .achievement-medal-header > .achievement-medal-heading { flex: 1 1 auto; min-width: 0; }
    .achievement-medal-category-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: #acc0d7; font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .achievement-medal-category-trail span + span::before { content: "/"; margin-right: 8px; color: #70829b; }
    .achievement-medal-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .achievement-medal-info-control { flex: 0 0 auto; }
    .achievement-medal-info-control .ui-icon-button { width: 32px; min-width: 32px; height: 32px; color: #b8c9db; }
    .achievement-medal-info-panel { position: absolute; top: calc(100% - 4px); right: 18px; width: min(360px, calc(100vw - 48px)); max-height: min(45dvh, 260px); overflow: auto; padding: 14px 16px; color: #edf3fa; background: #182235; border: 1px solid #60748f; border-radius: 6px; box-shadow: 0 14px 36px rgba(0,0,0,.45); font-size: 14px; line-height: 1.45; }
    .achievement-medal-info-panel strong { display: block; margin-bottom: 5px; font-size: 12px; color: #a9c6e7; text-transform: uppercase; }
    .achievement-medal-info-panel p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
    .achievement-medal-polish.ui-icon-button,
    .achievement-medal-clean-reset.ui-icon-button,
    .achievement-medal-protection.ui-icon-button,
    .achievement-medal-age-toggle.ui-icon-button {
      position: absolute;
      z-index: 6;
      top: 14px;
      width: 42px;
      min-width: 42px;
      height: 42px;
      background: rgba(12, 18, 28, .86);
      border: 1px solid rgba(255, 255, 255, .3);
    }
    .achievement-medal-polish.ui-icon-button { right: 14px; }
    .achievement-medal-clean-reset.ui-icon-button { right: 118px; }
    .achievement-medal-protection.ui-icon-button { right: 66px; }
    .achievement-medal-age-toggle.ui-icon-button { left: 14px; }
    .achievement-medal-polish.is-active {
      color: #e8fff8;
      border-color: #84dbc0 !important;
      background: #275a50 !important;
      box-shadow: 0 0 0 3px rgba(132, 219, 192, .25);
    }
    .achievement-medal-protection.is-active {
      color: #e8f7ff;
      border-color: #93c9ec !important;
      background: #244b66 !important;
    }
    .achievement-medal-age-panel {
      position: absolute;
      z-index: 7;
      top: 64px;
      left: 14px;
      display: grid;
      gap: 12px;
      width: min(270px, calc(100% - 28px));
      max-height: calc(100% - 78px);
      overflow-y: auto;
      padding: 14px;
      border: 1px solid rgba(255,255,255,.28);
      border-radius: 8px;
      background: rgba(10, 17, 29, .97);
      color: var(--text);
      font-size: 12px;
      font-weight: 700;
      box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
      touch-action: pan-y;
    }
    .achievement-medal-stage.is-admin-testing {
      display: grid;
      grid-template-columns: 284px minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr);
    }
    .achievement-medal-stage.is-admin-testing .achievement-medal-canvas {
      grid-column: 2;
      grid-row: 1;
      min-width: 0;
    }
    .achievement-medal-stage.is-admin-testing .achievement-medal-age-panel {
      position: relative;
      grid-column: 1;
      grid-row: 1;
      top: auto;
      left: auto;
      align-self: start;
      margin: 64px 0 0 14px;
      max-height: calc(100% - 78px);
    }
    .achievement-medal-test-heading,
    .achievement-medal-age-control label,
    .achievement-medal-look-control span {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }
    .achievement-medal-test-heading strong { font-size: 14px; }
    .achievement-medal-age-panel small { color: var(--muted); font-weight: 500; }
    .achievement-medal-age-panel output { color: #aad9ed; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .achievement-medal-age-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 6px; }
    .achievement-medal-age-control label { grid-column: 1 / -1; }
    .achievement-medal-look-control { display: grid; gap: 4px; }
    .achievement-medal-age-panel input { width: 100%; min-width: 0; margin: 0; accent-color: #7fcfdb; touch-action: auto; }
    .achievement-medal-look-reset { width: 100%; justify-content: center; padding: 7px 10px; font-size: 12px; }
    .achievement-medal-kicker { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
    .achievement-medal-stage {
      position: relative;
      flex: 1 1 auto;
      min-height: 0;
      overflow: hidden;
      touch-action: none;
      cursor: grab;
      background:
        radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--rarity-color) 30%, transparent), transparent 42%),
        linear-gradient(145deg, color-mix(in srgb, var(--rarity-deep) 34%, #080b14), #070a12 70%);
    }
    .achievement-medal-stage:active { cursor: grabbing; }
    .achievement-medal-stage.is-cleaning, .achievement-medal-stage.is-cleaning:active {
      box-shadow: inset 0 0 0 2px rgba(132, 219, 192, .56);
    }
    .achievement-medal-stage.is-cleaning .achievement-medal-canvas { cursor: none; }
    .achievement-medal-polish-tool {
      position: fixed;
      z-index: 9999;
      visibility: hidden;
      pointer-events: none;
      user-select: none;
      isolation: isolate;
      background: var(--polish-cloth-image) center / contain no-repeat;
      transform: translate(-50%, -50%) rotate(-12deg);
      filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .4));
    }
    .achievement-medal-polish-tool::after {
      content: "";
      position: absolute;
      inset: 0;
      background: var(--active-profile-color, #7ac6d4);
      -webkit-mask: var(--polish-cloth-image) center / contain no-repeat;
      mask: var(--polish-cloth-image) center / contain no-repeat;
      mix-blend-mode: color;
    }
    .achievement-medal-clean-panel {
      flex: 0 0 0;
      min-height: 0;
      overflow: hidden;
    }
    .achievement-medal-clean-panel.is-active { flex-basis: 112px; border-top: 1px solid rgba(132, 219, 192, .4); background: #101923; }
    .achievement-medal-clean-status {
      padding: 10px 16px;
      color: #e8fff8;
      font-size: 13px;
      font-weight: 800;
    }
    .achievement-medal-clean-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .achievement-medal-clean-label output { font-variant-numeric: tabular-nums; white-space: nowrap; }
    .achievement-medal-clean-track {
      height: 6px;
      margin-top: 6px;
      overflow: hidden;
      border-radius: var(--radius-pill);
      background: rgba(132, 219, 192, .18);
    }
    .achievement-medal-clean-fill {
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #68b49c, #b8f3dc);
      transition: width 80ms linear;
    }
    .achievement-medal-clean-parts {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
      margin-top: 10px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .achievement-medal-clean-part { min-width: 0; }
    .achievement-medal-clean-part-label { display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
    .achievement-medal-clean-part-label output { color: #d4eee5; font-variant-numeric: tabular-nums; }
    .achievement-medal-clean-part-done .bro-icon { display: block; width: 15px; height: 15px; stroke-width: 3; }
    .achievement-medal-clean-part-track {
      height: 5px;
      margin-top: 5px;
      overflow: hidden;
      border-radius: var(--radius-pill);
      background: rgba(132, 219, 192, .16);
    }
    .achievement-medal-clean-part-fill {
      height: 100%;
      border-radius: inherit;
      background: #8edac2;
      transition: width 80ms linear;
    }
    .achievement-media { --medal-dust: 0; }
    .achievement-media > img { filter: saturate(calc(1 - var(--medal-dust) * .84)) brightness(calc(1 - var(--medal-dust) * .52)); }
    .achievement-media-frame-clean {
      position: absolute;
      z-index: 4;
      inset: -1px;
      opacity: var(--medal-frame-clean-opacity, 0);
      pointer-events: none;
      background: var(--achievement-frame) center / contain no-repeat;
      transform: translateY(var(--achievement-frame-offset-y, 0)) scale(var(--achievement-frame-scale, 1));
      -webkit-mask-image: var(--medal-frame-clean-mask);
      mask-image: var(--medal-frame-clean-mask);
      -webkit-mask-size: 100% 100%;
      mask-size: 100% 100%;
    }
    .achievement-media-dust {
      position: absolute;
      z-index: 5;
      inset: 0;
      border-radius: 50%;
      pointer-events: none;
      opacity: calc(var(--medal-dust) * .94);
      background:
        radial-gradient(circle at 38% 32%, rgba(171,175,178,.2), transparent 64%),
        rgba(125,130,134,.25);
      clip-path: circle(39% at 50% 50%);
    }
    .achievement-media.is-polished { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--rarity-color) 50%, white)); }
    .achievement-medal-canvas { display: block; width: 100%; height: 100%; min-height: 0; }
    @media (max-width: 600px) {
      .achievement-medal-dialog { width: calc(100vw - 20px); height: min(82dvh, 620px); }
      .achievement-medal-dialog.is-admin-testing { width: calc(100vw - 20px); }
      .achievement-medal-clean-panel.is-active { flex-basis: 158px; }
      .achievement-medal-clean-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin-top: 8px; }
      .achievement-medal-clean-status { padding: 8px 12px; }
      .achievement-medal-stage.is-admin-testing { display: block; }
      .achievement-medal-stage.has-variants .achievement-medal-canvas { transform: translateY(36px); }
      .achievement-medal-stage.is-admin-testing .achievement-medal-age-panel {
        position: absolute;
        top: auto;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-height: 42%;
        margin: 0;
      }
    }

    .achievement-toast-media { position: relative; overflow: visible; isolation: isolate; border-radius: 50%; }
    .achievement-toast-media img { position: relative; z-index: 1; clip-path: circle(43% at 50% 50%); }

    .achievement.achievement-rarity-common { --achievement-card-tone: #a87951; --achievement-star-tone: #dcad77; }
    .achievement.achievement-rarity-uncommon { --achievement-card-tone: #b87843; --achievement-star-tone: #ecad70; }
    .achievement.achievement-rarity-rare { --achievement-card-tone: #b8c8d4; --achievement-star-tone: #e1edf7; }
    .achievement.achievement-rarity-epic { --achievement-card-tone: #f3bd36; --achievement-star-tone: #ffe16c; }
    .achievement.achievement-rarity-legendary { --achievement-card-tone: #eaa8cf; --achievement-star-tone: #ffc6eb; }
    .achievement.achievement-rarity-secret { --achievement-card-tone: #8a4eb5; --achievement-star-tone: #d899ff; }
    .achievement[class*="achievement-rarity-"] {
      background:
        radial-gradient(ellipse at 14% 12%, color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 28%, transparent), transparent 72%),
        linear-gradient(115deg, color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 15%, #151a29), color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 7%, #111624));
      border-color: color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 35%, var(--line));
    }

    .achievement[class*="achievement-rarity-"].unlocked {
      background:
        radial-gradient(ellipse at 14% 12%, color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 37%, transparent), transparent 74%),
        linear-gradient(115deg, color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 21%, #171c2b), color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 10%, #111624));
      border-color: color-mix(in srgb, var(--achievement-card-tone, var(--rarity-material)) 45%, var(--line));
    }
    .achievement.achievement-rarity-legendary,
    .achievement.achievement-rarity-legendary.unlocked {
      background:
        radial-gradient(ellipse at 14% 12%, rgba(250, 171, 215, .24), transparent 72%),
        radial-gradient(ellipse at 88% 80%, rgba(126, 225, 234, .13), transparent 68%),
        linear-gradient(115deg, #292138, #181d2c 78%);
    }
    .achievement.achievement-rarity-secret,
    .achievement.achievement-rarity-secret.unlocked {
      background:
        radial-gradient(ellipse at 16% 12%, rgba(139, 69, 187, .31), transparent 70%),
        linear-gradient(115deg, #1d1426, #0d0c15 80%);
    }
    .achievement-rarity-stars {
      position: absolute;
      z-index: 2;
      right: 10px;
      bottom: 8px;
      color: var(--achievement-star-tone, var(--rarity-color));
      font-size: 13px;
      line-height: 1;
      letter-spacing: 0;
      white-space: nowrap;
      text-shadow: 0 1px 3px #080b14, 0 0 8px color-mix(in srgb, currentColor 30%, transparent);
      pointer-events: none;
    }
    .achievement.achievement-rarity-legendary .achievement-rarity-stars {
      background: linear-gradient(105deg, #ffc4e8, #e7d4ff 48%, #a9eced 82%, #ffd2a8);
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
    }

    .achievement-media::before,
    .achievement-toast-media::before {
      content: "";
      position: absolute;
      z-index: 3;
      inset: -1px;
      pointer-events: none;
      background: var(--achievement-frame) center / contain no-repeat;
      filter: saturate(calc(1 - var(--medal-frame-dust, 0) * .84)) brightness(calc(1 - var(--medal-frame-dust, 0) * .52)) drop-shadow(0 0 6px color-mix(in srgb, var(--rarity-color) 42%, transparent));
      transform: translateY(var(--achievement-frame-offset-y, 0)) scale(var(--achievement-frame-scale, 1));
    }

    .achievement-media::after,
    .achievement-toast-media::after {
      content: "";
      position: absolute;
      z-index: 0;
      inset: 0;
      clip-path: circle(43% at 50% 50%);
      background:
        repeating-radial-gradient(circle at 50% 50%, transparent 0 2px, color-mix(in srgb, var(--rarity-color) 5%, transparent) 2px 3px),
        radial-gradient(circle at 50% 50%, var(--rarity-deep) 0 70%, #080b14 100%);
      pointer-events: none;
    }
    .achievement-toast-media::before { inset: -4px; }

    .achievement-frame-overlap .achievement-media img,
    .achievement-frame-overlap .achievement-toast-media img { z-index: 4; clip-path: none; }
    .achievement-rarity-glitch .achievement-media::before,
    .achievement-rarity-glitch .achievement-toast-media::before { display: none; }
    .achievement-rarity-glitch .achievement-media img,
    .achievement-rarity-glitch .achievement-toast-media img { clip-path: none; }
    .achievement-rarity-glitch .achievement-media::after,
    .achievement-rarity-glitch .achievement-toast-media::after { clip-path: circle(47% at 50% 50%); background: #020104; }

    .achievement.locked .achievement-media {
      filter: grayscale(1) brightness(.62);
      opacity: .9;
    }

    .achievement-body {
      min-width: 0;
      display: flex;
      flex: 1;
      flex-direction: column;
      gap: 4px;
    }

    .achievement-owner {
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .achievement[data-profile-person] .achievement-owner {
      color: color-mix(in srgb, var(--profile-color) 74%, white);
    }

    .achievement[data-profile-team] .achievement-owner {
      color: color-mix(in srgb, var(--profile-color) 48%, var(--profile-color-2));
    }

    .achievement-title {
      color: var(--text);
      font-weight: 900;
      line-height: 1.15;
      font-size: 14px;
    }

    .achievement-entry-new {
      position: absolute;
      z-index: 6;
      top: -5px;
      right: -7px;
      box-shadow: 0 3px 8px rgba(0, 0, 0, .28);
    }

    .achievement-description {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.35;
    }

    .achievement.unlocked .achievement-description {
      color: color-mix(in srgb, var(--muted) 82%, white);
    }

    .achievement-unlocked-date {
      color: color-mix(in srgb, var(--good) 72%, white);
      font-size: 10px;
      font-weight: 850;
      line-height: 1.25;
    }

    .achievement-progress {
      margin-top: auto;
      display: grid;
      gap: 6px;
    }

    .achievement-admin-target-field.is-invalid input {
      border-color: var(--bad);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 20%, transparent);
    }

    .achievement-admin-target-field.is-invalid small {
      color: var(--bad);
      font-weight: 800;
    }

    .achievement-reward-slot {
      min-height: 31px;
      display: flex;
      align-items: center;
    }

    .progress-bar {
      height: 7px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255,255,255,.08);
    }

    .progress-fill {
      height: 100%;
      width: var(--progress);
      border-radius: inherit;
      background: linear-gradient(90deg, var(--today), var(--good));
    }

    .achievement[data-profile-person] .progress-fill {
      background: linear-gradient(90deg, color-mix(in srgb, var(--profile-color) 72%, white), var(--profile-color));
    }

    .achievement[data-profile-team] .progress-fill {
      background: linear-gradient(90deg, var(--profile-color), var(--profile-color-2));
    }

    .achievement[class*="achievement-rarity-"] .progress-fill {
      background: linear-gradient(90deg, var(--rarity-progress-start), var(--rarity-progress-end));
      box-shadow: 0 0 8px color-mix(in srgb, var(--rarity-progress-end) 34%, transparent);
    }

    .progress-label {
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
    }

    .achievement-status {
      color: var(--good);
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .achievement.locked .achievement-status {
      color: var(--warn);
    }

    .achievement[data-profile-person].unlocked .achievement-status {
      color: color-mix(in srgb, var(--profile-color) 76%, white);
    }

    .achievement[data-profile-team].unlocked .achievement-status {
      color: color-mix(in srgb, var(--profile-color) 50%, var(--profile-color-2));
    }

    .achievement[data-profile-person].locked .achievement-status {
      color: color-mix(in srgb, var(--profile-color) 58%, var(--warn));
    }

    .achievement[data-profile-team].locked .achievement-status {
      color: color-mix(in srgb, var(--profile-color) 34%, var(--profile-color-2));
    }

    .achievement-celebration-backdrop {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: grid;
      place-items: center;
      padding: 18px;
      background:
        radial-gradient(circle at center, color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, transparent), transparent 34%),
        rgba(5,8,18,.72);
      backdrop-filter: blur(12px);
      animation: achievementBackdropIn .18s ease-out both;
    }

    .achievement-celebration-backdrop[hidden] {
      display: none;
    }

    .achievement-celebration-backdrop.is-leaving {
      animation: achievementBackdropOut .18s ease-in both;
    }

    .achievement-celebration-backdrop.is-reloaded {
      background: rgba(5,8,18,.72);
    }

    .achievement-celebration-card {
      position: relative;
      width: min(430px, 100%);
      height: min(560px, calc(100dvh - 36px));
      display: flex;
      flex-direction: column;
      align-items: center;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--good)) 48%, white);
      border-radius: 22px;
      padding: 28px 22px 22px;
      text-align: center;
      color: var(--text);
      background:
        radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--profile-color, var(--good)) 26%, transparent), transparent 34%),
        linear-gradient(145deg, rgba(255,255,255,.13), rgba(21,27,47,.96));
      box-shadow:
        0 30px 90px rgba(0,0,0,.5),
        0 0 0 1px color-mix(in srgb, var(--profile-color, var(--good)) 18%, transparent) inset;
      overflow: hidden;
      animation: achievementCardPop .56s cubic-bezier(.2, 1.3, .24, 1) both;
    }
    .achievement-showcase-action.ui-icon-button { position: absolute; z-index: 3; top: 8px; right: 8px; width: 32px; min-width: 32px; height: 32px; opacity: .72; }
    .achievement-admin-unlock { position: absolute; z-index: 5; top: 8px; right: 88px; }
    .achievement:has(> .achievement-admin-unlock) { overflow: visible; }
    .achievement:has(> .achievement-admin-unlock.open) { z-index: 9; }
    .achievement-admin-unlock .ui-dropdown-menu { right: -80px; min-width: 260px; }
    .achievement-medal-variants { position: absolute; z-index: 6; top: 14px; left: 72px; right: 170px; }
    .achievement-medal-variants .ui-variant-picker { gap: 6px; flex-wrap: nowrap; }
    .achievement-medal-variants .ui-select { min-width: 0; }
    .achievement-medal-variant-note { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
    .achievement-medal-variant-error { color: var(--bad); }
    @media (max-width: 600px) {
      .achievement-medal-variants { top: 66px; left: 14px; right: 14px; }
    }
    .achievement:has(> .achievement-admin-edit) > .achievement-showcase-action.ui-icon-button { right: 48px; }
    .achievement-showcase-action.ui-icon-button:hover,
    .achievement-showcase-action.is-exhibited { opacity: 1; }
    .achievement-showcase-action.is-exhibited { color: var(--good); }
    .achievement-showcase-dialog { display: grid; gap: 14px; }
    .achievement-showcase-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
    .achievement-showcase-dialog-head .section-title { font-size: 18px; }
    .achievement-showcase-slots { display: grid; gap: 2px; }
    .achievement-showcase-slot { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; cursor: pointer; }
    .achievement-showcase-slot:hover:not(:disabled) { background: rgba(255, 255, 255, .05); }
    .achievement-showcase-slot:disabled { cursor: default; opacity: .6; }
    .achievement-showcase-slot-number { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-weight: 800; }
    .achievement-showcase-slot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
    .achievement-showcase-slot-action { color: var(--muted); font-size: 12px; }

    .achievement-hidden-mark {
      position: relative;
      z-index: 4;
      display: grid;
      width: 100%;
      height: 100%;
      place-items: center;
      color: var(--muted);
    }

    .achievement-hidden-mark svg { width: 28px; height: 28px; }

    .achievement.is-hidden-locked .achievement-media::before { display: none; }

    .achievement-celebration-content {
      width: 100%;
      min-height: 0;
      flex: 1 1 auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      overflow-y: auto;
      padding: 18px 10px 8px;
      scrollbar-width: thin;
    }

    .achievement-celebration-footer {
      width: 100%;
      flex: 0 0 auto;
      display: grid;
      justify-items: center;
      gap: 8px;
      padding-top: 8px;
    }

    .achievement-celebration-remaining {
      min-height: 18px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .achievement-celebration-backdrop.is-reloaded .achievement-celebration-card {
      border-color: color-mix(in srgb, var(--muted) 42%, var(--line));
      background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(21,27,47,.98));
      box-shadow:
        0 22px 64px rgba(0,0,0,.44),
        0 0 0 1px rgba(255,255,255,.05) inset;
      animation: achievementReloadedIn .22s ease-out both;
    }

    .achievement-celebration-kicker {
      color: color-mix(in srgb, var(--profile-color, var(--good)) 72%, white);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .achievement-celebration-backdrop.is-reloaded .achievement-celebration-kicker {
      color: var(--muted);
      text-shadow: none;
    }

    .achievement-celebration-badge {
      position: relative;
      width: 112px;
      height: 112px;
      border-radius: 28px;
      background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,.22), transparent 24%),
        var(--achievement-badge-image, var(--badge-sheet)) var(--icon-position) / var(--achievement-badge-size, 400% 400%);
      box-shadow:
        0 0 0 8px color-mix(in srgb, var(--profile-color, var(--good)) 14%, transparent),
        0 0 46px color-mix(in srgb, var(--profile-color, var(--good)) 38%, transparent);
      animation: achievementBadgePulse 1.4s ease-in-out infinite;
    }

    .tracker-detail-fixer {
      width: fit-content;
      margin-top: 9px;
      padding: 4px 8px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 24%, var(--line));
      border-radius: var(--radius-pill);
      background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 7%, transparent);
      font-size: 12px;
    }

    .tracker-detail-fixer img { width: 20px; height: 20px; }
    .tracker-detail-fixer-icon { position: relative; display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; }
    .tracker-detail-fixer.is-unavailable { color: var(--muted); opacity: .7; }
    .tracker-detail-fixer.is-unavailable img { filter: grayscale(1); opacity: .5; }
    .tracker-detail-fixer.is-unavailable .tracker-detail-fixer-icon::after {
      content: "";
      position: absolute;
      inset: 1px;
      border: 2px solid currentColor;
      border-radius: 50%;
      background: linear-gradient(45deg, transparent 44%, currentColor 45% 55%, transparent 56%);
    }

    .achievement-celebration-badge > img {
      position: relative;
      z-index: 2;
      display: block;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      object-fit: cover;
    }

    .achievement-celebration-badge:has(> img) {
      background-image: none;
    }

    .achievement-celebration-backdrop.is-reloaded .achievement-celebration-badge {
      box-shadow:
        0 0 0 6px rgba(255,255,255,.06),
        0 8px 24px rgba(0,0,0,.3);
      filter: saturate(.62) brightness(.92);
      animation: none;
    }

    .achievement-celebration-backdrop[class*="achievement-rarity-"] .achievement-celebration-badge {
      border-radius: 50%;
      background-color: color-mix(in srgb, var(--rarity-deep) 34%, #080c17);
      box-shadow: inset 0 0 18px var(--rarity-deep), 0 0 24px color-mix(in srgb, var(--rarity-color) 52%, transparent);
    }

    .achievement-celebration-backdrop[class*="achievement-rarity-"] .achievement-celebration-badge:has(> img) {
      background-image:
        radial-gradient(circle at 38% 30%, color-mix(in srgb, var(--rarity-color) 42%, transparent), transparent 62%),
        linear-gradient(145deg, color-mix(in srgb, var(--rarity-deep) 38%, transparent), color-mix(in srgb, var(--rarity-color) 16%, transparent));
    }

    .achievement-celebration-backdrop[class*="achievement-rarity-"] .achievement-celebration-badge::after {
      content: "";
      position: absolute;
      z-index: 3;
      inset: -14px;
      background: var(--achievement-frame) center / contain no-repeat;
      filter: drop-shadow(0 0 10px color-mix(in srgb, var(--rarity-color) 48%, transparent));
      transform: translateY(var(--achievement-frame-offset-y, 0)) scale(var(--achievement-frame-scale, 1));
      pointer-events: none;
    }

    .achievement-celebration-badge > img { clip-path: circle(43% at 50% 50%); }
    .achievement-celebration-backdrop.achievement-frame-overlap .achievement-celebration-badge > img { z-index: 4; clip-path: none; }

    .achievement-repeat-mark {
      position: absolute;
      z-index: 4;
      right: -10px;
      bottom: -10px;
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border: 2px solid color-mix(in srgb, var(--muted) 72%, white);
      border-radius: 50%;
      color: var(--text);
      background: color-mix(in srgb, var(--card) 92%, black);
      box-shadow: 0 6px 18px rgba(0,0,0,.42);
      font-size: 25px;
      font-weight: 900;
      line-height: 1;
    }

    .achievement-celebration-backdrop.is-reloaded .achievement-celebration-badge::before {
      display: none;
    }

    .achievement-celebration-badge::before {
      content: "";
      position: absolute;
      inset: -16px;
      border: 2px solid color-mix(in srgb, var(--profile-color, var(--good)) 46%, transparent);
      border-radius: 36px;
      animation: achievementRing 1.7s ease-out infinite;
    }

    .achievement-celebration-card h2 {
      margin: 4px 0 0;
      color: #fff;
      font-size: clamp(28px, 6vw, 42px);
      font-weight: 950;
      letter-spacing: 0;
      line-height: 1.02;
    }

    .achievement-celebration-card p {
      max-width: 34ch;
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.45;
    }

    .achievement-celebration-reward {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin: 2px auto 0;
      padding: 9px 14px;
      border: 1px solid color-mix(in srgb, var(--profile-color, #9f8cff) 55%, transparent);
      border-radius: var(--radius-pill);
      background: color-mix(in srgb, var(--profile-color, #9f8cff) 18%, rgba(16, 18, 34, .88));
      animation: achievement-reward-arrive .55s .2s both cubic-bezier(.2, .8, .2, 1);
    }
    .achievement-celebration-reward img {
      width: 25px;
      height: 25px;
      object-fit: contain;
      flex: 0 0 auto;
    }
    .achievement-reward-burst {
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
    }
    .achievement-reward-burst img {
      position: absolute;
      left: var(--burst-x);
      top: var(--burst-y);
      width: 27px;
      height: 27px;
      object-fit: contain;
      animation: achievement-reward-burst .55s ease-out both;
    }
    @keyframes achievement-reward-burst {
      from { opacity: 1; transform: translate(-50%, -50%) scale(.65); }
      to { opacity: 0; transform: translate(calc(-50% + var(--burst-dx)), calc(-50% + var(--burst-dy))) scale(1.2); }
    }
    @keyframes achievement-reward-arrive {
      from { opacity: 0; scale: .75; }
      to { opacity: 1; scale: 1; }
    }

    .achievement-celebration-card .achievement-celebration-confirm {
      min-width: 136px;
      height: 47px;
      min-height: 47px;
      border-radius: 999px;
      font-weight: 950;
    }

    .achievement-celebration-debug {
      width: 100%;
      max-height: 150px;
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 8px 10px;
      text-align: left;
      background: rgba(0,0,0,.22);
    }

    .achievement-celebration-debug summary { cursor: pointer; font-weight: 850; }
    .achievement-celebration-debug pre { white-space: pre-wrap; font-size: 10px; }

    .achievement-confetti {
      position: absolute;
      inset: 50% auto auto 50%;
      pointer-events: none;
    }

    .achievement-confetti span {
      position: absolute;
      width: 8px;
      height: 14px;
      border-radius: 3px;
      background: hsl(calc(var(--angle) * 1), 86%, 67%);
      transform: rotate(var(--angle)) translateY(-12px);
      opacity: 0;
      animation: achievementConfetti 920ms ease-out var(--delay) both;
    }

    @keyframes achievementBackdropIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes achievementBackdropOut {
      from { opacity: 1; }
      to { opacity: 0; }
    }

    @keyframes achievementCardPop {
      0% { opacity: 0; transform: translateY(16px) scale(.88); }
      62% { opacity: 1; transform: translateY(-4px) scale(1.03); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes achievementReloadedIn {
      from { opacity: 0; transform: scale(.98); }
      to { opacity: 1; transform: scale(1); }
    }

    @keyframes achievementBadgePulse {
      0%, 100% { transform: scale(1) rotate(-1deg); }
      50% { transform: scale(1.045) rotate(1deg); }
    }

    @keyframes achievementRing {
      0% { opacity: .9; transform: scale(.82); }
      100% { opacity: 0; transform: scale(1.22); }
    }

    @keyframes achievementConfetti {
      0% {
        opacity: 0;
        transform: rotate(var(--angle)) translateY(-10px) scale(.6);
      }
      12% { opacity: 1; }
      100% {
        opacity: 0;
        transform: rotate(var(--angle)) translateY(calc(-1 * var(--distance))) translateX(36px) rotate(260deg);
      }
    }
.tracker-market-button { border-style: dashed; }
.tracker-market-modal { width: min(1080px, calc(100vw - 24px)); height: min(88vh, 900px); max-height: min(88vh, 900px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--control-pad); background: var(--card); color: var(--text); }

/* ---- Tracker-Media (Audio-Upload & Video-Link + Player, pro Tracker vom Ersteller freischaltbar) ---- */

.tracker-media-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 36%, var(--line));
  border-radius: 18px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--active-profile-color, #8ab4ff) 16%, transparent), rgba(255,255,255,.025)),
    rgba(16,23,42,.82);
  box-shadow: 0 16px 45px rgba(0,0,0,.22);
}

.tracker-media-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tracker-media-empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 14px;
  font-size: 13px;
}

.tracker-media-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracker-media-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.tracker-media-item.active {
  border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 55%, var(--line));
  background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 12%, rgba(255,255,255,.035));
}

.tracker-media-play {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease;
}

.tracker-media-play:hover {
  background: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 18%, rgba(255,255,255,.06));
  border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 45%, var(--line));
}

.tracker-media-info {
  flex: 1;
  min-width: 0;
}

.tracker-media-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracker-media-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.tracker-media-delete {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background .15s ease, color .15s ease;
}

.tracker-media-delete:hover {
  background: color-mix(in srgb, var(--bad) 25%, rgba(255,255,255,.06));
  color: var(--text);
}

.tracker-media-player {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracker-media-player-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.tracker-media-seek {
  width: 100%;
  accent-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 70%, white);
}

.tracker-media-time {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tracker-media-done {
  align-self: flex-start;
  color: var(--good);
  font-size: 12px;
  font-weight: 900;
  border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line));
  border-radius: 999px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--good) 14%, rgba(255,255,255,.04));
}

.tracker-media-modal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  width: min(92vw, 460px);
  max-height: 85vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tracker-media-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tracker-media-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tracker-media-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tracker-media-label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.tracker-media-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  box-sizing: border-box;
}

.tracker-media-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 60%, rgba(255,255,255,.2));
}

.tracker-media-file-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,.06);
  border: 1.5px dashed rgba(255,255,255,.2);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  transition: border-color .15s, background .15s, color .15s;
}

.tracker-media-file-pick:hover {
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
}

.tracker-media-file-pick.has-file {
  border-style: solid;
  border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 60%, rgba(255,255,255,.2));
  color: var(--text);
}

.tracker-media-file-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tracker-media-upload-progress {
  height: 4px;
  margin: 4px 0 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}

.tracker-media-upload-bar {
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 70%, white);
  animation: tracker-media-upload-slide 1.1s ease-in-out infinite;
}

@keyframes tracker-media-upload-slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tracker-media-upload-bar { animation-duration: 2.2s; }
}

.tracker-media-form-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

.tracker-media-kind-switch {
  display: flex;
  gap: 8px;
}

.tracker-media-video-shell {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracker-media-video-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.tracker-media-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.tracker-media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.tracker-flavor-text { margin: 2px 0 12px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.tracker-weekly-goal {
  width: fit-content;
  max-width: 100%;
  margin: -2px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--card2) 82%, transparent);
  color: var(--muted);
  font-size: .78rem;
}
.tracker-weekly-goal summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
}
.tracker-weekly-goal summary::-webkit-details-marker { display: none; }
.tracker-weekly-goal summary::after {
  content: "▾";
  color: var(--muted);
  font-size: .7rem;
}
.tracker-weekly-goal[open] {
  width: min(100%, 520px);
  border-radius: var(--control-radius);
}
.tracker-weekly-goal[open] summary::after { transform: rotate(180deg); }
.tracker-weekly-goal strong { color: var(--text); }
.tracker-weekly-goal p {
  margin: 0;
  padding: 0 10px 10px;
  line-height: 1.45;
}
.zen-automation-panel {
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
  border-radius: var(--control-radius);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 7%, rgba(255,255,255,.035));
}

.zen-automation-panel summary {
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.zen-automation-switches,
.zen-automation-items {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.zen-automation-switches label,
.zen-automation-item,
.zen-automation-item label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zen-automation-item {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.zen-automation-item input[type="number"] {
  width: 82px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  color: var(--text);
  background: var(--card2);
}

.zen-automation-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.zen-auto-ascension-settings {
  display: grid;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  border-radius: var(--control-radius);
  padding: 12px;
  background: color-mix(in srgb, var(--warn) 8%, rgba(255,255,255,.035));
}

.zen-auto-ascension-settings > small {
  color: var(--muted);
  line-height: 1.45;
}

.zen-auto-ascension-limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.zen-auto-ascension-limits label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.zen-auto-ascension-limits input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 9px;
  color: var(--text);
  background: var(--card2);
}
.tracker-overview-card,
.tracker-streak-card {
  position: relative;
}
.tracker-fixer-card-celebration {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  pointer-events: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .38));
  animation: tracker-fixer-celebration 2.5s ease both;
}
.tracker-fixer-weekly-main { width: 62px; height: 62px; object-fit: contain; }
.tracker-fixer-card-celebration > strong {
  position: absolute;
  right: 4px;
  bottom: 10px;
  color: #fff4b1;
  font-size: 24px;
  text-shadow: 0 2px 8px #392100;
}
.tracker-fixer-weekly-orbit { position: absolute; inset: 0; }
.tracker-fixer-weekly-orbit img {
  --fixer-angle: calc(var(--fixer-index) * 72deg);
  position: absolute;
  left: 45px;
  top: 45px;
  width: 26px;
  height: 26px;
  object-fit: contain;
  animation: tracker-fixer-orbit 1.45s calc(var(--fixer-index) * 45ms) ease-out both;
}
@keyframes tracker-fixer-celebration {
  0% { opacity: 0; scale: .55; }
  18%, 72% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: .92; }
}
@keyframes tracker-fixer-orbit {
  from { opacity: 0; transform: rotate(var(--fixer-angle)) translateX(0) rotate(calc(-1 * var(--fixer-angle))) scale(.4); }
  35%, 75% { opacity: 1; }
  to { opacity: 0; transform: rotate(var(--fixer-angle)) translateX(50px) rotate(calc(-1 * var(--fixer-angle))) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tracker-fixer-card-celebration,
  .tracker-fixer-weekly-orbit img { animation-duration: .01ms; }
}

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .achievements-page .achievements-shell, :where(body:not(.og-design)) .inventory-page .inventory-shell{ border: 0; border-radius: 0; padding: 16px 0; background: transparent; box-shadow: none; backdrop-filter: none; }
:where(body:not(.og-design)) .achievements-page .achievement-filter-panel{ border: 0; border-radius: 0; padding: 0 0 20px; background: transparent; box-shadow: none; }
:where(body:not(.og-design)) .tracker-page .tracker-media-shell{ border: 0; border-radius: 0; padding-inline: 0; background: transparent; box-shadow: none; }
:where(body:not(.og-design)) .tracker-page .stat, :where(body:not(.og-design)) .tracker-page .player-card{ border-radius: 8px; box-shadow: none; }
/* Einzelnes Kategorienfeld im gemeinsamen Formulardialog. */
.achievement-prompt-rule-field { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-weight: 800; }
.achievement-prompt-rule-field textarea { width: 100%; min-width: 0; resize: vertical; border: 1px solid var(--line); border-radius: var(--control-radius); padding: 11px 12px; color: var(--text); background: color-mix(in srgb, var(--card2) 88%, black); font: inherit; font-weight: 600; line-height: 1.45; }
.achievement-prompt-rule-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
.achievement-prompt-rule-field small { color: var(--muted); font-weight: 600; line-height: 1.4; }

/* Quelle: community.css */
.community-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: var(--control-pad); min-height: 0; height: 100%; }
.community-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--control-pad); }
.community-search { display: flex; align-items: center; flex: 1 1 320px; max-width: 520px; min-width: 180px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--card2); }
.community-search > span { display: grid; place-items: center; flex: 0 0 40px; color: var(--muted); }
.community-search .bro-icon { width: 18px; height: 18px; }
.community-search input { width: 100%; min-width: 0; border: 0; background: transparent; box-shadow: none; color: var(--text); caret-color: var(--text); }
.community-search input::placeholder { color: var(--muted); opacity: 1; }
.community-search-clear { flex: 0 0 36px; width: 36px; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.community-search-clear:hover { color: var(--text); background: transparent; }
.community-form, .community-card { padding: var(--control-pad); border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--card2); }
.community-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--control-pad); }
.community-form label, .community-manage label { display: grid; gap: 6px; }
.community-form textarea { min-height: 90px; resize: vertical; }
.community-icon-prompt-guide { grid-column: 1 / -1; border: 1px solid color-mix(in srgb,var(--accent) 28%,var(--line)); border-radius: var(--control-radius); padding: 9px 11px; background: color-mix(in srgb,var(--accent) 5%,transparent); }
.community-icon-prompt-guide summary { cursor: pointer; font-weight: 900; }
.community-icon-prompt-guide p { color: var(--muted); font-size: .78rem; }
.community-icon-prompt-guide textarea { width: 100%; min-height: 180px; resize: vertical; }
.community-edit-icon-prompt-guide { flex: 0 0 auto; }
.community-results-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.community-results-scroll .community-form { margin-bottom: var(--control-pad); }
.community-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: var(--control-pad); align-items: stretch; }
/* flex statt grid: so kann die Follower/Aktionen-Gruppe per margin-top:auto
   unten andocken, egal wie viel Platz Titel/Beschreibung/Infoliste darüber
   brauchen - sonst rutschen diese Zeilen je nach Textlänge auf
   unterschiedliche Höhen. */
.community-card { display: flex; flex-direction: column; gap: 12px; }
.community-card.is-subscribed { border-color: color-mix(in srgb,var(--community-profile-color) 48%,var(--line)); background: linear-gradient(145deg,color-mix(in srgb,var(--community-profile-color) 13%,var(--card2)),color-mix(in srgb,var(--community-profile-color) 5%,var(--card2))); box-shadow: inset 3px 0 0 color-mix(in srgb,var(--community-profile-color) 75%,transparent); }
.community-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.community-card-identity { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.community-card-identity > div { min-width: 0; }
.community-card-icon { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; }
.community-card-head h2 { margin: 3px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.community-card-head > span, .community-card-head small { color: var(--muted); font-size: .82rem; }
.community-weekly-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb,var(--accent) 36%,var(--line));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb,var(--accent) 10%,transparent);
  color: var(--text);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}
.community-request-count {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb,var(--warn) 46%,var(--line));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb,var(--warn) 12%,transparent);
  color: color-mix(in srgb,var(--warn) 82%,var(--text));
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}
.community-card-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font-size: .82rem; }
.community-edit-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); }
.community-edit-button:hover, .community-edit-button.active { color: var(--text); border-color: var(--accent); background: color-mix(in srgb,var(--accent) 12%,transparent); }
.community-edit-button .bro-icon { width: 16px; height: 16px; }
.community-achievement-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 15px; }
.community-achievement-button:hover { color: #fde68a; border-color: #fde68a; background: color-mix(in srgb,#fde68a 10%,transparent); }

.streak-achievement-manager { display: grid; gap: var(--control-pad); }
.streak-achievement-manager-head { display: flex; align-items: center; justify-content: space-between; gap: var(--control-pad); }
.streak-achievement-manager-head p { margin: 0; max-width: 680px; color: var(--muted); }
.streak-achievement-editor-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: var(--control-pad); padding: var(--control-pad); border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--card2); }
.streak-achievement-editor-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.8fr); gap: 12px; }
.streak-achievement-editor-fields label, .streak-achievement-fixed-target { display: grid; align-content: start; gap: 6px; }
.streak-achievement-editor-fields label > span, .streak-achievement-fixed-target > span { color: var(--muted); font-size: .8rem; font-weight: 800; }
.streak-achievement-target-field.is-invalid input { border-color: var(--bad); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 20%, transparent); }
.streak-achievement-target-field.is-invalid small { color: var(--bad); font-weight: 800; }
.streak-achievement-description { grid-column: 1 / 2; }
.streak-achievement-description textarea { resize: vertical; }
.streak-achievement-fixed-target strong { min-height: 44px; display: flex; align-items: center; color: var(--text); }

@media (max-width: 760px) {
  .streak-achievement-manager-head, .streak-achievement-editor-card { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .streak-achievement-editor-fields { grid-template-columns: 1fr; }
  .streak-achievement-description { grid-column: 1; }
}

/* Follow-Status oben in der Kopfzeile (ersetzt den frueheren Text-Badge
   unten): Haken = folgst du bereits, Kreuz = entfolgen (mit Bestaetigung
   ueber .community-confirm-row). */
.community-follow-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb,var(--good) 45%,var(--line));
  background: color-mix(in srgb,var(--good) 16%,transparent);
  color: var(--good);
  font-weight: 900;
}
.community-follow-unfollow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}
.community-follow-unfollow:hover {
  color: var(--bad);
  border-color: color-mix(in srgb,var(--bad) 45%,var(--line));
  background: color-mix(in srgb,var(--bad) 10%,transparent);
}
.community-confirm-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb,var(--bad) 35%,var(--line));
  border-radius: var(--control-radius);
  background: color-mix(in srgb,var(--bad) 8%,transparent);
  color: var(--muted);
  font-size: .86rem;
}

.community-inline-title { width: min(100%, 360px); font-size: 1.25rem; font-weight: 700; }
.community-inline-description { min-height: 88px; resize: vertical; }
.community-icon-field { grid-column: 1 / -1; }
.community-icon-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.025);
  cursor: pointer;
}
.community-icon-picker:hover { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 7%,transparent); }
.community-icon-picker img,
.community-icon-placeholder { width: 54px; height: 54px; flex: 0 0 54px; object-fit: contain; }
.community-icon-placeholder { display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.06); color: var(--muted); font-size: 30px; }
.community-icon-picker > span:not(.community-icon-placeholder) { display: grid; gap: 3px; }
.community-icon-picker small { color: var(--muted); }
.community-icon-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.community-edit-icon-field { display: grid; gap: 6px; }
.community-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.community-approval-wait { padding: 8px 10px; border: 1px solid color-mix(in srgb,var(--accent) 35%,var(--line)); border-radius: var(--control-radius); color: var(--muted); background: color-mix(in srgb,var(--accent) 8%,transparent); }
.community-rejection-note { margin: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb,var(--danger) 45%,var(--line)); border-radius: var(--control-radius); background: color-mix(in srgb,var(--danger) 9%,var(--card2)); color: var(--text); line-height: 1.45; }
.community-approval-dialog { width: min(760px,calc(100vw - 24px)); max-height: min(88vh,900px); overflow-y: auto; display: grid; gap: 12px; }
.community-approval-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.community-review-notice { margin: 0; color: var(--muted); }
.community-review-list { display: grid; gap: 12px; min-height: 0; }
.community-review-item { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card2); }
.community-review-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.community-review-status { font-size: .8rem; font-weight: 800; }
.community-review-status.is-added, .community-review-version.is-new > strong { color: #73d5a2; }
.community-review-status.is-removed, .community-review-version.is-old > strong { color: #f49898; }
.community-review-status.is-changed { color: #f5c875; }
.community-review-status.is-unverified { color: var(--muted); }
.community-review-versions { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 10px; }
.community-review-version { min-width: 0; padding: 10px; border-radius: 6px; border: 1px solid var(--line); }
.community-review-version.is-old { background: rgba(180,48,48,.1); border-color: rgba(244,152,152,.3); }
.community-review-version.is-new { background: rgba(40,150,90,.1); border-color: rgba(115,213,162,.3); }
.community-review-version dl { display: grid; grid-template-columns: minmax(90px,35%) minmax(0,1fr); gap: 6px 10px; margin: 8px 0 0; line-height: 1.35; }
.community-review-version dt { color: var(--muted); }
.community-review-version dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.community-review-version.is-old dd { color: #f49898; }
.community-review-version.is-new dd { color: #73d5a2; }
.community-review-art { display: block; width: 80px; height: 80px; margin: 8px 0; }

@media (max-width: 640px) {
  .community-toolbar { align-items: stretch; flex-direction: column; }
  .community-search { flex-basis: auto; width: 100%; max-width: none; }
}

/* Feld-Liste unter der Beschreibung: im Anzeigemodus reiner Text, im
   Bearbeiten-Modus wird der Wert je Zeile durch ein Eingabefeld ersetzt -
   kein separates Bearbeiten-Panel mehr. */
.community-info-list {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.community-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: .86rem;
}
.community-info-label {
  color: var(--muted);
  font-weight: 600;
}
.community-info-value {
  color: var(--text);
  font-weight: 700;
  text-align: right;
}
.community-info-row select,
.community-info-row input[type="date"] {
  max-width: 60%;
}
.community-info-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  color: var(--text);
}
.community-info-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.community-edit-actions { display: flex; gap: 10px; }

/* margin-top:auto dockt die ganze Fuß-Gruppe (Follower, Aktionen) unten an,
   unabhängig von der Höhe der Karte darüber - macht die Karten im Markt
   einheitlich, statt je nach Textlänge unterschiedlich hoch anzusetzen. */
.community-followers { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; color: var(--muted); font-size: .86rem; }
.community-form .community-media-toggle { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); font-weight: 400; }
.community-media-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.community-media-toggle span { display: grid; gap: 2px; }
.community-media-toggle small { color: var(--muted); font-weight: 500; }
.community-media-toggle.is-disabled,
.community-info-row.is-disabled { opacity: .55; }
.community-follower-faces { display: flex; flex-direction: row-reverse; justify-content: flex-end; }
.community-follower-face { width: 30px; height: 30px; margin-left: -8px; overflow: hidden; border: 2px solid var(--card2); border-radius: 50%; background: var(--card2); }
.community-follower-face svg { width: 100%; height: 100%; }
.community-join-requests {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb,var(--warn) 38%,var(--line));
  border-radius: var(--control-radius);
  background: color-mix(in srgb,var(--warn) 8%,transparent);
}
.community-join-requests-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.community-join-requests-head span { color: var(--muted); font-size: .78rem; }
.community-request { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* Follower-Verwaltung im Bearbeiten-Modus: Owner darf einzelne Mitglieder
   entfernen (Kick), unabhaengig vom kompakten Avatar-Stapel oben. */
.community-member-manage { display: grid; gap: 8px; margin-top: 10px; }
.community-member-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  font-size: .86rem;
}
.community-member-avatar { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.community-member-avatar svg { width: 100%; height: 100%; }
.community-member-name { flex: 1; color: var(--text); font-weight: 600; }

.community-close-control { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
@media (max-width:700px) { .community-form { grid-template-columns: 1fr; } }

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .community-shell .community-card{ border-radius: 8px; }
.inbox-reactions .sticker-art { width: 24px; height: 24px; flex: 0 0 24px; }

/* Quelle: calendar.css */
    .calendar-shell {
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 18px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .calendar-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .calendar-title {
      font-size: 22px;
      font-weight: 900;
      letter-spacing: -.04em;
    }

    .month-buttons {
      display: flex;
      gap: 8px;
    }

    .legend {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 12px 0 16px;
      color: var(--muted);
      font-size: 13px;
    }

    .legend-item {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 10px;
      background: rgba(255,255,255,.035);
    }

    .dot {
      width: 14px;
      height: 14px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      background: rgba(255,255,255,.16);
      color: #06120b;
      font-size: 10px;
      font-weight: 950;
      line-height: 1;
    }

    .dot.good { background: var(--good); }
    .dot.good::before { content: "✓"; }
    .dot.bad {
      border-radius: 4px;
      background: var(--bad);
      color: #21050a;
    }
    .dot.bad::before { content: "×"; }
    .dot.today { background: var(--today); }

    .calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0,1fr));
      gap: 8px;
    }

    .weekday {
      color: var(--muted);
      font-size: 12px;
      text-align: center;
      padding: 6px;
      font-weight: 800;
    }

    .day {
      min-height: 100px;
      background: rgba(255,255,255,.035);
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .day.outside {
      opacity: .32;
    }

    .day.today {
      border-color: rgba(138,180,255,.75);
      box-shadow: 0 0 0 2px rgba(138,180,255,.12) inset;
    }

    .day.future {
      opacity: .45;
    }

    .day.before-start {
      opacity: .3;
    }

    .date-number {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .badge {
      font-size: 10px;
      border-radius: 999px;
      padding: 3px 6px;
      color: var(--today);
      background: rgba(138,180,255,.12);
      border: 1px solid rgba(138,180,255,.3);
    }

    .check-row {
      display: grid;
      gap: 6px;
      margin-top: auto;
    }

    .mobile-check-dots,
    .tracker-mobile-day {
      display: none;
    }

    .check {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-radius: 12px;
      padding: 7px 8px;
      font-size: 12px;
      background: rgba(255,255,255,.045);
      border: 1px solid rgba(255,255,255,.08);
      border-left: 3px solid color-mix(in srgb, var(--profile-color) 68%, transparent);
      user-select: none;
      cursor: pointer;
    }

    .check.read-only {
      cursor: default;
      opacity: .72;
    }

    .check[data-profile-person] {
      background: color-mix(in srgb, var(--profile-color) 8%, rgba(255,255,255,.045));
    }

    .check .person-label {
      display: inline-flex;
      align-items: center;
    }

    .check .person-label::before {
      content: "";
      width: .64em;
      height: .64em;
      margin-right: 5px;
      border-radius: 999px;
      background: var(--profile-color);
    }

    .check.done {
      background: rgba(51,209,122,.13);
      border-color: rgba(51,209,122,.38);
    }

    .check.fail {
      background: rgba(255,92,122,.12);
      border-color: rgba(255,92,122,.35);
    }

    .check.fixed {
      background: rgba(71,124,255,.15);
      border-color: rgba(115,152,255,.48);
    }

    .mark {
      font-weight: 900;
      color: var(--muted);
    }

    .check.done .mark { color: var(--good); }
    .check.fail .mark { color: var(--bad); }
    .check.fixed .mark { display: inline-flex; align-items: center; color: #a9beff; }
    .check.fixed .mark img { width: 20px; height: 20px; object-fit: contain; }

    .notice {
      margin-top: 14px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
      border: 1px dashed rgba(246,193,119,.35);
      background: rgba(246,193,119,.08);
      border-radius: 18px;
      padding: 12px;
    }

    .notice[hidden],
    .notice:empty {
      display: none;
    }

    /* Toast-Basis liegt in css/components.css. */

    @media (max-width: 850px) {
      body { padding: 16px; }
      header { flex-direction: column; }
      .header-actions { width: 100%; justify-items: start; }
      .header-top-actions,
      .session-actions,
      .profile-switch { justify-content: flex-start; }
      .tracker-controls { flex-direction: column; align-items: stretch; }
      .tracker-members-card { align-items: stretch; flex-direction: column; }
      .tracker-member-list { justify-content: flex-start; }
      .tracker-friends-panel { grid-template-columns: 1fr; }
      .tracker-view-switch { justify-content: flex-start; min-width: 0; border-radius: 16px; }
      .top-grid, .players, .achievements-grid { grid-template-columns: 1fr; }
      .streak-hero { flex-direction: column; align-items: flex-start; }
      .quote-shell { flex-direction: column; }
      .quote-meta { justify-content: flex-start; min-width: 0; }
      .quote-rating-buttons { grid-template-columns: repeat(6, minmax(34px, 1fr)); }
      .quote-list-item { grid-template-columns: minmax(0, 1fr); }
      .quote-rank { width: 28px; height: 28px; }
      .quote-score { text-align: left; }
      .quote-admin-row { flex-direction: column; align-items: stretch; }
      .journal-toolbar,
      .journal-day-head,
      .journal-day-bar,
      .journal-card-head,
      .journal-gallery-head { flex-direction: column; align-items: stretch; }
      .journal-grid,
      .journal-gallery-grid { grid-template-columns: 1fr; }
      .journal-gallery-filters { justify-content: flex-start; }
      .journal-card textarea { min-height: 180px; }
      .journal-cover { min-height: 190px; }
      .streak-side { min-width: 0; width: 100%; justify-content: flex-start; }
      .streak-number { font-size: 56px; }
      .day { min-height: 88px; padding: 8px; border-radius: 14px; }
      .calendar-grid { gap: 6px; }
      .check { font-size: 11px; padding: 6px; }
      .actions { grid-template-columns: 1fr; }
      .achievements-top,
      .inventory-top { flex-direction: column; }
      .achievements-actions,
      .inventory-tabs { justify-content: flex-start; }
    }

    @media (min-width: 1500px) {
      .site-nav {
        position: fixed;
        top: 136px;
        left: calc((100vw - 1180px) / 2 - 164px);
        width: 148px;
        flex-direction: column;
      }

      .nav-link {
        width: 100%;
      }
    }

    @media (max-width: 560px) {
      .calendar-grid { gap: 4px; }
      .weekday { font-size: 10px; padding: 4px 1px; }
      .day { min-height: 76px; }
      .storage-debug { text-align: left; }
      .check {
        justify-content: center;
      }
      .check .person-label {
        display: none;
      }
    }

/* Games page styles. Kept in the shared bundle so static hosting stays simple.
   Design-Tokens (:root) und box-sizing liegen zentral in css/base-shell.css. */

    .app {
      max-width: 1180px;
      margin: 0 auto;
    }

    header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 20px;
      margin-bottom: 22px;
      border-top: 3px solid color-mix(in srgb, var(--active-profile-color, transparent) 72%, transparent);
      padding-top: 14px;
    }

    h1 {
      margin: 0;
      font-size: clamp(32px, 6vw, 56px);
      letter-spacing: -.06em;
      line-height: .95;
    }

    .subtitle {
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 16px;
      max-width: 680px;
    }

    .site-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 18px;
    }

    .nav-link {
      position: relative;
      min-width: 138px;
      min-height: 44px;
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr) auto;
      align-items: center;
      gap: 9px;
      justify-content: flex-start;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, var(--line));
      border-radius: 16px;
      padding: 9px 11px;
      color: var(--muted);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 7%, transparent), transparent 70%),
        rgba(255,255,255,.04);
      font-size: 13px;
      font-weight: 900;
      text-align: left;
      text-decoration: none;
      box-shadow: 0 10px 24px rgba(0,0,0,.08);
      overflow: hidden;
      transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease, color .14s ease;
    }

    .nav-link.active {
      color: var(--text);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, rgba(255,255,255,.06)), rgba(255,255,255,.045) 72%),
        rgba(138,180,255,.12);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 64%, white);
      box-shadow:
        0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent) inset,
        0 12px 28px color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, transparent);
    }

    .nav-link:hover {
      color: color-mix(in srgb, var(--text) 86%, var(--muted));
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 36%, var(--line));
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 13%, transparent), transparent 70%),
        rgba(255,255,255,.06);
      transform: translateX(2px);
    }

    .nav-link:hover .nav-icon,
    .nav-link.active .nav-icon {
      color: #fff;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 36%, rgba(255,255,255,.08));
      transform: scale(1.04);
    }

    .nav-link:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
      outline-offset: 3px;
    }

    .nav-link.active::before {
      content: "";
      position: absolute;
      inset: 8px auto 8px 0;
      width: 3px;
      border-radius: 0 999px 999px 0;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
    }

    .active-account-pill {
      border: 1px solid color-mix(in srgb, var(--profile-color) 54%, var(--line));
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color) 18%, rgba(255,255,255,.045));
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 14%, transparent) inset;
    }

    .active-account-pill .profile-dot {
      margin-right: 0;
    }

    .active-account-pill .game-avatar {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      box-shadow: none;
    }

    .storage-debug {
      position: fixed;
      right: 14px;
      bottom: 10px;
      z-index: 30;
      max-width: min(320px, calc(100vw - 28px));
      padding: 0;
      color: color-mix(in srgb, var(--muted) 72%, transparent);
      font-size: 11px;
      line-height: 1.35;
      text-align: right;
      pointer-events: none;
    }

    .games-stack {
      display: grid;
      gap: 18px;
    }

    .games-stack {
      overflow-x: auto;
      padding-bottom: 8px;
    }

    .game-tabs {
      --switcher-accent: var(--today);
      margin-bottom: 16px;
    }

    .game-tabs .profile-btn { --switcher-item-accent: var(--game-tab-color, var(--today)); }

    .game-tabs .profile-btn {
      min-height: 42px;
      white-space: nowrap;
    }

    .game-tab-icon {
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border-radius: 11px;
      background:
        radial-gradient(circle at 34% 24%, rgba(255,255,255,.34), transparent 34%),
        color-mix(in srgb, var(--game-tab-color, var(--today)) 24%, rgba(255,255,255,.07));
      box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--game-tab-color, var(--today)) 28%, rgba(255,255,255,.16)),
        0 8px 18px color-mix(in srgb, var(--game-tab-color, var(--today)) 18%, transparent);
      overflow: hidden;
    }

    .game-tab-icon img {
      width: 23px;
      height: 23px;
      display: block;
      object-fit: contain;
    }

    .game-tab-icon.emoji-icon {
      font-size: 17px;
      line-height: 1;
    }

    .game-tabs [data-game-tab="zen"] { --game-tab-color: #7dd3fc; }
    .game-tabs [data-game-tab="snake"] { --game-tab-color: #22c55e; }
    .game-tabs [data-game-tab="dodger"] { --game-tab-color: #f97316; }
    .game-tabs [data-game-tab="td"] { --game-tab-color: #a78bfa; }
    .game-tabs [data-game-tab="tictactoe"] { --game-tab-color: #f43f5e; }

    .game-tabs .profile-btn.active .game-tab-icon {
      background:
        radial-gradient(circle at 34% 24%, rgba(255,255,255,.42), transparent 34%),
        color-mix(in srgb, var(--game-tab-color) 44%, rgba(255,255,255,.08));
      box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--game-tab-color) 62%, white),
        0 10px 24px color-mix(in srgb, var(--game-tab-color) 28%, transparent);
    }

    .game-shell[hidden] {
      display: none;
    }

    .game-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      gap: 16px;
      align-items: start;
    }

    .game-shell[data-game-panel="zen"] {
      display: block;
      min-width: 1180px;
    }

    .game-shell[data-game-panel="zen"][hidden] {
      display: none;
    }

    .game-card,
    .score-card {
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .game-card {
      padding: 18px;
    }

    .score-card {
      padding: 18px;
      display: grid;
      gap: 14px;
      text-align: left;
    }

    .score-card .actions {
      grid-template-columns: minmax(0, 1fr);
      justify-items: stretch;
    }

    .game-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .game-top-actions {
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
      gap: 8px;
    }

    .game-toolbar {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .game-icon-btn {
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      display: inline-grid;
      place-items: center;
      border-radius: 8px;
      padding: 0;
      color: var(--muted);
      background: rgba(255,255,255,.045);
    }

    .game-icon-btn span,
    .game-icon-btn .bro-icon,
    .game-start-overlay .bro-icon {
      width: 18px;
      height: 18px;
      display: block;
    }

    .game-icon-btn .bro-icon,
    .game-start-overlay .bro-icon {
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .game-icon-btn.active {
      color: var(--good);
      border-color: color-mix(in srgb, var(--good) 55%, var(--line));
      background: color-mix(in srgb, var(--good) 12%, rgba(255,255,255,.045));
    }

    .game-audio-control {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--muted);
      background: rgba(255,255,255,.045);
      overflow: hidden;
    }

    .game-audio-control .game-icon-btn {
      border: 0;
      border-right: 1px solid var(--line);
      border-radius: 0;
      background: transparent;
    }

    .game-audio-control .game-icon-btn.active {
      background: color-mix(in srgb, var(--good) 12%, transparent);
    }

    .game-audio-control input {
      width: 72px;
      margin: 0 9px;
      accent-color: var(--good);
    }

    .game-title {
      font-size: 24px;
      font-weight: 900;
      letter-spacing: -.04em;
    }

    .game-subtitle {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
      margin-top: 3px;
    }

    .pill {
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      color: var(--muted);
      border-radius: 999px;
      padding: 10px 14px;
      font-size: 13px;
      white-space: nowrap;
    }

    .board-wrap {
      position: relative;
      width: min(100%, 620px);
      margin: 0 auto;
      aspect-ratio: 1;
      border: 1px solid rgba(138,180,255,.24);
      border-radius: 18px;
      overflow: hidden;
      background: #080d18;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    }

    .game-start-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 2;
      min-height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border-color: color-mix(in srgb, var(--good) 62%, white);
      border-radius: 8px;
      padding: 10px 16px;
      color: var(--text);
      background: rgba(8,13,24,.88);
      box-shadow: 0 12px 30px rgba(0,0,0,.32);
      backdrop-filter: blur(8px);
      transform: translate(-50%, -50%);
    }

    .game-start-overlay[hidden] {
      display: none;
    }

    .dodger-wrap .game-start-overlay.game-over {
      top: 65%;
    }

    .game-stage-stats {
      width: min(100%, 620px);
      margin: 0 auto 10px;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .game-stage-stat {
      min-width: 0;
      min-height: 42px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 8px 11px;
      background: rgba(255,255,255,.045);
    }

    .game-stage-stat span {
      min-width: 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .game-stage-stat strong {
      flex: 0 0 auto;
      font-size: 20px;
      line-height: 1;
    }

    .game-touch-controls {
      display: none;
    }

    .snake-dpad {
      width: 160px;
      display: grid;
      grid-template-columns: repeat(3, 48px);
      grid-template-rows: repeat(2, 48px);
      justify-content: center;
      gap: 6px;
    }

    .snake-dpad button {
      width: 48px;
      min-height: 48px;
      padding: 0;
      border-radius: 8px;
      font-size: 24px;
      line-height: 1;
      touch-action: manipulation;
    }

    .snake-dpad [data-snake-direction="up"] { grid-column: 2; }
    .snake-dpad [data-snake-direction="left"] { grid-column: 1; grid-row: 2; }
    .snake-dpad [data-snake-direction="down"] { grid-column: 2; grid-row: 2; }
    .snake-dpad [data-snake-direction="right"] { grid-column: 3; grid-row: 2; }

    .dodger-wrap {
      background:
        linear-gradient(180deg, rgba(138,180,255,.05), rgba(51,209,122,.04)),
        #080d18;
    }

    .game-card:fullscreen {
      width: 100vw;
      height: 100vh;
      min-height: 0;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr) auto;
      align-items: stretch;
      gap: 10px;
      overflow: hidden;
      box-sizing: border-box;
      border-radius: 0;
      padding: 18px;
      background: #080d18;
    }

    .game-card:fullscreen .game-top,
    .game-card:fullscreen .game-stage-stats {
      margin-bottom: 0;
    }

    .game-card:fullscreen .board-wrap {
      width: auto;
      height: 100%;
      min-height: 0;
      max-width: 100%;
      max-height: 100%;
      align-self: center;
      justify-self: center;
    }

    canvas {
      display: block;
      width: 100%;
      height: 100%;
      image-rendering: pixelated;
    }

    #snakeBoard,
    #dodgerBoard {
      touch-action: none;
    }

    @media (hover: none) and (pointer: coarse) {
      .game-touch-controls {
        width: min(100%, 620px);
        margin: 12px auto 0;
        display: grid;
        justify-items: center;
      }
    }

    @media (max-height: 480px) {
      .game-card:fullscreen {
        gap: 6px;
        padding: 8px;
      }

      .game-card:fullscreen .game-subtitle,
      .game-card:fullscreen .pill,
      .game-card:fullscreen #gamePlayer,
      .game-card:fullscreen #dodgerPlayer {
        display: none;
      }

      .game-card:fullscreen .game-title {
        font-size: 18px;
      }

      .game-card:fullscreen .game-top {
        flex-direction: row;
        align-items: center;
      }

      .game-card:fullscreen .game-top-actions {
        width: auto;
        flex-wrap: nowrap;
      }

      .game-card:fullscreen .game-stage-stat {
        min-height: 34px;
        padding: 5px 9px;
      }

      .game-card:fullscreen .game-stage-stat strong {
        font-size: 17px;
      }

      .game-card:fullscreen .game-icon-btn {
        width: 34px;
        min-width: 34px;
        min-height: 34px;
      }

      .game-card:fullscreen .game-audio-control {
        min-height: 34px;
      }
    }

    @media (max-width: 620px) {
      .game-top-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
      }

      .game-audio-control input {
        width: 58px;
      }
    }

    @media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
      .game-card:fullscreen .snake-touch-controls {
        display: none;
      }
    }

    .score-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap: 10px;
    }

    .mini {
      background: rgba(255,255,255,.04);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 12px;
    }

    .mini span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 4px;
    }

    .mini strong {
      font-size: 28px;
    }

    .actions {
      display: grid;
      gap: 10px;
    }

    .actions {
      grid-template-columns: 1fr 1fr;
    }

    .actions button:nth-child(n + 3) {
      grid-column: 1 / -1;
    }

    /* Button-Basis liegt in css/components.css. */

    .hint {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
      border: 1px dashed rgba(246,193,119,.35);
      background: rgba(246,193,119,.08);
      border-radius: 18px;
      padding: 12px;
    }

    .volume-control {
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 11px 12px;
      background: rgba(255,255,255,.045);
    }

    .volume-control input {
      width: 100%;
      accent-color: var(--good);
    }

    .highscore-panel {
      display: grid;
      gap: 10px;
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .item-legend {
      display: grid;
      gap: 10px;
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .item-legend-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }

    .legend-pill {
      min-height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 7px 10px;
      font-size: 12px;
      font-weight: 900;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.045);
    }

    .legend-pill.good {
      color: var(--good);
      border-color: rgba(51,209,122,.36);
      background: rgba(51,209,122,.08);
    }

    .legend-pill.bad {
      color: var(--bad);
      border-color: rgba(255,92,122,.34);
      background: rgba(255,92,122,.08);
    }

    .highscore-list {
      display: grid;
      gap: 7px;
    }

    .highscore-row {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 9px 10px;
      background: rgba(255,255,255,.045);
    }

    .highscore-row.current {
      border-color: rgba(51,209,122,.45);
      background: rgba(51,209,122,.09);
    }

    .highscore-row[data-profile-person] {
      border-color: color-mix(in srgb, var(--profile-color) 34%, var(--line));
      background: color-mix(in srgb, var(--profile-color) 8%, rgba(255,255,255,.045));
    }

    .highscore-row[data-profile-person].current {
      border-color: color-mix(in srgb, var(--profile-color) 68%, white);
      background: color-mix(in srgb, var(--profile-color) 14%, rgba(51,209,122,.06));
    }

    .highscore-rank,
    .highscore-player {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .highscore-player {
      color: var(--text);
      display: inline-flex;
      align-items: center;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .highscore-row strong {
      font-size: 18px;
    }

    .planner-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 340px;
      gap: 16px;
      align-items: start;
    }

    .planner-card,
    .planner-panel {
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .planner-card,
    .planner-panel {
      padding: 18px;
    }

    .planner-panel {
      display: grid;
      gap: 16px;
      align-content: start;
      background:
        linear-gradient(145deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 10%, rgba(21,27,47,.82)), rgba(21,27,47,.78)),
        rgba(21,27,47,.78);
    }

    .planner-form-head {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr) auto;
      align-items: start;
      gap: 12px;
    }

    .planner-form-head-text { min-width: 0; }

    .planner-form-icon {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 46%, var(--line));
      border-radius: 14px;
      color: #fff;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, rgba(255,255,255,.06));
      font-size: 18px;
      font-weight: 950;
      box-shadow: 0 14px 28px color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, transparent);
    }

    .planner-person-filter {
      display: grid;
      grid-template-columns: auto minmax(150px, 240px);
      align-items: center;
      width: fit-content;
      max-width: 100%;
      gap: 9px;
      margin-bottom: 14px;
    }

    .planner-person-filter > span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .planner-person-filter .ui-select { min-width: 0; width: 100%; }
    .planner-person-filter .ui-select-trigger { border-width: 2px; border-color: color-mix(in srgb, var(--text) 68%, var(--line)); }

    .planner-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0,1fr));
      column-gap: 5px;
      row-gap: 8px;
      animation: planner-grid-in .26s ease both;
    }

    .planner-zoom-surface {
      min-width: 0;
    }

    .planner-zoom-surface > .planner-week,
    .planner-zoom-surface > .planner-day-view {
      animation: planner-grid-in .22s ease both;
    }

    .planner-gesture-hint {
      display: none;
    }

    @keyframes planner-grid-in {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: none; }
    }

    .planner-grid .weekday {
      color: color-mix(in srgb, var(--muted) 80%, var(--text));
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
      padding: 2px 6px 8px;
    }

    .planner-day {
      --planner-day-inline-pad: 9px;
      position: relative;
      min-height: 110px;
      background: rgba(255,255,255,.04);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 9px var(--planner-day-inline-pad);
      display: flex;
      flex-direction: column;
      gap: 6px;
      cursor: pointer;
      overflow: hidden;
      transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
    }

    @media (hover: hover) {
      .planner-day:not(.outside):hover {
        transform: translateY(-2px);
        border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 40%, var(--line));
        background: rgba(255,255,255,.06);
        box-shadow: 0 12px 26px rgba(0,0,0,.32);
      }
    }

    .planner-day.weekend { background: rgba(255,255,255,.018); }

    .planner-day.outside {
      opacity: .34;
    }

    .planner-day.today {
      border-color: color-mix(in srgb, var(--today) 60%, var(--line));
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--today) 14%, transparent) inset;
    }

    .planner-day.selected-range {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 42%, var(--line));
      background: color-mix(in srgb, var(--profile-color, var(--today)) 13%, rgba(255,255,255,.035));
    }

    .planner-day.range-start,
    .planner-day.range-end {
      border-color: color-mix(in srgb, var(--warn) 62%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 18%, transparent) inset;
    }

    .planner-day.range-anchor {
      border-style: dashed;
    }

    .planner-date {
      color: color-mix(in srgb, var(--text) 78%, var(--muted));
      font-size: 13px;
      font-weight: 900;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }

    .planner-date > span:first-child {
      display: inline-grid;
      place-items: center;
      min-width: 24px;
      height: 24px;
      padding: 0 6px;
      border-radius: 999px;
    }

    .planner-week-badge {
      min-width: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      border: 1px solid color-mix(in srgb, var(--warn) 34%, var(--line));
      border-radius: 999px;
      padding: 3px 6px;
      color: color-mix(in srgb, var(--warn) 82%, white);
      background: color-mix(in srgb, var(--warn) 9%, rgba(255,255,255,.035));
      font-size: 10px;
      font-weight: 950;
      line-height: 1.1;
      text-align: center;
      white-space: nowrap;
    }

    .planner-week-badge strong {
      font: inherit;
    }

    .planner-day.weekend .planner-date > span:first-child { color: var(--muted); }

    /* Heute: gefüllte Scheibe um die Tageszahl statt separatem Badge. */
    .planner-day.today .planner-date > span:first-child {
      color: #04122b;
      background: var(--today);
      box-shadow: 0 4px 12px color-mix(in srgb, var(--today) 40%, transparent);
    }

    .planner-events {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      grid-auto-rows: 21px;
      gap: 3px;
      min-height: 0;
      /* sichtbar lassen, damit mehrtägige Balken über die Zellränder hinweg
         zu einem durchgehenden Band werden; die Zelle selbst clippt (overflow:hidden). */
      overflow: visible;
    }

    .planner-day-markers,
    .planner-mobile-agenda {
      display: none;
    }

    /* Kompakte Event-Chips im Monatsraster */
    .planner-chip {
      display: flex;
      align-items: center;
      width: 100%;
      text-align: left;
      font: inherit;
      cursor: pointer;
      border: none;
      border-left: 3px solid color-mix(in srgb, var(--profile-color, var(--today)) 90%, white);
      border-radius: 7px;
      padding: 2px 7px;
      min-height: 21px;
      height: 21px;
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color, var(--today)) 40%, transparent);
      overflow: hidden;
      transition: filter .14s ease, box-shadow .14s ease, background .14s ease;
    }

    .planner-chip[data-profile-team] {
      border-left-color: color-mix(in srgb, var(--profile-color) 60%, var(--profile-color-2));
      background: linear-gradient(100deg, color-mix(in srgb, var(--profile-color, var(--today)) 42%, transparent), color-mix(in srgb, var(--profile-color-2) 38%, transparent));
    }

    .planner-chip-label {
      display: flex;
      align-items: baseline;
      gap: 5px;
      min-width: 0;
    }

    .planner-chip-time {
      flex: 0 0 auto;
      font-size: 10px;
      font-weight: 800;
      opacity: .8;
    }

    .planner-chip-title {
      flex: 1 1 auto;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .planner-chip.tentative {
      border-left-style: dashed;
      opacity: .85;
      background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--profile-color, var(--today)) 22%, transparent) 0 6px, transparent 6px 12px);
    }

    /* Mehrtägige Segmente reichen exakt bis an die Zellkante. Die Erweiterung
       leitet sich direkt aus dem Zell-Padding ab; der Grid-Abstand bleibt leer. */
    .planner-chip.span-start {
      z-index: 2;
      width: calc(100% + var(--planner-day-inline-pad));
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
      overflow: hidden;
    }
    .planner-chip.span-mid {
      z-index: 2;
      width: calc(100% + var(--planner-day-inline-pad) + var(--planner-day-inline-pad));
      margin-left: calc(-1 * var(--planner-day-inline-pad));
      border-left: 0;
      border-radius: 0;
      overflow: hidden;
    }
    .planner-chip.span-end {
      z-index: 2;
      width: calc(100% + var(--planner-day-inline-pad));
      margin-left: calc(-1 * var(--planner-day-inline-pad));
      border-left: 0;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
      overflow: hidden;
    }
    .planner-chip.span-mid.no-label,
    .planner-chip.span-end.no-label { padding-inline: 0; }
    /* Folge-Segmente behalten den Hintergrund der Personenfarbe bzw. des
       Team-Verlaufs, damit mehrtägige Termine durchgehend gleich aussehen. */
    .planner-chip.no-label { min-height: 21px; }

    /* Explizite Hintergründe verhindern, dass das globale button:hover den
       Termin transparent macht. Einzel- und Teamtermine reagieren gleich stark. */
    @media (hover: hover) {
      .planner-chip:hover {
        z-index: 4;
        background: color-mix(in srgb, var(--profile-color, var(--today)) 58%, rgba(255,255,255,.08));
        filter: brightness(1.12) saturate(1.12);
        box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 4px 12px rgba(0,0,0,.3);
      }

      .planner-chip[data-profile-team]:hover {
        background: linear-gradient(100deg,
          color-mix(in srgb, var(--profile-color, var(--today)) 58%, rgba(255,255,255,.08)),
          color-mix(in srgb, var(--profile-color-2) 54%, rgba(255,255,255,.08)));
      }

      .planner-chip.tentative:hover {
        background: repeating-linear-gradient(45deg,
          color-mix(in srgb, var(--profile-color, var(--today)) 40%, rgba(255,255,255,.08)) 0 6px,
          color-mix(in srgb, var(--profile-color, var(--today)) 18%, transparent) 6px 12px);
      }
    }

    .planner-chip.span-hovered {
      z-index: 4;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 58%, rgba(255,255,255,.08));
      filter: brightness(1.12) saturate(1.12);
      box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 4px 12px rgba(0,0,0,.3);
    }

    .planner-chip[data-profile-team].span-hovered {
      background: linear-gradient(100deg,
        color-mix(in srgb, var(--profile-color, var(--today)) 58%, rgba(255,255,255,.08)),
        color-mix(in srgb, var(--profile-color-2) 54%, rgba(255,255,255,.08)));
    }

    .planner-chip.tentative.span-hovered {
      background: repeating-linear-gradient(45deg,
        color-mix(in srgb, var(--profile-color, var(--today)) 40%, rgba(255,255,255,.08)) 0 6px,
        color-mix(in srgb, var(--profile-color, var(--today)) 18%, transparent) 6px 12px);
    }

    .planner-chip.span-start.span-hovered,
    .planner-chip.span-mid.span-hovered,
    .planner-chip.span-end.span-hovered {
      box-shadow:
        inset 0 2px 0 rgba(255,255,255,.28),
        inset 0 -2px 0 rgba(255,255,255,.28);
    }

    .planner-chip-more {
      align-self: flex-start;
      background: transparent;
      border: none;
      color: var(--muted);
      font-size: 10.5px;
      font-weight: 800;
      padding: 0 4px;
      min-height: 15px;
      cursor: pointer;
    }
    .planner-chip-more:hover { color: var(--text); }

    /* ---- Ansicht-Umschalter Monat / Woche ---- */
    .planner-viewswitch {
      --switcher-accent: var(--active-profile-color, var(--today));
      display: inline-flex;
      gap: 4px;
      margin-bottom: 14px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.04);
    }

    .planner-viewswitch-btn {
      border: 0;
      border-radius: 999px;
      padding: 7px 18px;
      font-size: 13px;
      font-weight: 800;
      color: var(--muted);
      background: transparent;
      cursor: pointer;
      transition: color .14s ease, background .14s ease;
    }

    .planner-viewswitch-btn.active {
      color: #04122b;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 85%, white);
    }

    /* ---- Wochenansicht (Tageszeit-Raster) ---- */
    .planner-week { display: grid; gap: 0; }

    .planner-week-label {
      justify-self: start;
      margin-bottom: 8px;
      border: 1px solid color-mix(in srgb, var(--warn) 34%, var(--line));
      border-radius: 999px;
      padding: 5px 9px;
      color: color-mix(in srgb, var(--warn) 82%, white);
      background: color-mix(in srgb, var(--warn) 9%, rgba(255,255,255,.035));
      font-size: 11px;
      font-weight: 950;
      line-height: 1;
    }

    .planner-week-head,
    .planner-week-allday,
    .planner-week-grid {
      display: grid;
      grid-template-columns: 54px repeat(7, minmax(0, 1fr));
    }

    .planner-week-head { gap: 6px; margin-bottom: 6px; }
    .planner-week-gutter-cell { }

    .planner-week-day {
      display: grid;
      justify-items: center;
      gap: 2px;
      padding: 6px 2px;
      border: 1px solid transparent;
      border-radius: 12px;
      background: transparent;
      cursor: pointer;
      transition: background .14s ease;
    }

    .planner-week-day:hover { background: rgba(255,255,255,.05); }

    .planner-week-wd {
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: color-mix(in srgb, var(--muted) 80%, var(--text));
    }

    .planner-week-num {
      display: inline-grid;
      place-items: center;
      min-width: 26px;
      height: 26px;
      font-size: 14px;
      font-weight: 900;
      color: var(--text);
      border-radius: 999px;
    }

    .planner-week-day.weekend .planner-week-wd { color: var(--muted); }

    .planner-week-day.today .planner-week-num {
      color: #04122b;
      background: var(--today);
      box-shadow: 0 4px 12px color-mix(in srgb, var(--today) 40%, transparent);
    }

    .planner-week-allday {
      gap: 4px;
      margin-bottom: 8px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--line);
    }

    .planner-week-allday-label {
      font-size: 9px;
      font-weight: 800;
      letter-spacing: .06em;
      text-transform: uppercase;
      color: var(--muted);
      align-self: center;
      text-align: right;
      padding-right: 8px;
    }

    .planner-week-allday-col { display: grid; gap: 3px; align-content: start; }

    .week-allday-chip {
      border: 0;
      border-left: 3px solid color-mix(in srgb, var(--profile-color, var(--today)) 90%, white);
      border-radius: 6px;
      padding: 3px 7px;
      font-size: 11px;
      font-weight: 800;
      color: var(--text);
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: pointer;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 40%, transparent);
    }

    .week-allday-chip.tentative {
      border-left-style: dashed;
      background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--profile-color, var(--today)) 22%, transparent) 0 6px, transparent 6px 12px);
    }

    .planner-week-body {
      max-height: min(58vh, 620px);
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    /* ---- Tagesansicht (dritte semantische Zoomstufe) ---- */
    .planner-day-view {
      display: grid;
      gap: 10px;
    }

    .planner-day-view-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
      padding: 2px 4px 8px 54px;
      border-bottom: 1px solid var(--line);
    }

    .planner-day-view-head > div {
      display: grid;
      gap: 2px;
    }

    .planner-day-view-weekday {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .planner-day-view-head strong {
      font-size: 18px;
      font-weight: 950;
    }

    .planner-day-view-count {
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      padding: 5px 9px;
      color: var(--muted);
      background: rgba(255,255,255,.04);
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .planner-day-allday {
      display: grid;
      grid-template-columns: 54px minmax(0, 1fr);
      gap: 8px;
      align-items: start;
      padding-bottom: 9px;
      border-bottom: 1px solid var(--line);
    }

    .planner-day-allday > span {
      padding-top: 5px;
      color: var(--muted);
      font-size: 9px;
      font-weight: 900;
      text-align: right;
      text-transform: uppercase;
    }

    .planner-day-allday > div {
      display: grid;
      gap: 4px;
    }

    .planner-day-body {
      max-height: min(62vh, 680px);
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    .planner-day-grid {
      position: relative;
      display: grid;
      grid-template-columns: 54px minmax(0, 1fr);
    }

    .planner-day-column {
      border-right: 1px solid var(--line);
    }

    .planner-day-event {
      min-width: 0;
      padding: 5px 9px;
    }

    .planner-day-event .week-event-time {
      display: block;
    }

    .planner-day-now-label {
      position: absolute;
      left: 7px;
      top: -17px;
      border-radius: var(--radius-pill);
      padding: 2px 5px;
      color: white;
      background: var(--bad);
      font-size: 9px;
      font-weight: 900;
    }

    .planner-agenda-sheet {
      gap: 14px;
      padding-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .planner-mobile-sheet-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 12px;
    }

    .planner-mobile-sheet-agenda,
    .planner-mobile-overview {
      display: grid;
      gap: 14px;
    }

    .planner-mobile-sheet-actions {
      display: grid;
      grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
      gap: 9px;
    }

    .planner-week-grid { position: relative; }

    .planner-week-gutter { position: relative; }

    .week-hour-label {
      height: 44px;
      text-align: right;
      padding-right: 9px;
      font-size: 10px;
      font-weight: 700;
      color: var(--muted);
    }

    .week-hour-label span { display: inline-block; transform: translateY(-7px); }

    .planner-week-col {
      position: relative;
      border-left: 1px solid var(--line);
      background:
        repeating-linear-gradient(to bottom,
          transparent 0, transparent 43px,
          color-mix(in srgb, var(--line) 70%, transparent) 43px,
          color-mix(in srgb, var(--line) 70%, transparent) 44px);
      cursor: pointer;
    }

    .planner-week-col.weekend { background-color: rgba(255,255,255,.018); }
    .planner-week-col:last-child { border-right: 1px solid var(--line); }
    .planner-week-col.today { background-color: color-mix(in srgb, var(--today) 6%, transparent); }

    .week-now {
      position: absolute;
      left: 0;
      right: 0;
      height: 0;
      border-top: 2px solid var(--bad);
      z-index: 4;
      pointer-events: none;
    }

    .week-now-dot {
      position: absolute;
      left: -4px;
      top: -4px;
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: var(--bad);
    }

    .week-event {
      position: absolute;
      display: flex;
      flex-direction: column;
      gap: 1px;
      overflow: hidden;
      text-align: left;
      border: 0;
      border-left: 3px solid color-mix(in srgb, var(--profile-color, var(--today)) 92%, white);
      border-radius: 7px;
      padding: 3px 7px;
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color, var(--today)) 46%, rgba(16,21,38,.86));
      box-shadow: 0 6px 16px rgba(0,0,0,.28);
      cursor: pointer;
      transition: filter .14s ease;
      z-index: 2;
    }

    @media (hover: hover) {
      .week-event:hover { filter: brightness(1.12); z-index: 3; }
    }

    .week-event.tentative {
      border-left-style: dashed;
      background:
        repeating-linear-gradient(45deg, color-mix(in srgb, var(--profile-color, var(--today)) 26%, transparent) 0 7px, transparent 7px 14px),
        rgba(16,21,38,.86);
    }

    .week-event[data-profile-team] {
      border-left-color: color-mix(in srgb, var(--profile-color) 56%, var(--profile-color-2));
      background:
        linear-gradient(135deg,
          color-mix(in srgb, var(--profile-color) 54%, rgba(16,21,38,.86)),
          color-mix(in srgb, var(--profile-color-2) 50%, rgba(16,21,38,.86)));
    }

    .week-event-title {
      font-size: 11.5px;
      font-weight: 800;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .week-event-time {
      font-size: 10px;
      font-weight: 700;
      opacity: .82;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .week-event-avatar-stack {
      display: inline-flex;
      align-items: center;
      align-self: flex-start;
      margin-top: 4px;
      padding-left: 1px;
    }

    .week-event-avatar {
      display: inline-grid;
      place-items: center;
      width: 23px;
      height: 23px;
      margin-left: -7px;
      border: 2px solid color-mix(in srgb, rgba(16,21,38,.92) 82%, var(--profile-color, var(--today)));
      border-radius: 50%;
      overflow: hidden;
      background: rgba(16,21,38,.92);
      box-shadow: 0 2px 6px rgba(0,0,0,.3);
    }

    .week-event-avatar:first-child { margin-left: 0; }

    .week-event-avatar .game-avatar.compact {
      width: 100%;
      height: 100%;
      border: 0;
      border-radius: 50%;
      box-shadow: none;
    }

    .week-event-avatar-more {
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color-2, var(--today)) 42%, rgba(16,21,38,.96));
      font-size: 8px;
      font-weight: 950;
      line-height: 1;
    }

    @media (max-width: 760px) {
      .planner-week-head,
      .planner-week-allday,
      .planner-week-grid {
        grid-template-columns: 38px repeat(7, minmax(0, 1fr));
      }
      .week-hour-label { font-size: 9px; padding-right: 5px; }
      .planner-week-num { min-width: 22px; height: 22px; font-size: 12px; }
      .week-event { padding: 2px 4px; }
      .week-event-time { display: none; }
      .planner-week-allday-label { font-size: 8px; }
    }

    /* "Zum Kalender hinzufügen"-Dropdown (Google / Apple) */
    .cal-add-dropdown {
      position: relative;
      display: inline-flex;
    }

    .cal-add-menu {
      position: absolute;
      left: 0;
      top: calc(100% + 6px);
      z-index: 6;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 6px;
      min-width: 210px;
      background: #141a2e;
      border: 1px solid var(--line);
      border-radius: 12px;
      box-shadow: 0 16px 36px rgba(0,0,0,.45);
    }

    .cal-add-menu[hidden] { display: none; }

    .cal-add-menu button {
      justify-content: flex-start;
      text-align: left;
      width: 100%;
    }

    .planner-event {
      position: relative;
      display: grid;
      gap: 2px;
      border: 1px solid rgba(255,255,255,.1);
      border-left-width: 4px;
      border-radius: 10px;
      padding: 7px 26px 7px 8px;
      background: rgba(255,255,255,.05);
      overflow-wrap: anywhere;
      cursor: pointer;
    }

    .planner-event.person-a {
      border-left-color: var(--today);
      background: rgba(138,180,255,.11);
    }

    .planner-event.person-b {
      border-left-color: var(--good);
      background: rgba(51,209,122,.1);
    }

    .planner-event[data-profile-person] {
      border-color: color-mix(in srgb, var(--profile-color) 30%, rgba(255,255,255,.1));
      border-left-color: var(--profile-color);
      background: color-mix(in srgb, var(--profile-color) 13%, rgba(255,255,255,.045));
    }

    .planner-event[data-profile-team] {
      border-color: color-mix(in srgb, var(--profile-color) 38%, var(--profile-color-2));
      border-left-color: color-mix(in srgb, var(--profile-color) 50%, var(--profile-color-2));
      background:
        linear-gradient(135deg,
          color-mix(in srgb, var(--profile-color) 19%, transparent) 0 25%,
          color-mix(in srgb, var(--profile-color-2) 19%, transparent) 25% 50%,
          color-mix(in srgb, var(--profile-color) 14%, transparent) 50% 75%,
          color-mix(in srgb, var(--profile-color-2) 14%, transparent) 75% 100%),
        rgba(255,255,255,.045);
    }

    .planner-event[data-profile-general] {
      border-color: rgba(255,255,255,.13);
      border-left-color: #9aa3b5;
      background: rgba(154,163,181,.11);
    }

    .planner-event.tentative-event {
      border-style: dashed;
      opacity: .86;
      background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.055) 0 8px, transparent 8px 16px),
        color-mix(in srgb, var(--profile-color, #9aa3b5) 9%, rgba(255,255,255,.035));
    }

    .planner-event.tentative-event .event-title::before {
      content: "Planung";
      display: inline-flex;
      margin-right: 6px;
      border-radius: 999px;
      padding: 2px 6px;
      color: #071019;
      background: var(--warn);
      font-size: 9px;
      font-weight: 950;
      vertical-align: 1px;
    }

    .planner-event.is-selected {
      border-color: color-mix(in srgb, var(--today) 58%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--today) 22%, transparent), 0 12px 28px rgba(0,0,0,.22);
    }

    .planner-event.is-editing {
      border-color: color-mix(in srgb, var(--warn) 70%, white);
      border-left-color: var(--warn);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 28%, transparent), 0 12px 28px rgba(0,0,0,.24);
    }

    .event-time,
    .event-date-range,
    .event-person,
    .event-note {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.25;
    }

    .event-date-range {
      color: var(--warn);
      font-weight: 900;
    }

    .event-title {
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
      line-height: 1.2;
    }

    .event-delete {
      position: absolute;
      top: 5px;
      right: 5px;
      width: 20px;
      height: 20px;
      min-height: 0;
      display: grid;
      place-items: center;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1;
      background: rgba(0,0,0,.2);
    }

    .event-form {
      display: grid;
      gap: 11px;
    }

    .event-overview {
      display: grid;
      gap: 12px;
      border: 1px solid color-mix(in srgb, var(--today) 34%, var(--line));
      border-radius: 16px;
      padding: 14px;
      background: color-mix(in srgb, var(--today) 7%, rgba(255,255,255,.04));
    }

    .event-overview[hidden] {
      display: none;
    }

    .event-overview-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 10px;
    }

    /* Kontextuelles Panel: Schließen-Button, Agenda-Liste, Termin-anlegen ---- */
    .panel-agenda {
      display: grid;
      gap: 12px;
    }

    .panel-agenda-list {
      display: grid;
      gap: 8px;
      max-height: 46vh;
      overflow-y: auto;
    }

    .panel-agenda-item {
      width: 100%;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 3px 11px;
      align-items: center;
      text-align: left;
      cursor: pointer;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 38%, var(--line));
      border-left: 4px solid var(--profile-color, var(--today));
      border-radius: 13px;
      padding: 10px 12px;
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color, var(--today)) 12%, rgba(255,255,255,.04));
      transition: filter .14s ease, background .14s ease;
    }

    .panel-agenda-item[data-profile-team] {
      border-color: color-mix(in srgb, var(--profile-color) 48%, var(--profile-color-2));
      border-left-color: color-mix(in srgb, var(--profile-color) 52%, var(--profile-color-2));
      background:
        linear-gradient(110deg,
          color-mix(in srgb, var(--profile-color) 22%, rgba(255,255,255,.04)),
          color-mix(in srgb, var(--profile-color-2) 20%, rgba(255,255,255,.04)));
    }

    @media (hover: hover) {
      .panel-agenda-item:hover {
        filter: brightness(1.08);
        background: color-mix(in srgb, var(--profile-color, var(--today)) 20%, rgba(255,255,255,.05));
      }

      .panel-agenda-item[data-profile-team]:hover {
        background:
          linear-gradient(110deg,
            color-mix(in srgb, var(--profile-color) 30%, rgba(255,255,255,.05)),
            color-mix(in srgb, var(--profile-color-2) 27%, rgba(255,255,255,.05)));
      }
    }

    .panel-agenda-item .event-time {
      grid-row: span 2;
      min-width: 58px;
      color: var(--text);
      font-size: 11px;
      font-weight: 950;
    }

    .panel-agenda-item .event-title,
    .panel-agenda-item .event-person {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .panel-agenda-item .event-person { font-size: 11px; color: var(--muted); }

    .panel-agenda-people {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .panel-agenda-avatar-stack {
      display: inline-flex;
      align-items: center;
      flex: 0 0 auto;
      padding-left: 2px;
    }

    .panel-agenda-avatar {
      position: relative;
      display: inline-grid;
      place-items: center;
      width: 25px;
      height: 25px;
      margin-left: -7px;
      border: 2px solid color-mix(in srgb, var(--card2) 82%, var(--profile-color, var(--today)));
      border-radius: 50%;
      overflow: hidden;
      background: var(--card2);
      box-shadow: 0 2px 7px rgba(0,0,0,.28);
    }

    .panel-agenda-avatar:first-child { margin-left: 0; }

    .panel-agenda-avatar .game-avatar.compact {
      width: 100%;
      height: 100%;
      border: 0;
      border-radius: 50%;
      box-shadow: none;
    }

    .panel-agenda-avatar-more {
      z-index: 4;
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color-2, var(--today)) 40%, var(--card2));
      font-size: 9px;
      font-weight: 950;
      line-height: 1;
    }

    .panel-agenda-person-names {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .panel-agenda-item.tentative-event {
      border-style: dashed;
      opacity: .9;
      background:
        repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 8px, transparent 8px 16px),
        color-mix(in srgb, var(--profile-color, var(--today)) 9%, rgba(255,255,255,.035));
    }

    .panel-agenda-empty {
      display: grid;
      justify-items: center;
      gap: 8px;
      border: 1px dashed var(--line);
      border-radius: 16px;
      padding: 26px 16px;
      color: var(--muted);
      text-align: center;
      background: rgba(255,255,255,.025);
    }

    .panel-agenda-empty-icon {
      font-size: 26px;
      opacity: .5;
    }

    .planner-add-btn {
      width: 100%;
      padding: 12px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 900;
    }

    .planner-form-actions {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 10px;
    }

    .event-overview-people {
      width: fit-content;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 999px;
      padding: 6px 10px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
      background: rgba(255,255,255,.045);
    }

    .event-overview-note {
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }

    .event-overview-note.empty {
      color: var(--muted);
    }

    .event-overview-private {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .planner-toggle-line.is-disabled {
      opacity: .5;
      cursor: not-allowed;
    }

    .event-form.is-editing {
      border: 1px solid color-mix(in srgb, var(--warn) 48%, var(--line));
      border-radius: 16px;
      padding: 12px;
      background: color-mix(in srgb, var(--warn) 7%, rgba(255,255,255,.035));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.045);
    }

    .date-range-picker {
      display: grid;
      gap: 7px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 28%, var(--line));
      border-radius: 14px;
      padding: 12px;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 8%, rgba(255,255,255,.04));
    }

    .date-range-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .date-range-summary {
      color: var(--text);
      font-size: 15px;
      font-weight: 950;
      line-height: 1.3;
    }

    .date-range-inputs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .date-range-inputs label {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .date-range-toggles {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
    }

    .date-range-times {
      padding-top: 3px;
      border-top: 1px solid var(--line);
    }

    .date-range-inputs input[type="date"] {
      width: 100%;
      min-width: 0;
      max-width: 100%;
    }

    @media (max-width: 520px) {
      .date-range-inputs { grid-template-columns: 1fr; }
    }

    .date-range-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    /* .ghost-btn-Basis liegt in css/components.css. */

/* Journal page */

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .planner-shell > .planner-card,
:where(body:not(.og-design)) .tracker-page .calendar-shell{
  border: 1px solid rgba(255,255,255,.18);
  border-top: 5px solid var(--today);
  border-radius: 6px;
  background-color: #24262a;
  background-image: var(--calendar-paper);
  background-size: 640px 640px;
  box-shadow: 0 3px 0 #141619;
  backdrop-filter: none;
  padding: 18px;
}
:where(body:not(.og-design)) .planner-card > .calendar-top,
:where(body:not(.og-design)) .tracker-page .calendar-shell > .calendar-top{ padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.2); }
@media (max-width: 640px) {
  :where(body:not(.og-design)) .planner-shell > .planner-card,
  :where(body:not(.og-design)) .tracker-page .calendar-shell{ padding: 12px 8px; }
}

/* Quelle: snake.css */
.snake-shell .game-card {
  background: radial-gradient(ellipse at top, #263044 0%, #101a25 55%, #0c1520 100%);
  border-color: #55756f;
}
.snake-shell .game-title {
  color: #f9e7b8;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  letter-spacing: -.035em;
}
.snake-shell .game-subtitle {
  color: #a5cabe;
  letter-spacing: .12em;
  font-size: .7rem;
}
.snake-shell .board-wrap {
  border-color: #71978a;
  box-shadow: 0 0 32px #62d5b414, 0 18px 45px #0005;
}
.snake-shell .game-stage-stats {
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  background: transparent;
}
.snake-shell .game-stage-stat strong { color: #ffe3a0; }
.snake-shell .game-stage-stats .ghost-btn { margin-left: auto; }
.snake-shell .game-start-overlay {
  top: 68%;
  border-radius: var(--radius-pill);
  border-color: #e5cd91;
  padding: var(--control-pad);
  background: linear-gradient(135deg, #34493bf2, #292644f2);
  color: #fff0c3;
  box-shadow: 0 0 35px #d8b16a33, 0 12px 30px #0008;
  white-space: nowrap;
}
.snake-run-status {
  color: #bddbce;
  text-align: center;
  min-height: 1.5em;
  font-size: .8rem;
  margin-top: var(--space-sm, 8px);
}
.snake-shell .snake-dpad button {
  background: linear-gradient(145deg, #30433f, #202a37);
  border-color: #648b7e;
  color: #f6e7bf;
  border-radius: var(--control-radius);
  box-shadow: inset 0 1px 0 #dfffe51a;
  touch-action: manipulation;
}
.snake-shell .snake-dpad button:active { background: #466e5d; }

/* Quelle: journal.css */
    .journal-shell {
      display: grid;
      gap: 16px;
    }

    .journal-dream-prompt-guide {
      margin: 8px 0;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
      border-radius: var(--control-radius);
      padding: 9px 11px;
      background: rgba(255,255,255,.035);
    }

    .journal-dream-prompt-guide summary {
      cursor: pointer;
      font-weight: 900;
    }

    .journal-dream-prompt-guide p {
      color: var(--muted);
      font-size: 12px;
    }

    .journal-dream-prompt-guide textarea {
      width: 100%;
      min-height: 210px;
      resize: vertical;
    }

    .journal-mode-tabs {
      --switcher-accent: var(--active-profile-color, var(--today));
      width: fit-content;
      max-width: 100%;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px;
      background: rgba(255,255,255,.045);
    }

    .journal-mode-btn {
      min-height: 38px;
      border-radius: 999px;
      padding: 9px 14px;
      color: var(--muted);
      background: transparent;
      border-color: transparent;
      font-size: 13px;
      font-weight: 950;
    }

    .journal-mode-btn.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 44%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255,255,255,.045));
    }

    .journal-session-shell {
      --journal-session-accent: var(--profile-color, var(--active-profile-color, var(--today)));
      width: min(920px, 100%);
      display: grid;
      gap: 16px;
      margin: 0 auto;
    }

    .journal-session-datebar {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) 48px;
      align-items: center;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 10px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--journal-session-accent) 10%, transparent), rgba(255,255,255,.025)),
        rgba(15,21,38,.88);
      box-shadow: 0 18px 48px rgba(0,0,0,.22);
    }

    .journal-session-people {
      width: fit-content;
      max-width: 100%;
      display: flex;
      gap: 7px;
      margin: -3px auto 0;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .journal-session-people::-webkit-scrollbar {
      display: none;
    }

    .journal-session-people button {
      min-width: 86px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      border-color: var(--line);
      border-radius: var(--radius-pill);
      padding: 7px 11px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
    }

    .journal-session-people button > span {
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .journal-session-people .profile-avatar,
    .journal-session-people .game-avatar.compact {
      width: 25px;
      height: 25px;
    }

    .journal-session-people button small {
      overflow: hidden;
      max-width: 100px;
      font-size: 11px;
      font-weight: 950;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .journal-session-people button.active {
      border-color: color-mix(in srgb, var(--journal-session-accent) 60%, white);
      color: var(--text);
      background: color-mix(in srgb, var(--journal-session-accent) 15%, rgba(255,255,255,.045));
    }

    .journal-session-day-nav,
    .journal-session-today {
      min-height: 44px;
      border-color: color-mix(in srgb, var(--journal-session-accent) 30%, var(--line));
      background: rgba(255,255,255,.045);
      color: var(--text);
      font-weight: 950;
    }

    .journal-session-day-nav {
      width: 48px;
      border-radius: 15px;
      font-size: 25px;
    }

    .journal-session-day-nav:hover,
    .journal-session-today:hover {
      border-color: color-mix(in srgb, var(--journal-session-accent) 62%, white);
      background: color-mix(in srgb, var(--journal-session-accent) 14%, rgba(255,255,255,.055));
    }

    .journal-session-date-center {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-width: 0;
    }

    .journal-session-date {
      min-width: 0;
      display: grid;
      gap: 2px;
      border: 0;
      padding: 6px 12px;
      color: var(--text);
      background: transparent;
      text-align: center;
    }

    .journal-session-date span {
      color: var(--journal-session-accent);
      font-size: 11px;
      font-weight: 950;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .journal-session-date strong {
      overflow: hidden;
      font-size: 17px;
      font-weight: 950;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .journal-session-today {
      min-height: 36px;
      border-radius: var(--radius-pill);
      padding: 7px 12px;
      font-size: 12px;
    }

    .journal-session-card {
      position: relative;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--journal-session-accent) 26%, var(--line));
      border-radius: 28px;
      padding: clamp(22px, 4vw, 42px);
      background:
        radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--journal-session-accent) 16%, transparent), transparent 34%),
        linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.018)),
        rgba(13,19,34,.94);
      box-shadow: 0 26px 70px rgba(0,0,0,.3);
    }

    .journal-session-card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
      background-size: 100% 32px;
      opacity: .45;
    }

    .journal-session-card > * {
      position: relative;
      z-index: 1;
    }

    .journal-session-intro {
      min-height: 520px;
      align-content: center;
      justify-items: center;
      text-align: center;
    }

    .journal-session-intro,
    .journal-session-editor,
    .journal-session-summary-card {
      display: grid;
      gap: 22px;
    }

    .journal-session-kicker {
      color: var(--journal-session-accent);
      font-size: 12px;
      font-weight: 1000;
      letter-spacing: .16em;
      text-transform: uppercase;
    }

    .journal-session-intro h2,
    .journal-session-editor h2,
    .journal-session-summary-card h2,
    .journal-session-panel h3 {
      margin: 0;
      color: var(--text);
      font-weight: 1000;
      line-height: 1.1;
    }

    .journal-session-intro h2 {
      font-size: clamp(32px, 6vw, 52px);
    }

    .journal-session-intro > p {
      max-width: 560px;
      margin: -10px 0 0;
      color: var(--muted);
      font-size: clamp(15px, 2.2vw, 18px);
      line-height: 1.55;
    }

    .journal-session-formula {
      width: min(560px, 100%);
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .journal-session-formula span {
      display: grid;
      gap: 4px;
      border: 1px solid color-mix(in srgb, var(--journal-session-accent) 25%, var(--line));
      border-radius: 18px;
      padding: 14px 8px;
      background: rgba(255,255,255,.04);
    }

    .journal-session-formula b {
      color: var(--text);
      font-size: 28px;
      font-weight: 1000;
    }

    .journal-session-formula small,
    .journal-session-duration {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
    }

    .journal-session-start {
      min-height: 50px;
      border-radius: var(--radius-pill);
      padding-inline: 28px;
      font-size: 15px;
    }

    .journal-session-summary-head,
    .journal-session-editor-head,
    .journal-session-editor-footer,
    .journal-session-summary-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .journal-session-summary-head > div,
    .journal-session-editor-head > div {
      display: grid;
      gap: 7px;
    }

    .journal-session-summary-head h2,
    .journal-session-editor-head h2 {
      font-size: clamp(23px, 4vw, 34px);
    }

    .journal-session-privacy {
      flex: 0 0 auto;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      padding: 8px 11px;
      color: var(--muted);
      background: rgba(255,255,255,.04);
      font-size: 11px;
      font-weight: 950;
    }

    .journal-session-privacy.is-shared {
      border-color: color-mix(in srgb, var(--good) 42%, var(--line));
      color: color-mix(in srgb, var(--good) 80%, white);
    }

    .journal-session-progress {
      display: grid;
      gap: 9px;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 14px 16px;
      background: rgba(255,255,255,.035);
    }

    .journal-session-progress > span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .journal-session-progress > span b {
      color: var(--text);
      font-size: 18px;
    }

    .journal-session-progress > div {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 6px;
    }

    .journal-session-progress i {
      height: 5px;
      border-radius: var(--radius-pill);
      background: rgba(255,255,255,.1);
    }

    .journal-session-progress i.filled {
      background: var(--journal-session-accent);
      box-shadow: 0 0 12px color-mix(in srgb, var(--journal-session-accent) 40%, transparent);
    }

    .journal-session-summary-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .journal-session-summary-block {
      display: grid;
      align-content: start;
      gap: 10px;
      min-height: 150px;
      border: 1px solid var(--line);
      border-radius: 20px;
      padding: 18px;
      background: rgba(255,255,255,.035);
    }

    .journal-session-summary-label {
      color: var(--journal-session-accent);
      font-size: 12px;
      font-weight: 1000;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    .journal-session-summary-block p,
    .journal-session-summary-block ul {
      margin: 0;
      color: var(--text);
      font-size: 14px;
      font-weight: 750;
      line-height: 1.55;
      white-space: pre-wrap;
    }

    .journal-session-summary-block ul {
      display: grid;
      gap: 6px;
      padding-left: 20px;
    }

    .journal-session-summary-block .empty {
      color: var(--muted);
      font-style: italic;
      font-weight: 650;
    }

    .journal-session-story-block,
    .journal-session-intention-block {
      background: color-mix(in srgb, var(--journal-session-accent) 7%, rgba(255,255,255,.03));
    }

    .journal-session-stepper {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .journal-session-stepper button {
      min-width: 0;
      display: grid;
      justify-items: center;
      gap: 5px;
      border-color: var(--line);
      border-radius: 16px;
      padding: 10px 7px;
      color: var(--muted);
      background: rgba(255,255,255,.03);
    }

    .journal-session-stepper button span {
      width: 26px;
      height: 26px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: rgba(255,255,255,.075);
      font-size: 12px;
      font-weight: 1000;
    }

    .journal-session-stepper button small {
      overflow: hidden;
      max-width: 100%;
      font-size: 10px;
      font-weight: 900;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .journal-session-stepper button.active {
      border-color: color-mix(in srgb, var(--journal-session-accent) 65%, white);
      color: var(--text);
      background: color-mix(in srgb, var(--journal-session-accent) 14%, rgba(255,255,255,.04));
    }

    .journal-session-stepper button.done span {
      color: #07120c;
      background: var(--good);
    }

    .journal-session-panel {
      position: relative;
      display: grid;
      gap: 18px;
      min-height: 360px;
      align-content: center;
      border: 1px solid color-mix(in srgb, var(--journal-session-accent) 22%, var(--line));
      border-radius: 22px;
      padding: clamp(20px, 4vw, 34px);
      background: rgba(4,9,18,.34);
    }

    .journal-session-panel-number {
      position: absolute;
      top: 14px;
      right: 18px;
      color: color-mix(in srgb, var(--journal-session-accent) 18%, transparent);
      font-size: clamp(52px, 10vw, 88px);
      font-weight: 1000;
      line-height: 1;
      pointer-events: none;
    }

    .journal-session-panel-copy {
      display: grid;
      gap: 7px;
      padding-right: 70px;
    }

    .journal-session-panel h3 {
      font-size: clamp(24px, 4vw, 34px);
    }

    .journal-session-panel-copy p,
    .journal-session-intention-panel > small {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 750;
      line-height: 1.5;
    }

    .journal-session-panel > textarea,
    .journal-session-bullet-field textarea {
      width: 100%;
      border: 1px solid color-mix(in srgb, var(--journal-session-accent) 24%, var(--line));
      border-radius: 17px;
      padding: 15px 16px;
      resize: vertical;
      color: var(--text);
      background: rgba(255,255,255,.055);
      font: inherit;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.5;
      outline: none;
    }

    .journal-session-panel > textarea:focus,
    .journal-session-bullet-field textarea:focus {
      border-color: color-mix(in srgb, var(--journal-session-accent) 72%, white);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--journal-session-accent) 14%, transparent);
      background: rgba(255,255,255,.07);
    }

    .journal-session-bullet-field {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
    }

    .journal-session-bullet-field > span {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border: 1px solid color-mix(in srgb, var(--good) 44%, var(--line));
      border-radius: 50%;
      color: var(--good);
      background: rgba(51,209,122,.08);
      font-size: 12px;
      font-weight: 1000;
    }

    .journal-session-lesson-field > span {
      border-color: color-mix(in srgb, var(--journal-session-accent) 50%, var(--line));
      color: var(--journal-session-accent);
      background: color-mix(in srgb, var(--journal-session-accent) 9%, transparent);
    }

    .journal-session-editor-footer > div {
      display: flex;
      justify-content: flex-end;
      gap: 9px;
    }

    .journal-session-editor-footer button,
    .journal-session-summary-actions button {
      min-height: 44px;
      border-radius: 14px;
      padding-inline: 17px;
      font-weight: 950;
    }

    .journal-session-complete-hint {
      margin: -10px 0 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
      text-align: right;
    }

    @media (max-width: 700px) {
      .journal-session-datebar {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 6px;
        padding: 7px;
      }

      .journal-session-day-nav {
        width: 42px;
      }

      .journal-session-date-center {
        gap: 4px;
      }

      .journal-session-date {
        padding-inline: 4px;
      }

      .journal-session-date strong {
        font-size: 14px;
      }

      .journal-session-today {
        padding-inline: 8px;
      }

      .journal-session-card {
        border-radius: 22px;
        padding: 20px 16px;
      }

      .journal-session-intro {
        min-height: 460px;
      }

      .journal-session-formula {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .journal-session-summary-head,
      .journal-session-editor-head,
      .journal-session-editor-footer,
      .journal-session-summary-actions {
        align-items: stretch;
        flex-direction: column;
      }

      .journal-session-summary-grid {
        grid-template-columns: 1fr;
      }

      .journal-session-stepper button {
        border-radius: 13px;
        padding-inline: 4px;
      }

      .journal-session-stepper button small {
        font-size: 9px;
      }

      .journal-session-panel {
        min-height: 400px;
        padding: 22px 15px;
      }

      .journal-session-panel-copy {
        padding-right: 48px;
      }

      .journal-session-bullet-field {
        grid-template-columns: 29px minmax(0, 1fr);
        gap: 7px;
      }

      .journal-session-bullet-field > span {
        width: 29px;
        height: 29px;
      }

      .journal-session-editor-footer > div,
      .journal-session-editor-footer button,
      .journal-session-summary-actions button {
        width: 100%;
      }

      .journal-session-editor-footer > div {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .journal-session-editor-footer > div > button:only-child {
        grid-column: 1 / -1;
      }

      .journal-session-complete-hint {
        text-align: left;
      }
    }

    .journal-toolbar,
    .journal-day-head,
    .journal-day-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 14px;
      background:
        linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
        rgba(21,27,47,.78);
      box-shadow: 0 18px 50px rgba(0,0,0,.25);
    }

    /* Tageskopf-Zusammenfassung: mehrere <span> (Einträge, Bilder, Personen)
       brauchen Abstand + Trenner, sonst kleben sie zusammen ("Einträge0 Bilder"). */
    .journal-day-head .section-subtitle {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 2px 10px;
    }

    .journal-day-head .section-subtitle > span:not(:first-child)::before {
      content: "·";
      margin-right: 10px;
      color: var(--muted);
      opacity: .65;
    }

    .journal-toolbar {
      flex-wrap: wrap;
      justify-content: center;
    }

    .journal-day-bar {
      display: grid;
      grid-template-columns: 1fr;
      align-items: stretch;
    }

    .journal-day-navigation {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) 44px;
      align-items: center;
      gap: 10px;
    }

    .journal-date-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-width: 0;
    }

    .journal-day-bar .journal-date-control,
    .journal-day-bar .journal-date-display {
      min-width: 0;
    }

    .journal-day-bar .journal-date-display {
      width: 100%;
    }

    .journal-day-summary {
      min-width: 0;
      border-top: 1px solid var(--line);
      padding-top: 10px;
    }

    .journal-day-summary .section-subtitle {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 2px 10px;
    }

    .journal-day-summary .section-subtitle > span:not(:first-child)::before {
      content: "·";
      margin-right: 10px;
      color: var(--muted);
      opacity: .65;
    }

    @media (max-width: 850px) {
      .journal-day-bar {
        grid-template-columns: 1fr;
        align-items: stretch;
      }

      .journal-day-navigation {
        gap: 6px;
      }
    }

    .journal-toolbar[hidden],
    .journal-day-head[hidden],
    .journal-grid[hidden] {
      display: none;
    }

    .journal-date-control {
      min-width: min(320px, 100%);
      display: grid;
      gap: 6px;
      justify-items: center;
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .journal-date-display {
      min-width: min(280px, 100%);
      min-height: 58px;
      display: grid;
      place-items: center;
      gap: 2px;
      border-radius: 18px;
      padding: 10px 18px;
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 42%, var(--line));
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--active-profile-color, #8ab4ff) 18%, transparent), rgba(255,255,255,.04)),
        rgba(255,255,255,.045);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    }

    .journal-date-display strong {
      color: var(--text);
      font-size: 18px;
      font-weight: 950;
      line-height: 1.1;
    }

    .journal-date-display small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .journal-date-native {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .bro-date-native {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }

    .bro-date-button {
      width: 100%;
      min-height: 42px;
      justify-content: flex-start;
      border-radius: 12px;
      padding: 10px 12px;
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, #8ab4ff) 32%, var(--line));
      background: rgba(5,12,22,.42);
      font-weight: 900;
      text-align: left;
    }

    .bro-date-popover {
      position: absolute;
      z-index: 10000;
      width: min(308px, calc(100vw - 24px));
      border: 1px solid color-mix(in srgb, var(--active-profile-color, #8ab4ff) 34%, var(--line));
      border-radius: 18px;
      padding: 12px;
      color: var(--text);
      background:
        linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035)),
        #10172a;
      box-shadow: 0 24px 70px rgba(0,0,0,.45);
    }

    .bro-date-popover[hidden] {
      display: none;
    }

    .bro-date-head,
    .bro-date-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .bro-date-title {
      color: var(--text);
      font-size: 15px;
      font-weight: 950;
      text-transform: capitalize;
    }

    .bro-date-nav {
      width: 36px;
      min-width: 36px;
      min-height: 36px;
      border-radius: 999px;
      padding: 0;
      font-size: 20px;
      font-weight: 950;
    }

    .bro-date-weekdays,
    .bro-date-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 4px;
    }

    .bro-date-weekdays {
      margin-top: 12px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 950;
      text-align: center;
    }

    .bro-date-grid {
      margin-top: 7px;
    }

    .bro-date-day {
      min-width: 0;
      min-height: 34px;
      border-radius: 10px;
      padding: 0;
      color: var(--text);
      border-color: transparent;
      background: transparent;
      font-size: 13px;
      font-weight: 850;
    }

    .bro-date-day.outside {
      color: color-mix(in srgb, var(--muted) 62%, transparent);
    }

    .bro-date-day.today {
      border-color: color-mix(in srgb, var(--warn) 58%, var(--line));
      background: color-mix(in srgb, var(--warn) 12%, transparent);
    }

    .bro-date-day.selected {
      color: #07120c;
      border-color: var(--good);
      background: var(--good);
    }

    .bro-date-actions {
      margin-top: 12px;
    }

    .journal-day-nav {
      width: 44px;
      min-width: 44px;
      min-height: 44px;
      border-radius: 999px;
      padding: 0;
      font-size: 22px;
      font-weight: 950;
    }

    .journal-today-btn {
      min-height: 44px;
      border-radius: 999px;
      padding: 10px 16px;
      font-weight: 950;
    }

    .journal-day-head {
      align-items: flex-start;
    }

    #journalDaySummary {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
      max-width: none;
    }

    #journalDaySummary span {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 7px 10px;
      background: rgba(255,255,255,.045);
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .journal-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }

    .journal-card.own-entry {
      grid-column: 1 / -1;
    }

    .journal-card.own-entry .journal-cover {
      min-height: 290px;
    }

    .journal-card.peer-entry .journal-cover {
      min-height: 170px;
    }

    .journal-card.peer-entry .journal-card-head {
      padding: 12px 14px 0;
    }

    .journal-card.peer-entry .journal-person {
      font-size: 17px;
    }

    .journal-card.peer-entry .journal-read-body {
      font-size: 14px;
    }

    .journal-card.no-image .journal-cover {
      min-height: 92px;
    }

    .journal-card.own-entry.no-image .journal-cover {
      min-height: 120px;
    }

    @media (max-width: 850px) {
      .journal-card.own-entry .journal-cover {
        min-height: 220px;
      }
    }

    .journal-book-stage {
      position: relative;

      display: grid;
      gap: 16px;
      padding-top: 28px; /* room for the floating title above the open book */
    }

    .journal-open-book {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 0;
      min-height: 480px;
      border: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 74%, rgba(255,255,255,.18));
      border-radius: 8px;
      padding: 18px;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 18%, #6e3614);
      box-shadow:
        0 28px 80px rgba(0,0,0,.34),
        inset 0 0 0 5px color-mix(in srgb, var(--profile-color, var(--today)) 28%, transparent),
        inset 0 0 0 1px rgba(255,255,255,.08);
      overflow: hidden;
    }

    .journal-open-book.is-dream-book {
      --profile-color: #8674d8;
      border-color: rgba(183, 165, 255, .68);
      background: linear-gradient(145deg, #171735, #30265b 52%, #171b43);
      box-shadow: 0 30px 90px rgba(7, 5, 30, .62), 0 0 38px rgba(139, 117, 226, .28), inset 0 0 0 5px rgba(185, 169, 255, .12);
    }

    .journal-open-book.is-dream-book .journal-page-sheet {
      color: #211b3b;
      background:
        linear-gradient(rgba(239, 235, 255, .88), rgba(226, 221, 249, .9)),
        url("../assets/journal/dream-paper.png") center top / cover repeat-y;
      border-color: rgba(113, 91, 167, .34);
      box-shadow: inset 0 0 42px rgba(82, 63, 137, .2);
    }

    .journal-open-book.is-dream-book .journal-paper-head {
      background: linear-gradient(115deg, rgba(218, 208, 250, .82), rgba(233, 229, 252, .72));
      border-bottom-color: rgba(119, 95, 181, .32);
    }

    .journal-open-book.is-dream-book .journal-book-spine {
      background: linear-gradient(90deg, #12132f, #8d7ad1 48%, #151432);
      box-shadow: 0 0 28px rgba(135, 111, 221, .46);
    }

    .journal-open-book.is-dream-book .journal-reflection-zone,
    .journal-open-book.is-dream-book .journal-page-stars {
      display: none;
    }

    .journal-dream-book,
    .journal-add-dream-book {
      --profile-color: #8e78de;
      background:
        linear-gradient(150deg, rgba(20, 21, 59, .72), rgba(78, 59, 126, .52)),
        url("../assets/journal/dream-paper.png") center / cover;
      border-color: rgba(174, 153, 246, .7);
      color: #f1ecff;
      box-shadow: inset -8px 0 16px rgba(5, 5, 24, .35), 0 12px 28px rgba(7, 5, 30, .34);
    }

    .journal-add-dream-book {
      border-style: dashed;
      filter: saturate(.72);
    }

    .journal-dream-cloud {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      color: #eee8ff;
      background: rgba(200, 187, 255, .16);
      font-size: 30px;
      text-shadow: 0 0 14px rgba(218, 208, 255, .8);
    }

    .journal-dream-book-avatar {
      box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 2px rgba(205, 191, 255, .38), 0 0 14px rgba(158, 133, 235, .5);
    }

    .journal-dream-book-status {
      color: #e8e0ff;
      text-shadow: 0 0 9px rgba(202, 187, 255, .8);
      opacity: .9;
    }

    .journal-shell.is-dream-journal .journal-book-title {
      border-color: rgba(180, 161, 245, .5);
      color: #eee9ff;
      background: linear-gradient(180deg, rgba(38, 30, 78, .94), rgba(15, 16, 44, .94));
      box-shadow: 0 10px 26px rgba(5, 4, 25, .46), 0 0 22px rgba(143, 119, 226, .28);
    }

    .journal-book-title {
      position: absolute;
      z-index: 10; /* above the open book (z-index:2) */
      top: 4px;    /* hovers just above the open book's top edge */
      left: 50%;
      transform: translateX(-50%);
      max-width: calc(100% - 160px);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 38%, rgba(226,202,148,.34));
      border-radius: 999px;
      padding: 7px 18px;
      color: color-mix(in srgb, var(--profile-color, var(--today)) 74%, white);
      background:
        linear-gradient(180deg, rgba(22,14,11,.76), rgba(10,14,26,.78)),
        color-mix(in srgb, var(--profile-color, var(--today)) 38%, #211710);
      box-shadow:
        0 10px 24px rgba(0,0,0,.28),
        0 0 0 3px color-mix(in srgb, var(--profile-color, var(--today)) 18%, transparent),
        inset 0 0 0 1px rgba(255,255,255,.08);
      font-size: 17px;
      font-weight: 950;
      text-shadow: 0 1px 2px rgba(0,0,0,.72);
      pointer-events: none;
      display: inline-flex;
      align-items: center;
    }

    .journal-book-title > button {
      width: 24px;
      height: 24px;
      min-width: 24px;
      min-height: 24px;
      margin-left: 7px;
      border: 0;
      padding: 3px;
      color: currentColor;
      background: rgba(255,255,255,.08);
      pointer-events: auto;
    }

    .journal-book-title > button svg { width: 16px; height: 16px; }

    .journal-book-title-copy {
      min-width: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      line-height: 1.08;
    }
    .journal-book-title-copy strong {
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .journal-book-title-copy small {
      margin-top: 3px;
      color: rgba(255,255,255,.68);
      font-size: 10px;
      font-weight: 750;
    }
    .journal-book-title.is-editing {
      width: min(520px, calc(100% - 120px));
      max-width: none;
      border-radius: 12px;
      white-space: normal;
      pointer-events: auto;
    }
    .journal-book-title-form {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(100px, 1fr) auto auto;
      gap: 6px;
    }
    .journal-book-title-form input {
      min-width: 0;
      height: 32px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 55%, white);
      border-radius: 8px;
      padding: 5px 9px;
      color: white;
      background: rgba(5,8,18,.72);
      font: inherit;
    }
    .journal-book-title-form button {
      width: auto;
      min-width: 0;
      min-height: 32px;
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 8px;
      padding: 5px 9px;
      color: white;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 48%, #172036);
      font-size: 11px;
      font-weight: 850;
    }

    .journal-dream-sections { display: grid; gap: 16px; }
    .journal-dream-section-edit {
      display: grid;
      gap: 8px;
      border: 1px solid rgba(111, 88, 174, .3);
      border-radius: 12px;
      padding: 12px;
      background: rgba(245, 241, 255, .48);
    }
    .journal-dream-section-edit > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #4e3c78; }
    .journal-dream-title-input {
      min-width: 0;
      flex: 1;
      border: 0;
      border-bottom: 1px solid rgba(91, 65, 143, .28);
      border-radius: 0;
      padding: 4px 2px;
      color: #4e3c78;
      background: transparent;
      font-size: 15px;
      font-weight: 900;
    }
    .journal-dream-title-input:focus { border-bottom-color: rgba(91, 65, 143, .72); outline: none; }
    .journal-dream-section-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
    .journal-dream-remove {
      width: 30px;
      height: 30px;
      min-width: 30px;
      min-height: 30px;
      border: 1px solid rgba(102, 75, 158, .28);
      padding: 6px;
      color: #69508f;
      background: rgba(255,255,255,.46);
    }
    .journal-dream-remove svg { width: 16px; height: 16px; }
    .journal-dream-add { justify-self: stretch; border-color: rgba(104, 81, 172, .36); color: #57417e; background: rgba(232, 224, 255, .52); }
    .journal-open-book.is-dream-book .journal-read-body [data-dream-section] {
      margin: 0 0 18px;
      border: 1px solid rgba(105, 82, 167, .25);
      border-radius: 12px;
      padding: 13px 14px;
      background: rgba(244, 240, 255, .48);
    }
    .journal-open-book.is-dream-book .journal-read-body [data-dream-section]:last-child { margin-bottom: 0; }
    .journal-open-book.is-dream-book .journal-read-body [data-dream-section] h3 { margin: 0 0 9px; color: #59427f; font-size: 14px; }

    .journal-book-page-btn {
      position: absolute;
      z-index: 9;
      top: 0;
      bottom: 0;
      width: clamp(26px, 4vw, 38px);
      min-width: 0;
      min-height: 0;
      display: grid;
      place-items: center;
      transform: none !important;
      border: 0;
      border-radius: 0;
      padding: 0;
      color: rgba(58,40,27,.62);
      background: transparent;
      box-shadow: none;
      font-size: 42px;
      font-weight: 950;
      line-height: 1;
      text-shadow: 0 1px 0 rgba(255,255,255,.55), 0 8px 16px rgba(72,45,24,.18);
    }

    .journal-book-prev {
      left: 0;
    }

    .journal-book-next {
      right: 0;
    }

    .journal-book-page-btn:hover {
      color: rgba(43,27,16,.9);
      background: linear-gradient(90deg, rgba(246,193,119,.22), rgba(246,193,119,.08) 72%, transparent);
      transform: none !important;
    }

    .journal-book-next:hover {
      background: linear-gradient(270deg, rgba(246,193,119,.22), rgba(246,193,119,.08) 72%, transparent);
    }

    .journal-book-page-btn:disabled,
    .journal-paper-date:disabled {
      opacity: .48;
      cursor: not-allowed;
    }

    .journal-open-book::before {
      content: "";
      position: absolute;
      inset: 9px;
      border: 1px solid rgba(255,255,255,.13);
      border-radius: 6px;
      pointer-events: none;
    }

    .journal-book-spine {
      position: absolute;
      z-index: 4;
      top: 18px;
      bottom: 18px;
      left: 50%;
      width: 30px;
      transform: translateX(-50%);
      background:
        linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.16), rgba(0,0,0,.22)),
        color-mix(in srgb, var(--profile-color, var(--today)) 60%, #2f221c);
      box-shadow: 0 0 26px color-mix(in srgb, var(--profile-color, var(--today)) 22%, rgba(35,21,14,.38));
      pointer-events: none;
    }

    /* bookmark: sibling of open book, z-index:1.
       Cover background (block element) paints below it; page sheets (z-index:2) paint above it.
       12px nub above book top, body goes behind the pages, not the cover. */
    .journal-heute-bookmark {
      position: absolute;
      top: 34px;
      z-index: 1;
      box-sizing: border-box;
      width: 76px;
      min-width: 76px;
      height: 126px;
      min-height: 0;
      border: none;
      border-radius: 2px 2px 0 0;
      appearance: none;
      -webkit-appearance: none;
      background-color: var(--profile-color, var(--today));
      background-image: url("../assets/journal/appearance/journal-bookmark-navigation.png");
      background-position: center;
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-blend-mode: luminosity;
      -webkit-mask: url("../assets/journal/appearance/journal-bookmark-navigation.png") center / 100% 100% no-repeat;
      mask: url("../assets/journal/appearance/journal-bookmark-navigation.png") center / 100% 100% no-repeat;
      color: rgba(255,255,255,.96);
      box-shadow: none;
      font-size: 11px;
      line-height: 1;
      font-weight: 950;
      letter-spacing: .035em;
      white-space: nowrap;
      text-transform: uppercase;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      /* padding-top:16px → "Heute" at stage y=50 > 46 (page start) → hidden in resting state */
      padding: 10px 4px 0;
      cursor: pointer;
      opacity: 1;
      transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .18s ease;
    }

    .journal-heute-bookmark::before {
      display: none;
    }

    .journal-heute-bookmark::after { display: none; }

    .journal-heute-bookmark.bookmark-left  { left: 28px; }
    .journal-heute-bookmark.bookmark-right { right: 28px; left: auto; }

    /* hover: pull 20px up → "Heute" at stage y=30, visible in cover strip; V-notch at y=82, behind pages */
    .journal-heute-bookmark:hover {
      transform: translateY(-34px);
      opacity: 1;
      background: var(--profile-color, var(--today)) url("../assets/journal/appearance/journal-bookmark-navigation.png") center / 100% 100% no-repeat;
      background-blend-mode: luminosity;
      filter: brightness(1.08) drop-shadow(0 10px 12px rgba(0,0,0,.24));
    }

    .journal-heute-bookmark:disabled {
      opacity: 1;
    }

    .journal-heute-bookmark:focus-visible {
      outline: 3px solid color-mix(in srgb, var(--profile-color, var(--today)) 62%, white);
      outline-offset: 3px;
      opacity: 1;
    }

    .journal-page-sheet {
      position: relative;
      z-index: 2;
      display: grid;
      grid-template-rows: max-content minmax(0, 1fr) auto;
      align-content: start;
      height: clamp(560px, 72vh, 780px);
      min-height: 0;
      padding: 24px 24px 14px;
      color: #241d18;
      background:
        linear-gradient(90deg, transparent, rgba(71,45,24,.1)),
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(100,100,110,.09) 32px, transparent 33px),
        #f5ecd8;
      box-shadow:
        inset 0 0 34px rgba(88,57,29,.16),
        inset 0 0 0 1px rgba(120,82,40,.18);
      overflow-wrap: anywhere;
      overflow: hidden;
    }

    .journal-page-sheet.left-page {
      border-radius: 6px 0 0 6px;
      padding-right: 36px;
      background:
        linear-gradient(90deg, transparent, rgba(71,45,24,.1)),
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(100,100,110,.09) 32px, transparent 33px),
        #f5ecd8;
    }

    .journal-page-sheet.right-page {
      border-radius: 0 6px 6px 0;
      padding-left: 38px;
      background:
        linear-gradient(270deg, transparent, rgba(71,45,24,.1)),
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(100,100,110,.09) 32px, transparent 33px),
        #f7efdf;
    }

    .journal-page-sheet.journal-reward-silver {
      background:
        linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)),
        url("../assets/journal/appearance/journal-paper-silver-v2.png") center top / 720px auto repeat-y,
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(100,100,110,.09) 32px, transparent 33px),
        #f7f0df;
      box-shadow: inset 0 0 34px rgba(88,57,29,.14), inset 0 0 0 4px rgba(126,139,157,.56), inset 0 0 0 7px rgba(241,244,247,.72);
    }

    .journal-page-sheet.journal-reward-bronze {
      background:
        linear-gradient(rgba(255,250,240,.62), rgba(255,250,240,.62)),
        url("../assets/journal/appearance/journal-paper-bronze-v2.png") center top / 720px auto repeat-y,
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(112,68,40,.055) 32px, transparent 33px),
        #f2dfc5;
      box-shadow: inset 0 0 30px rgba(112,64,31,.1), inset 0 0 0 3px rgba(139,77,38,.3), inset 0 0 0 6px rgba(235,205,174,.36);
    }

    .journal-page-sheet.journal-reward-gold {
      background:
        linear-gradient(rgba(255,252,231,.12), rgba(255,252,231,.12)),
        url("../assets/journal/appearance/journal-paper-gold-v2.png") center top / 720px auto repeat-y,
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(125,91,25,.11) 32px, transparent 33px),
        #fbefc5;
      box-shadow: inset 0 0 44px rgba(175,118,20,.24), inset 0 0 0 4px rgba(190,125,20,.62), inset 0 0 0 7px rgba(255,229,142,.62);
    }

    .journal-page-sheet.journal-reward-complete {
      background:
        linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)),
        url("../assets/journal/appearance/journal-paper-pearlescent-v2.png") center top / 720px auto repeat-y,
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(105,91,113,.09) 32px, transparent 33px),
        #fff4dc;
      box-shadow: inset 0 0 48px rgba(133,92,147,.18), inset 0 0 0 5px rgba(172,116,190,.58), inset 0 0 0 9px rgba(180,235,231,.5), 0 0 32px rgba(200,155,229,.28);
    }

    .journal-reflection-note {
      position: relative;
      z-index: 3;
      margin: 18px 14px 6px;
      border: 1px solid rgba(153,112,54,.35);
      border-radius: 4px 11px 8px 5px;
      color: #4d3928;
      background:
        linear-gradient(105deg, rgba(255,255,255,.42), transparent 30%),
        repeating-linear-gradient(180deg, transparent 0 27px, rgba(104,126,151,.12) 28px, transparent 29px),
        #f7e9bd;
      box-shadow: 2px 5px 12px rgba(70,45,24,.2), inset 0 0 18px rgba(143,99,35,.08);
      transform: rotate(-.25deg);
      transform-origin: top center;
      clear: both;
      overflow-anchor: none;
    }

    .journal-reflection-note::before {
      content: "";
      position: absolute;
      top: -9px;
      left: 50%;
      width: 74px;
      height: 20px;
      transform: translateX(-50%) rotate(.8deg);
      background: rgba(224,207,160,.72);
      box-shadow: 0 1px 2px rgba(73,52,31,.12);
      pointer-events: none;
    }

    .journal-reflection-note > summary {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 48px;
      padding: 12px 15px;
      cursor: pointer;
      list-style: none;
      font-weight: 950;
    }

    .journal-reflection-note > summary::-webkit-details-marker { display: none; }
    .journal-reflection-note > summary::after { content: "+"; font-size: 21px; line-height: 1; }
    .journal-reflection-note[open] > summary::after { content: "−"; }
    .journal-reflection-note > summary small { color: rgba(77,57,40,.68); font-size: 11px; }

    .journal-reflection-note-body {
      padding: 0 0 14px;
    }

    .journal-reflection-note .journal-reflection-field,
    .journal-reflection-note .journal-reflection-read {
      margin-top: 6px;
      border-color: rgba(112,78,47,.2);
      background: rgba(255,255,255,.2);
    }

    .journal-reflection-note-read .journal-reflection-read {
      margin-bottom: 14px;
    }

    .journal-page-stars {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      padding: 5px 9px;
      border: 2px solid color-mix(in srgb, currentColor 64%, transparent);
      border-radius: 999px;
      background: color-mix(in srgb, #f7efdf 88%, transparent);
      box-shadow: 0 3px 9px rgba(65,44,24,.16), inset 0 0 0 2px rgba(255,255,255,.52);
      color: #8491a3;
    }

    .journal-page-stars > span {
      color: rgba(103,91,73,.2);
      font-size: 12px;
      line-height: 1;
    }

    .journal-page-stars > span.earned { color: currentColor; }
    .journal-page-stars.journal-reward-bronze { color: #9a552d; }
    .journal-page-stars.journal-reward-silver { color: #71839b; }
    .journal-page-stars.journal-reward-gold { color: #b47b16; }
    .journal-page-stars.journal-reward-complete {
      color: #8d4fd0;
      border-color: rgba(153,91,173,.68);
      background: linear-gradient(115deg, rgba(255,239,205,.94), rgba(229,210,255,.92), rgba(202,244,242,.94));
    }

    .journal-page-stars .journal-page-bonus-star {
      color: #8d4fd0;
      font-size: 15px;
      filter: drop-shadow(0 0 3px rgba(160,88,221,.48));
    }

    .journal-card.journal-reward-bronze { border-color: rgba(164,95,52,.5); }
    .journal-card.journal-reward-silver { border-color: rgba(154,177,207,.72); box-shadow: 0 0 24px rgba(126,154,190,.12); }
    .journal-card.journal-reward-gold { border-color: rgba(236,190,74,.68); box-shadow: 0 0 28px rgba(236,190,74,.13); }
    .journal-card.journal-reward-complete { border-color: rgba(255,211,94,.85); box-shadow: 0 0 34px rgba(244,174,73,.24); }

    .journal-page-sheet.is-today {
      outline: 4px solid color-mix(in srgb, var(--profile-color, var(--today)) 78%, white);
      outline-offset: -8px;
      box-shadow:
        inset 0 0 34px rgba(88,57,29,.16),
        inset 0 0 0 1px rgba(120,82,40,.18),
        inset 0 0 0 7px color-mix(in srgb, var(--profile-color, var(--today)) 18%, transparent),
        0 0 34px color-mix(in srgb, var(--profile-color, var(--today)) 34%, transparent);
    }

    .journal-page-sheet.left-page::after,
    .journal-page-sheet.right-page::after {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      width: 26px;
      pointer-events: none;
    }

    .journal-page-sheet.left-page::after {
      right: 0;
      background: linear-gradient(90deg, transparent, rgba(74,45,24,.18));
    }

    .journal-page-sheet.right-page::after {
      left: 0;
      background: linear-gradient(270deg, transparent, rgba(74,45,24,.2));
    }

    .journal-paper-head {
      position: relative !important;
      z-index: 20 !important;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
      gap: 12px;
      min-height: 112px;
      flex: none;
      align-content: start;
      margin: -24px -24px 0;
      padding: 24px 24px 10px;
      border-bottom: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 52%, rgba(96,64,36,.28));
      background: rgba(247,239,223,.97);
      box-shadow: 0 8px 14px rgba(74,48,28,.1);
      isolation: isolate;
      overflow: hidden;
    }

    .journal-paper-head > * {
      position: relative;
      z-index: 1;
      min-width: 0;
    }

    .journal-paper-head > .journal-today-ribbon {
      position: absolute;
      z-index: 30;
      top: -12px;
      left: 10px;
      box-sizing: border-box;
      width: 96px;
      min-width: 96px;
      height: calc(100% + 18px);
      min-height: 0;
      display: grid;
      place-items: start center;
      padding: 46px 4px 0;
      color: rgba(255,255,255,.96);
      background-color: var(--profile-color, var(--today));
      background-image: url("../assets/journal/appearance/journal-bookmark-today.png");
      background-position: center top;
      background-size: 100% 100%;
      background-repeat: no-repeat;
      background-blend-mode: luminosity;
      -webkit-mask: url("../assets/journal/appearance/journal-bookmark-today.png") center top / 100% 100% no-repeat;
      mask: url("../assets/journal/appearance/journal-bookmark-today.png") center top / 100% 100% no-repeat;
      font-size: 12px;
      line-height: 1;
      font-weight: 950;
      letter-spacing: .04em;
      white-space: nowrap;
      text-transform: uppercase;
      filter: drop-shadow(0 8px 8px rgba(0,0,0,.3));
      pointer-events: none;
    }

    .journal-page-sheet.right-page .journal-paper-head > .journal-today-ribbon {
      right: 10px;
      left: auto;
    }

    .journal-page-sheet.left-page.is-today .journal-paper-head {
      padding-left: 128px;
    }

    .journal-page-sheet.right-page.is-today .journal-paper-head {
      padding-right: 128px;
    }

    .journal-paper-head::before {
      content: "";
      position: absolute;
      z-index: -1;
      top: 0;
      bottom: 0;
      left: 0;
      width: 190px;
      height: 100%;
      background: var(--journal-head-ornament, none) left top / auto 100% no-repeat;
      opacity: .62;
      pointer-events: none;
    }

    .journal-page-sheet.right-page .journal-paper-head::before {
      right: 0;
      left: auto;
      transform: scaleX(-1);
    }

    .journal-reward-silver .journal-paper-head {
      --journal-head-ornament: url("../assets/journal/appearance/journal-ornament-silver.png");
      background: rgba(235,242,248,.9);
    }

    .journal-reward-silver .journal-paper-head::before { width: 210px; opacity: .68; }

    .journal-reward-bronze .journal-paper-head {
      --journal-head-ornament: url("../assets/journal/appearance/journal-ornament-bronze-v2.png");
      background: rgba(244,221,194,.9);
    }

    .journal-reward-bronze .journal-paper-head::before { width: 170px; opacity: .58; }

    .journal-reward-gold .journal-paper-head {
      --journal-head-ornament: url("../assets/journal/appearance/journal-ornament-gold.png");
      background: rgba(255,235,159,.9);
    }

    .journal-reward-gold .journal-paper-head::before { width: 255px; opacity: .76; }

    .journal-reward-complete .journal-paper-head {
      --journal-head-ornament: url("../assets/journal/appearance/journal-ornament-pearlescent.png");
      background: linear-gradient(110deg, rgba(255,240,246,.9), rgba(232,218,255,.88), rgba(205,246,244,.9));
    }

    .journal-reward-complete .journal-paper-head::before { width: 310px; opacity: .84; }

    .journal-page-sheet.left-page .journal-paper-head {
      margin-right: -36px;
      padding-right: 36px;
    }

    .journal-page-sheet.right-page .journal-paper-head {
      margin-left: -38px;
      padding-left: 38px;
    }

    .journal-page-scroll {
      min-height: 0;
      margin: 0 -24px -14px;
      padding: 0 24px 14px;
      overflow-x: hidden;
      overflow-y: scroll;
      scrollbar-gutter: stable;
      /* Die Status-Papiertextur gehört zum scrollenden Blattinhalt. */
      background: inherit;
      background-attachment: local;
      scrollbar-color: rgba(112,78,47,.42) transparent;
      scrollbar-width: thin;
      overflow-anchor: none;
    }

    .journal-page-sheet.is-editing .journal-page-scroll {
      padding-bottom: 92px;
      scroll-padding-block: 72px 92px;
    }

    .journal-entry-content {
      display: flow-root;
      min-width: 0;
      min-height: 120px;
      padding-block: 12px 24px;
    }

    .journal-reflection-zone {
      position: relative;
      display: flow-root;
      clear: both;
      min-width: 0;
      margin-top: 22px;
      padding-top: 18px;
      border-top: 1px dashed rgba(112,78,47,.24);
      contain: layout;
      overflow-anchor: none;
    }

    .journal-reflection-zone::before {
      content: "Ende des Tagebucheintrags";
      position: absolute;
      top: -8px;
      left: 50%;
      transform: translateX(-50%);
      padding: 0 9px;
      color: rgba(91,64,42,.48);
      background: color-mix(in srgb, #f7efdf 88%, transparent);
      font: 800 9px/1.4 system-ui, sans-serif;
      letter-spacing: .07em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .journal-reflection-zone .journal-reflection-note {
      margin-top: 8px;
    }

    .journal-birthday-sheet {
      position: relative;
      margin: 18px 5% 24px;
      padding: 18px;
      border: 1px solid rgba(155, 98, 49, .28);
      border-radius: 8px 18px 9px 15px;
      color: #4a2d25;
      background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(111,84,127,.12) 28px), linear-gradient(135deg, #fff9e9, #f8e9ff);
      box-shadow: 2px 5px 15px rgba(68, 35, 44, .16);
      transform: rotate(-.25deg);
    }

    .journal-birthday-sheet > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; text-align: center; }
    .journal-birthday-sheet > header > span { font-size: 28px; }
    .journal-birthday-sheet h3 { margin: 2px 0 0; font-family: Georgia, serif; font-size: clamp(18px, 2.2vw, 25px); }
    .journal-birthday-sheet header small { color: #9b4c85; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
    .journal-birthday-wishes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
    .journal-birthday-wish { border: 1px solid rgba(155,76,133,.16); border-radius: 12px; background: rgba(255,255,255,.58); overflow: hidden; }
    .journal-birthday-wish > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
    .journal-birthday-wish > summary::-webkit-details-marker { display: none; }
    .journal-birthday-wish > summary::after { margin-left: auto; color: #9b4c85; content: "+"; font-size: 20px; font-weight: 900; }
    .journal-birthday-wish[open] > summary::after { content: "−"; }
    .journal-birthday-wish > summary > span { flex: 0 0 auto; width: 35px; height: 35px; }
    .journal-birthday-wish > summary svg { width: 100%; height: 100%; }
    .journal-birthday-wish > summary strong small { display: block; margin-top: 2px; color: #9b4c85; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
    .journal-birthday-wish-body { position: relative; padding: 2px 52px 14px 57px; }
    .journal-birthday-wish-copy { min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
    .journal-birthday-wish-copy > :first-child { margin-top: 0; }
    .journal-birthday-wish-copy > :last-child { margin-bottom: 0; }
    .journal-birthday-wish-edit {
      position: absolute;
      top: 0;
      right: 12px;
      width: 32px;
      min-width: 32px;
      min-height: 32px;
      padding: 6px;
      border-radius: 999px;
      color: #7f356d;
      border-color: rgba(155,76,133,.26);
      background: rgba(255,255,255,.68);
    }
    .journal-birthday-wish-edit svg { width: 17px; height: 17px; }
    .journal-birthday-empty { color: rgba(74,45,37,.62); text-align: center; }
    .journal-birthday-compose { display: grid; gap: 9px; margin-top: 14px; }
    .journal-birthday-belated-label { color: #9b4c85; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
    .journal-birthday-wish-editor {
      width: 100%;
      min-height: 190px;
      max-height: min(46vh, 420px);
      overflow: auto;
      border-color: rgba(155,76,133,.28);
      color: #4a2d25;
      background: rgba(255,255,255,.7);
    }
    .journal-birthday-compose-actions { display: flex; justify-content: flex-end; gap: 8px; }

    .journal-page-sheet.left-page .journal-page-scroll {
      margin-right: -36px;
      padding-right: 36px;
    }

    .journal-page-sheet.right-page .journal-page-scroll {
      margin-left: -38px;
      padding-left: 38px;
    }

    .journal-paper-sticky-meta {
      grid-column: 1 / -1;
      display: flex;
      min-height: 34px;
      align-items: center;
      padding-top: 2px;
      border-top: 1px solid rgba(112,78,47,.12);
    }

    .journal-paper-sticky-meta .journal-field-privacy { margin: 2px 0 0; }
    .journal-paper-sticky-meta .journal-entry-visibility-status { margin: 2px 0 0; }

    .journal-page-sheet.is-editing .journal-paper-head {
      min-height: 132px;
      background-color: rgba(255,249,231,.98);
    }

    .journal-page-sheet.is-editing .journal-paper-head::before {
      opacity: .18;
    }

    .journal-page-sheet.is-editing .journal-edit-field {
      padding-top: 22px;
    }

    .journal-page-sheet.is-editing .journal-paper-sticky-meta .journal-field-privacy select {
      min-height: 34px;
      max-width: 13rem;
      padding: 6px 10px;
      font-size: 12px;
    }

    .journal-paper-date {
      position: relative;
      min-height: 44px;
      display: grid;
      gap: 1px;
      border: 0;
      border-radius: 6px;
      padding: 6px 9px;
      color: #7b3f24;
      background: rgba(255,255,255,.22);
      font-weight: 950;
      text-align: left;
      cursor: pointer;
    }

    .journal-paper-date span {
      color: #8b4a2b;
      font-size: 16px;
      line-height: 1.05;
      text-transform: capitalize;
    }

    .journal-paper-date strong {
      color: #422719;
      font-size: 13px;
      line-height: 1.05;
    }

    .journal-paper-date em {
      position: absolute;
      top: -24px;
      left: 12px;
      margin: 0;
      border: none;
      border-radius: 2px 2px 0 0;
      padding: 16px 6px 0;
      color: rgba(255,255,255,.95);
      background:
        linear-gradient(180deg,
          color-mix(in srgb, var(--profile-color, var(--today)) 78%, #7a4808),
          color-mix(in srgb, var(--profile-color, var(--today)) 62%, #5a3406));
      font-size: 10px;
      font-style: normal;
      font-weight: 950;
      letter-spacing: .07em;
      text-transform: uppercase;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.3),
        inset 0 -1px 0 rgba(0,0,0,.2),
        0 8px 16px color-mix(in srgb, var(--profile-color, var(--today)) 22%, rgba(0,0,0,.25));
      z-index: 6;
      width: 54px;
      height: 112px;
      clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 13px), 0 100%);
      white-space: nowrap;
      pointer-events: none;
      text-align: center;
    }

    .journal-paper-date em::before {
      content: "";
      position: absolute;
      inset: 0 7px auto auto;
      width: 1px;
      height: 96px;
      background: rgba(255,255,255,.18);
      pointer-events: none;
    }

    .journal-paper-date em::after { display: none; }

    .journal-paper-date.today {
      background: rgba(246,193,119,.22);
      box-shadow: inset 0 0 0 1px rgba(214,153,54,.32);
      padding-left: 9px;
    }

    .journal-page-sheet.is-today .journal-paper-date {
      position: static;
    }

    .journal-page-sheet.is-today .journal-paper-date em {
      top: 0;
      left: 6px;
    }

    .journal-page-sheet.right-page .journal-paper-date.today {
      padding-left: 9px;
      padding-right: 9px;
    }

    .journal-page-sheet.right-page.is-today .journal-paper-date em {
      left: auto;
      right: 6px;
    }


    .journal-paper-date:hover {
      background: rgba(255,255,255,.42);
      filter: none;
      transform: none;
    }

    .journal-paper-tools {
      position: relative;
      z-index: 12;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
    }

    .journal-page-edit-icon {
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      display: inline-grid;
      place-items: center;
      border-radius: 999px;
      padding: 0;
      color: #4b3320;
      border-color: rgba(100,64,31,.24);
      background: rgba(255,255,255,.42);
    }

    .journal-page-edit-icon svg {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .journal-page-edit-icon:hover {
      color: #2b1b10;
      background: rgba(246,193,119,.28);
      transform: translateY(-1px);
    }

    .journal-paper-owner,
    .journal-person {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .journal-paper-owner {
      margin-top: 4px;
      color: #211913;
      font-size: 22px;
      font-weight: 950;
    }

    .journal-paper-owner .profile-avatar,
    .journal-closed-book-avatar .profile-avatar,
    .journal-share-avatar .profile-avatar {
      width: 28px;
      height: 28px;
    }

    .journal-page-sheet .journal-entry-favorite {
      color: #6f5947;
      border-color: rgba(100,64,31,.24);
      background: rgba(255,255,255,.42);
    }

    .journal-page-sheet .journal-entry-favorite.active {
      color: #9f5b10;
      border-color: rgba(159,91,16,.42);
      background: rgba(245,191,91,.22);
    }

    .journal-paper-photo {
      position: relative;
      width: min(62%, 250px);
      margin: 12px 0 0 auto;
      border: 1px solid rgba(94,67,42,.18);
      border-radius: 3px;
      padding: 8px 8px 18px;
      background: #fff8eb;
      box-shadow: 0 10px 22px rgba(72,45,24,.16), 0 1px 0 rgba(255,255,255,.8) inset;
      transform: rotate(1.2deg);
    }

    .journal-paper-photo-inline {
      float: right;
      display: block;
      width: min(48%, 210px);
      margin: 2px 0 10px 16px;
      padding: 7px 7px 16px;
      cursor: zoom-in;
    }

    .journal-paper-photo-edit {
      display: block;
    }

    .journal-page-sheet.left-page .journal-paper-photo-inline {
      float: left;
      margin: 2px 16px 10px 0;
    }

    .journal-page-sheet.left-page .journal-paper-photo {
      margin-left: 0;
      margin-right: auto;
      transform: rotate(-1.1deg);
    }

    .journal-paper-photo.photo-variant-0 {
      transform: rotate(-2.4deg);
      margin-top: 4px;
    }

    .journal-paper-photo.photo-variant-1 {
      transform: rotate(2deg);
      margin-top: 14px;
      margin-right: 8px;
    }

    .journal-paper-photo.photo-variant-2 {
      transform: rotate(-.7deg);
      width: min(44%, 190px);
      margin-top: 8px;
    }

    .journal-paper-photo.photo-variant-3 {
      transform: rotate(2.8deg);
      width: min(54%, 230px);
      margin-top: 18px;
    }

    .journal-paper-photo.photo-variant-4 {
      transform: rotate(-1.8deg);
      margin-left: 8px;
      margin-right: 18px;
    }

    .journal-paper-photo.photo-variant-5 {
      transform: rotate(1deg);
      width: min(50%, 205px);
      margin-top: 0;
    }

    .journal-paper-photo-inline.photo-variant-0,
    .journal-paper-photo-inline.photo-variant-3,
    .journal-page-sheet.left-page .journal-paper-photo-inline.photo-variant-1,
    .journal-page-sheet.left-page .journal-paper-photo-inline.photo-variant-4 {
      float: left;
      margin: 2px 16px 10px 0;
    }

    .journal-paper-photo-inline.photo-variant-1,
    .journal-paper-photo-inline.photo-variant-4,
    .journal-page-sheet.left-page .journal-paper-photo-inline.photo-variant-0,
    .journal-page-sheet.left-page .journal-paper-photo-inline.photo-variant-3 {
      float: right;
      margin: 2px 0 10px 16px;
    }

    .journal-paper-photo.photo-variant-2::before,
    .journal-paper-photo.photo-variant-5::before {
      left: 58%;
      transform: translateX(-50%) rotate(4deg);
    }

    .journal-paper-photo.photo-variant-1::before,
    .journal-paper-photo.photo-variant-4::before {
      left: 42%;
      transform: translateX(-50%) rotate(-6deg);
    }

    .journal-paper-photo::before {
      content: "";
      position: absolute;
      top: -11px;
      left: 50%;
      width: 72px;
      height: 20px;
      transform: translateX(-50%) rotate(-3deg);
      border-radius: 2px;
      background: rgba(230,210,162,.7);
      box-shadow: 0 2px 6px rgba(74,45,24,.12);
      opacity: .9;
    }

    .journal-paper-photo .journal-image {
      width: 100%;
      max-height: 230px;
      aspect-ratio: 4 / 3;
      object-fit: cover;
      border-radius: 2px;
      cursor: zoom-in;
    }

    .journal-page-sheet .journal-read-body {
      min-height: 120px;
      padding: 10px 0 0;
      color: #2b221b;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 17px;
      font-weight: 600;
      line-height: 1.72;
    }

    .journal-page-sheet .journal-read-body::after {
      content: "";
      display: block;
      clear: both;
    }

    .journal-page-sheet .journal-read-body ul,
    .journal-page-sheet .journal-read-body ol {
      margin: .35em 0 .55em;
      padding-left: 1.45em;
      list-style-position: outside;
    }

    .journal-page-sheet .journal-read-body li {
      padding-left: .12em;
    }

    .journal-page-sheet .journal-read-body.empty {
      color: rgba(74,55,39,.58);
    }

    .journal-page-sheet .journal-edit-field,
    .journal-page-sheet .journal-reflection-field,
    .journal-page-sheet .journal-reflection-read,
    .journal-page-sheet .journal-preview {
      margin-left: 0;
      margin-right: 0;
      padding-left: 0;
      padding-right: 0;
      color: #463324;
    }

    .journal-page-sheet .journal-edit-label,
    .journal-page-sheet .journal-reflection-read-head > span {
      color: #7b3f24;
    }

    .journal-page-sheet .journal-rte-toolbar {
      background: #f4ead8;
      border-color: rgba(84,56,30,.18);
    }

    .journal-page-sheet .jtb-btn,
    .journal-page-sheet .jtb-select {
      color: #4d3827;
    }

    .journal-page-sheet .journal-rte-editor,
    .journal-page-sheet .journal-reflection-input {
      color: #241d18;
      border-color: rgba(84,56,30,.2);
      background: rgba(255,255,255,.35);
      font-family: Georgia, "Times New Roman", serif;
    }

    .journal-page-sheet .journal-rte-editor {
      min-height: 230px;
      font-size: 17px;
      line-height: 1.72;
    }

    .journal-page-sheet .journal-rte-editor:focus,
    .journal-page-sheet .journal-reflection-input:focus {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 52%, #7b3f24);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-color, var(--today)) 13%, transparent);
      background: rgba(255,255,255,.48);
    }

    .journal-page-sheet .journal-reflection-field,
    .journal-page-sheet .journal-reflection-read {
      border-color: rgba(84,56,30,.18);
      background: rgba(255,255,255,.28);
      border-radius: 6px;
      padding: 12px;
    }

    .journal-page-sheet .journal-reflection-field strong,
    .journal-page-sheet .journal-reflection-answer strong,
    .journal-page-sheet .journal-reflection-answer p {
      color: #2b221b;
    }

    .journal-page-sheet .journal-actions {
      padding-left: 0;
      padding-right: 0;
    }

    .journal-page-sheet .journal-page-edit-actions {
      position: relative;
      z-index: 20;
      margin: 0 -24px -14px;
      padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
      border-top: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 34%, rgba(96,64,36,.22));
      background: rgba(247,239,223,.97);
      box-shadow: 0 -8px 18px rgba(74,48,28,.12);
      backdrop-filter: blur(12px);
    }

    .journal-page-sheet.left-page .journal-page-edit-actions {
      margin-right: -36px;
      padding-right: 36px;
    }

    .journal-page-sheet.right-page .journal-page-edit-actions {
      margin-left: -38px;
      padding-left: 38px;
    }

    .journal-reward-bronze .journal-page-edit-actions { background: rgba(248,239,225,.97); }
    .journal-reward-silver .journal-page-edit-actions { background: rgba(247,246,241,.97); }
    .journal-reward-gold .journal-page-edit-actions { background: rgba(255,243,196,.97); }
    .journal-reward-complete .journal-page-edit-actions {
      background: linear-gradient(110deg, rgba(255,243,222,.97), rgba(236,224,255,.96), rgba(218,247,244,.97));
    }

    .journal-page-sheet .ghost-btn,
    .journal-page-sheet .journal-upload-btn {
      color: #2b221b;
      border-color: rgba(84,56,30,.22);
      background: rgba(255,255,255,.32);
    }

    .journal-share-panel {
      display: grid;
      gap: 12px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
      border-radius: 8px;
      padding: 14px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--profile-color, var(--today)) 12%, rgba(255,255,255,.04)), rgba(255,255,255,.025)),
        rgba(16,23,42,.78);
      box-shadow: 0 18px 50px rgba(0,0,0,.22);
    }

    .journal-share-summary {
      display: none;
      list-style: none;
    }

    .journal-share-summary::-webkit-details-marker {
      display: none;
    }

    .journal-share-content {
      display: grid;
      gap: 12px;
    }

    .journal-share-panel:not([open]) > .journal-share-content {
      display: none;
    }

    .journal-share-defaults {
      display: grid;
      gap: 8px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 22%, var(--line));
      border-radius: 14px;
      padding: 12px;
      background: rgba(255,255,255,.035);
    }

    .journal-share-defaults > strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .journal-share-default-option {
      position: relative;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      border: 1px solid transparent;
      border-radius: 11px;
      padding: 9px;
      color: var(--text);
      background: rgba(255,255,255,.03);
      cursor: pointer;
    }

    .journal-share-default-option:hover {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
      background: rgba(255,255,255,.05);
    }

    .journal-share-default-option input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .journal-share-default-option > span:last-child {
      display: grid;
      gap: 3px;
    }

    .journal-share-default-option b { font-size: 13px; }
    .journal-share-default-option small { color: var(--muted); font-size: 11px; line-height: 1.35; }

    .journal-share-default-option input:checked + .planner-toggle-box {
      border-color: color-mix(in srgb, var(--good) 78%, white);
      background: var(--good);
      box-shadow: 0 0 0 4px rgba(51,209,122,.14);
    }

    .journal-share-default-option input:checked + .planner-toggle-box::after { opacity: 1; }

    .journal-field-privacy select:disabled {
      opacity: .58;
      cursor: not-allowed;
    }

    .journal-share-options {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .journal-share-option {
      position: relative;
      min-width: 0;
      min-height: 48px;
      display: flex;
      align-items: center;
      gap: 9px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 20%, var(--line));
      border-radius: 8px;
      padding: 9px 10px;
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
      cursor: pointer;
      overflow: hidden;
    }

    .journal-share-option input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .journal-share-option > span:last-child {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .journal-share-option:has(input:checked) {
      border-color: color-mix(in srgb, var(--good) 42%, var(--line));
      background:
        linear-gradient(90deg, rgba(51,209,122,.14), transparent 66%),
        rgba(255,255,255,.055);
    }

    .journal-share-option input:checked + .planner-toggle-box {
      border-color: color-mix(in srgb, var(--good) 78%, white);
      background: var(--good);
      box-shadow: 0 0 0 4px rgba(51,209,122,.14);
    }

    .journal-share-option input:checked + .planner-toggle-box::after {
      opacity: 1;
    }

    .journal-share-empty {
      min-height: 50px;
      display: grid;
      place-items: center;
      border: 1px dashed var(--line);
      border-radius: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
      background: rgba(255,255,255,.035);
    }

    /* === Bookshelf === */
    .journal-closed-books {
      position: relative;
      display: flex;
      flex-direction: row;
      align-items: flex-end;
      gap: 6px;
      padding: 24px 20px 0;
      min-height: 268px;
      border-radius: 8px 8px 6px 6px;
      border: 1px solid rgba(70,44,18,.46);
      overflow: hidden;
      /* back wall of the bookcase */
      background:
        /* subtle vertical wood grain */
        repeating-linear-gradient(90deg,
          transparent 0,
          rgba(0,0,0,.06) 1px,
          transparent 1px,
          transparent 28px
        ),
        /* top-to-bottom depth gradient */
        linear-gradient(180deg, #120c04 0%, #1e1208 60%, #160d05 100%);
    }

    /* shelf plank at the bottom */
    .journal-closed-books::before {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 22px;
      background:
        /* subtle wood grain lines */
        repeating-linear-gradient(90deg,
          transparent 0,
          rgba(255,255,255,.03) 2px,
          transparent 2px,
          transparent 18px
        ),
        linear-gradient(0deg,
          #2e1a08 0%,
          #51320f 28%,
          #6b4418 55%,
          #4a2c0e 80%,
          #3a2009 100%
        );
      box-shadow:
        inset 0 3px 8px rgba(0,0,0,.55),
        inset 0 -1px 0 rgba(0,0,0,.6),
        0 -2px 6px rgba(0,0,0,.3);
    }

    /* faint light from above */
    .journal-closed-books::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 40px;
      background: linear-gradient(180deg, rgba(255,220,160,.04), transparent);
      pointer-events: none;
    }

    /* === Spine book === */
    .journal-closed-book {
      position: relative;
      z-index: 1;
      flex-shrink: 0;
      width: var(--journal-book-width, 64px);
      height: var(--journal-book-height, 218px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      border: none;
      border-radius: 2px 2px 0 0;
      padding: 0;
      color: rgba(255,255,255,.9);
      text-align: center;
      background:
        /* spine highlight — lighter center strip for 3-D rounding effect */
        linear-gradient(90deg,
          rgba(0,0,0,.42) 0%,
          rgba(255,255,255,.07) 30%,
          rgba(255,255,255,.13) 50%,
          rgba(255,255,255,.05) 70%,
          rgba(0,0,0,.36) 100%
        ),
        color-mix(in srgb, var(--profile-color, var(--today)) 78%, #100805);
      box-shadow:
        3px 0 8px rgba(0,0,0,.52),
        -1px 0 3px rgba(0,0,0,.28),
        inset 0 0 0 1px rgba(255,255,255,.06);
      overflow: hidden;
      cursor: pointer;
      transition: transform .16s ease, box-shadow .16s ease;
    }

    .journal-closed-book:hover {
      box-shadow:
        4px 0 14px rgba(0,0,0,.6),
        -1px 0 4px rgba(0,0,0,.3),
        inset 0 0 0 1px rgba(255,255,255,.08);
    }

    /* horizontal decorative band at top and bottom of spine */
    .journal-closed-book-band {
      position: relative;
      width: 100%;
      flex-shrink: 0;
    }

    .journal-closed-book-band::before,
    .journal-closed-book-band::after {
      content: "";
      display: block;
      width: 100%;
    }

    /* top band */
    .journal-closed-book-band::before {
      height: 14px;
      background:
        linear-gradient(180deg,
          color-mix(in srgb, var(--profile-color, var(--today)) 96%, #fff) 0%,
          color-mix(in srgb, var(--profile-color, var(--today)) 80%, #000) 100%
        );
      box-shadow: 0 2px 0 rgba(255,255,255,.12), 0 3px 0 rgba(0,0,0,.3);
    }

    /* bottom decorative line */
    .journal-closed-book-band::after {
      height: 6px;
      background:
        linear-gradient(180deg,
          rgba(0,0,0,.3) 0%,
          color-mix(in srgb, var(--profile-color, var(--today)) 88%, #000) 40%,
          rgba(0,0,0,.2) 100%
        );
      box-shadow: 0 -1px 0 rgba(255,255,255,.1);
    }

    .journal-closed-book-avatar {
      width: 36px;
      height: 36px;
      flex-shrink: 0;
      display: grid;
      place-items: center;
      border-radius: 50%;
      box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 0 2px rgba(255,255,255,.14);
      overflow: hidden;
      margin: 4px 0 2px;
    }

    .journal-closed-book-label {
      position: absolute;
      z-index: 2;
      top: 58px;
      right: 10px;
      bottom: 42px;
      left: 10px;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 4px;
      overflow: hidden;
      pointer-events: none;
    }

    .journal-closed-book-title {
      writing-mode: vertical-rl;
      text-orientation: mixed;
      transform: rotate(180deg);   /* reads bottom → top */
      flex: 0 1 auto;
      max-height: 100%;
      overflow: hidden;
      padding: 2px 0;
      font-size: 10px;
      font-weight: 950;
      letter-spacing: .05em;
      color: rgba(255,255,255,.86);
      text-shadow: 0 1px 4px rgba(0,0,0,.6);
    }

    .journal-closed-book-author {
      writing-mode: vertical-rl;
      text-orientation: mixed;
      transform: rotate(180deg);
      flex: 0 1 auto;
      max-height: 100%;
      overflow: hidden;
      padding: 2px 0 4px;
      color: rgba(255,255,255,.68);
      font-size: 8px;
      font-weight: 800;
      letter-spacing: .04em;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-shadow: 0 1px 3px rgba(0,0,0,.68);
    }

    .journal-dream-book .journal-closed-book-label {
      top: 60px;
      bottom: 45px;
    }

    .journal-closed-book.journal-ghost-book {
      opacity: .42;
      filter: grayscale(.72) drop-shadow(0 0 7px rgba(190,205,255,.28));
    }
    .journal-closed-book.journal-ghost-book:hover {
      opacity: .78;
      filter: grayscale(.35) brightness(1.12) drop-shadow(0 0 8px rgba(204,218,255,.68));
    }
    .journal-ghost-book-time {
      position: absolute !important;
      z-index: 4 !important;
      top: 7px;
      right: 5px;
      border-radius: 999px;
      padding: 2px 4px;
      color: #eef3ff;
      background: rgba(25,31,55,.76);
      font-size: 7px;
      line-height: 1;
    }
    .journal-ghost-book-action {
      position: absolute !important;
      z-index: 4 !important;
      right: 5px;
      bottom: 7px;
      left: 5px;
      overflow: hidden;
      color: #f4f6ff;
      font-size: 7px;
      font-weight: 850;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .journal-empty-ghosts { margin: 4px 0 2px !important; }

    .journal-closed-book-status {
      font-size: 11px;
      opacity: .64;
      line-height: 1;
      margin-bottom: 6px;
    }

    .journal-add-book-outline {
      position: relative;
      z-index: 1;
      flex: 0 0 46px;
      width: 46px;
      height: 112px;
      min-width: 46px;
      min-height: 112px;
      margin-left: auto;
      margin-bottom: 22px;
      border: 2px dashed rgba(196, 181, 242, .58);
      border-radius: 4px 8px 3px 3px;
      padding: 0;
      color: #ddd3ff;
      background: rgba(105, 83, 165, .12);
      box-shadow: inset -5px 0 0 rgba(190, 175, 235, .08);
    }
    .journal-add-book-outline span { font-size: 34px; font-weight: 500; line-height: 1; }
    .journal-add-book-outline small {
      position: absolute;
      bottom: 10px;
      color: currentColor;
      font-size: 8px;
      font-weight: 850;
      writing-mode: vertical-rl;
      transform: rotate(180deg);
    }
    .journal-add-dream-book { margin-left: 4px; }
    .journal-add-book-outline:hover { border-color: rgba(220, 209, 255, .92); background: rgba(126, 100, 190, .25); }

    .journal-empty-library {
      min-height: 330px;
      display: grid;
      place-items: center;
      align-content: center;
      gap: 10px;
      border: 1px dashed rgba(157, 139, 219, .42);
      border-radius: var(--radius);
      padding: 28px;
      text-align: center;
      background: rgba(22, 28, 51, .74);
    }
    .journal-empty-library > span { font-size: 52px; }
    .journal-empty-library h2,
    .journal-empty-library p { margin: 0; }
    .journal-empty-library p { max-width: 560px; color: var(--muted); line-height: 1.5; }
    .journal-empty-library > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }

    .journal-reactable-image {
      --journal-photo-angle: 1.2deg;
      position: relative;
      float: left;
      width: min(48%, 310px);
      margin: 0 10px 2px 0;
      z-index: 2;
      transform: rotate(var(--journal-photo-angle));
      transform-origin: center;
      cursor: zoom-in;
    }
    .journal-reactable-image.photo-variant-0 { --journal-photo-angle: -2.4deg; }
    .journal-reactable-image.photo-variant-1 { --journal-photo-angle: 2deg; }
    .journal-reactable-image.photo-variant-2 { --journal-photo-angle: -.7deg; }
    .journal-reactable-image.photo-variant-3 { --journal-photo-angle: 2.8deg; }
    .journal-reactable-image.photo-variant-4 { --journal-photo-angle: -1.8deg; }
    .journal-reactable-image.photo-variant-5 { --journal-photo-angle: 1deg; }
    .journal-page-sheet .journal-reactable-image .journal-paper-photo-inline,
    .journal-page-sheet.left-page .journal-reactable-image .journal-paper-photo-inline {
      float: none;
      width: 100%;
      margin: 0;
      box-sizing: border-box;
      z-index: 1;
      transform: none;
    }
    .journal-reactable-image > .journal-social > .journal-reactions {
      position: absolute;
      top: auto;
      right: 8px;
      bottom: 8px;
      left: auto;
      z-index: 3;
      max-width: calc(100% - 16px);
      margin: 0;
      clear: none;
      cursor: default;
    }
    .journal-content-blocks { display: contents; }
    .journal-content-group { display: block; margin: 0; padding: 0; }
    .journal-dream-read-section {
      position: relative;
      margin: 0 0 18px;
      border: 1px solid rgba(105, 82, 167, .25);
      border-radius: 28px 38px 31px 42px / 32px 27px 40px 30px;
      padding: 16px 18px;
      background: radial-gradient(circle at 18% 10%, rgba(255,255,255,.78), transparent 34%), rgba(244, 240, 255, .56);
      box-shadow: 0 8px 22px rgba(77, 54, 126, .1);
    }
    .journal-dream-read-section::before,
    .journal-dream-read-section::after {
      content: "";
      position: absolute;
      z-index: -1;
      border: 1px solid rgba(105, 82, 167, .2);
      border-radius: 50%;
      background: rgba(244, 240, 255, .6);
    }
    .journal-dream-read-section::before { width: 15px; height: 15px; left: 18px; bottom: -10px; }
    .journal-dream-read-section::after { width: 7px; height: 7px; left: 8px; bottom: -18px; }
    .journal-dream-read-section .journal-dream-image {
      border-radius: 34% 44% 38% 48% / 42% 35% 47% 38%;
      box-shadow: 0 7px 18px rgba(61, 42, 105, .18);
    }
    .journal-dream-read-section:last-child { margin-bottom: 0; }
    .journal-dream-read-section > h3,
    .journal-dream-read-head h3 { margin: 0; color: #59427f; font-size: 14px; }
    .journal-dream-read-section > h3 { margin-bottom: 9px; }
    .journal-dream-read-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 9px;
    }
    .journal-dream-read-head .journal-visibility-badge { flex: 0 0 auto; }
    .journal-reactable-block {
      position: relative;
      margin-bottom: 3px;
    }
    .journal-reactable-block:last-child { margin-bottom: 0; }
    .journal-reactable-block a {
      color: #315f9d;
      font-weight: 700;
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 2px;
      overflow-wrap: anywhere;
    }
    .journal-reactable-block a:hover { filter: brightness(1.18); }
    .journal-rte-editor a {
      color: #315f9d;
      font-weight: 700;
      text-decoration: underline;
      text-underline-offset: 2px;
    }
    .journal-edit-field > .ui-link-preview {
      color: #2b221b;
      background: rgba(255,255,255,.72);
    }
    .journal-edit-field > .ui-link-preview .ui-link-preview-copy small,
    .journal-edit-field > .ui-link-preview .ui-link-preview-copy > span {
      color: #65584e;
    }
    .journal-edit-field > .ui-link-preview .ui-link-preview-link {
      color: #2b221b;
    }
    .journal-reflection-answer { position: relative; }
    .journal-social { display: contents; }
    .journal-reactions {
      position: relative;
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: flex-end;
      gap: 2px;
      width: 76px;
      height: 28px;
      margin: 0;
      grid-column: 2;
      grid-row: 1;
      align-self: end;
    }
    @media (min-width: 761px) {
      .journal-page-sheet.left-page .journal-reactable-block .journal-reactions,
      .journal-page-sheet.right-page .journal-reactable-block .journal-reactions,
      .journal-page-sheet.left-page .journal-reflection-answer .journal-reactions,
      .journal-page-sheet.right-page .journal-reflection-answer .journal-reactions {
        box-sizing: border-box;
        padding-right: 15px;
      }
      .journal-page-sheet.left-page .journal-reactable-image > .journal-social > .journal-reactions,
      .journal-page-sheet.right-page .journal-reactable-image > .journal-social > .journal-reactions { right: 23px; }
      .journal-page-sheet.right-page .journal-reactable-block .journal-reactions { right: 7px; }
    }
    .journal-reactable-block {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 42px;
      column-gap: 2px;
      min-height: 28px;
    }
    .journal-reactable-block > div:first-child { grid-column: 1; min-width: 0; }
    .journal-reactable-block.is-list-item > div:first-child > ul,
    .journal-reactable-block.is-list-item > div:first-child > ol {
      margin: 0;
      padding-inline-start: 1.35em;
    }
    .journal-reflection-answer > .journal-social > .journal-reactions {
      position: absolute;
      right: 0;
      bottom: 0;
    }
    .journal-reaction-summary { display: flex; width: 28px; height: 32px; overflow: visible; flex: 0 0 28px; }
    .journal-reaction-summary::-webkit-scrollbar { display: none; }
    .journal-reaction-chip,
    .journal-reaction-trigger,
    .journal-comment-trigger {
      width: 28px;
      min-width: 28px;
      flex: 0 0 28px;
      height: 27px;
      min-height: 27px;
      border: 1px solid rgba(95, 73, 145, .22);
      border-radius: 4px;
      padding: 2px;
      color: #46345f;
      background: rgba(255,255,255,.62);
      box-shadow: none;
      font-size: 15px;
      line-height: 1;
    }
    .journal-reaction-chip:disabled { cursor: default; opacity: 1; }
    .journal-reaction-chip.mine { border-color: rgba(115, 84, 200, .55); background: rgba(216, 204, 255, .72); }
    .journal-reaction-chip img { width: 20px; height: 20px; object-fit: contain; }
    .journal-reaction-chip { position: relative; border-color: rgba(85,62,34,.16); border-radius: 9px 7px 10px 6px; background: #fffdf5; box-shadow: 0 2px 4px rgba(54,38,23,.2); transform: rotate(-5deg); }
    .journal-reaction-chip:nth-child(2n) { transform: translate(-6px, 3px) rotate(6deg); }
    .journal-reaction-chip:nth-child(3n) { transform: translate(-10px, -2px) rotate(-2deg); }
    .journal-reaction-chip b { position: absolute; right: 0; bottom: 0; font-size: 10px; background: white; color: #333; }
    .journal-comment-trigger svg { width: 16px; height: 16px; }
    .journal-comment-trigger { position: relative; display: grid; place-items: center; }
    .journal-comment-trigger > span { display: grid; place-items: center; }
    .journal-comment-trigger > b { position: absolute; top: -6px; right: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #286f60; color: white; font: 700 10px/16px system-ui, sans-serif; }
    .journal-comments-backdrop { position: fixed; z-index: 1250; inset: 0; display: grid; place-items: center; overflow: auto; padding: 14px; background: rgba(18,14,19,.68); backdrop-filter: blur(5px); }
    .journal-comments-paper { position: relative; width: min(620px, calc(100vw - 28px)); max-height: min(760px, calc(100dvh - 28px)); overflow: auto; border: 1px solid rgba(102,71,43,.35); border-radius: 4px 7px 3px 6px; padding: 22px; color: #34271d; background-color: #f6ecd5; background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(93,125,158,.16) 27px 28px), radial-gradient(circle at 15% 8%, rgba(255,255,255,.7), transparent 36%); box-shadow: 0 22px 60px rgba(0,0,0,.4); transform: rotate(-.25deg); }
    .journal-comments-paper::before { content: ""; position: absolute; top: -8px; left: 42%; width: 92px; height: 22px; background: rgba(224,201,151,.72); transform: rotate(2deg); box-shadow: 0 2px 4px rgba(70,48,29,.12); pointer-events: none; }
    .journal-comments-paper-head { position: sticky; z-index: 5; top: -22px; display: flex; flex-flow: row nowrap; align-items: center; justify-content: space-between; gap: 12px; margin: -22px -22px 10px; border: 0; padding: 20px 22px 10px; background: linear-gradient(#f6ecd5 82%, transparent); }
    .journal-comments-paper-head > div { min-width: 0; }
    .journal-comments-paper-head .ui-close-button { flex: 0 0 auto; }
    .journal-comments-paper-head small { color: #876346; font: 700 11px/1.2 system-ui, sans-serif; text-transform: uppercase; }
    .journal-comments-paper-head h2 { margin: 2px 0 0; font: 700 24px/1.1 Georgia, serif; }
    .journal-comments { min-width: 0; padding: 0; border: 0; font: 13px/1.4 system-ui, sans-serif; white-space: normal; }
    .journal-comments-paper .journal-comments p { font: inherit; margin: 4px 0; }
    .journal-comments-paper .journal-comments strong { font: inherit; font-weight: 650; }
    .journal-comment-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
    .journal-comment { position: relative; padding: 8px 0; border-bottom: 1px solid rgba(100,100,100,.2); outline: none; }
    .journal-comment header { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 6px; border: 0; padding: 0; margin: 0 0 4px; }
    .journal-comment time { font-size: 11px; opacity: .7; }
    .journal-comment-avatar { display: inline-grid; width: 26px; height: 26px; overflow: hidden; place-items: center; border-radius: 50%; }
    .journal-comment-author { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
    .journal-comment-author:hover, .journal-comment-author:focus-visible { text-decoration: underline; }
    .journal-comment-avatar .profile-avatar { width: 26px; height: 26px; }
    .journal-comment-avatar-fallback { display: grid; width: 100%; height: 100%; place-items: center; background: #286f60; color: white; font: 700 12px/1 system-ui, sans-serif; }
    .journal-comment p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
    .journal-comment-mention { color: #267261; font-weight: 700; margin-right: 4px; }
    .journal-comment-actions { position: absolute; z-index: 2; top: 5px; right: 0; display: flex; gap: 2px; padding-left: 12px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9) 18%); opacity: 0; pointer-events: none; }
    .journal-comment:focus-within .journal-comment-actions,
    .journal-comment.is-action-active .journal-comment-actions { opacity: 1; pointer-events: auto; }
    .journal-comment-actions .ui-icon-button { width: 30px; height: 30px; min-height: 30px; }
    .journal-comment-form { margin-top: 8px; }
    .journal-comment-form textarea, .journal-comment-edit textarea { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 54px; font: inherit; color: inherit; background: rgba(255,255,255,.55); }
    .journal-comment-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .journal-comment-send { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-width: 92px; height: 36px; padding: 6px 12px; border-radius: 4px; background: #286f60; color: white; font-weight: 750; }
    .journal-comment-send svg { width: 18px; height: 18px; }
    .journal-comment-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
    .journal-comment-reactions > span { display: inline-flex; align-items: center; gap: 2px; min-height: 24px; padding: 1px 5px; border: 1px solid rgba(95,73,145,.22); border-radius: 8px; background: rgba(255,255,255,.55); }
    .journal-comment-reactions img { width: 18px; height: 18px; object-fit: contain; }
    .journal-comment-reactions .sticker-art { width: 22px; height: 22px; font-size: 18px; }
    .journal-comment-reactions b { font-size: 10px; }
    .journal-comment-reaction-picker { position: relative; z-index: 3; margin-top: 6px; }
    .journal-reactable-image { display: block; }
    .journal-cover > .journal-social { display: block; position: relative; }
    .journal-cover .journal-reactions { margin-left: auto; }
    .journal-reaction-trigger { opacity: .38; padding: 2px 6px; }
    @media (hover: hover) {
      .journal-comment:hover .journal-comment-actions { opacity: 1; pointer-events: auto; }
      .journal-reaction-trigger,
      .journal-comment-trigger { opacity: 0; pointer-events: none; }
      .journal-reactions.has-comments .journal-comment-trigger,
      .journal-social:hover .journal-reaction-trigger,
      .journal-social:hover .journal-comment-trigger,
      .journal-reactable-block:hover .journal-comment-trigger,
      .journal-reactable-image:hover .journal-comment-trigger,
      .journal-reflection-answer:hover .journal-comment-trigger,
      .journal-cover:hover .journal-comment-trigger,
      .journal-social:focus-within .journal-reaction-trigger,
      .journal-social:focus-within .journal-comment-trigger { opacity: 1; pointer-events: auto; }
    }
    .journal-reactable-block:hover .journal-reaction-trigger,
    .journal-reactable-image:hover .journal-reaction-trigger,
    .journal-reflection-answer:hover .journal-reaction-trigger,
    .journal-reaction-trigger[aria-expanded="true"] { opacity: 1; }
    .journal-reaction-picker {
      position: fixed;
      z-index: 1200;
    }

    @media (hover: none) {
      .journal-reaction-trigger, .journal-comment-trigger { opacity: 0; pointer-events: none; }
      .journal-reactions.has-comments .journal-comment-trigger,
      .journal-reactable-block:focus-within .journal-reaction-trigger,
      .journal-reactable-block:focus-within .journal-comment-trigger,
      .journal-reactable-image:focus-within .journal-reaction-trigger,
      .journal-reactable-image:focus-within .journal-comment-trigger,
      .journal-cover:focus-within .journal-reaction-trigger,
      .journal-cover:focus-within .journal-comment-trigger,
      .journal-reflection-answer:focus-within .journal-reaction-trigger,
      .journal-reflection-answer:focus-within .journal-comment-trigger { opacity: 1; pointer-events: auto; }
    }

    .journal-dream-delete-zone {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      border: 1px solid rgba(221, 91, 112, .3);
      border-radius: 12px;
      padding: 12px 14px;
      background: rgba(126, 30, 53, .08);
    }
    .journal-dream-delete-zone > div { display: grid; gap: 3px; }
    .journal-dream-delete-zone small { color: var(--muted); font-size: 12px; }
    .journal-dream-delete {
      flex: 0 0 auto;
      border-color: rgba(231, 90, 112, .52);
      color: #ffd9df;
      background: rgba(158, 38, 61, .56);
    }
    .journal-dream-delete:hover { filter: brightness(1.15); background: rgba(177, 43, 68, .7); }

    @media (max-width: 700px) {
      .journal-dream-delete-zone { align-items: stretch; flex-direction: column; }
    }

    /* ImageGen-Skins: Material und Licht kommen aus den Rastervorlagen;
       Größe, Profilfarbe, Avatar und Titel bleiben dynamische UI-Ebenen. */
    .journal-closed-books {
      box-sizing: border-box;
      padding-bottom: 30px;
      background: #160d05 url("../assets/journal/bookshelf-walnut.png") center / 100% 100% no-repeat;
    }
    .journal-closed-books::before { content: none; }

    .journal-closed-book {
      border: 0;
      background-color: transparent;
      background-image: url("../assets/journal/book-spine-regular.png");
      background-position: center;
      background-size: 410% 100%;
      background-repeat: no-repeat;
      box-shadow: none;
      filter: drop-shadow(4px 3px 5px rgba(0,0,0,.52));
      transition: transform .16s ease, filter .16s ease;
    }
    .journal-closed-book::before {
      content: "";
      position: absolute;
      z-index: 0;
      inset: 0;
      background: var(--profile-color, var(--today));
      opacity: .72;
      mix-blend-mode: color;
      -webkit-mask: url("../assets/journal/book-spine-regular.png") center / 410% 100% no-repeat;
      mask: url("../assets/journal/book-spine-regular.png") center / 410% 100% no-repeat;
      pointer-events: none;
    }
    .journal-closed-book > :not(.journal-closed-book-label) { position: relative; z-index: 1; }
    .journal-closed-book .journal-closed-book-avatar {
      position: absolute;
      z-index: 3;
      top: 25px;
      left: 50%;
      margin: 0;
      transform: translateX(-50%);
    }
    .journal-closed-book .journal-closed-book-status {
      position: absolute;
      z-index: 3;
      right: 0;
      bottom: 24px;
      left: 0;
      margin: 0;
    }
    .journal-closed-book:hover {
      filter:
        brightness(1.1)
        saturate(1.06)
        drop-shadow(0 0 5px color-mix(in srgb, var(--profile-color, var(--today)) 70%, white))
        drop-shadow(4px 5px 6px rgba(0,0,0,.58));
    }
    .journal-closed-book-band::before,
    .journal-closed-book-band::after {
      background: none;
      box-shadow: none;
    }
    .journal-dream-book {
      background-color: transparent;
      background-image: url("../assets/journal/book-spine-dream.png");
      background-position: center;
      background-size: 425% 100%;
      background-repeat: no-repeat;
      box-shadow: none;
    }
    .journal-dream-book::before {
      background: var(--profile-color, #8e78de);
      opacity: .2;
      mix-blend-mode: soft-light;
      -webkit-mask-image: url("../assets/journal/book-spine-dream.png");
      mask-image: url("../assets/journal/book-spine-dream.png");
      -webkit-mask-size: 425% 100%;
      mask-size: 425% 100%;
      -webkit-mask-position: center;
      mask-position: center;
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
    }

    @media (max-width: 900px) {
      .journal-reactable-block {
        grid-template-columns: minmax(0, 1fr) 76px;
      }

      .journal-open-book {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 12px 10px 10px;
      }

      .journal-book-title {
        top: 8px;
        max-width: calc(100% - 120px);
      }

      .journal-book-spine {
        display: none;
      }

      .journal-page-sheet,
      .journal-page-sheet.left-page,
      .journal-page-sheet.right-page {
        min-height: 360px;
        border-radius: 6px;
        padding: 18px;
        background:
          linear-gradient(90deg, transparent, rgba(71,45,24,.1)),
          repeating-linear-gradient(180deg, transparent 0 31px, rgba(100,100,110,.09) 32px, transparent 33px),
          #f5ecd8;
      }

      .journal-page-sheet.journal-reward-silver {
        background:
          linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)),
          url("../assets/journal/appearance/journal-paper-silver-v2.png") center top / 720px auto repeat-y,
          repeating-linear-gradient(180deg, transparent 0 31px, rgba(100,100,110,.09) 32px, transparent 33px),
          #f7f0df;
      }

      .journal-page-sheet.journal-reward-bronze {
        background:
          linear-gradient(rgba(255,250,240,.62), rgba(255,250,240,.62)),
          url("../assets/journal/appearance/journal-paper-bronze-v2.png") center top / 720px auto repeat-y,
          repeating-linear-gradient(180deg, transparent 0 31px, rgba(112,68,40,.055) 32px, transparent 33px),
          #f2dfc5;
      }

      .journal-page-sheet.journal-reward-gold {
        background:
          linear-gradient(rgba(255,252,231,.12), rgba(255,252,231,.12)),
          url("../assets/journal/appearance/journal-paper-gold-v2.png") center top / 720px auto repeat-y,
          repeating-linear-gradient(180deg, transparent 0 31px, rgba(125,91,25,.11) 32px, transparent 33px),
          #fbefc5;
      }

      .journal-page-sheet.journal-reward-complete {
        background:
          linear-gradient(rgba(255,255,255,.08), rgba(255,255,255,.08)),
          url("../assets/journal/appearance/journal-paper-pearlescent-v2.png") center top / 720px auto repeat-y,
          repeating-linear-gradient(180deg, transparent 0 31px, rgba(105,91,113,.09) 32px, transparent 33px),
          #fff4dc;
      }

      .journal-paper-head {
        margin: -18px -18px 0;
        padding: 18px 18px 10px;
        min-height: 104px;
      }

      .journal-page-sheet.left-page .journal-paper-head,
      .journal-page-sheet.right-page .journal-paper-head {
        margin: -18px -18px 0;
        padding: 18px 18px 10px;
      }

      .journal-page-scroll,
      .journal-page-sheet.left-page .journal-page-scroll,
      .journal-page-sheet.right-page .journal-page-scroll {
        margin: 0 -18px -18px;
        padding: 0 18px 18px;
      }

      .journal-page-sheet .journal-page-edit-actions,
      .journal-page-sheet.left-page .journal-page-edit-actions,
      .journal-page-sheet.right-page .journal-page-edit-actions {
        margin: 0 -18px -18px;
        padding: 9px 18px calc(9px + env(safe-area-inset-bottom));
      }

      .journal-page-sheet + .journal-page-sheet {
        margin-top: 10px;
      }

      .journal-page-sheet.left-page::after,
      .journal-page-sheet.right-page::after {
        display: none;
      }

      .journal-paper-photo-inline,
      .journal-page-sheet.left-page .journal-paper-photo-inline {
        float: none;
        width: min(92%, 360px);
        margin: 4px auto 16px;
      }

      .journal-reactable-image {
        float: none;
        width: min(72%, 240px);
        margin: 4px auto 2px;
      }

      .journal-page-sheet .journal-reactable-image .journal-paper-photo-inline,
      .journal-page-sheet.left-page .journal-reactable-image .journal-paper-photo-inline {
        width: 100%;
        margin: 0;
      }

      .journal-share-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 620px) {
      .journal-open-book {
        margin-inline: -2px;
      }

      .journal-book-title {
        max-width: calc(100% - 96px);
        padding: 5px 11px;
        font-size: 14px;
      }

      .journal-book-title.is-editing {
        width: calc(100% - 32px);
        max-width: none;
      }

      .journal-book-title-form {
        grid-template-columns: minmax(0, 1fr) auto;
      }

      .journal-book-title-form button:last-child {
        grid-column: 1 / -1;
      }

      .journal-book-page-btn {
        top: 0;
        bottom: 0;
        width: 30px;
        font-size: 27px;
      }

      .journal-book-prev {
        left: 0;
      }

      .journal-book-next {
        right: 0;
      }

      .journal-paper-owner {
        font-size: 19px;
      }

      .journal-paper-photo {
        width: min(70%, 190px);
      }

      .journal-paper-photo-inline,
      .journal-page-sheet.left-page .journal-paper-photo-inline {
        width: min(88%, 240px);
        margin-bottom: 14px;
      }

      .journal-page-sheet .journal-read-body,
      .journal-page-sheet .journal-rte-editor {
        font-size: 16px;
      }

      .journal-share-options,
      .journal-closed-books {
        grid-template-columns: 1fr;
      }
    }

    .journal-card {
      display: grid;
      gap: 0;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 34%, var(--line));
      border-radius: var(--radius);
      padding: 0;
      background:
        linear-gradient(180deg, color-mix(in srgb, var(--profile-color, var(--today)) 12%, transparent), rgba(255,255,255,.025)),
        rgba(16,23,42,.86);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .journal-card.read-only {
      opacity: .82;
    }

    .journal-card.is-editing {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 62%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color, var(--today)) 16%, transparent), var(--shadow);
    }

    .journal-cover {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 230px;
      background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--profile-color, var(--today)) 20%, transparent), transparent 42%),
        rgba(5,12,22,.35);
      border-bottom: 1px solid var(--line);
    }

    .journal-card-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 16px 0;
    }

    .journal-card-tools {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .journal-entry-favorite {
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      border-color: var(--line);
      background: rgba(255,255,255,.045);
      font-size: 21px;
      line-height: 1;
    }

    .journal-entry-favorite.active {
      color: var(--warn);
      border-color: rgba(246,193,119,.5);
      background: rgba(246,193,119,.12);
      box-shadow: 0 0 0 2px rgba(246,193,119,.08);
    }

    .journal-person {
      color: var(--text);
      font-size: 20px;
      font-weight: 950;
    }

    .journal-updated {
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .journal-edit-field {
      display: grid;
      gap: 7px;
      padding: 14px 16px 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .journal-card textarea {
      width: 100%;
      min-height: 220px;
      resize: vertical;
      line-height: 1.45;
    }

    .journal-edit-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .journal-reflection-field,
    .journal-reflection-read {
      display: grid;
      gap: 8px;
      margin: 14px 16px 0;
      padding: 14px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 32%, rgba(255,255,255,.12));
      border-radius: 14px;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 8%, rgba(255,255,255,.025));
    }

    .journal-reflection-add {
      display: grid;
      gap: 8px;
      margin: 12px 16px 0;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .journal-question-select,
    .journal-reflection-add .ui-select {
      width: 100%;
    }

    .journal-question-select .ui-select-trigger,
    .journal-reflection-add .ui-select-trigger {
      width: 100%;
      max-width: none;
      white-space: normal;
      text-align: left;
    }

    .journal-reflection-field .ui-dropdown-menu,
    .journal-reflection-add .ui-dropdown-menu {
      position: relative;
      top: auto;
      right: auto;
      left: auto;
      margin-top: 8px;
    }

    .journal-question-select .ui-dropdown-menu,
    .journal-reflection-add .ui-dropdown-menu {
      position: static;
      width: min(34rem, 100%);
      margin-top: 8px;
      max-height: min(18rem, 45vh);
      overflow-y: auto;
    }

    .journal-reflection-field strong,
    .journal-reflection-answer strong {
      color: var(--text);
      font-size: 14px;
      line-height: 1.4;
    }

    .journal-reflection-input {
      width: 100%;
      min-height: 88px;
      padding: 10px 12px;
      resize: vertical;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 10px;
      background: rgba(4, 9, 28, .32);
      color: var(--text);
      font: inherit;
      line-height: 1.5;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
    }

    .journal-reflection-input:empty::before {
      content: attr(data-placeholder);
      color: var(--muted);
      pointer-events: none;
    }

    .journal-reflection-input .journal-inline-emoji {
      width: 1.45em;
      height: 1.45em;
      object-fit: contain;
      vertical-align: -.3em;
    }

    .journal-reflection-input:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 65%, white);
    }

    .journal-weekly-reflection {
      border-color: rgba(246,193,119,.38);
      background: rgba(246,193,119,.08);
    }

    .journal-reflection-read {
      margin-top: 10px;
    }

    .journal-reflection-answer {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 76px;
      gap: 5px;
    }
    .journal-reflection-answer > .journal-reflection-read-head,
    .journal-reflection-answer > strong,
    .journal-reflection-answer > p { grid-column: 1; min-width: 0; }

    .journal-reflection-answer + .journal-reflection-answer {
      padding-top: 12px;
      border-top: 1px solid rgba(255,255,255,.1);
    }

    .journal-reflection-read-head > span {
      color: var(--today);
      font-size: 11px;
      font-weight: 950;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .journal-reflection-read-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .journal-entry-visibility-status {
      width: fit-content;
      margin: 10px 16px 0;
      padding: 5px 9px;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      color: var(--muted);
      background: rgba(255,255,255,.05);
      font-size: 11px;
      font-weight: 850;
    }

    .journal-entry-visibility-status.is-private,
    .journal-visibility-badge.is-private {
      border-color: color-mix(in srgb, var(--warn) 42%, var(--line));
      color: var(--warn);
      background: color-mix(in srgb, var(--warn) 9%, transparent);
    }

    .journal-visibility-badge {
      padding: 3px 7px;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      color: var(--muted);
      background: rgba(255,255,255,.05);
      font-size: 10px;
      font-weight: 800;
      white-space: nowrap;
    }

    .journal-page-sheet .journal-entry-visibility-status {
      margin: 8px 0 0;
      color: #68412d;
      border-color: rgba(104,65,45,.28);
      background: rgba(123,63,36,.08);
    }

    .journal-page-sheet .journal-entry-visibility-status.is-private,
    .journal-page-sheet .journal-visibility-badge.is-private {
      color: #7b3f24;
      border-color: rgba(123,63,36,.36);
      background: rgba(123,63,36,.11);
    }

    .journal-page-sheet .journal-visibility-badge.is-shared {
      color: #315f47;
      border-color: rgba(49,95,71,.3);
      background: rgba(49,95,71,.09);
    }

    .journal-reflection-answer p {
      margin: 0;
      color: var(--text);
      line-height: 1.55;
      white-space: pre-wrap;
    }

    .journal-rte-toolbar {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 3px;
      padding: 6px 8px;
      border-radius: 10px;
      background: rgba(255,255,255,.05);
      border: 1px solid rgba(255,255,255,.1);
    }

    .journal-rte-group {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      padding-right: 6px;
      border-right: 1px solid rgba(255,255,255,.14);
    }

    .journal-rte-group:last-child {
      padding-right: 0;
      border-right: 0;
    }

    .journal-rte-privacy-group {
      margin-left: auto;
    }

    .journal-rte-emoji-group {
      position: relative;
    }

    .journal-rte-emoji-picker {
      position: fixed;
      z-index: 1200;
    }

    .jtb-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      padding: 0;
      border: none;
      border-radius: 6px;
      background: transparent;
      color: var(--muted);
      font-size: 13px;
      cursor: pointer;
      transition: background .12s, color .12s;
      flex-shrink: 0;
    }

    .jtb-btn:hover {
      background: rgba(255,255,255,.1);
      color: var(--text);
    }

    .jtb-btn.active {
      background: rgba(255,255,255,.14);
      color: var(--text);
    }

    .jtb-sep {
      width: 1px;
      height: 18px;
      background: rgba(255,255,255,.14);
      margin: 0 2px;
      flex-shrink: 0;
    }

    .jtb-select {
      height: 28px;
      padding: 0 4px;
      border-radius: 6px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.07);
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
    }

    .jtb-select:focus {
      outline: none;
      border-color: rgba(255,255,255,.25);
      color: var(--text);
    }

    .jtb-color-dot {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1.5px solid rgba(0,0,0,.25);
      cursor: pointer;
      flex-shrink: 0;
      padding: 0;
      transition: transform .12s, box-shadow .12s;
    }

    .jtb-color-dot:hover {
      transform: scale(1.25);
      box-shadow: 0 0 0 2px rgba(255,255,255,.3);
    }

    .jtb-color-pick {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      border: 1.5px dashed rgba(255,255,255,.3);
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
      position: relative;
    }

    .jtb-color-input {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .jtb-color-compact {
      position: relative;
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 6px;
      color: var(--text);
      background: rgba(255,255,255,.07);
      font-size: 13px;
      font-weight: 900;
      text-decoration: underline 3px #7f1d1d;
      text-underline-offset: 3px;
      cursor: pointer;
    }

    .jtb-color-compact:hover {
      background: rgba(255,255,255,.12);
    }

    .journal-private-btn {
      width: auto;
      padding-inline: 8px;
      white-space: nowrap;
    }

    .journal-rte-editor {
      min-height: 220px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,.1);
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 15px;
      line-height: 1.55;
      overflow-wrap: anywhere;
      outline: none;
      cursor: text;
      transition: border-color .15s;
    }

    .journal-inline-emoji {
      display: inline-block;
      width: 1.4em;
      height: 1.4em;
      margin-inline: .08em;
      object-fit: contain;
      vertical-align: -.3em;
    }

    .journal-rte-editor:focus {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 55%, rgba(255,255,255,.2));
      background: rgba(255,255,255,.06);
    }

    .journal-rte-editor:empty::before {
      content: attr(data-placeholder);
      color: var(--muted);
      pointer-events: none;
      font-style: italic;
    }

    .journal-rte-editor ul,
    .journal-rte-editor ol {
      padding-left: 1.4em;
      margin: 4px 0;
    }

    .journal-rte-editor li {
      margin: 2px 0;
    }

    .journal-read-body {
      min-height: 150px;
      padding: 18px 16px 4px;
      color: var(--text);
      font-size: 15px;
      line-height: 1.58;
      font-weight: 650;
      overflow-wrap: anywhere;
      white-space: normal;
    }

    .journal-read-body.empty {
      color: var(--muted);
      font-style: italic;
    }

    .journal-image {
      width: 100%;
      max-height: 390px;
      display: block;
      object-fit: contain;
    }

    .journal-cover .journal-image {
      cursor: zoom-in;
    }

    .journal-image-viewer-backdrop {
      position: fixed;
      inset: 0;
      z-index: 260;
      display: grid;
      place-items: center;
      padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
      background: rgba(2, 6, 23, .84);
      backdrop-filter: blur(18px);
    }

    .journal-image-viewer {
      position: relative;
      width: min(960px, 100%);
      max-height: min(88vh, 900px);
      display: grid;
      grid-template-rows: minmax(0, 1fr) auto;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 18px;
      background: rgba(9,14,25,.94);
      box-shadow: 0 26px 80px rgba(0,0,0,.46);
    }

    .journal-image-viewer-stage {
      min-height: 0;
      overflow: hidden;
      display: grid;
      place-items: center;
      touch-action: none;
      background: rgba(0,0,0,.22);
      cursor: zoom-in;
    }

    .journal-rte-editor [data-journal-private="true"],
    .journal-read-body [data-journal-private="true"] {
      position: relative;
      margin-inline: -5px;
      padding: 7px 10px;
      border: 1px dashed color-mix(in srgb, var(--profile-color, #7c5b3c) 55%, transparent);
      border-radius: var(--control-radius);
      background: color-mix(in srgb, var(--profile-color, #7c5b3c) 10%, transparent);
    }

    .journal-rte-editor [data-journal-private="true"]::before,
    .journal-read-body [data-journal-private="true"]::before {
      content: "🔒 Nur für dich";
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
      font: 700 0.72rem/1.2 system-ui, sans-serif;
    }

    .journal-read-body [data-journal-private="true"] {
      margin-block: 7px;
    }

    .journal-read-body.suppress-private-markers [data-journal-private="true"] {
      margin: 0;
      padding: 0;
      border: 0;
      background: transparent;
    }

    .journal-read-body.suppress-private-markers [data-journal-private="true"]::before {
      display: none;
    }

    .journal-private-btn.active {
      border-color: var(--profile-color, #7c5b3c);
      background: color-mix(in srgb, var(--profile-color, #7c5b3c) 18%, transparent);
    }

    .journal-privacy-indicator {
      display: inline-grid;
      width: 28px;
      height: 28px;
      place-items: center;
      color: var(--muted);
    }

    .journal-privacy-pill {
      color: var(--muted);
    }

    .journal-reflection-field-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .journal-field-privacy {
      width: fit-content;
      flex: 0 0 auto;
      margin: 6px 0 10px;
    }

    .journal-reflection-field-head .journal-field-privacy {
      margin: 0;
    }

    .journal-reflection-field-actions {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .journal-reflection-delete {
      display: grid;
      width: 30px;
      height: 30px;
      flex: 0 0 auto;
      place-items: center;
      padding: 0;
      border: 1px solid rgba(190,84,84,.32);
      border-radius: var(--control-radius);
      color: #d98585;
      background: rgba(117,39,39,.16);
      cursor: pointer;
    }

    .journal-reflection-delete:hover {
      border-color: rgba(220,104,104,.58);
      background: rgba(142,48,48,.28);
      filter: brightness(1.08);
    }

    .journal-reflection-delete svg {
      width: 15px;
      height: 15px;
    }

    .journal-field-privacy select {
      min-height: 30px;
      max-width: 10rem;
      padding: 4px 8px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 28%, var(--line));
      border-radius: var(--control-radius);
      background: #202942;
      color: #f5f7fb;
      color-scheme: dark;
      font-size: 11px;
      font-weight: 800;
    }

    .journal-field-privacy select option {
      background: #202942;
      color: #f5f7fb;
    }

    @media (max-width: 560px) {
      .journal-rte-privacy-group {
        width: 100%;
        margin-left: 0;
        padding-top: 4px;
        border-top: 1px solid rgba(255,255,255,.1);
      }

      .journal-reflection-field-head {
        align-items: flex-start;
      }
    }

    .journal-image-viewer-stage.is-zoomed {
      cursor: grab;
    }

    .journal-image-viewer-stage.is-zoomed:active {
      cursor: grabbing;
    }

    .journal-image-viewer img {
      width: 100%;
      min-height: 0;
      max-height: calc(88vh - 74px);
      object-fit: contain;
      transform-origin: center;
      user-select: none;
      -webkit-user-drag: none;
    }

    .journal-image-viewer-close {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 1;
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      border-radius: 999px;
      padding: 0;
      background: rgba(8,13,23,.76);
      border: 1px solid rgba(255,255,255,.18);
      color: white;
      box-shadow: 0 12px 28px rgba(0,0,0,.28);
    }

    .journal-image-viewer-close svg {
      width: 19px;
      height: 19px;
      display: block;
      margin: auto;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.4;
      stroke-linecap: round;
    }

    .journal-image-viewer-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .journal-image-viewer-meta strong {
      color: var(--text);
      font-size: 15px;
      font-weight: 950;
    }

    @media (max-width: 640px) {
      .journal-image-viewer-backdrop {
        align-items: end;
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
      }

      .journal-image-viewer {
        width: 100%;
        max-height: 86vh;
        border-radius: 16px;
      }

      .journal-image-viewer img {
        max-height: calc(86vh - 70px);
      }

    }

    .journal-image-empty {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
      text-align: center;
      padding: 24px;
    }

    .journal-image-empty span {
      color: var(--text);
      font-size: 18px;
      font-weight: 950;
    }

    .journal-image-empty small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .journal-preview {
      margin: 14px 16px 0;
      border: 1px dashed color-mix(in srgb, var(--profile-color, var(--today)) 48%, var(--line));
      border-radius: 16px;
      overflow: hidden;
      background: rgba(5,12,22,.32);
    }

    .journal-preview[hidden] {
      display: none;
    }

    .journal-preview-note {
      padding: 10px 12px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .journal-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      padding: 16px;
    }

    .journal-actions.compact {
      padding-top: 12px;
    }

    .journal-upload-btn {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 10px 12px;
      color: var(--text);
      background: rgba(255,255,255,.045);
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .journal-upload-btn.disabled {
      opacity: .45;
      cursor: not-allowed;
    }

    .journal-upload-btn input {
      position: absolute;
      width: 1px;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .journal-gallery {
      display: grid;
      gap: 16px;
    }

    .journal-gallery[hidden] {
      display: none;
    }

    .journal-gallery-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      border: 1px solid var(--line);
      border-radius: 18px;
      padding: 16px;
      background:
        linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.025)),
        rgba(21,27,47,.78);
      box-shadow: 0 18px 50px rgba(0,0,0,.22);
    }

    .journal-gallery-filters {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .journal-gallery-filter {
      min-height: 36px;
      border-radius: 999px;
      padding: 8px 12px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
      background: rgba(255,255,255,.045);
    }

    .journal-gallery-filter.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 44%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 15%, rgba(255,255,255,.045));
    }

    .journal-gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .journal-gallery-card {
      position: relative;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 34%, var(--line));
      border-radius: 18px;
      background:
        linear-gradient(180deg, color-mix(in srgb, var(--profile-color, var(--today)) 10%, transparent), rgba(255,255,255,.025)),
        rgba(16,23,42,.88);
      box-shadow: 0 16px 42px rgba(0,0,0,.28);
    }

    .journal-gallery-card.favorite {
      border-color: color-mix(in srgb, var(--warn) 68%, white);
      box-shadow: 0 0 0 2px rgba(246,193,119,.14), 0 16px 42px rgba(0,0,0,.28);
    }

    .journal-gallery-open {
      position: relative;
      width: 100%;
      display: block;
      min-height: 0;
      border: 0;
      border-radius: 0;
      padding: 0;
      background: transparent;
      overflow: hidden;
    }

    .journal-gallery-open:hover {
      transform: none;
    }

    .journal-gallery-open img {
      width: 100%;
      aspect-ratio: 4 / 3;
      display: block;
      object-fit: cover;
      background: rgba(5,12,22,.35);
      transition: transform .18s ease, filter .18s ease;
    }

    .journal-gallery-open:hover img {
      transform: scale(1.025);
      filter: brightness(1.08);
    }

    .journal-gallery-overlay {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      display: grid;
      gap: 4px;
      padding: 36px 12px 12px;
      text-align: left;
      background: linear-gradient(180deg, transparent, rgba(5,12,22,.88));
    }

    .journal-gallery-overlay strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 950;
    }

    .journal-gallery-overlay small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .journal-gallery-favorite {
      position: absolute;
      z-index: 2;
      top: 10px;
      right: 10px;
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      border-radius: 999px;
      padding: 0;
      color: var(--warn);
      border-color: rgba(246,193,119,.48);
      background: rgba(5,12,22,.72);
      font-size: 22px;
      line-height: 1;
      box-shadow: 0 10px 24px rgba(0,0,0,.28);
    }

    .journal-gallery-copy {
      min-height: 74px;
      padding: 12px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
      font-weight: 750;
    }

    .journal-gallery-empty {
      grid-column: 1 / -1;
      display: grid;
      gap: 6px;
      min-height: 220px;
      place-items: center;
      text-align: center;
      border: 1px dashed var(--line);
      border-radius: 18px;
      padding: 24px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
    }

    .journal-gallery-empty strong {
      color: var(--text);
      font-size: 20px;
      font-weight: 950;
    }

    /* .ghost-btn-Varianten (danger/accept/[hidden]) liegen in css/components.css. */

    .event-form label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .event-form {
      gap: 14px;
    }

    .planner-form-field {
      min-width: 0;
      gap: 8px !important;
    }

    .planner-form-label {
      color: color-mix(in srgb, var(--muted) 82%, var(--text));
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .checkbox-line {
      display: flex !important;
      grid-template-columns: none !important;
      align-items: center;
      gap: 9px !important;
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px 12px;
      background: rgba(255,255,255,.045);
      color: var(--text) !important;
    }

    .planner-toggle-line {
      position: relative;
      min-height: 44px;
      align-items: center;
      gap: 10px !important;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, var(--line));
      background: rgba(255,255,255,.035);
      cursor: pointer;
      transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
    }

    .planner-toggle-line:hover {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 34%, var(--line));
      background: rgba(255,255,255,.05);
    }

    .planner-toggle-line span:not(.planner-toggle-box) {
      display: block;
      min-width: 0;
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .checkbox-line input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .planner-toggle-box {
      width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      flex: 0 0 auto;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
      border-radius: 8px;
      background: rgba(255,255,255,.055);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
      transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
    }

    .planner-toggle-box::after {
      content: "";
      width: 9px;
      height: 5px;
      border-left: 2px solid #07120c;
      border-bottom: 2px solid #07120c;
      opacity: 0;
      transform: rotate(-45deg) translateY(-1px);
    }

    .planner-toggle-line input:checked + .planner-toggle-box {
      border-color: color-mix(in srgb, var(--good) 78%, white);
      background: var(--good);
      box-shadow: 0 0 0 4px rgba(51,209,122,.14);
      transform: scale(1.03);
    }

    .planner-toggle-line input:checked + .planner-toggle-box::after {
      opacity: 1;
    }

    .planner-toggle-line:has(input:checked) {
      border-color: color-mix(in srgb, var(--good) 42%, var(--line));
      background:
        linear-gradient(90deg, rgba(51,209,122,.12), transparent 68%),
        rgba(255,255,255,.045);
    }

    .event-person-options {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, var(--line));
      border-radius: 16px;
      padding: 8px;
      background: rgba(255,255,255,.035);
    }

    .event-person-btn {
      min-height: 46px;
      justify-content: flex-start;
      border-radius: 12px;
      padding: 8px 10px;
      color: var(--muted);
      background: transparent;
      border-color: transparent;
      overflow: hidden;
    }

    .event-person-btn span:last-child {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .event-person-btn.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 64%, white);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 28%, rgba(255,255,255,.06)), rgba(255,255,255,.06)),
        rgba(255,255,255,.065);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 20%, transparent) inset;
    }

    .event-form input,
    .event-form select,
    .event-form textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 11px 12px;
      color: var(--text);
      background: rgba(255,255,255,.06);
      font: inherit;
      outline: none;
    }

    .event-form textarea {
      resize: vertical;
    }

    .event-form input:focus,
    .event-form select:focus,
    .event-form textarea:focus {
      border-color: rgba(138,180,255,.6);
      box-shadow: 0 0 0 3px rgba(138,180,255,.12);
    }

    .event-form input:disabled {
      opacity: .55;
      cursor: not-allowed;
    }

    .time-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .planner-time-control {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      gap: 6px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, var(--line));
      border-radius: 16px;
      padding: 6px;
      background: rgba(255,255,255,.045);
      transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
    }

    .planner-time-control:focus-within {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 62%, white);
      background: rgba(255,255,255,.06);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, transparent);
    }

    .planner-time-control input {
      min-height: 36px;
      border: 0;
      border-radius: 11px;
      padding: 8px 6px;
      text-align: center;
      color: var(--text);
      background: rgba(0,0,0,.12);
      font-size: 15px;
      font-weight: 950;
      outline: none;
    }

    .planner-time-control input:focus {
      box-shadow: none;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, rgba(255,255,255,.06));
    }

    .planner-time-control span {
      color: var(--muted);
      font-weight: 950;
    }

    /* Mobiler Fokusmodus: Die Buchoptik bleibt beim Lesen erhalten. Erst beim
       Schreiben wird die aktive Papierseite zu einer ruhigen VollbildflÃ¤che. */
    .journal-mobile-editor-head,
    .journal-mobile-image-action,
    .journal-mobile-options-action,
    .journal-rte-mobile-more-group {
      display: none;
    }

    .journal-editor-toolbar-row {
      position: sticky;
      z-index: 24;
      top: 0;
      display: grid;
      gap: 8px;
      padding-block: 4px;
      background: #f4ead8;
    }

    body:not(.journal-mobile-editing) .journal-open-book.is-dream-book .journal-editor-toolbar-row,
    .journal-open-book.is-dream-book .journal-page-sheet .journal-rte-toolbar {
      background: #e9e4f8;
    }

    .journal-mobile-options-sheet {
      width: min(100%, 560px);
      max-height: min(78vh, 620px);
      display: grid;
      gap: 14px;
      padding-right: 18px;
      padding-left: 18px;
    }

    .journal-mobile-options-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .journal-mobile-options-head h2 {
      margin: 0;
      font-size: 21px;
      letter-spacing: -.025em;
    }

    .journal-mobile-options-head button {
      width: 40px;
      min-width: 40px;
      min-height: 40px;
      border-radius: 50%;
      padding: 0;
      color: var(--muted);
      border-color: transparent;
      background: rgba(255, 255, 255, .06);
      font-size: 25px;
    }

    .journal-mobile-visibility-options {
      display: grid;
      gap: 8px;
    }

    .journal-mobile-visibility-options button {
      min-height: 58px;
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) 22px;
      align-items: center;
      gap: 10px;
      border-radius: 16px;
      padding: 9px 12px;
      text-align: left;
      color: var(--text);
      border-color: var(--line);
      background: rgba(255, 255, 255, .035);
    }

    .journal-mobile-visibility-options button.active {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 60%, white);
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255, 255, 255, .04));
    }

    .journal-mobile-visibility-options button > span:first-child {
      font-size: 22px;
      text-align: center;
    }

    .journal-mobile-visibility-options strong,
    .journal-mobile-visibility-options small {
      display: block;
    }

    .journal-mobile-visibility-options small {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
    }

    .journal-mobile-visibility-check {
      color: var(--good);
      font-size: 17px;
      font-weight: 950;
      text-align: center;
    }

    .journal-mobile-privacy-help {
      border: 1px solid var(--line);
      border-radius: 15px;
      padding: 11px 13px;
      background: rgba(255, 255, 255, .025);
    }

    .journal-mobile-privacy-help summary {
      color: var(--text);
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .journal-mobile-privacy-help p {
      margin: 9px 0 1px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    .journal-mobile-remove-image {
      width: 100%;
      min-height: 44px;
      color: var(--danger, #ff6b8b);
      border-color: color-mix(in srgb, var(--danger, #ff6b8b) 30%, var(--line));
      background: color-mix(in srgb, var(--danger, #ff6b8b) 8%, transparent);
    }

    @media (max-width: 900px) {
      .journal-share-panel {
        gap: 0;
        border-radius: 16px;
        padding: 0;
        overflow: hidden;
      }

      .journal-share-summary {
        min-height: 64px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) 24px;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        cursor: pointer;
      }

      .journal-share-summary-icon {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        background: color-mix(in srgb, var(--profile-color, var(--today)) 15%, rgba(255,255,255,.05));
        font-size: 18px;
      }

      .journal-share-summary > span:nth-child(2) {
        min-width: 0;
        display: grid;
        gap: 2px;
      }

      .journal-share-summary strong,
      .journal-share-summary small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .journal-share-summary strong {
        color: var(--text);
        font-size: 14px;
      }

      .journal-share-summary small {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
      }

      .journal-share-summary-chevron {
        color: var(--muted);
        font-size: 24px;
        text-align: center;
        transition: transform .16s ease;
      }

      .journal-share-panel[open] .journal-share-summary-chevron {
        transform: rotate(90deg);
      }

      .journal-share-panel[open] .journal-share-summary {
        border-bottom: 1px solid var(--line);
      }

      .journal-share-content {
        padding: 12px;
      }

      .journal-share-heading .section-title {
        font-size: 18px;
      }

      body.spa-page.journal-mobile-editing,
      body.spa-page.journal-mobile-editing.music-player-active {
        --mobile-nav-space: 0px;
        --mobile-player-space: 0px;
        padding: 0 !important;
        overflow: hidden;
      }

      body.journal-mobile-editing .spa-header,
      body.journal-mobile-editing .site-nav,
      body.journal-mobile-editing .music-player-bar,
      body.journal-mobile-editing .journal-mode-tabs,
      body.journal-mobile-editing .journal-book-title,
      body.journal-mobile-editing .journal-book-page-btn,
      body.journal-mobile-editing .journal-book-spine,
      body.journal-mobile-editing .journal-closed-books {
        display: none !important;
      }

      body.journal-mobile-editing .spa-app,
      body.journal-mobile-editing .spa-frame,
      body.journal-mobile-editing .spa-view,
      body.journal-mobile-editing .journal-page,
      body.journal-mobile-editing .journal-shell,
      body.journal-mobile-editing .journal-book-stage,
      body.journal-mobile-editing .journal-open-book {
        width: 100%;
        min-width: 0;
        min-height: 0;
        margin: 0;
        border: 0;
        padding: 0;
      }

      body.journal-mobile-editing .journal-open-book {
        display: block;
        background: transparent;
        box-shadow: none;
      }

      body.journal-mobile-editing .journal-page-sheet.is-editing,
      body.journal-mobile-editing .journal-page-sheet.is-editing.left-page,
      body.journal-mobile-editing .journal-page-sheet.is-editing.right-page {
        position: fixed;
        z-index: 170;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        margin: 0;
        border: 0;
        border-radius: 0;
        padding: 0;
        overflow: hidden;
        background:
          repeating-linear-gradient(180deg, transparent 0 31px, rgba(100, 100, 110, .075) 32px, transparent 33px),
          #f8f1e2;
        box-shadow: none;
      }

      body.journal-mobile-editing .journal-page-sheet.is-editing .journal-paper-head {
        display: none;
      }

      body.journal-mobile-editing .journal-mobile-editor-head {
        position: fixed !important;
        z-index: 179 !important;
        top: 0;
        right: 0;
        left: 0;
        isolation: isolate;
        display: grid;
        gap: 5px;
        padding: calc(7px + env(safe-area-inset-top)) 12px 7px;
        color: #34251d;
        border-bottom: 1px solid rgba(112, 78, 47, .18);
        background: rgba(252, 247, 236, .96);
        box-shadow: 0 8px 22px rgba(73, 47, 28, .08);
        backdrop-filter: blur(18px);
      }

      .journal-mobile-editor-mainbar {
        min-height: 38px;
        display: grid;
        grid-template-columns: minmax(78px, 1fr) minmax(0, 1.15fr) minmax(78px, 1fr);
        align-items: center;
        gap: 6px;
      }

      .journal-mobile-editor-mainbar button {
        min-height: 38px;
        border: 0;
        padding: 5px 3px;
        color: #76543e;
        background: transparent;
        font-size: 14px;
        font-weight: 850;
      }

      .journal-mobile-editor-cancel {
        justify-self: start;
      }

      .journal-mobile-editor-mainbar .journal-mobile-editor-save {
        justify-self: end;
        color: #296344;
        font-weight: 950;
      }

      .journal-mobile-editor-save:disabled {
        opacity: .52;
      }

      .journal-mobile-editor-title {
        min-width: 0;
        display: grid;
        justify-items: center;
        line-height: 1.12;
        text-align: center;
      }

      .journal-mobile-editor-title small,
      .journal-mobile-editor-title strong {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .journal-mobile-editor-title small {
        color: rgba(80, 55, 39, .58);
        font-size: 10px;
        font-weight: 850;
      }

      .journal-mobile-editor-title strong {
        color: #34251d;
        font-size: 13px;
      }

      .journal-mobile-editor-metabar {
        min-height: 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .journal-mobile-visibility-trigger {
        min-width: 0;
        min-height: 30px;
        display: flex;
        align-items: center;
        gap: 6px;
        border: 0;
        border-radius: var(--radius-pill);
        padding: 4px 9px;
        color: #6c4d39;
        background: rgba(112, 78, 47, .075);
        font-size: 11px;
        font-weight: 900;
      }

      .journal-mobile-visibility-trigger span:nth-child(2) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .journal-mobile-draft-status {
        flex: 0 0 auto;
        color: rgba(80, 55, 39, .52);
        font-size: 10px;
        font-weight: 800;
      }

      body.journal-mobile-editing .journal-page-scroll,
      body.journal-mobile-editing .journal-page-sheet.left-page .journal-page-scroll,
      body.journal-mobile-editing .journal-page-sheet.right-page .journal-page-scroll {
        min-height: 0;
        margin: 0;
        padding: calc(86px + env(safe-area-inset-top)) 14px calc(154px + env(safe-area-inset-bottom));
        scroll-padding-block: 96px calc(154px + env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-padding-top: 118px;
        scroll-padding-bottom: calc(94px + env(safe-area-inset-bottom));
        scrollbar-gutter: auto;
        background: transparent;
      }

      body.journal-mobile-editing .journal-entry-content {
        min-height: 100%;
      }

      body.journal-mobile-editing .journal-page-sheet.is-editing .journal-edit-field {
        display: block;
        padding: 0;
      }

      body.journal-mobile-editing .journal-edit-field > .journal-edit-label {
        display: none;
      }

      body.journal-mobile-editing .journal-page-sheet .journal-rte-editor {
        min-height: clamp(250px, 52vh, 620px);
        max-height: none;
        border: 0;
        border-radius: 0;
        padding: 14px 4px 36px;
        color: #3d2b20;
        background: transparent;
        box-shadow: none;
        font: 17px/1.78 Georgia, "Times New Roman", serif;
        overflow: visible;
      }

      body.journal-mobile-editing .journal-rte-editor:focus {
        outline: none;
        box-shadow: none;
      }

      body.journal-mobile-editing .journal-rte-editor:empty::before {
        color: rgba(80, 55, 39, .42);
        font-size: 20px;
        font-style: italic;
      }

      body.journal-mobile-editing .journal-editor-toolbar-row {
        position: fixed;
        z-index: 181;
        isolation: isolate;
        top: auto;
        right: 7px;
        bottom: calc(var(--journal-editor-keyboard-offset, 0px) + max(6px, env(safe-area-inset-bottom)));
        left: 7px;
        display: flex;
        align-items: flex-end;
        gap: 5px;
        border: 1px solid rgba(112, 78, 47, .2);
        border-radius: 16px;
        padding: 5px;
        background: #faf6ed;
        box-shadow: 0 10px 34px rgba(55, 36, 23, .28);
      }

      body.journal-mobile-editing .journal-mobile-editor-head > * {
        position: relative;
        z-index: 1;
        visibility: visible;
        opacity: 1;
      }

      body.journal-mobile-editing .journal-page-sheet .journal-rte-toolbar {
        position: relative;
        z-index: 1;
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 2px;
        border: 0;
        border-radius: 11px;
        padding: 0;
        background: #faf6ed;
      }

      body.journal-mobile-editing .journal-rte-group {
        min-height: 42px;
        gap: 1px;
        border-right-color: rgba(112, 78, 47, .15);
        padding-right: 3px;
      }

      body.journal-mobile-editing .journal-rte-advanced-group {
        display: none;
      }

      body.journal-mobile-editing .journal-rte-toolbar.mobile-expanded .journal-rte-advanced-group {
        position: absolute;
        z-index: 4;
        bottom: calc(100% + 10px);
        left: 0;
        width: max-content;
        max-width: calc(100vw - 28px);
        min-height: 48px;
        display: inline-flex;
        gap: 3px;
        border: 1px solid rgba(112, 78, 47, .2);
        border-radius: 14px;
        padding: 4px;
        background: rgba(250, 246, 237, .98);
        box-shadow: 0 10px 30px rgba(55, 36, 23, .24);
      }

      body.journal-mobile-editing .journal-rte-advanced-group .jtb-select,
      body.journal-mobile-editing .journal-rte-advanced-group .jtb-color-compact {
        color: #624733;
        border-color: rgba(112, 78, 47, .18);
        background: rgba(112, 78, 47, .08);
      }

      body.journal-mobile-editing .jtb-btn,
      body.journal-mobile-editing .journal-mobile-image-action {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
        display: inline-grid;
        place-items: center;
        border: 0;
        border-radius: 11px;
        padding: 0;
        color: #624733;
        background: transparent;
        font-size: 17px;
      }

      body.journal-mobile-editing .jtb-btn.active {
        color: #39271d;
        background: rgba(112, 78, 47, .13);
      }

      body.journal-mobile-editing .journal-rte-privacy-group {
        margin-left: 0;
      }

      body.journal-mobile-editing .journal-private-label {
        display: none;
      }

      body.journal-mobile-editing .journal-rte-mobile-more-group {
        display: inline-flex;
      }

      body.journal-mobile-editing .journal-mobile-image-action {
        flex: 0 0 auto;
        cursor: pointer;
      }

      body.journal-mobile-editing .journal-mobile-image-action .journal-image-input {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        border: 0 !important;
        white-space: nowrap !important;
      }

      body.journal-mobile-editing .journal-reflection-zone {
        margin-top: 8px;
        border-top-color: rgba(112, 78, 47, .12);
        padding: 8px 0 32px;
        contain: none;
      }

      body.journal-mobile-editing .journal-reflection-field,
      body.journal-mobile-editing .journal-reflection-add {
        scroll-margin-block: 14px 96px;
      }

      body.journal-mobile-editing .journal-question-select .ui-dropdown-menu,
      body.journal-mobile-editing .journal-reflection-add .ui-dropdown-menu {
        max-height: min(13rem, 32dvh);
        overscroll-behavior: contain;
      }

      body.journal-mobile-editing .journal-reflection-zone::before {
        display: none;
      }

      body.journal-mobile-editing .journal-reflection-note {
        margin: 0;
        border-color: rgba(112, 78, 47, .18);
        background: rgba(255, 255, 255, .22);
        transform: none;
      }

      body.journal-mobile-editing .journal-page-edit-actions,
      body.journal-mobile-editing .journal-preview-note {
        display: none !important;
      }

      body.journal-mobile-editing .journal-preview {
        margin-bottom: 8px;
      }

      body.journal-mobile-editing .journal-paper-photo-edit {
        max-height: 190px;
        margin: 4px auto 10px;
        overflow: hidden;
      }
    }

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .journal-session-shell .journal-session-summary-block{ border: 0; border-radius: 0; background: transparent; box-shadow: none; }
:where(body:not(.og-design)) .journal-session-shell .journal-session-summary-block + .journal-session-summary-block{ border-top: 1px solid var(--line); }

.journal-page-sheet.journal-reward-onyx {
  color: #eee8f7;
  background:
    linear-gradient(rgba(14, 11, 22, .16), rgba(14, 11, 22, .16)),
    url("../assets/journal/appearance/journal-paper-onyx-v1.png") center top / 720px auto repeat-y,
    #191522;
  box-shadow: inset 0 0 42px rgba(0, 0, 0, .58), inset 0 0 0 4px rgba(130, 85, 172, .7), inset 0 0 0 8px rgba(47, 35, 69, .85), 0 0 28px rgba(96, 47, 145, .24);
}

.journal-reward-onyx .journal-paper-head {
  --journal-head-ornament: url("../assets/journal/appearance/journal-ornament-onyx-v1.png");
  color: #f2e9fa;
  border-bottom-color: rgba(151, 101, 190, .55);
  background: rgba(21, 17, 31, .94);
}

.journal-reward-onyx .journal-paper-head::before { width: 310px; opacity: .95; }
.journal-reward-onyx .journal-paper-owner,
.journal-reward-onyx .journal-paper-date strong,
.journal-reward-onyx .journal-read-body,
.journal-reward-onyx .journal-reflection-field strong,
.journal-reward-onyx .journal-reflection-answer strong,
.journal-reward-onyx .journal-reflection-answer p { color: #f2e9fa; }
.journal-reward-onyx .journal-paper-date span,
.journal-reward-onyx .journal-edit-label,
.journal-reward-onyx .journal-reflection-read-head > span { color: #d8b3f4; }
.journal-reward-onyx .journal-paper-date,
.journal-reward-onyx .journal-reflection-field,
.journal-reward-onyx .journal-reflection-read,
.journal-reward-onyx .journal-preview {
  color: #ece4f4;
  border-color: rgba(167, 124, 202, .35);
  background: rgba(18, 15, 29, .68);
}
.journal-reward-onyx .journal-entry-favorite,
.journal-reward-onyx .journal-rte-toolbar,
.journal-reward-onyx .journal-rte-editor,
.journal-reward-onyx .journal-reflection-input {
  color: #eee8f7;
  border-color: rgba(167, 124, 202, .35);
  background: rgba(18, 15, 29, .64);
}
body:not(.journal-mobile-editing) .journal-reward-onyx .journal-editor-toolbar-row,
.journal-reward-onyx .journal-rte-toolbar { background: #211b2d; }
.journal-reward-onyx .jtb-btn,
.journal-reward-onyx .jtb-select { color: #eee8f7; }
.journal-reward-onyx .journal-page-edit-actions {
  border-top-color: rgba(151, 101, 190, .55);
  background: rgba(21, 17, 31, .96);
}
.journal-page-stars.journal-reward-onyx {
  color: #e9baff;
  border-color: rgba(172, 102, 224, .8);
  background: linear-gradient(135deg, #21152d, #38204a);
  box-shadow: 0 0 16px rgba(172, 102, 224, .35), inset 0 0 0 1px rgba(248, 215, 255, .3);
}
.journal-card.journal-reward-onyx { border-color: rgba(172, 102, 224, .86); box-shadow: 0 0 32px rgba(137, 62, 195, .24); }
.journal-reaction-chip > .sticker-art { width: 24px; height: 24px; flex: 0 0 24px; }

/* Quelle: recap.css */
/* Rückblick-Seite: Wochen-/Monatszusammenfassung aus Check-ins + Journal.
   Premium-Look: Gradient-Hero mit Fortschrittsring, Tagesleisten (Form +
   Farbe: ✓/✕/· für CVD-Sicherheit), Profil-Akzentkarten, Tracker-Drilldown. */

.recap-shell {
  display: grid;
  gap: 16px;
  max-width: 1020px;
  margin: 0 auto;
}

:where(body:not(.og-design)) .recap-shell { width: 100%; max-width: var(--page-content-width); }

.recap-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.recap-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Segmentierter Woche/Monat-Schalter */
.recap-mode {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.recap-seg {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.recap-seg.active {
  color: #0b1020;
  background: linear-gradient(135deg, #8ab4ff, #a7f3d0);
  box-shadow: 0 2px 12px rgba(138, 180, 255, 0.35);
}

.recap-nav {
  display: flex;
  gap: 6px;
}

.recap-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.recap-nav-btn:not(:disabled):hover {
  border-color: var(--today);
  filter: brightness(1.1);
}

.recap-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.recap-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

/* ---- Team-Hero ---- */

.recap-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(138, 180, 255, 0.10), rgba(51, 209, 122, 0.05) 45%, transparent 70%),
    var(--card);
}

.recap-hero-glow {
  position: absolute;
  inset: -40% auto auto -10%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 180, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.recap-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex: 0 0 auto;
}

.recap-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.recap-ring-track,
.recap-ring-value {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}

.recap-ring-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.recap-ring-value {
  transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .recap-ring-value {
    transition: none;
  }
}

.recap-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 1px;
}

.recap-ring-center b {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.recap-ring-center b span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.recap-ring-center small {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recap-hero-body {
  display: grid;
  gap: 14px;
  flex: 1;
  min-width: 0;
  position: relative;
}

.recap-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recap-hero-best {
  text-align: right;
}

.recap-hero-best b {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--today);
}

.recap-hero-best small {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---- Persönliche Trainingszusammenfassung ---- */

.recap-training {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(138, 180, 255, 0.08), transparent 55%),
    var(--card);
}

.recap-training-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recap-training-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.recap-training-card {
  --training-accent: #8ab4ff;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top-color: color-mix(in srgb, var(--training-accent) 60%, var(--line));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.recap-training-person {
  display: flex;
  align-items: center;
  gap: 9px;
}

.recap-private-badge {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid rgba(138, 180, 255, 0.35);
  border-radius: var(--radius-pill);
  color: var(--today);
  background: rgba(138, 180, 255, 0.08);
  font-size: 0.7rem;
  font-weight: 700;
}

.recap-training-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.recap-training-stat {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.recap-training-stats.empty .recap-training-stat {
  opacity: 0.6;
}

.recap-training-stat b {
  color: var(--today);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.recap-training-stat span {
  color: var(--muted);
  font-size: 0.7rem;
}

.recap-training-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.recap-training-note.error {
  color: var(--bad);
}

/* ---- Tagesleisten (Woche: Pillen mit Wochentag, Monat: kompaktes Raster) ---- */

.recap-days.is-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.recap-days.is-month {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22px, 1fr));
  gap: 4px;
}

.recap-day {
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.15s ease;
}

.recap-day:hover {
  transform: translateY(-2px);
}

.recap-days.is-week .recap-day {
  padding: 7px 4px;
}

.recap-days.is-month .recap-day {
  aspect-ratio: 1;
  border-radius: 7px;
  font-size: 0.7rem;
}

.recap-day-name {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.recap-day-mark {
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  min-height: 0.85rem;
}

.recap-day.done {
  background: linear-gradient(160deg, rgba(51, 209, 122, 0.28), rgba(51, 209, 122, 0.10));
  border-color: rgba(51, 209, 122, 0.45);
  color: var(--good);
}

.recap-day.fail {
  background: linear-gradient(160deg, rgba(255, 92, 122, 0.26), rgba(255, 92, 122, 0.10));
  border-color: rgba(255, 92, 122, 0.45);
  color: var(--bad);
}

.recap-day.future {
  opacity: 0.4;
  border-style: dashed;
}

.recap-day.future:hover {
  transform: none;
}

.recap-microday.future {
  opacity: 0.35;
  border-style: dashed;
}

/* ---- Bro-Karten ---- */

.recap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.recap-card {
  --bro-accent: #8ab4ff;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  display: grid;
  gap: 13px;
  align-content: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.recap-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--bro-accent), transparent 80%);
  opacity: 0.85;
}

.recap-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.recap-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recap-avatar {
  display: inline-flex;
  align-items: center;
}

.recap-card-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.recap-card-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.recap-card-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.recap-card-badge.good {
  color: var(--good);
  border-color: rgba(51, 209, 122, 0.5);
  background: rgba(51, 209, 122, 0.08);
  box-shadow: 0 0 14px rgba(51, 209, 122, 0.15);
}

.recap-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.recap-stat {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.recap-stat b {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.recap-stat span:last-child {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---- Streak-Serien ---- */

.recap-runs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.recap-runs-label {
  font-size: 0.74rem;
  color: var(--muted);
}

.recap-run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.recap-run small {
  font-weight: 500;
  color: var(--muted);
}

.recap-run.open {
  border-color: rgba(51, 209, 122, 0.5);
  background: rgba(51, 209, 122, 0.08);
}

.recap-run-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: recap-pulse 1.8s ease-in-out infinite;
}

@keyframes recap-pulse {
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .recap-run-live {
    animation: none;
  }
}

/* ---- Tracker-Drilldown ---- */

.recap-details-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.recap-details-toggle:hover {
  color: var(--text);
  border-color: var(--today);
}

.recap-toggle-chevron {
  transition: transform 0.2s ease;
}

.recap-toggle-chevron.open {
  transform: rotate(180deg);
}

.recap-trackers {
  display: grid;
  gap: 9px;
}

.recap-tracker-row {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.recap-tracker-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.recap-tracker-label {
  font-size: 0.78rem;
  font-weight: 700;
}

.recap-tracker-count {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.recap-microdays {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.recap-microday {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: transparent;
}

.recap-microday.done {
  background: var(--good);
  border-color: var(--good);
}

.recap-microday.fail {
  background: transparent;
  border-color: var(--bad);
  position: relative;
}

.recap-microday.fail::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: linear-gradient(45deg, transparent 42%, var(--bad) 42%, var(--bad) 58%, transparent 58%);
}

.recap-tracker-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--muted);
  padding: 0 2px;
}

/* ---- Responsive ---- */

@media (max-width: 620px) {
  .recap-hero {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .recap-ring-wrap {
    margin: 0 auto;
  }

  .recap-hero-top {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .recap-hero-best {
    text-align: center;
  }

  .recap-stat b {
    font-size: 1.05rem;
  }

  .recap-training-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .recap-training-list {
    grid-template-columns: 1fr;
  }
}

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .recap-shell .recap-hero, :where(body:not(.og-design)) .recap-shell .recap-training{ border: 0; border-radius: 0; padding: 20px 0; background: transparent; }
:where(body:not(.og-design)) .recap-shell .recap-hero-glow{ display: none; }
:where(body:not(.og-design)) .recap-shell .recap-training{ border-top: 1px solid var(--line); }
:where(body:not(.og-design)) .recap-shell .recap-card, :where(body:not(.og-design)) .recap-shell .recap-training-card{ border-radius: 8px; box-shadow: none; }

/* Quelle: gym.css */
/* Gym-Bereich: Trainingsplanung, Workout-Logging, Historie. Nutzt die globalen
   Tokens (--card, --line, --good, --today ...) aus base-shell.css. */
.gym-page {
  padding: 4px 0 96px;
}

.gym-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.gym-shell-wide { max-width: 1180px; }
.gym-tabs {
  --switcher-accent: var(--today);
  display: flex;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 4px 0;
  background: transparent;
}

.gym-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  color: var(--muted);
  position: relative;
}

.gym-tab.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 55%, var(--line));
  background: color-mix(in srgb, var(--today) 12%, rgba(255, 255, 255, 0.05));
}

.gym-tab-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--good);
  vertical-align: middle;
}

.gym-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gym-card {
  background: rgba(21, 27, 47, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.gym-card-head {
  display: flex;
  flex-wrap: wrap; /* Mobile: Selects/Toggles rutschen unter den Titel statt zu quetschen */
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gym-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
}

.gym-empty.small {
  padding: 6px 0;
  font-size: 13px;
}

.gym-empty-state {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* Buttons ---------------------------------------------------------------- */
.gym-primary {
  background: color-mix(in srgb, var(--good) 16%, rgba(255, 255, 255, 0.06));
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
  color: var(--text);
  font-size: 14px;
}

.gym-primary.sm,
.gym-ghost.sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
}

.gym-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 14px;
}

.gym-ghost.full {
  width: 100%;
  margin-top: 8px;
}

.gym-ghost.danger,
.gym-inline-x.danger {
  color: color-mix(in srgb, var(--bad) 78%, white);
  border-color: color-mix(in srgb, var(--bad) 35%, var(--line));
}

.gym-inline-x {
  padding: 4px 9px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

/* Wochenvolumen ---------------------------------------------------------- */
.gym-volume-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}
.gym-volume-controls > label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gym-volume-controls > label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.gym-volume-controls .gym-select {
  width: auto;
  min-width: 170px;
  padding: 8px 10px;
  font-size: 12px;
}

.gym-volume-insight {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--today) 34%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--today) 8%, rgba(255, 255, 255, 0.02));
}
.gym-volume-insight.is-decrease {
  border-color: color-mix(in srgb, var(--warn) 42%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, rgba(255, 255, 255, 0.02));
}
.gym-volume-insight-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gym-volume-insight-kicker {
  color: color-mix(in srgb, var(--today) 78%, white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gym-volume-insight-copy strong { font-size: 14px; }
.gym-volume-insight-copy > span:last-child { color: var(--muted); font-size: 12px; line-height: 1.4; }
.gym-volume-complaint-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 14px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line));
  border-radius: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--warn) 7%, transparent);
  font-size: 11px;
  line-height: 1.4;
}
.gym-volume-complaint-note b { color: var(--text); }
.gym-volume-label small { color: var(--warn); }
.gym-muscle.has-complaint path { stroke: color-mix(in srgb, var(--warn) 85%, white); stroke-width: 1.2; }
.gym-body-detail small { color: var(--warn); font-size: 10px; }

.gym-volume-insight-dialog {
  position: relative;
  width: min(580px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.gym-volume-insight-dialog > .section-title { margin-top: 4px; }
.gym-volume-insight-dialog > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.gym-volume-insight-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.gym-volume-insight-facts > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}
.gym-volume-insight-facts dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.gym-volume-insight-facts dd { margin: 3px 0 0; color: var(--text); font-size: 12px; font-weight: 800; }
.gym-volume-apply-title { margin: 18px 0 8px; color: var(--text); font-size: 12px; font-weight: 800; }
.gym-volume-apply-list { display: flex; flex-direction: column; gap: 7px; }
.gym-volume-apply-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.gym-volume-apply-list button:hover { border-color: color-mix(in srgb, var(--today) 50%, var(--line)); }
.gym-volume-apply-list button > span { display: flex; flex-direction: column; gap: 2px; }
.gym-volume-apply-list small { color: var(--muted); }
.gym-volume-apply-list b { color: color-mix(in srgb, var(--today) 75%, white); font-size: 12px; white-space: nowrap; }

.gym-volume-goals-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 18, 0.76);
  backdrop-filter: blur(6px);
}
.gym-volume-goals-dialog {
  position: relative;
  width: min(700px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.gym-volume-goals-dialog > .section-subtitle { margin: 5px 34px 14px 0; }
.gym-volume-goals-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.gym-volume-goal-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 3px;
  margin-bottom: 12px;
}
.gym-volume-goal-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) minmax(210px, 1.5fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}
.gym-volume-goal-row > strong { font-size: 12px; }
.gym-volume-goal-row .gym-select { padding: 7px 9px; font-size: 12px; }
.gym-volume-goal-range {
  min-width: 42px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.gym-volume-custom-range {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.gym-volume-custom-range label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
}
.gym-volume-custom-range input {
  width: 52px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card2);
  color: var(--text);
  text-align: center;
}
.gym-volume-goals-dialog > .gym-primary.full { width: 100%; }

.gym-volume-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gym-volume-row {
  font-size: 13px;
  border-radius: 9px;
}

.gym-volume-row:has(.gym-volume-calculation) {
  background: rgba(255, 255, 255, 0.025);
}

.gym-volume-row-main {
  width: 100%;
  display: grid;
  grid-template-columns: 118px minmax(90px, 1fr) 94px auto;
  align-items: center;
  gap: 9px;
  padding: 5px 6px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gym-volume-row-main:hover,
.gym-volume-row-main:focus-visible {
  transform: none;
  filter: brightness(1.12);
}

.gym-volume-label {
  display: grid;
  gap: 1px;
  color: var(--text);
  font-weight: 700;
}
.gym-volume-label > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.gym-volume-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.gym-volume-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--today);
}

.gym-volume-row.status-under .gym-volume-fill { background: var(--warn); }
.gym-volume-row.status-in .gym-volume-fill { background: var(--good); }
.gym-volume-row.status-over .gym-volume-fill { background: var(--bad); }
.gym-volume-row.status-support .gym-volume-fill { background: var(--muted); opacity: 0.7; }

.gym-volume-score {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gym-volume-score strong { color: var(--text); }
.gym-volume-score small { opacity: 0.7; }

.gym-volume-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.gym-volume-row.status-under .gym-volume-tag { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.gym-volume-row.status-in .gym-volume-tag { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.gym-volume-row.status-over .gym-volume-tag { color: color-mix(in srgb, var(--bad) 80%, white); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.gym-volume-row.status-support .gym-volume-tag { color: var(--muted); }

.gym-volume-calculation {
  margin: 2px 6px 6px 133px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
}

.gym-volume-calculation > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}

.gym-volume-calculation > small {
  display: block;
  margin: -1px 0 4px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.gym-volume-calculation strong {
  color: var(--text);
  white-space: nowrap;
}

.gym-volume-calculation .gym-volume-calculation-total {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.gym-volume-calculation p {
  margin: 7px 0 0;
  line-height: 1.4;
}

/* Körperkarte (Muskel-Heatmap) ------------------------------------------ */
.gym-week-toggle {
  --switcher-accent: var(--today);
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 14px;
}
.gym-week-tab {
  padding: 6px 16px;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  background: none;
  color: var(--muted);
}
.gym-week-tab:hover { transform: none; background: rgba(255, 255, 255, 0.05); }
.gym-week-tab.active {
  color: var(--text);
  background: color-mix(in srgb, var(--today) 16%, rgba(255, 255, 255, 0.06));
}

.gym-bodymap {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.gym-body-figure {
  margin: 0;
  text-align: center;
}
.gym-body-svg {
  width: 140px;
  max-width: 42vw;
  height: auto;
  display: block;
}
.gym-body-figure figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Basis-Silhouette: Fill kommt als Gradient (url(#gymBody-*)) vom SVG selbst,
   hier nur eine dezente Trennkante zum Hintergrund. */
.gym-body-base > * {
  stroke: color-mix(in srgb, var(--bg) 60%, transparent);
  stroke-width: 0.5;
}

.gym-muscle {
  cursor: pointer;
  outline: none;
  transition: fill-opacity 0.2s ease;
}
/* Dünne Trennlinie in Seitenfarbe separiert überlappende/benachbarte Regionen. */
.gym-muscle > * {
  stroke: var(--bg);
  stroke-width: 0.75;
  transition: stroke 0.15s ease;
}
.gym-muscle.status-empty > * { fill: color-mix(in srgb, var(--muted) 26%, transparent); }
.gym-muscle.status-under > * { fill: var(--warn); }
.gym-muscle.status-in > * { fill: var(--good); }
.gym-muscle.status-over > * { fill: var(--bad); }
.gym-muscle.status-support > * { fill: color-mix(in srgb, var(--muted) 70%, transparent); }
.gym-muscle.focused > *,
.gym-muscle:focus-visible > * {
  stroke: var(--text);
  stroke-width: 1.6;
  paint-order: stroke;
}

.gym-body-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  font-size: 13px;
}
.gym-body-detail strong { color: var(--text); }
.gym-body-detail span { color: var(--muted); }
.gym-body-detail.muted { color: var(--muted); font-size: 12px; }

.gym-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.gym-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gym-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.gym-legend-dot.status-under { background: var(--warn); }
.gym-legend-dot.status-in { background: var(--good); }
.gym-legend-dot.status-over { background: var(--bad); }
.gym-legend-dot.status-support { background: color-mix(in srgb, var(--muted) 70%, transparent); }
.gym-legend-dot.status-empty { background: color-mix(in srgb, var(--muted) 40%, transparent); }

/* Pläne ------------------------------------------------------------------ */
.gym-freeworkout {
  width: 100%;
  margin-bottom: 12px;
  background: color-mix(in srgb, var(--today) 14%, rgba(255, 255, 255, 0.05));
  border-color: color-mix(in srgb, var(--today) 45%, var(--line));
}

.gym-plan {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.gym-plan.is-editing {
  border-color: color-mix(in srgb, var(--today) 45%, var(--line));
  background: color-mix(in srgb, var(--today) 5%, rgba(255, 255, 255, 0.02));
}

.gym-plan-head,
.gym-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gym-plan-tools,
.gym-day-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.gym-day {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.gym-day-head .gym-day-name { font-weight: 700; }

/* Inline-Umbenennen: Name klickbar, Feld erscheint an gleicher Stelle. */
.gym-plan-name,
.gym-day-name {
  border-radius: 6px;
  padding: 1px 5px;
  margin: -1px -5px;
  outline: none;
}
.gym-plan-name.can-edit,
.gym-day-name.can-edit { cursor: text; }
.gym-plan-name.can-edit:hover,
.gym-day-name.can-edit:hover,
.gym-plan-name:focus-visible,
.gym-day-name:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}
.gym-rename-input {
  font: inherit;
  font-weight: 800;
  min-width: 0;
  max-width: 220px;
  padding: 4px 9px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--today) 55%, var(--line));
  background: var(--card2);
  color: var(--text);
}
.gym-rename-input.sm { font-weight: 700; }

.gym-day-exercises {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gym-day-exercises li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  padding: 3px 0;
}
.gym-day-exercise-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gym-day-exercise-top .gym-ex-name { font-weight: 600; }
.gym-day-exercise-top small { color: var(--muted); flex: 1; }
.gym-plan-order {
  display: inline-flex;
  gap: 3px;
}
.gym-plan-order button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card2);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.gym-plan-order button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--today) 70%, var(--line));
  background: color-mix(in srgb, var(--today) 12%, var(--card2));
}
.gym-plan-order button:disabled { opacity: 0.3; }
.gym-plan-sets {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.gym-plan-sets > span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.gym-plan-sets strong {
  min-width: 16px;
  text-align: center;
  font-size: 12px;
}
.gym-plan-sets button {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}
.gym-plan-sets button:disabled { opacity: 0.35; }

/* Geplante Muskelabdeckung ----------------------------------------------- */
.gym-plan-coverage {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.gym-plan-coverage-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
}
.gym-plan-coverage-toggle:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}
.gym-plan-coverage-toggle > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.gym-plan-coverage-toggle strong { font-size: 12px; }
.gym-plan-coverage-toggle small {
  color: var(--muted);
  font-size: 10px;
}
.gym-plan-coverage-toggle b {
  color: var(--muted);
  font-size: 18px;
}
.gym-plan-coverage-details {
  display: grid;
  gap: 9px;
  padding: 10px;
}
.gym-plan-coverage-details > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.gym-plan-coverage-list {
  display: grid;
  gap: 6px;
}
.gym-plan-coverage-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.8fr) minmax(90px, 1.6fr) minmax(92px, auto) 66px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 11px;
}
.gym-plan-coverage-row > span {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gym-plan-coverage-row > strong {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.gym-plan-coverage-row > small {
  color: var(--muted);
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}
.gym-plan-coverage-track {
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
}
.gym-plan-coverage-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--warn);
}
.gym-plan-coverage-row.is-in .gym-plan-coverage-track i { background: var(--good); }
.gym-plan-coverage-row.is-over .gym-plan-coverage-track i { background: var(--bad); }
.gym-plan-coverage-row.is-support .gym-plan-coverage-track i { background: var(--muted); opacity: 0.65; }
.gym-plan-coverage-row.is-support > span,
.gym-plan-coverage-row.is-support > strong { color: var(--muted); }

/* Muskel-Tags: primär hervorgehoben, sekundär dezent. */
.gym-mtags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.gym-mtag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.gym-mtag.primary {
  color: var(--text);
  font-weight: 700;
  border-color: color-mix(in srgb, var(--today) 45%, var(--line));
  background: color-mix(in srgb, var(--today) 13%, rgba(255, 255, 255, 0.04));
}

.gym-add-exercise,
.gym-add-exercise-active,
.gym-custom-muscles + .gym-primary {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gym-add-exercise-active { align-items: stretch; }

.gym-select,
.gym-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font-size: 14px;
}

/* Eigene Übung ----------------------------------------------------------- */
.gym-custom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gym-custom-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.gym-custom-list-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.gym-custom-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, 0.025);
}
.gym-custom-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.gym-custom-item-copy > strong {
  overflow-wrap: anywhere;
}
.gym-custom-item-copy > span {
  color: var(--muted);
  font-size: 11px;
}
.gym-custom-item .gym-ghost {
  flex: 0 0 auto;
}
.gym-custom-item-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}
.gym-custom-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.gym-custom-delete-actions .gym-primary.danger {
  background: color-mix(in srgb, var(--bad) 75%, #5a1830);
  border-color: color-mix(in srgb, var(--bad) 55%, var(--line));
}
.gym-training-settings > summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}
.gym-setting-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
}
.gym-setting-toggle input { margin-top: 3px; accent-color: var(--today); }
.gym-setting-toggle span { display: grid; gap: 3px; }
.gym-setting-toggle small,
.gym-setting-note { color: var(--muted); font-size: 11px; }
.gym-setting-note { margin: 10px 0 0 25px; }
.gym-setting-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
  align-items: center;
  gap: 12px;
  margin: 12px 0 0 25px;
}
.gym-setting-select > span { display: grid; gap: 3px; }
.gym-setting-select small { color: var(--muted); font-size: 11px; }
.gym-sharing-settings { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.gym-setting-copy { display: grid; gap: 3px; }
.gym-setting-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.gym-sharing-settings .gym-setting-note { margin: 2px 0; }
.gym-sharing-settings .gym-setting-note.is-error { color: var(--bad); }
.gym-share-friend { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--control-radius); background: color-mix(in srgb, var(--card-2) 70%, transparent); cursor: pointer; }
.gym-share-friend input { accent-color: var(--today); }
.gym-share-friend span { display: flex; align-items: baseline; gap: 7px; }
.gym-share-friend small { color: var(--muted); }
.gym-share-avatar,
.gym-stats-owner-avatar { flex: 0 0 auto; display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; }
.gym-share-friend .gym-share-avatar { width: 34px; height: 34px; display: inline-grid; }
.gym-stats-owner-avatar { width: 28px; height: 28px; }
.gym-share-avatar .game-avatar.compact,
.gym-stats-owner-avatar .game-avatar.compact { width: 100%; height: 100%; }
.gym-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gym-bodyweight-quick {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-color: color-mix(in srgb, var(--today) 38%, var(--line));
  background: color-mix(in srgb, var(--today) 8%, var(--card));
}
.gym-bodyweight-quick span { display: grid; gap: 2px; text-align: left; }
.gym-bodyweight-quick small { color: var(--muted); font-size: 10px; }
.gym-bodyweight-quick strong { color: var(--text); font-size: 14px; }
.gym-bodyweight-quick b { color: var(--today); font-size: 12px; }
.gym-custom-progress {
  width: min(100%, 420px);
}
.gym-custom-progress .gym-select {
  width: 100%;
}
.gym-muscle-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}
.gym-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.gym-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.gym-chip.on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 55%, var(--line));
  background: color-mix(in srgb, var(--today) 16%, rgba(255, 255, 255, 0.05));
}

/* Aktives Workout -------------------------------------------------------- */
.gym-active-head,
.gym-add-exercise-active {
  display: flex;
  flex-wrap: wrap; /* Mobile: Buttons brechen unter den Titel um statt zu überlaufen */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gym-active-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.gym-exercise-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.gym-exercise-head-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gym-exercise-head strong { font-size: 16px; }
.gym-exercise-head-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.gym-replacement-note {
  color: var(--today);
  font-size: 11px;
  font-weight: 700;
}

/* Varianten (Geräte) --------------------------------------------------- */
.gym-variations,
.gym-var-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.gym-var-filter { margin-bottom: 14px; }

.gym-var-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.gym-var-chip small {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
}
.gym-var-chip.on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 55%, var(--line));
  background: color-mix(in srgb, var(--today) 16%, rgba(255, 255, 255, 0.05));
}

.gym-var-add {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border-style: dashed;
}

/* Löschbarer Geräte-Chip (aktives Workout): Container mit klickbarem Hauptteil
   + optionalem Lösch-✕. Der Detail-Filter nutzt weiter .gym-var-chip. */
.gym-var-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  overflow: hidden;
}
.gym-var-pill.on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 55%, var(--line));
  background: color-mix(in srgb, var(--today) 16%, rgba(255, 255, 255, 0.05));
}
.gym-var-pill-main {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 9px 6px 12px;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}
.gym-var-pill-main:hover { transform: none; background: none; }
.gym-var-step-edit {
  align-self: stretch;
  padding: 5px 7px;
  border: 0;
  border-left: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.72;
  cursor: pointer;
}
.gym-var-step-edit:hover { background: color-mix(in srgb, var(--today) 10%, transparent); opacity: 1; }
.gym-var-del {
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  opacity: 0.5;
  padding: 6px 10px 6px 2px;
  font-size: 11px;
  font-weight: 700;
}
.gym-var-del:hover {
  transform: none;
  background: none;
  opacity: 1;
  color: color-mix(in srgb, var(--bad) 82%, white);
}

.gym-var-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.gym-var-input,
.gym-var-step {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font-size: 13px;
}
.gym-var-input { width: 130px; }
.gym-var-step { width: 90px; }
.gym-var-step-form {
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--today) 40%, var(--line));
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--today) 7%, var(--card2));
}

.gym-rec {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
  white-space: normal;
}
.gym-rec b { color: var(--text); }
.gym-rec-why { display: block; color: var(--muted); margin-top: 2px; }

.gym-workout-target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin: -4px 0 12px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
}
.gym-workout-target b { color: var(--text); }
.gym-workout-progress {
  color: var(--good);
  font-weight: 700;
  white-space: nowrap;
}

.gym-sets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gym-set {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.gym-set.done { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: color-mix(in srgb, var(--good) 8%, rgba(255, 255, 255, 0.02)); }
.gym-set.warmup { border-style: dashed; opacity: 0.85; }

.gym-set-type {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-weight: 800;
  color: var(--muted);
}
.gym-set.warmup .gym-set-type { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }

.gym-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.gym-field input {
  width: 64px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.gym-rir {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.gym-rir-chips { display: flex; gap: 3px; }
.gym-rir-chip {
  width: 30px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.gym-rir-chip.on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 55%, var(--line));
  background: color-mix(in srgb, var(--today) 18%, rgba(255, 255, 255, 0.05));
}

.gym-set-tools {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.gym-set-done {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
}
.gym-set-done.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, var(--line)); background: color-mix(in srgb, var(--good) 14%, transparent); }

.gym-finish-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.gym-finish-dialog > p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.gym-finish-dialog > .full { width: 100%; }

.gym-exercise { margin-bottom: 0; }

/* Tagesform-Check-in ----------------------------------------------------- */
.gym-readiness-current {
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--today);
  font-size: 11px;
  font-weight: 800;
  background: color-mix(in srgb, var(--today) 10%, transparent);
  border-color: color-mix(in srgb, var(--today) 35%, var(--line));
}
.gym-readiness-current:hover { transform: none; }
.gym-complaints-current { margin-left: 5px; color: var(--muted); }

.gym-readiness-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.gym-readiness-pill.is-fit { color: var(--good); border-color: color-mix(in srgb, var(--good) 42%, var(--line)); }
.gym-readiness-pill.is-okay { color: var(--today); border-color: color-mix(in srgb, var(--today) 42%, var(--line)); }
.gym-readiness-pill.is-exhausted { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 42%, var(--line)); }

.gym-readiness-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 18, 0.76);
  backdrop-filter: blur(6px);
}
.gym-readiness-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.gym-readiness-dialog > .section-subtitle { margin-top: 5px; }
.gym-readiness-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.gym-readiness-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 12px;
}
.gym-readiness-option {
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}
.gym-readiness-option strong { color: var(--text); font-size: 16px; }
.gym-readiness-option span { color: var(--muted); font-size: 11px; line-height: 1.35; }
.gym-readiness-option.is-fit { border-color: color-mix(in srgb, var(--good) 38%, var(--line)); }
.gym-readiness-option.is-okay { border-color: color-mix(in srgb, var(--today) 38%, var(--line)); }
.gym-readiness-option.is-exhausted { border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); }
.gym-readiness-option.is-fit:hover { background: color-mix(in srgb, var(--good) 10%, var(--card)); }
.gym-readiness-option.is-okay:hover { background: color-mix(in srgb, var(--today) 10%, var(--card)); }
.gym-readiness-option.is-exhausted:hover { background: color-mix(in srgb, var(--warn) 10%, var(--card)); }
.gym-readiness-option.selected { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--text) 70%, transparent); }
.gym-checkin-label { display: block; margin-top: 16px; font-size: 12px; }
.gym-checkin-label small,
.gym-checkin-optional { color: var(--muted); font-size: 10px; font-weight: 600; }
.gym-checkin-optional { display: block; margin: 2px 0 8px; }
.gym-readiness-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.gym-complaint-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 16px; }
.gym-complaint-options button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 700;
}
.gym-complaint-options button.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.gym-checkin-save { width: 100%; }
.gym-checkin-weight-input { display: flex; align-items: center; gap: 8px; }
.gym-checkin-weight-input input {
  width: 110px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}
.gym-bodyweight-dialog {
  position: relative;
  width: min(440px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 28px));
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.gym-bodyweight-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 14px;
}
.gym-bodyweight-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.gym-bodyweight-form input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--text);
  font: inherit;
}
.gym-bodyweight-recent { display: grid; gap: 7px; margin-top: 18px; }
.gym-bodyweight-recent > strong { color: var(--muted); font-size: 11px; }
.gym-bodyweight-recent > div { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.gym-bodyweight-recent > div > button:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: var(--muted);
}
.gym-bodyweight-recent > div > button:first-child b { color: var(--text); }
.gym-bodyweight-delete { width: 38px; padding: 0; color: var(--bad); }
.gym-history-complaints { color: var(--warn); font-size: 11px; font-style: italic; }
.gym-readiness-reasons button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 700;
}
.gym-readiness-reasons button.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

/* Übung nur für die laufende Einheit ersetzen --------------------------- */
.gym-replace-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 18, 0.76);
  backdrop-filter: blur(6px);
}
.gym-replace-dialog {
  position: relative;
  width: min(600px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.gym-replace-dialog > .section-subtitle { margin: 5px 32px 14px 0; }
.gym-replace-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.gym-replace-list {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 3px;
}
.gym-replace-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}
.gym-replace-option > span:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gym-replace-option strong { color: var(--text); font-size: 13px; }
.gym-replace-option small { color: var(--good); font-size: 10px; font-weight: 700; }
.gym-replace-option .gym-mtags { flex: 0 0 auto; justify-content: flex-end; }

/* Trainingskalender (wann & wie oft) ------------------------------------ */
.gym-trainstats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}
.gym-trainstat {
  flex: 1 1 auto;
  min-width: 72px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.gym-trainstat strong {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.gym-trainstat span { font-size: 11px; color: var(--muted); }

.gym-heat {
  --gym-heat-cell: 13px;
  --gym-heat-gap: 3px;
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gym-heat.range-3m { --gym-heat-cell: 18px; --gym-heat-gap: 4px; }
.gym-heat.range-6m { --gym-heat-cell: 15px; }
.gym-heat-days {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  gap: var(--gym-heat-gap);
  padding-top: 16px; /* Höhe der Monatszeile ausgleichen */
  flex: 0 0 auto;
}
.gym-heat-days span {
  font-size: 9px;
  color: var(--muted);
  height: var(--gym-heat-cell);
  line-height: var(--gym-heat-cell);
}
.gym-heat-right { display: flex; flex: 0 0 auto; flex-direction: column; gap: var(--gym-heat-gap); }
.gym-heat-months {
  display: flex;
  gap: var(--gym-heat-gap);
  height: 13px;
}
.gym-heat-month {
  width: var(--gym-heat-cell);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: visible;
}
.gym-heat-grid { display: flex; gap: var(--gym-heat-gap); }
.gym-heat-col { display: grid; grid-template-rows: repeat(7, 1fr); gap: var(--gym-heat-gap); }

.gym-heat-cell {
  width: var(--gym-heat-cell);
  height: var(--gym-heat-cell);
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: color-mix(in srgb, var(--muted) 20%, transparent);
}
.gym-heat-cell:hover { transform: none; }
.gym-heat-cell.trained { background: var(--good); }
.gym-heat-cell.today { box-shadow: 0 0 0 1.5px var(--text); }
.gym-heat-cell.future { visibility: hidden; }

.gym-heat-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.gym-heat-focus { font-size: 12px; color: var(--muted); }
/* Info-Seite (So funktioniert's) ------------------------------------------ */
.gym-tab-info {
  flex: 0 0 auto;
  width: 42px;
  font-weight: 900;
  font-size: 15px;
}

.gym-info-overview {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.gym-info-overview p { margin: 0; }

.gym-info-sec { padding: 0; overflow: hidden; }
.gym-info-sec > summary {
  cursor: pointer;
  list-style: none;
  padding: 16px;
  font-size: 15px;
  font-weight: 800;
  position: relative;
}
.gym-info-sec > summary::-webkit-details-marker { display: none; }
.gym-info-example {
  margin: 14px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--today) 7%, transparent);
}
.gym-info-example > strong { color: var(--text); }
.gym-info-example p { margin: 8px 0; }
.gym-info-example ol { margin: 10px 0; padding-left: 22px; }
.gym-info-example li + li { margin-top: 7px; }
.gym-info-sec > summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.gym-info-sec[open] > summary::after { transform: translateY(-30%) rotate(225deg); }
.gym-info-sec > *:not(summary) {
  margin: 0 16px 14px;
}

.gym-info p,
.gym-info dd,
.gym-info li {
  font-size: 13px;
  line-height: 1.65;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
}
.gym-info code {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.gym-info-dl { display: flex; flex-direction: column; gap: 2px; }
.gym-info-dl dt {
  font-size: 13px;
  font-weight: 800;
  margin-top: 10px;
}
.gym-info-dl dt:first-child { margin-top: 0; }
.gym-info-dl dd { margin: 2px 0 0; }
.gym-info-list {
  margin: 8px 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gym-info-list ul {
  margin: 6px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gym-info-note {
  border-left: 3px solid color-mix(in srgb, var(--today) 55%, var(--line));
  padding-left: 10px;
}

/* Deload ------------------------------------------------------------------ */
.gym-deload-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--today) 40%, var(--line));
  background: color-mix(in srgb, var(--today) 10%, rgba(255, 255, 255, 0.03));
}
.gym-deload-icon {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1.2;
}
.gym-deload-banner div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gym-deload-banner strong { font-size: 14px; }
.gym-deload-banner span { font-size: 13px; color: var(--muted); }

.gym-deload-on {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 55%, var(--line));
  background: color-mix(in srgb, var(--today) 16%, rgba(255, 255, 255, 0.05));
}

.gym-deload-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--today) 45%, var(--line));
  color: color-mix(in srgb, var(--today) 80%, white);
  background: color-mix(in srgb, var(--today) 12%, transparent);
  vertical-align: 1px;
}

/* Statistik-Charts ------------------------------------------------------- */
.gym-stats-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  grid-area: toolbar;
}
.gym-stats-filter > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.gym-stats-owners { display: flex; align-items: center; gap: 7px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.gym-stats-owners::-webkit-scrollbar { display: none; }
.gym-stats-owners button { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 4px 10px 4px 5px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--card-2); color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.gym-stats-owners button:hover { filter: brightness(1.08); }
.gym-stats-owners button.active { border-color: var(--today); background: color-mix(in srgb, var(--today) 14%, var(--card-2)); color: var(--text); }
.gym-friend-notice { flex: 1 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.gym-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "toolbar toolbar"
    "calendar calendar"
    "progress records"
    "volume intensity"
    "balance history";
  gap: 16px;
  align-items: stretch;
}
.gym-trainlog { grid-area: calendar; }
.gym-stat-progression { grid-area: progress; }
.gym-stat-records { grid-area: records; }
.gym-stat-weight { grid-area: weight; }
.gym-stat-cardio { grid-area: cardio; }
.gym-stat-volume { grid-area: volume; }
.gym-stat-balance { grid-area: balance; }
.gym-stat-intensity { grid-area: intensity; }
.gym-stat-history { grid-area: history; }
.gym-stats-grid.has-bodyweight {
  grid-template-areas:
    "toolbar toolbar"
    "calendar calendar"
    "progress records"
    "weight balance"
    "volume intensity"
    "history history";
}
.gym-stats-grid.has-cardio {
  grid-template-areas:
    "toolbar toolbar"
    "calendar calendar"
    "progress records"
    "cardio cardio"
    "volume intensity"
    "balance history";
}
.gym-stats-grid.has-bodyweight.has-cardio {
  grid-template-areas:
    "toolbar toolbar"
    "calendar calendar"
    "progress records"
    "weight cardio"
    "volume intensity"
    "balance history";
}
.gym-weight-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 8px;
}
.gym-weight-summary > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card2) 82%, transparent);
}
.gym-weight-summary small { color: var(--muted); font-size: 10px; }
.gym-weight-summary strong { color: var(--text); font-size: 14px; }
.gym-weight-summary strong.is-up { color: color-mix(in srgb, var(--today) 78%, white); }
.gym-weight-summary strong.is-down { color: color-mix(in srgb, #b99cff 78%, white); }
.gym-weight-summary strong.is-stable { color: var(--muted); }
.gym-weight-raw-line,
.gym-weight-average-line { fill: none; }
.gym-weight-raw-line { stroke: color-mix(in srgb, var(--muted) 60%, transparent); stroke-width: 1.5; }
.gym-weight-average-line { stroke-width: 3; }
.gym-chart-dot.gym-weight-dot { fill: var(--muted); }
.gym-weight-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10px; }
.gym-weight-legend span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  background: var(--muted);
}
.gym-weight-legend .average::before { height: 3px; background: var(--today); }
.gym-weight-legend small { margin-left: auto; }

/* Cardio & Alltagsbewegung ---------------------------------------------- */
.gym-cardio-overview { margin-top: 14px; }
.gym-cardio-score { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gym-cardio-score strong { font-size: 24px; color: var(--text); }
.gym-cardio-score strong small { color: var(--muted); font-size: 12px; }
.gym-cardio-score > span { color: var(--good); font-size: 12px; font-weight: 800; }
.gym-cardio-progress { height: 10px; margin: 8px 0 12px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.gym-cardio-progress span { display: block; height: 100%; border-radius: inherit; background: var(--good); }
.gym-cardio-breakdown { display: flex; flex-wrap: wrap; gap: 7px; }
.gym-cardio-breakdown span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.gym-cardio-breakdown b { color: var(--text); }
.gym-cardio-running { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.gym-cardio-running > div { display: grid; gap: 3px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; }
.gym-cardio-running small { color: var(--muted); font-size: 9px; }
.gym-cardio-running strong { color: var(--text); font-size: 12px; }
.gym-movement-base { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 7px; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--card2) 82%, transparent); }
.gym-movement-base > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.gym-movement-base strong { color: var(--text); font-size: 12px; }
.gym-movement-base small { color: var(--muted); font-size: 10px; text-align: right; }
.gym-cardio-weeks { display: grid; grid-template-columns: repeat(13, 1fr); align-items: end; gap: 4px; height: 92px; margin-top: 16px; padding-top: 5px; border-bottom: 1px solid var(--line); }
.gym-cardio-weeks > div { position: relative; height: 70px; display: flex; align-items: flex-end; }
.gym-cardio-weeks > div > span { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--today); }
.gym-cardio-weeks small { position: absolute; left: 50%; bottom: -18px; display: none; transform: translateX(-50%); color: var(--muted); font-size: 8px; }
.gym-cardio-weeks > div:first-child small,
.gym-cardio-weeks > div:last-child small { display: block; }
.gym-cardio-recent { display: grid; gap: 6px; margin-top: 22px; }
.gym-cardio-recent button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); color: var(--text); text-align: left; }
.gym-cardio-recent button:hover { transform: none; border-color: color-mix(in srgb, var(--today) 45%, var(--line)); }
.gym-cardio-recent button span { display: grid; gap: 2px; }
.gym-cardio-recent small { color: var(--muted); font-size: 10px; }
.gym-cardio-recent b { font-size: 11px; white-space: nowrap; }
.gym-cardio-dialog { max-width: 520px; }
.gym-cardio-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 4px; }
.gym-cardio-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.gym-cardio-form input { min-width: 0; width: 100%; box-sizing: border-box; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--card2); color: var(--text); }
.gym-cardio-unit { display: flex; align-items: center; gap: 7px; }
.gym-cardio-unit b { color: var(--muted); font-size: 11px; }
.gym-cardio-intensity-help { margin: 10px 0 14px; }

.gym-recovery-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.gym-recovery-summary > span { font-weight: 700; }
.gym-recovery-summary strong { color: var(--text); }
.gym-recovery-summary.is-good strong { color: var(--good); }
.gym-recovery-summary.is-strained strong { color: var(--warn); }
.gym-recovery-summary.is-bad strong { color: var(--bad); }
.gym-recovery-summary small { margin-left: auto; color: var(--muted); }
.gym-history-readiness-reasons {
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
}

.gym-select-compact {
  flex: 0 1 auto;
  width: auto;
  max-width: 190px;
  padding: 8px 10px;
  font-size: 13px;
}

.gym-chart {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 4px;
}
.gym-chart-short { max-width: 100%; }

.gym-progression-dual {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}
.gym-progression-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--today) 35%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--today) 8%, transparent);
}
.gym-progression-summary > span {
  grid-column: 1 / -1;
  color: var(--today);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.gym-progression-summary > strong { color: var(--text); font-size: 14px; }
.gym-progression-summary > small { color: var(--muted); font-size: 10px; }
.gym-progression-summary > b {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: center;
  max-width: 170px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}
.gym-progression-summary.ready {
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
  background: color-mix(in srgb, var(--good) 8%, transparent);
}
.gym-progression-summary.ready > span,
.gym-progression-summary.ready > b { color: var(--good); }
.gym-progression-metric {
  padding: 9px 10px 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--card2) 74%, transparent);
}
.gym-progression-metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.gym-progression-metric-head span { color: var(--muted); font-size: 10px; font-weight: 700; }
.gym-progression-metric-head strong { color: var(--text); font-size: 12px; }
.gym-progression-chart { margin-top: 0; }
.gym-progression-target-band {
  fill: var(--good);
  opacity: 0.07;
}
.gym-progression-rep-area { fill: var(--good); }
.gym-progression-rep-line { stroke: var(--good); }
.gym-chart-dot.gym-progression-rep-dot { fill: var(--good); }
.gym-strength-summary {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--today) 35%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--today) 8%, transparent);
}
.gym-strength-summary > span {
  color: var(--today);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.gym-strength-summary > strong { color: var(--text); font-size: 14px; }
.gym-strength-summary > small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.gym-strength-summary.positive {
  border-color: color-mix(in srgb, var(--good) 40%, var(--line));
  background: color-mix(in srgb, var(--good) 7%, transparent);
}
.gym-strength-summary.positive > span { color: var(--good); }
.gym-strength-topsets {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.gym-strength-topsets-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.gym-strength-topsets-head strong { color: var(--text); font-size: 11px; }
.gym-strength-topsets-head small { color: var(--muted); font-size: 9px; }
.gym-strength-topsets table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.gym-strength-topsets th,
.gym-strength-topsets td {
  padding: 6px 5px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  text-align: left;
  white-space: nowrap;
}
.gym-strength-topsets th { color: var(--muted); font-size: 9px; }
.gym-strength-topsets td { color: var(--muted); }
.gym-strength-topsets td b { color: var(--text); }
.gym-strength-topsets tbody tr:last-child td { border-bottom: 0; }

.gym-chart-grid {
  stroke: rgba(255, 255, 255, 0.07); /* Hairline, eine Stufe über der Fläche */
  stroke-width: 1;
}
.gym-chart-tick {
  fill: var(--muted);
  font-size: 9px;
}
.gym-chart-line {
  fill: none;
  stroke: var(--today);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gym-chart-area {
  fill: var(--today);
  opacity: 0.1;
}
.gym-chart-dot {
  fill: var(--today);
  stroke: var(--card); /* Surface-Ring: bleibt lesbar, wo Punkt die Linie kreuzt */
  stroke-width: 2;
  cursor: pointer;
  outline: none;
}
.gym-chart-dot.focused,
.gym-chart-dot:focus-visible {
  stroke: var(--text);
}
.gym-chart-hit {
  fill: transparent;
  cursor: pointer;
}
.gym-chart-bar {
  fill: var(--today);
  cursor: pointer;
  outline: none;
}
.gym-chart-bar.focused,
.gym-chart-bar:focus-visible {
  fill: color-mix(in srgb, var(--today) 70%, white);
}
.gym-chart-endlabel {
  fill: var(--text);
  font-size: 10px;
  font-weight: 700;
}
.gym-chart-focus {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  min-height: 16px;
}

@media (max-width: 520px) {
  .gym-progression-summary { grid-template-columns: 1fr; }
  .gym-progression-summary > b {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
    margin-top: 3px;
    text-align: left;
  }
}

/* Rekorde ----------------------------------------------------------------- */
.gym-pr-feed {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gym-pr-feed li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gym-pr-badge {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  font-size: 15px;
}
.gym-pr-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gym-pr-body strong { font-size: 13px; }
.gym-pr-body span { font-size: 12px; color: var(--muted); }
.gym-pr-feed li > small { color: var(--muted); white-space: nowrap; }

/* Muskel-Balance ----------------------------------------------------------- */
.gym-balance-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gym-balance-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.gym-balance-label { font-weight: 700; }
.gym-balance-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.gym-balance-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--today); /* Magnitude: eine Farbe für alle Balken */
}
.gym-balance-value {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

@media (max-width: 480px) {
  .gym-balance-row { grid-template-columns: 88px 1fr auto; }
}

/* Historie & Detail ------------------------------------------------------ */
.gym-history-item {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.gym-history-item:first-of-type { border-top: 0; }
.gym-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.gym-history-head small { color: var(--muted); }
.gym-history-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gym-history-edit {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  color: var(--muted);
  font-size: 17px;
}
.gym-history-edit:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--today) 45%, var(--line));
  background: color-mix(in srgb, var(--today) 10%, transparent);
}
.gym-corrected-pill {
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--today) 35%, var(--line));
  border-radius: var(--radius-pill);
  color: var(--today);
  font-size: 10px;
  font-weight: 800;
}

/* Zugeklappte Workout-Zeile: kompletter Kopf ist der Auf-/Zuklapp-Button. */
.gym-history-row {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  margin: -4px -6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-size: 14px;
  text-align: left;
}
.gym-history-row:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.05);
}
.gym-history-row strong { font-weight: 800; }
.gym-history-row small { margin-left: auto; }

.gym-history-chevron {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); /* zu: Pfeil nach rechts */
  transition: transform 0.15s ease;
}
.gym-history-chevron.open { transform: rotate(45deg); } /* offen: Pfeil nach unten */
.gym-history-exercises {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gym-history-exercises li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.gym-history-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--today);
  font-weight: 700;
  text-align: left;
}
.gym-history-link:hover { transform: none; background: none; text-decoration: underline; }
.gym-history-exercises li small { color: var(--muted); }

.gym-session-edit-dialog {
  width: min(94vw, 720px);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.gym-session-edit-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.gym-session-edit-exercises {
  display: grid;
  gap: 12px;
}
.gym-session-edit-exercise {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.gym-session-edit-exercise-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.gym-session-edit-exercise-head small { color: var(--muted); }
.gym-session-edit-sets {
  display: grid;
  gap: 8px;
}
.gym-session-edit-set {
  display: grid;
  grid-template-columns: 38px minmax(70px, 1fr) minmax(70px, 1fr) 78px 34px;
  align-items: end;
  gap: 8px;
}
.gym-session-edit-set .gym-field input { width: 100%; }
.gym-session-edit-set .gym-set-type.warmup {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
}
.gym-session-edit-rir {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}
.gym-session-edit-rir .gym-select {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
}
.gym-session-edit-warning {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  color: var(--warn);
  font-size: 12px;
  line-height: 1.45;
}
.gym-session-edit-warning small { color: var(--muted); }
.gym-session-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 560px) {
  .gym-session-edit-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 16px;
  }
  .gym-session-edit-set {
    grid-template-columns: 36px minmax(58px, 1fr) minmax(58px, 1fr) 68px 32px;
    gap: 5px;
  }
  .gym-session-edit-set .gym-field input { padding-inline: 5px; }
  .gym-session-edit-actions > button { flex: 1; }
}

.gym-detail-chart { margin: 8px 0 14px; }
.gym-spark {
  width: 100%;
  height: 80px;
  display: block;
}
.gym-detail-chart-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.gym-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.gym-detail-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.gym-detail-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-variant-numeric: tabular-nums;
}

/* Tabellen scrollen auf schmalen Screens im eigenen Container statt die Seite
   horizontal zu sprengen. */
.gym-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.gym-table-scroll .gym-detail-table { min-width: 320px; }

@media (max-width: 560px) {
  .gym-volume-row-main { grid-template-columns: 105px minmax(60px, 1fr) auto; }
  .gym-volume-tag { display: none; }
  .gym-volume-calculation { margin-left: 0; }
  .gym-set { gap: 6px; }
  .gym-field input { width: 56px; }
  .gym-bodyweight-form { grid-template-columns: 1fr; }
  .gym-weight-summary { grid-template-columns: 1fr 1fr; }
  .gym-weight-summary > div:last-child { grid-column: 1 / -1; }
  .gym-setting-select { grid-template-columns: 1fr; margin-left: 0; }
  .gym-quick-grid,
  .gym-cardio-form { grid-template-columns: 1fr; }
  .gym-cardio-running { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .gym-stats-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "toolbar"
      "calendar"
      "progress"
      "records"
      "volume"
      "balance"
      "intensity"
      "history";
  }
  .gym-stats-grid.has-bodyweight {
    grid-template-areas:
      "toolbar"
      "calendar"
      "progress"
      "records"
      "weight"
      "volume"
      "balance"
      "intensity"
      "history";
  }
  .gym-stats-grid.has-cardio,
  .gym-stats-grid.has-bodyweight.has-cardio {
    grid-template-areas:
      "toolbar"
      "calendar"
      "progress"
      "records"
      "weight"
      "cardio"
      "volume"
      "balance"
      "intensity"
      "history";
  }
  .gym-heat { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .gym-stats-filter { align-items: stretch; flex-wrap: wrap; }
  .gym-stats-owners { width: 100%; }
  .gym-friend-notice { align-items: flex-start; flex-direction: column; }
  .gym-tab {
    padding: 10px 6px;
    font-size: 13px;
  }
  .gym-tab-info { width: 36px; }
  .gym-rir-chip { width: 28px; }
  .gym-active-tools { margin-left: 0; }
  .gym-readiness-options { grid-template-columns: 1fr; }
  .gym-readiness-option { min-height: 76px; }
  .gym-exercise-head { flex-direction: column; }
  .gym-exercise-head-tools { width: 100%; justify-content: flex-start; }
  .gym-replace-option { align-items: flex-start; flex-direction: column; }
  .gym-day-exercise-top { flex-wrap: wrap; }
  .gym-day-exercise-top small { flex-basis: calc(100% - 36px); order: 3; }
  .gym-plan-coverage-row {
    grid-template-columns: minmax(86px, 0.8fr) minmax(70px, 1fr) auto;
    gap: 5px 7px;
  }
  .gym-plan-coverage-row > small {
    grid-column: 2 / 4;
    text-align: left;
  }
  .gym-volume-controls { width: 100%; justify-content: flex-start; }
  .gym-volume-controls > label { flex: 1; }
  .gym-volume-controls .gym-select { width: 100%; min-width: 0; }
  .gym-volume-goal-row { grid-template-columns: 1fr; }
  .gym-volume-insight { align-items: flex-start; flex-direction: column; }
  .gym-volume-insight .gym-ghost { width: 100%; }
  .gym-volume-insight-facts { grid-template-columns: 1fr; }
  .gym-recovery-summary { align-items: flex-start; flex-wrap: wrap; }
  .gym-recovery-summary small { flex-basis: 100%; margin-left: 0; }
  .gym-volume-goal-range { text-align: left; }
  .gym-select-compact { max-width: 100%; }
  /* Selects in Karten-Köpfen: volle Breite statt neben dem Titel zu quetschen */
  .gym-card-head .gym-select { flex-basis: 100%; }
}

/* Trainingsbereiche bleiben als klar getrennte Arbeitsflächen erkennbar. */
:where(body:not(.og-design)) .gym-page .gym-shell { width: 100%; max-width: var(--page-content-width); }
:where(body:not(.og-design)) .gym-page .gym-section > .gym-card:not(.gym-exercise):not(.gym-friend-notice){ border-radius: 8px; box-shadow: none; }
:where(body:not(.og-design)) .gym-page .gym-exercise, :where(body:not(.og-design)) .gym-page .gym-plan, :where(body:not(.og-design)) .gym-page .gym-history-item{ border-radius: 8px; box-shadow: none; }

/* Quelle: inbox.css */
    .inbox-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0; }
    .inbox-pagination button { width: 40px; height: 40px; padding: 8px; }
    .inbox-shell {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 340px;
      gap: 16px;
      align-items: start;
    }

    @media (max-width: 1180px) {
      .inbox-shell {
        grid-template-columns: 1fr;
      }
    }

    .inbox-list-panel,
    .inbox-compose-panel {
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
      padding: 18px;
    }

    .inbox-compose-panel {
      display: grid;
      gap: 16px;
      align-content: start;
      background:
        linear-gradient(145deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 10%, rgba(21,27,47,.82)), rgba(21,27,47,.78)),
        rgba(21,27,47,.78);
    }

    .compose-head {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      align-items: start;
      gap: 12px;
    }

    .compose-icon {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 46%, var(--line));
      border-radius: 14px;
      color: #fff;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, rgba(255,255,255,.06));
      font-size: 18px;
      font-weight: 950;
      box-shadow: 0 14px 28px color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, transparent);
    }

    .compose-avatar {
      width: 40px;
      height: 40px;
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      border-radius: 50%;
      overflow: hidden;
      border: 2px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 55%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, rgba(255,255,255,.05));
      box-shadow: 0 10px 24px color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, transparent);
    }

    .compose-avatar svg,
    .compose-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .compose-avatar-glyph {
      font-size: 18px;
      color: #fff;
    }

    .inbox-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 14px;
    }

    #inboxSummary {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 6px;
    }

    #inboxSummary span {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, var(--line));
      border-radius: 999px;
      padding: 5px 8px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
      font-size: 12px;
      font-weight: 850;
    }

    #inboxSummary strong {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 78%, white);
      font-weight: 950;
    }

    .inbox-tabs {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .inbox-mobile-appbar,
    .inbox-tab-label-mobile {
      display: none;
    }

    .inbox-tabs .profile-btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }

    .inbox-tab-count {
      min-width: 20px;
      height: 20px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      padding: 0 6px;
      color: #07120c;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 74%, white);
      font-size: 11px;
      font-weight: 950;
    }

    /* Tabs links, einklappbare Suche rechts ---- */
    .inbox-tabs { justify-content: flex-start; }

    .inbox-history-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      width: max-content;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
    }

    .inbox-tabs .profile-btn:has(span:first-child:not(:last-child)) {
      white-space: nowrap;
    }

    .inbox-scroll .notification-card {
      cursor: pointer;
      border-color: rgba(124, 164, 255, .24);
      background: linear-gradient(135deg, rgba(79, 111, 205, .13), rgba(113, 84, 174, .08));
    }

    .inbox-scroll .notification-card.unread {
      border-color: rgba(124, 164, 255, .58);
      box-shadow: inset 3px 0 0 rgba(124, 164, 255, .88);
    }

    .inbox-notification-body {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .inbox-notification-emoji {
      flex: 0 0 auto;
      display: inline-grid;
      place-items: center;
      width: 36px;
      height: 36px;
      font-size: 28px;
      line-height: 1;
    }

    .inbox-notification-emoji img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .inbox-tab-switcher {
      --switcher-accent: var(--active-profile-color, var(--today));
      min-width: 0;
      flex: 0 1 auto;
    }

    .inbox-tab-switcher .ui-section-switcher-badge {
      background: color-mix(in srgb, var(--today) 24%, rgba(255,255,255,.12));
    }

    .inbox-notification-emoji.is-shop-item {
      width: 48px;
      height: 48px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 6px;
      padding: 4px;
      background: rgba(255,255,255,.08);
    }

    .inbox-notification-emoji.is-clothing {
      width: 56px;
      height: 56px;
    }

    .inbox-history-toggle input {
      width: 16px;
      height: 16px;
      margin: 0;
      accent-color: var(--accent);
    }

    .inbox-tabs .inbox-search {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .inbox-search-btn {
      flex: 0 0 auto;
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.04);
      color: var(--muted);
      cursor: pointer;
      transition: background .14s ease, color .14s ease;
    }

    .inbox-search-btn:hover,
    .inbox-search-btn.active { background: rgba(255,255,255,.09); color: var(--text); }

    .inbox-tabs .inbox-search input { max-width: min(240px, 52vw); }

    .inbox-select-toggle {
      border-style: dashed;
    }

    .message-form {
      display: grid;
      gap: 14px;
    }

    .message-form label {
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .compose-label {
      color: color-mix(in srgb, var(--muted) 82%, var(--text));
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .compose-field {
      min-width: 0;
    }

    .inbox-compose-panel .event-person-options {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
      gap: 8px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, var(--line));
      border-radius: 16px;
      padding: 8px;
      background: rgba(255,255,255,.035);
    }

    .compose-recipient-btn {
      min-height: 46px;
      justify-content: flex-start;
      border-radius: 12px;
      padding: 8px 10px;
      overflow: hidden;
    }

    .compose-recipient-btn span:last-child {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .compose-recipient-btn.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 64%, white);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 28%, rgba(255,255,255,.06)), rgba(255,255,255,.06)),
        rgba(255,255,255,.065);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 20%, transparent) inset;
    }

    .compose-textarea-shell {
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, var(--line));
      border-radius: 16px;
      background: rgba(255,255,255,.045);
      overflow: hidden;
      transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
    }

    .compose-textarea-shell:focus-within {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 62%, white);
      background: rgba(255,255,255,.06);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, transparent);
    }

    .message-form textarea {
      width: 100%;
      min-height: 142px;
      border: 0;
      border-radius: 0;
      padding: 13px 13px 8px;
      color: var(--text);
      background: transparent;
      font: inherit;
      outline: none;
      resize: vertical;
    }

    .date-range-picker {
      display: grid;
      gap: 10px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
      border-radius: 18px;
      padding: 14px;
      background:
        linear-gradient(145deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 13%, rgba(255,255,255,.045)), rgba(255,255,255,.035));
    }

    .date-range-label {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 70%, white);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .date-range-summary {
      color: var(--text);
      font-size: 18px;
      font-weight: 950;
    }

    .date-range-inputs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .date-range-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    .planner-note-shell {
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, var(--line));
      border-radius: 16px;
      background: rgba(255,255,255,.045);
      overflow: hidden;
      transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
    }

    .planner-note-shell:focus-within {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 62%, white);
      background: rgba(255,255,255,.06);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, transparent);
    }

    .planner-note-shell textarea {
      min-height: 96px;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .planner-note-shell textarea:focus {
      box-shadow: none;
    }

    .planner-submit {
      min-height: 46px;
      border-radius: 16px;
      font-size: 14px;
      font-weight: 950;
    }

    #calendarNotice:empty {
      display: none;
    }

    .message-form textarea:focus {
      box-shadow: none;
    }

    .compose-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border-top: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 12%, var(--line));
      padding: 8px 11px;
      color: var(--muted);
      background: rgba(0,0,0,.08);
      font-size: 11px;
      font-weight: 850;
    }

    .compose-send {
      min-height: 46px;
      border-radius: 16px;
      font-size: 14px;
      font-weight: 950;
    }

    #inboxNotice:empty {
      display: none;
    }

    .inbox-compose-panel .notice {
      margin: 0;
      border-radius: 14px;
    }

    .message-list {
      display: grid;
      gap: 10px;
    }

    .inbox-bulk-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 38%, var(--line));
      border-radius: 14px;
      padding: 10px 12px;
      color: var(--text);
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255,255,255,.04)), rgba(255,255,255,.04)),
        rgba(255,255,255,.05);
    }

    .inbox-bulk-actions[hidden] {
      display: none;
    }

    .inbox-bulk-actions strong {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 78%, white);
      font-size: 16px;
      font-weight: 950;
    }

    .inbox-bulk-actions span {
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .inbox-bulk-buttons {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .message-card {
      position: relative;
      display: grid;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      background: rgba(255,255,255,.045);
      transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease;
    }

    .message-card.selecting {
      padding-left: 48px;
    }

    .message-card.selected {
      border-color: color-mix(in srgb, var(--good) 62%, var(--line));
      background:
        linear-gradient(90deg, rgba(51,209,122,.12), transparent 62%),
        rgba(255,255,255,.055);
      box-shadow: 0 0 0 1px rgba(51,209,122,.16) inset;
    }

    /* Auswahl-Checkbox: erscheint bei Hover (Desktop) bzw. im Auswahlmodus;
       per Long-Press (Handy) wird der Modus gestartet. Kein Tab-Button mehr. */
    .message-check {
      position: absolute;
      top: 14px;
      left: 13px;
      z-index: 3;
      width: 24px;
      height: 24px;
      display: grid;
      place-items: center;
      border: 2px solid color-mix(in srgb, var(--muted) 45%, var(--line));
      border-radius: 8px;
      background: rgba(10,14,28,.85);
      color: transparent;
      cursor: pointer;
      opacity: 0;
      transition: opacity .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
    }

    .message-card { transition: border-color .14s ease, background .14s ease, box-shadow .14s ease, transform .14s ease, padding .16s ease; }

    .message-card.selecting .message-check,
    .message-card.selected .message-check { opacity: 1; }

    @media (hover: hover) {
      .message-card:hover { padding-left: 48px; }
      .message-card:hover .message-check { opacity: 1; }
    }

    .message-check.checked {
      color: #07120c;
      border-color: var(--good);
      background: var(--good);
      box-shadow: 0 0 0 3px rgba(51,209,122,.14);
    }

    /* Im Auswahlmodus zählt nur die Auswahl – Einzel-Aktionen ausblenden. */
    .message-card.selecting .message-actions { display: none; }
    .message-card.selecting { cursor: pointer; }

    .message-card.unread {
      border-color: rgba(51,209,122,.48);
      background: rgba(51,209,122,.09);
    }

    .message-card[data-profile-person] {
      border-left: 4px solid var(--profile-color);
      background: color-mix(in srgb, var(--profile-color) 8%, rgba(255,255,255,.045));
    }

    .message-card[data-profile-person].unread {
      border-color: color-mix(in srgb, var(--profile-color) 58%, var(--good));
      border-left-color: var(--profile-color);
      background: color-mix(in srgb, var(--profile-color) 14%, rgba(51,209,122,.06));
    }

    .message-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .message-identity {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .message-avatar {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      flex: 0 0 38px;
      overflow: hidden;
      border-radius: 50%;
    }

    .message-avatar :where(.game-avatar, svg, img) {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .message-heading {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .message-title {
      color: var(--text);
      font-size: 15px;
      overflow: hidden;
      font-weight: 750;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .message-date,
    .message-status {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .message-status-stack {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 6px;
    }

    .message-type-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 8px;
      color: var(--muted);
      background: rgba(255,255,255,.045);
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .message-type-chip.message {
      color: color-mix(in srgb, var(--today) 78%, white);
      border-color: color-mix(in srgb, var(--today) 36%, var(--line));
      background: color-mix(in srgb, var(--today) 10%, rgba(255,255,255,.04));
    }

    .message-type-chip.inventory {
      color: color-mix(in srgb, var(--warn) 82%, white);
      border-color: color-mix(in srgb, var(--warn) 42%, var(--line));
      background: color-mix(in srgb, var(--warn) 12%, rgba(255,255,255,.04));
    }

    .message-type-chip.request {
      color: color-mix(in srgb, var(--good) 78%, white);
      border-color: color-mix(in srgb, var(--good) 38%, var(--line));
      background: color-mix(in srgb, var(--good) 10%, rgba(255,255,255,.04));
    }

    .inbox-messenger .message-type-chip.friend {
      color: color-mix(in srgb, var(--today) 72%, white);
      border-color: color-mix(in srgb, var(--today) 42%, var(--line));
      background: color-mix(in srgb, var(--today) 13%, rgba(255,255,255,.04));
    }

    .message-status {
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 8px;
      background: rgba(255,255,255,.045);
      white-space: nowrap;
    }

    .message-body {
      color: var(--text);
      font-size: 14px;
      line-height: 1.5;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .request-card {
      border-style: solid;
    }

    .inbox-messenger .friend-request-card {
      border-color: color-mix(in srgb, var(--today) 42%, var(--line));
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--today) 12%, transparent), transparent 62%),
        rgba(255,255,255,.045);
    }

    .inbox-messenger .friend-request-card .request-meta {
      color: color-mix(in srgb, var(--today) 76%, var(--text));
    }

    .action-card {
      border-color: color-mix(in srgb, var(--warn) 34%, var(--line));
      background:
        linear-gradient(135deg, rgba(246,193,119,.09), transparent 58%),
        rgba(255,255,255,.045);
    }

    .action-card.done {
      opacity: .68;
    }

    .inventory-action-card .request-meta {
      color: color-mix(in srgb, var(--warn) 82%, var(--text));
    }

    .community-join-action-card {
      border-color: color-mix(in srgb, var(--good) 38%, var(--line));
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--good) 10%, transparent), transparent 58%),
        rgba(255,255,255,.045);
    }

    .community-join-action-card .request-meta {
      color: color-mix(in srgb, var(--good) 78%, var(--text));
    }

    .request-title {
      color: var(--text);
      font-size: 16px;
      font-weight: 900;
      line-height: 1.25;
    }

    .request-meta {
      color: var(--warn);
      font-size: 13px;
      font-weight: 900;
    }

    .message-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    /* Zusammenfassungs-Chips */
    .inbox-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 8px;
      margin-top: 6px;
    }

    .inbox-stat {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,.05);
      border: 1px solid var(--line);
      font-size: 12px;
      color: var(--muted);
      white-space: nowrap;
    }

    .inbox-stat strong {
      color: var(--text);
      font-weight: 900;
    }

    /* Chat-Thread (Eingang) */
    .inbox-thread {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 4px 2px;
    }

    .inbox-day-sep {
      display: flex;
      justify-content: center;
      margin: 6px 0 2px;
    }

    .inbox-day-sep span {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .04em;
      text-transform: uppercase;
      color: var(--muted);
      background: rgba(255,255,255,.05);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px 12px;
    }

    .inbox-new-sep {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 10px;
      margin: 2px 0;
      scroll-margin-top: 12px;
    }

    .inbox-new-sep::before,
    .inbox-new-sep::after {
      content: "";
      height: 1px;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
      opacity: .7;
    }

    .inbox-new-sep span {
      padding: 2px 9px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 34%, var(--line));
      border-radius: 999px;
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 58%, white);
      background: rgba(255,255,255,.045);
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .inbox-msg {
      display: flex;
      align-items: flex-end;
      gap: 8px;
    }

    .inbox-msg.mine {
      justify-content: flex-end;
    }

    .inbox-bubble-avatar {
      flex: 0 0 auto;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      overflow: hidden;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
    }

    .inbox-bubble-avatar svg,
    .inbox-bubble-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .inbox-bubble {
      position: relative;
      max-width: 78%;
      color: #fff;
      background: linear-gradient(160deg,
        color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 34%, #0b1020),
        color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 22%, #0b1020));
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 38%, rgba(255,255,255,.12));
      border-radius: 18px;
      border-bottom-left-radius: 6px;
      padding: 9px 13px;
      box-shadow: 0 2px 8px rgba(0,0,0,.18);
    }

    .inbox-bubble.mine {
      background: linear-gradient(160deg,
        color-mix(in srgb, var(--active-profile-color, var(--today)) 44%, #0b1020),
        color-mix(in srgb, var(--active-profile-color, var(--today)) 30%, #0b1020));
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 44%, rgba(255,255,255,.16));
      border-bottom-left-radius: 18px;
      border-bottom-right-radius: 6px;
    }

    .inbox-bubble.mine .inbox-bubble-body { color: #fff; }
    .inbox-bubble.mine .inbox-bubble-meta { color: rgba(255,255,255,.82); }
    .inbox-bubble.mine .inbox-read { color: rgba(255,255,255,.7); }
    .inbox-bubble.mine .inbox-read.seen { color: #d6ffe6; }
    .inbox-bubble:not(.mine) .inbox-bubble-body { color: #fff; }
    .inbox-bubble:not(.mine) .inbox-bubble-meta { color: rgba(255,255,255,.78); }

    /* GIFs/Sticker stehen frei – ohne Bubble-Kasten drumherum. */
    .inbox-bubble:has(.inbox-gif) {
      padding: 8px;
    }

    .inbox-bubble:has(.inbox-gif) .inbox-bubble-body {
      display: grid;
      gap: 7px;
    }

    .inbox-gif { border-radius: 14px; }

    .inbox-bubble-body {
      color: var(--text);
      white-space: pre-wrap;
      word-break: break-word;
    }

    .inbox-bubble-body :where(p, ul, ol) {
      margin: 0;
    }

    .inbox-bubble-meta {
      margin-top: 4px;
      font-size: 11px;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .inbox-bubble.mine .inbox-bubble-meta {
      justify-content: flex-end;
    }

    /* Gelesen-/Gesendet-Häkchen am eigenen Bubble */
    .inbox-read {
      font-size: 11px;
      letter-spacing: -1px;
      color: var(--muted);
    }

    .inbox-read.seen {
      color: var(--good);
    }

    /* Reaktions-Auslöser: dezentes Inline-Icon in der Meta-Zeile */
    .inbox-react {
      position: relative;
      display: inline-flex;
      align-items: center;
    }

    .inbox-react-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      padding: 0;
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      opacity: 0;
      transition: opacity .12s, color .12s;
    }

    .inbox-bubble.mine .inbox-react-btn { color: rgba(255,255,255,.85); }

    .inbox-react-btn .bro-icon {
      width: 14px;
      height: 14px;
    }

    /* Reaktions-Auslöser nur bei Hover zeigen – hält die Meta-Zeile ruhig. */
    .inbox-msg:hover .inbox-react-btn { opacity: .8; }
    .inbox-react-btn:hover,
    .inbox-react-btn:focus-visible { opacity: 1; color: var(--text); }
    .inbox-bubble.mine .inbox-react-btn:hover { color: #fff; }
    @media (hover: none) {
      .inbox-react-btn { opacity: .6; }
    }

    .inbox-reaction-menu {
      position: absolute;
      bottom: 26px;
      left: 0;
      z-index: 32;
      display: flex;
      align-items: stretch;
    }

    .inbox-reaction-pop { position: static; }

    .inbox-reaction-delete {
      flex: 0 0 42px;
      min-width: 42px;
      border: 1px solid rgba(151,130,208,.44);
      border-left: 0;
      border-radius: 0 12px 12px 0;
      color: var(--bad);
      background: rgba(248,245,255,.98);
      cursor: pointer;
    }

    .inbox-list-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .inbox-list-toolbar-copy {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .inbox-list-toolbar-copy strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 750;
    }

    .inbox-list-toolbar-copy span {
      min-width: 22px;
      height: 22px;
      display: grid;
      place-items: center;
      border-radius: var(--radius-pill);
      padding: 0 6px;
      color: var(--muted);
      background: rgba(255,255,255,.06);
      font-size: 11px;
      font-weight: 750;
    }

    .inbox-filter-switch {
      display: inline-grid;
      grid-template-columns: repeat(2, auto);
      gap: 3px;
      padding: 3px;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      background: rgba(255,255,255,.035);
    }

    .inbox-filter-switch button {
      min-height: 32px;
      border: 0;
      border-radius: var(--radius-pill);
      padding: 6px 10px;
      color: var(--muted);
      background: transparent;
      font-size: 12px;
      font-weight: 700;
    }

    .inbox-filter-switch button.active {
      color: var(--text);
      background: rgba(255,255,255,.1);
    }

    .inbox-reaction-delete:hover,
    .inbox-reaction-delete:focus-visible {
      filter: brightness(.96);
    }

    .inbox-reaction-delete .bro-icon { width: 18px; height: 18px; }

    .inbox-reaction-pop .inbox-reaction-empty {
      white-space: nowrap;
      padding: 4px 8px;
    }

    .inbox-reaction-pop.expanded {
      overflow: visible;
      gap: 4px;
      border-radius: 12px;
    }

    .inbox-bubble.mine .inbox-reaction-menu {
      left: auto;
      right: 0;
    }


    .inbox-reaction-more-btn {
      color: #fff;
      font-weight: 950;
      display: inline-grid;
      place-items: center;
      min-width: 34px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, var(--line)) !important;
      background: rgba(255,255,255,.08) !important;
      font-size: 15px !important;
    }

    .inbox-reaction-more-grid {
      position: absolute;
      bottom: calc(100% + 6px);
      left: 0;
      width: min(388px, calc(100vw - 34px));
      max-height: min(318px, 46vh);
      overflow-y: auto;
      flex: 1 0 100%;
      display: grid;
      grid-template-columns: repeat(8, minmax(34px, 1fr));
      gap: 5px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #141a2e;
      box-shadow: 0 14px 34px rgba(0,0,0,.42);
      scrollbar-width: thin;
    }

    .inbox-reaction-empty {
      grid-column: 1 / -1;
      padding: 6px 4px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
    }

    .inbox-bubble.mine .inbox-reaction-more-grid {
      right: 0;
      left: auto;
    }

    /* Reaktions-Chips hängen optisch unter dem Bubble, ohne dessen Höhe zu
       vergrößern. Der Nachrichten-Row reserviert nur den kleinen Überstand. */
    .inbox-msg.has-reactions {
      margin-bottom: 16px;
    }

    .inbox-reactions {
      position: absolute;
      z-index: 2;
      top: calc(100% - 3px);
      left: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      max-width: calc(100% - 24px);
      margin: 0;
    }

    .inbox-bubble.mine .inbox-reactions {
      right: 12px;
      left: auto;
      justify-content: flex-end;
    }

    .inbox-reaction {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 7px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      font-size: 12px;
      cursor: pointer;
    }

    .inbox-reaction.mine {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 55%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, transparent);
    }

    .inbox-reaction-count {
      font-weight: 800;
      color: var(--muted);
    }

    .inbox-reaction-dialog-backdrop {
      position: absolute;
      inset: 0;
      z-index: 30;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(5,8,18,.34);
    }

    .inbox-reaction-dialog {
      display: grid;
      gap: 10px;
      width: min(320px, 100%);
      max-height: none;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #141a2e;
      box-shadow: 0 22px 60px rgba(0,0,0,.46);
    }

    .inbox-reaction-dialog-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: var(--text);
    }

    .inbox-reaction-dialog-head .ghost-btn {
      min-width: 32px;
      padding: 4px 8px;
      font-size: 18px;
      line-height: 1;
    }

    .inbox-reaction-dialog-list {
      display: grid;
      gap: 7px;
      min-height: 0;
      overflow: visible;
    }

    @media (max-width: 560px) {
      .inbox-reaction-more-grid {
        width: min(312px, calc(100vw - 28px));
        grid-template-columns: repeat(6, minmax(34px, 1fr));
      }
    }

    .inbox-reaction-detail-row {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr);
      align-items: center;
      gap: 7px;
      color: var(--text);
      font-size: 12px;
      font-weight: 800;
    }

    .inbox-reaction-detail-emoji {
      font-size: 17px;
      line-height: 1;
    }

    .inbox-reaction-detail-names {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    /* Custom-Emoji-Bilder: im Picker, als Chip und im Detail-Dialog. */
    .inbox-reaction-img {
      display: inline-block;
      width: 1.25em;
      height: 1.25em;
      object-fit: contain;
      vertical-align: -0.2em;
    }

    .inbox-reaction-pop button.inbox-reaction-custom {
      padding: 2px;
    }

    .inbox-reaction .inbox-reaction-img {
      width: 18px;
      height: 18px;
      vertical-align: middle;
    }

    .inbox-reaction-detail-emoji .inbox-reaction-img {
      width: 20px;
      height: 20px;
    }

    /* Overflow-Menü für Sekundäraktionen */
    .message-overflow {
      position: relative;
      display: inline-flex;
    }

    .message-overflow-btn {
      width: 40px;
      height: 40px;
      min-width: 40px;
      min-height: 40px;
      border: 0;
      border-radius: 50%;
      padding: 0 0 5px;
      color: var(--muted);
      background: transparent;
      font-weight: 800;
      letter-spacing: 2px;
    }

    .message-overflow-menu {
      position: absolute;
      top: calc(100% + 6px);
      right: 0;
      bottom: auto;
      left: auto;
      z-index: 12;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 6px;
      min-width: 190px;
      background: #141a2e;
      border: 1px solid var(--line);
      border-radius: 12px;
      box-shadow: 0 16px 36px rgba(0,0,0,.45);
    }

    .message-overflow-menu[hidden] {
      display: none;
    }

    .message-overflow-menu button {
      justify-content: flex-start;
      text-align: left;
      width: 100%;
    }

    .message-direct-delete {
      width: 40px;
      height: 40px;
      min-width: 40px;
      min-height: 40px;
      display: grid;
      place-items: center;
      border: 0;
      border-radius: 50%;
      padding: 0;
      color: color-mix(in srgb, var(--muted) 88%, transparent);
      background: transparent;
    }

    .message-direct-delete:hover {
      color: var(--bad);
      background: color-mix(in srgb, var(--bad) 10%, transparent);
    }

    .message-direct-delete .bro-icon { width: 18px; height: 18px; }

    /* Rich-Text-Compose (wiederverwendeter Tagebuch-Editor) */
    .compose-rte-shell {
      display: grid;
      gap: 8px;
    }

    .compose-editor {
      min-height: 140px;
      max-height: 300px;
      overflow-y: auto;
    }

    .compose-meta .over-limit {
      color: #ef4444;
      font-weight: 800;
    }

    /* Messenger-Layout (eine Spalte, scrollbarer Verlauf, angedockter Composer) */
    .inbox-shell.inbox-messenger {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 12px;
      width: 100%;
      max-width: none;
      margin: 0;
      height: min(78vh, 860px);
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
      padding: 16px;
    }

    .inbox-messenger .inbox-top { margin-bottom: 0; align-items: center; }

    .inbox-search { flex: 0 0 auto; }

    .inbox-search input {
      width: 100%;
      max-width: 220px;
      padding: 8px 12px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 13px;
    }

    /* ---- Chat-Header (Avatar + Name des Partners) ---- */
    .inbox-chat-header {
      display: flex;
      align-items: center;
      gap: 11px;
      padding: 2px 2px 12px;
      border-bottom: 1px solid var(--line);
    }

    .inbox-chat-avatar {
      flex: 0 0 auto;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      overflow: hidden;
      display: grid;
      place-items: center;
      border: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 60%, var(--line));
    }

    .inbox-chat-avatar svg,
    .inbox-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }

    .inbox-chat-headtext { display: grid; min-width: 0; }
    .inbox-chat-headtext strong { font-size: 15px; font-weight: 900; color: var(--text); }
    .inbox-chat-headtext span { font-size: 11.5px; color: var(--muted); font-weight: 600; }

    .inbox-retention-trigger {
      min-width: 70px;
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin-left: auto;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 24%, var(--line));
      border-radius: var(--radius-pill);
      padding: 7px 10px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
      font-size: 11px;
      font-weight: 900;
      white-space: nowrap;
    }

    .inbox-retention-trigger:hover { color: var(--text); background: rgba(255,255,255,.065); }

    .inbox-retention-label-desktop,
    .composer-emoji-inline,
    .inbox-format-close {
      display: none;
    }

    .inbox-chat-back,
    .inbox-conversation-list,
    .composer-tools-toggle,
    .composer-tools-sheet {
      display: none;
    }

    .inbox-partner-switch { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }

    /* Subtile Gesprächs-Leinwand, damit der Chat wie ein eigener Raum wirkt. */
    .inbox-chat-canvas {
      border-radius: 16px;
      background:
        radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--profile-color, var(--today)) 7%, transparent), transparent 60%),
        rgba(0,0,0,.14);
      padding: 12px 10px 8px;
    }

    .inbox-system-message {
      justify-self: center;
      max-width: min(420px, 88%);
      margin: 5px auto;
      border-radius: var(--radius-pill);
      padding: 6px 11px;
      color: var(--muted);
      background: rgba(255,255,255,.05);
      font-size: 10.5px;
      font-weight: 750;
      line-height: 1.35;
      text-align: center;
    }

    .inbox-partners {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .inbox-partners-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .inbox-scroll {
      width: 100%;
      align-self: stretch;
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 4px;
      scrollbar-width: thin;
      scrollbar-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 40%, var(--line)) transparent;
    }

    .inbox-scroll::-webkit-scrollbar { width: 8px; }
    .inbox-scroll::-webkit-scrollbar-track { background: transparent; }
    .inbox-scroll::-webkit-scrollbar-thumb {
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 35%, var(--line));
      border-radius: 999px;
    }

    .inbox-composer {
      width: 100%;
      align-self: stretch;
      flex: 0 0 auto;
      display: grid;
      gap: 8px;
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }

    .composer-recipients {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    /* ---- Clean Chat-Composer (Icons + rundes Eingabefeld + runder Senden-Knopf) ---- */
    .composer-bar {
      display: flex;
      align-items: flex-end;
      gap: 6px;
    }

    .composer-icon-btn {
      flex: 0 0 auto;
      width: 42px;
      height: 42px;
      display: inline-grid;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.04);
      color: var(--muted);
      font-size: 15px;
      font-weight: 800;
      cursor: pointer;
      transition: background .14s ease, color .14s ease, border-color .14s ease;
    }

    .composer-icon-btn:hover { background: rgba(255,255,255,.09); color: var(--text); }

    .composer-icon-btn.active {
      color: #04122b;
      border-color: transparent;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 82%, white);
    }

    .composer-icon-gif { font-size: 10px; font-weight: 950; letter-spacing: .03em; }

    .compose-input-stack {
      flex: 1 1 auto;
      min-width: 0;
      display: grid;
      gap: 7px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 21px;
      background: rgba(255,255,255,.05);
      box-sizing: border-box;
    }

    .compose-input-stack:focus-within {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 50%, var(--line));
    }

    .compose-input-stack .compose-editor {
      min-width: 0;
      min-height: 42px;
      max-height: 140px;
      overflow-y: auto;
      padding: 3px 8px;
      border: 0;
      border-radius: 15px;
      background: transparent;
      box-sizing: border-box;
    }

    .compose-input-stack .compose-editor:focus {
      outline: none;
    }

    .composer-bar .compose-send {
      flex: 0 0 auto;
      width: 42px;
      height: 42px;
      min-height: 0;
      padding: 0;
      border-radius: 999px;
      display: inline-grid;
      place-items: center;
      font-size: 16px;
      font-weight: 900;
    }

    .inbox-format-bar { margin-bottom: 2px; }

    /* Auf schmalen Screens würde die Format-Leiste sonst unschön umbrechen
       (Emoji-Button allein in Zeile 2). Stattdessen eine kompakte,
       horizontal scrollbare Einzelzeile – wie die Messenger-Tabs. */
    @media (max-width: 560px) {
      .inbox-composer .journal-rte-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
      }

      .inbox-composer .journal-rte-toolbar::-webkit-scrollbar {
        display: none;
      }

      .inbox-composer .journal-rte-toolbar > * {
        flex: 0 0 auto;
      }
    }

    .emoji-pop {
      width: 100%;
      max-width: none;
    }

    .gif-picker {
      display: grid;
      gap: 9px;
      max-height: min(560px, 62vh);
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #141a2e;
      box-shadow: 0 14px 34px rgba(0,0,0,.24);
      overflow: hidden;
    }

    .gif-picker { grid-template-rows: auto auto minmax(0, 1fr); }

    .gif-picker-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .gif-picker-head .ghost-btn {
      min-width: 32px;
      padding: 4px 8px;
      font-size: 18px;
      line-height: 1;
    }

    .gif-picker input {
      width: 100%;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: rgba(255,255,255,.05);
      color: var(--text);
    }

    .gif-picker-status {
      padding: 12px;
      color: var(--muted);
      text-align: center;
      font-size: 13px;
      font-weight: 800;
    }

    .compose-gif-preview {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 120px;
      max-height: 220px;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, var(--line));
      border-radius: 12px;
      background: rgba(0,0,0,.18);
    }

    .compose-gif-preview img {
      display: block;
      width: 100%;
      height: 100%;
      max-height: 220px;
      object-fit: contain;
    }

    .compose-gif-remove {
      position: absolute;
      right: 10px;
      bottom: 10px;
      width: 32px;
      height: 32px;
      min-width: 0;
      min-height: 0;
      padding: 0;
      border-radius: 999px;
      display: inline-grid;
      place-items: center;
      box-shadow: 0 12px 28px rgba(0,0,0,.34);
      background: color-mix(in srgb, var(--card) 88%, transparent);
      color: #fff;
    }

    .gif-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
      grid-auto-rows: minmax(104px, auto);
      gap: 8px;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-width: thin;
      scrollbar-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 55%, var(--line)) transparent;
    }

    .gif-grid::-webkit-scrollbar { width: 8px; }
    .gif-grid::-webkit-scrollbar-track { background: transparent; }
    .gif-grid::-webkit-scrollbar-thumb {
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, var(--line));
      border-radius: 999px;
    }

    .gif-result {
      height: 112px;
      padding: 0;
      overflow: hidden;
      border: 1px solid transparent;
      border-radius: 8px;
      background: rgba(255,255,255,.05);
      cursor: pointer;
    }

    .gif-result:hover,
    .gif-result:focus-visible,
    .gif-result.selected {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 78%, white);
    }

    .gif-result.selected {
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, transparent);
    }

    .gif-result img { width: 100%; height: 100%; object-fit: contain; display: block; }

    .inbox-gif {
      display: block;
      width: min(280px, 100%);
      max-height: 280px;
      border-radius: 10px;
      object-fit: contain;
    }

    @media (max-width: 560px) {
      .gif-picker { max-height: min(520px, 58vh); }
      .compose-gif-preview { min-height: 104px; max-height: 176px; }
      .compose-gif-preview img { max-height: 176px; }
      .gif-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(96px, auto);
      }
      .gif-result { height: 104px; }
    }

    /* Bubble-Gruppierung + Schnell-Löschen */
    .inbox-msg.grouped { margin-top: -6px; }
    .inbox-bubble-avatar.ghost { visibility: hidden; }
    .inbox-bubble { position: relative; }

    .inbox-bubble-del {
      position: absolute;
      top: -11px;
      right: -11px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
      background: color-mix(in srgb, var(--card) 88%, transparent);
      color: var(--muted);
      box-shadow: 0 10px 26px rgba(0,0,0,.28);
      cursor: pointer;
      opacity: 0;
      transform: translateY(3px) scale(.94);
      transition: opacity .14s ease, transform .14s ease, color .14s ease, border-color .14s ease, background .14s ease;
    }

    .inbox-bubble-del .bro-icon {
      width: 15px;
      height: 15px;
    }

    .inbox-msg:hover .inbox-bubble-del,
    .inbox-bubble-del:focus-visible {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    .inbox-bubble-del:hover,
    .inbox-bubble-del:focus-visible {
      color: #ef4444;
      border-color: color-mix(in srgb, #ef4444 72%, var(--line));
      background: color-mix(in srgb, #ef4444 14%, var(--card));
      outline: none;
    }

    @media (max-width: 720px) {
      body.inbox-mobile-overview,
      body.inbox-mobile-overview.music-player-active {
        --mobile-player-space: 0px;
        min-height: 100dvh;
        padding: 0 0 calc(var(--mobile-nav-space) + env(safe-area-inset-bottom));
      }

      body.inbox-mobile-overview .spa-header,
      body.inbox-mobile-overview .music-player-bar {
        display: none !important;
      }

      body.inbox-mobile-overview .spa-app,
      body.inbox-mobile-overview .spa-vue-mount,
      body.inbox-mobile-overview .spa-view-shell,
      body.inbox-mobile-overview .spa-frame-stack,
      body.inbox-mobile-overview .spa-frame {
        min-height: 0;
      }

      body.inbox-mobile-overview .inbox-page {
        width: 100%;
        height: calc(100dvh - var(--mobile-nav-space) - env(safe-area-inset-bottom));
        min-height: 0;
        overflow: hidden;
      }

      .inbox-page .inbox-shell.inbox-messenger:not(.mobile-thread-open) {
        width: 100%;
        height: 100%;
        max-height: none;
        gap: 0;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        padding: 0;
        background: var(--bg);
        box-shadow: none;
        backdrop-filter: none;
      }

      .inbox-mobile-appbar {
        display: grid;
        flex: 0 0 auto;
        gap: 10px;
        margin: 0;
        border: 0;
        padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
        background:
          linear-gradient(180deg, rgba(255,255,255,.035), transparent),
          color-mix(in srgb, var(--bg) 96%, var(--card));
      }

      .inbox-mobile-appbar-row {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .inbox-mobile-appbar h1 {
        margin: 0;
        color: var(--text);
        font-size: 28px;
        font-weight: 720;
        letter-spacing: -.04em;
        line-height: 1;
      }

      .inbox-mobile-appbar-actions {
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .inbox-mobile-search-toggle,
      .inbox-mobile-profile {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        flex: 0 0 44px;
        overflow: hidden;
        border: 0;
        border-radius: 50%;
        padding: 0;
        color: var(--muted);
        background: transparent;
        text-decoration: none;
      }

      .inbox-mobile-search-toggle.active,
      .inbox-mobile-search-toggle:active {
        color: var(--text);
        background: rgba(255,255,255,.07);
      }

      .inbox-mobile-profile {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 52%, var(--line));
        background: rgba(255,255,255,.045);
      }

      .inbox-mobile-profile > span {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
      }

      .inbox-mobile-profile :where(.game-avatar, svg, img) {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .inbox-mobile-search {
        min-height: 44px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 0 10px 0 13px;
        color: var(--muted);
        background: rgba(255,255,255,.055);
      }

      .inbox-mobile-search input {
        width: 100%;
        min-width: 0;
        border: 0;
        padding: 10px 0;
        color: var(--text);
        background: transparent;
        font: inherit;
        font-size: 16px;
        outline: 0;
      }

      .inbox-mobile-search button {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        border: 0;
        border-radius: 50%;
        padding: 0 0 2px;
        color: var(--muted);
        background: rgba(255,255,255,.07);
        font-size: 20px;
        font-weight: 450;
      }

      .inbox-messenger:not(.mobile-thread-open) > .inbox-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        flex: 0 0 auto;
        gap: 4px;
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,.07);
        padding: 4px 12px 10px;
        overflow: visible;
        background: color-mix(in srgb, var(--bg) 96%, var(--card));
      }

      .inbox-messenger:not(.mobile-thread-open) > .inbox-tabs .profile-btn {
        width: 100%;
        min-width: 0;
        min-height: var(--switcher-height);
        justify-content: center;
        gap: 5px;
        border: 1px solid transparent;
        border-radius: 7px;
        padding: 8px 5px;
        color: var(--muted);
        background: transparent;
        font-size: 13px;
        font-weight: 900;
      }

      .inbox-messenger:not(.mobile-thread-open) > .inbox-tabs .profile-btn.active {
        color: var(--text);
        border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 52%, var(--line));
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255,255,255,.045));
      }

      .inbox-tab-label-desktop,
      .inbox-tabs .inbox-search {
        display: none;
      }

      .inbox-tab-label-mobile { display: inline; }

      .inbox-tab-count {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
      }

      .inbox-list-toolbar {
        flex: 0 0 auto;
        padding: 12px 16px 8px;
      }

      .inbox-list-toolbar-copy strong {
        font-size: 14px;
        font-weight: 700;
      }

      .inbox-filter-switch button {
        min-height: 34px;
        padding-inline: 11px;
      }

      /* Die Gesprächsliste bleibt Teil des normalen Postfachs. Erst eine
         geöffnete Unterhaltung wechselt in den edge-to-edge Chatmodus. */
      .inbox-conversation-list {
        display: grid;
        align-content: start;
        flex: 1 1 auto;
        gap: 0;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        border: 0;
        border-radius: 0;
        padding: 0 16px 20px;
        background: transparent;
      }

      .inbox-conversation {
        width: 100%;
        min-height: 76px;
        display: grid;
        grid-template-columns: 50px minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border: 0;
        border-bottom: 1px solid rgba(255,255,255,.07);
        border-radius: 0;
        padding: 11px 0;
        color: var(--text);
        background: transparent;
        text-align: left;
        cursor: pointer;
      }

      .inbox-conversation:last-child { border-bottom: 0; }
      .inbox-conversation:active,
      .inbox-conversation:hover { background: rgba(255,255,255,.055); }

      .inbox-conversation-avatar {
        width: 50px;
        height: 50px;
        display: grid;
        place-items: center;
        overflow: hidden;
        border: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 54%, var(--line));
        border-radius: 50%;
        background: rgba(255,255,255,.04);
      }

      .inbox-conversation-avatar :where(svg, img) {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .inbox-conversation-copy {
        min-width: 0;
        display: grid;
        gap: 4px;
      }

      .inbox-conversation-copy strong {
        overflow: hidden;
        color: var(--text);
        font-size: 15px;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .inbox-conversation-copy > span {
        overflow: hidden;
        color: var(--muted);
        font-size: 12px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .inbox-conversation.unread .inbox-conversation-copy > span {
        color: color-mix(in srgb, var(--text) 78%, var(--muted));
        font-weight: 800;
      }

      .inbox-conversation-meta {
        align-self: stretch;
        display: grid;
        align-content: center;
        justify-items: end;
        gap: 7px;
        color: var(--muted);
        font-size: 10px;
        white-space: nowrap;
      }

      .inbox-conversation-meta b {
        min-width: 21px;
        height: 21px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        padding: 0 6px;
        color: #06140c;
        background: var(--good);
        font-size: 10px;
        font-weight: 950;
      }

      .inbox-messenger:not(.mobile-thread-open) > .inbox-scroll {
        flex: 1 1 auto;
        min-height: 0;
        padding: 4px 16px 24px;
        overflow-y: auto;
        scrollbar-width: none;
      }

      .inbox-messenger:not(.mobile-thread-open) > .inbox-scroll::-webkit-scrollbar {
        display: none;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-card {
        gap: 11px;
        margin-top: 10px;
        border: 1px solid rgba(255,255,255,.1);
        border-left: 1px solid rgba(255,255,255,.1);
        border-radius: 16px;
        padding: 14px;
        background: rgba(255,255,255,.035);
        box-shadow: none;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-card:first-child { margin-top: 4px; }

      .inbox-messenger:not(.mobile-thread-open) .message-card.unread,
      .inbox-messenger:not(.mobile-thread-open) .message-card[data-profile-person].unread,
      .inbox-messenger:not(.mobile-thread-open) .notification-card,
      .inbox-messenger:not(.mobile-thread-open) .notification-card.unread,
      .inbox-messenger:not(.mobile-thread-open) .action-card {
        border-color: rgba(255,255,255,.1);
        border-left-color: rgba(255,255,255,.1);
        background: rgba(255,255,255,.035);
        box-shadow: none;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-head {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-identity { flex: 1 1 auto; }

      .inbox-messenger:not(.mobile-thread-open) .message-avatar {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-title {
        font-size: 15px;
        font-weight: 720;
        line-height: 1.2;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-date {
        font-size: 11px;
        font-weight: 550;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-overflow-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-direct-delete {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-status-stack {
        justify-content: flex-start;
        gap: 7px;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-type-chip,
      .inbox-messenger:not(.mobile-thread-open) .message-status {
        border: 0;
        padding: 4px 8px;
        font-size: 11px;
        font-weight: 680;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-status {
        position: relative;
        padding-left: 14px;
        background: transparent;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-status::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 3px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--muted);
        transform: translateY(-50%);
      }

      .inbox-messenger:not(.mobile-thread-open) .message-status.unread::before {
        background: var(--good);
      }

      .inbox-messenger:not(.mobile-thread-open) .request-title {
        font-size: 17px;
        font-weight: 720;
      }

      .inbox-messenger:not(.mobile-thread-open) .request-meta {
        font-size: 13px;
        font-weight: 650;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-body {
        color: color-mix(in srgb, var(--text) 88%, var(--muted));
        font-size: 14px;
        line-height: 1.45;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-actions {
        display: flex;
      }

      .inbox-messenger:not(.mobile-thread-open) .message-actions > button {
        width: 100%;
        min-height: 44px;
        border-radius: 13px;
        font-size: 14px;
        font-weight: 700;
      }

      .inbox-messenger:not(.mobile-thread-open) .empty-inbox {
        margin-top: 12px;
        border: 0;
        padding: 32px 18px;
        background: transparent;
        text-align: center;
      }

      .inbox-messenger:not(.mobile-thread-open) > .inbox-chat-header,
      .inbox-messenger:not(.mobile-thread-open) > .inbox-chat-canvas,
      .inbox-messenger:not(.mobile-thread-open) > .inbox-composer {
        display: none;
      }

      /* Vollbildmodus ohne Fullscreen-API: bleibt browser- und PWA-freundlich,
         nutzt aber den kompletten dynamischen Viewport inklusive Safe Areas. */
      body.inbox-mobile-thread,
      body.inbox-mobile-thread.music-player-active {
        --mobile-nav-space: 0px;
        --mobile-player-space: 0px;
        height: 100dvh;
        overflow: hidden;
        padding: 0;
      }

      body.inbox-mobile-thread .spa-header,
      body.inbox-mobile-thread .site-nav,
      body.inbox-mobile-thread .nav-more-layer,
      body.inbox-mobile-thread .music-player-bar {
        display: none !important;
      }

      body.inbox-mobile-thread .inbox-page {
        position: fixed;
        inset: 0;
        z-index: 200;
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        background: var(--bg);
      }

      .inbox-page .inbox-shell.inbox-messenger.mobile-thread-open {
        width: 100%;
        height: 100dvh;
        min-height: 0;
        max-height: none;
        gap: 0;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        padding: 0;
        background: var(--bg);
        box-shadow: none;
        backdrop-filter: none;
      }

      .inbox-messenger.mobile-thread-open > .inbox-tabs,
      .inbox-messenger.mobile-thread-open > .inbox-mobile-appbar,
      .inbox-messenger.mobile-thread-open > .inbox-list-toolbar,
      .inbox-messenger.mobile-thread-open > .inbox-conversation-list {
        display: none;
      }

      .inbox-messenger.mobile-thread-open .inbox-chat-header {
        min-height: calc(60px + env(safe-area-inset-top));
        flex: 0 0 auto;
        gap: 9px;
        border-bottom-color: rgba(255,255,255,.08);
        padding: calc(8px + env(safe-area-inset-top)) 12px 8px 8px;
        background:
          linear-gradient(180deg, rgba(255,255,255,.055), transparent),
          color-mix(in srgb, var(--bg) 92%, var(--card));
        box-shadow: 0 8px 24px rgba(0,0,0,.2);
      }

      .inbox-chat-back {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 50%;
        padding: 0 0 3px;
        color: var(--text);
        background: transparent;
        font-size: 34px;
        font-weight: 450;
        line-height: 1;
      }

      .inbox-chat-back:active,
      .inbox-chat-back:hover { background: rgba(255,255,255,.07); }

      .inbox-messenger.mobile-thread-open .inbox-chat-avatar {
        width: 42px;
        height: 42px;
      }

      .inbox-messenger.mobile-thread-open .inbox-chat-headtext strong { font-size: 16px; }
      .inbox-messenger.mobile-thread-open .inbox-partner-switch { display: none; }

      .inbox-messenger.mobile-thread-open .inbox-chat-canvas {
        flex: 1 1 auto;
        min-height: 0;
        border-radius: 0;
        padding: 12px 10px 18px;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        background:
          radial-gradient(110% 64% at 50% 0%, color-mix(in srgb, var(--profile-color, var(--today)) 8%, transparent), transparent 64%),
          linear-gradient(rgba(255,255,255,.012), rgba(255,255,255,.012)),
          var(--bg);
        scrollbar-width: none;
      }

      .inbox-messenger.mobile-thread-open .inbox-chat-canvas::-webkit-scrollbar { display: none; }
      .inbox-messenger.mobile-thread-open .inbox-thread { gap: 7px; padding: 2px 0; }
      .inbox-messenger.mobile-thread-open .inbox-msg.grouped { margin-top: -4px; }
      .inbox-messenger.mobile-thread-open .inbox-bubble { max-width: 86%; padding: 8px 11px; touch-action: pan-y; }
      .inbox-messenger.mobile-thread-open .inbox-bubble-avatar { width: 27px; height: 27px; }

      .inbox-messenger.mobile-thread-open .inbox-composer {
        position: relative;
        z-index: 8;
        flex: 0 0 auto;
        gap: 0;
        border-top-color: rgba(255,255,255,.08);
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        background:
          linear-gradient(0deg, rgba(255,255,255,.045), transparent),
          color-mix(in srgb, var(--bg) 90%, var(--card));
        box-shadow: 0 -8px 28px rgba(0,0,0,.2);
      }

      .inbox-messenger.mobile-thread-open .compose-rte-shell { gap: 0; }
      .inbox-messenger.mobile-thread-open .composer-bar { align-items: flex-end; gap: 7px; }
      .inbox-messenger.mobile-thread-open .composer-format-btn,
      .inbox-messenger.mobile-thread-open .composer-emoji-btn,
      .inbox-messenger.mobile-thread-open .composer-gif-btn { display: none; }

      .composer-tools-toggle {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        display: grid;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 50%;
        padding: 0 0 4px;
        color: var(--muted);
        background: rgba(255,255,255,.045);
        font-size: 30px;
        font-weight: 350;
        line-height: 1;
        transition: color .14s ease, background .14s ease, transform .14s ease;
      }

      .composer-tools-toggle.active {
        color: var(--text);
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, rgba(255,255,255,.05));
        transform: rotate(45deg);
      }

      .inbox-messenger.mobile-thread-open .compose-input-stack {
        min-height: 46px;
        border-radius: 23px;
        padding: 4px 6px;
        background: rgba(255,255,255,.065);
      }

      .inbox-messenger.mobile-thread-open .compose-input-stack .compose-editor {
        min-height: 36px;
        max-height: min(120px, 24dvh);
        padding: 7px 8px 4px;
        font-size: 16px;
        line-height: 1.35;
      }

      .inbox-messenger.mobile-thread-open .composer-bar .compose-send {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        font-size: 17px;
      }

      .composer-tools-sheet {
        position: absolute;
        right: 8px;
        bottom: calc(62px + env(safe-area-inset-bottom));
        left: 8px;
        z-index: 12;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 9px;
        background: color-mix(in srgb, var(--card) 94%, black);
        box-shadow: 0 18px 44px rgba(0,0,0,.45);
      }

      .composer-tools-sheet button {
        min-width: 0;
        min-height: 54px;
        display: grid;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 13px;
        padding: 7px 5px;
        color: var(--text);
        background: rgba(255,255,255,.055);
        font-size: 10px;
        font-weight: 850;
      }

      .composer-tools-sheet button > :first-child { font-size: 18px; }

      .inbox-messenger.mobile-thread-open :is(.emoji-pop, .inbox-format-bar, .gif-picker) {
        position: absolute;
        right: 8px;
        bottom: calc(62px + env(safe-area-inset-bottom));
        left: 8px;
        z-index: 13;
        margin: 0;
        box-shadow: 0 18px 44px rgba(0,0,0,.48);
      }

      .inbox-messenger.mobile-thread-open .emoji-pop {
        width: auto;
        max-height: min(260px, 38dvh);
        overflow-y: auto;
        padding: 10px;
      }

      .inbox-messenger.mobile-thread-open .gif-picker { max-height: min(520px, 62dvh); }
      .inbox-messenger.mobile-thread-open .compose-meta { display: none; }
      .inbox-messenger.mobile-thread-open .inbox-bubble-del { display: none; }
      .inbox-messenger.mobile-thread-open .inbox-react-btn {
        opacity: 0;
        pointer-events: none;
      }

      .inbox-messenger.mobile-thread-open .inbox-reaction-pop button {
        min-width: 42px;
        min-height: 42px;
      }

      .inbox-reaction-delete {
        min-height: 42px;
      }
      body .inbox-retention-backdrop {
        align-items: end;
        padding: 0;
      }
      body .inbox-retention-dialog {
        width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
      }
      .inbox-messenger.mobile-thread-open .inbox-retention-trigger {
        min-width: 58px;
        min-height: 44px;
        padding: 6px 8px;
      }
      body.inbox-mobile-thread .inbox-page > .storage-debug { display: none; }
      body.inbox-mobile-overview .inbox-page > .storage-debug { display: none; }
    }

    /* Desktop: eine ruhige, zusammenhängende Messenger-Oberfläche. Sämtliche
       Mobile-Regeln darüber bleiben bewusst unverändert. */
    @media (min-width: 721px) {
      .inbox-messenger:not(.thread-open) > .inbox-conversation-list {
        display: grid;
        align-content: start;
        gap: 0;
        min-height: 320px;
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(0,0,0,.1);
      }

      .inbox-messenger:not(.thread-open) > .inbox-chat-header,
      .inbox-messenger:not(.thread-open) > .inbox-chat-canvas,
      .inbox-messenger:not(.thread-open) > .inbox-composer {
        display: none;
      }

      .inbox-messenger.thread-open > .inbox-conversation-list { display: none; }

      .inbox-messenger.thread-open .inbox-chat-back {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 50%;
        padding: 0 0 3px;
        color: var(--text);
        background: rgba(255,255,255,.035);
        font-size: 26px;
        cursor: pointer;
      }

      .inbox-conversation {
        width: 100%;
        min-height: 76px;
        display: grid;
        grid-template-columns: 50px minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border: 0;
        border-bottom: 1px solid rgba(255,255,255,.07);
        padding: 11px 16px;
        color: var(--text);
        background: transparent;
        text-align: left;
        cursor: pointer;
      }

      .inbox-conversation:hover { background: rgba(255,255,255,.055); }
      .inbox-conversation:last-child { border-bottom: 0; }

      .inbox-conversation-avatar {
        width: 50px;
        height: 50px;
        display: grid;
        place-items: center;
        overflow: hidden;
        border: 2px solid color-mix(in srgb, var(--profile-color, var(--today)) 54%, var(--line));
        border-radius: 50%;
      }

      .inbox-conversation-avatar :where(svg, img) { width: 100%; height: 100%; object-fit: cover; }
      .inbox-conversation-copy { min-width: 0; display: grid; gap: 4px; }
      .inbox-conversation-copy strong,
      .inbox-conversation-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .inbox-conversation-copy strong { color: var(--text); font-size: 15px; font-weight: 900; }
      .inbox-conversation-copy > span { color: var(--muted); font-size: 12px; font-weight: 650; }
      .inbox-conversation-meta { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 10px; }
      .inbox-conversation-meta b {
        min-width: 21px;
        height: 21px;
        display: grid;
        place-items: center;
        border-radius: var(--radius-pill);
        padding: 0 6px;
        color: #06140c;
        background: var(--good);
      }

      .inbox-messenger > .inbox-tabs {
        align-items: center;
        flex-wrap: nowrap;
        padding-bottom: 2px;
      }

      .inbox-tabs .inbox-search {
        width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        gap: 6px;
        border: 0;
        border-radius: var(--radius-pill);
        padding: 0;
        color: var(--muted);
        background: transparent;
        transition: width .16s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
      }

      .inbox-tabs .inbox-search.open {
        width: min(290px, 32vw);
        border: 1px solid var(--line);
        padding: 0 8px 0 0;
        background: rgba(255,255,255,.035);
      }

      .inbox-tabs .inbox-search.open:focus-within {
        border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 48%, var(--line));
        background: rgba(255,255,255,.055);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-profile-color, var(--today)) 10%, transparent);
      }

      .inbox-tabs .inbox-search-btn {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        border-color: var(--line);
        background: rgba(255,255,255,.035);
      }

      .inbox-tabs .inbox-search.open .inbox-search-btn {
        border-color: transparent;
        background: transparent;
      }

      .inbox-tabs .inbox-search input {
        width: 100%;
        min-width: 0;
        max-width: none;
        border: 0;
        padding: 9px 0;
        color: var(--text);
        background: transparent;
        font: inherit;
        font-size: 13px;
        outline: 0;
      }

      .inbox-tabs .inbox-search input::-webkit-search-cancel-button { display: none; }

      .inbox-search-clear {
        width: 25px;
        height: 25px;
        min-width: 25px;
        min-height: 25px;
        display: grid;
        place-items: center;
        border: 0;
        border-radius: 50%;
        padding: 0 0 2px;
        color: var(--muted);
        background: rgba(255,255,255,.07);
        font-size: 17px;
        line-height: 1;
      }

      .inbox-search-clear:hover { color: var(--text); background: rgba(255,255,255,.11); }

      .inbox-chat-header {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        column-gap: 11px;
        row-gap: 1px;
        padding: 5px 3px 13px;
      }

      .inbox-chat-avatar {
        grid-column: 1;
        grid-row: 1 / span 2;
      }

      .inbox-chat-headtext {
        grid-column: 2;
        grid-row: 1;
        align-self: end;
      }

      .inbox-chat-headtext strong { font-size: 15px; }
      .inbox-chat-headtext > span { display: none; }

      .inbox-retention-trigger {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        min-width: 0;
        min-height: 20px;
        justify-content: flex-start;
        gap: 5px;
        margin: 0;
        border: 0;
        border-radius: 8px;
        padding: 1px 4px 1px 0;
        color: var(--muted);
        background: transparent;
        font-size: 11px;
        font-weight: 650;
      }

      .inbox-retention-trigger:hover { color: var(--text); background: transparent; }
      .inbox-retention-trigger svg { width: 13px; height: 13px; }
      .inbox-retention-label-desktop { display: inline; }
      .inbox-retention-label-mobile { display: none; }

      .inbox-partner-switch {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
        margin-left: 0;
      }

      .inbox-chat-canvas {
        background:
          radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--profile-color, var(--active-profile-color, var(--today))) 6%, transparent), transparent 72%),
          linear-gradient(180deg, rgba(255,255,255,.012), rgba(0,0,0,.08));
      }

      .inbox-bubble { max-width: 64%; }

      .inbox-composer {
        padding-top: 11px;
        border-top-color: color-mix(in srgb, var(--line) 76%, transparent);
      }

      .compose-rte-shell { position: relative; gap: 7px; }

      .composer-bar {
        align-items: center;
        gap: 8px;
      }

      .composer-tools-toggle {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        display: inline-grid;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 50%;
        padding: 0 0 2px;
        color: var(--muted);
        background: rgba(255,255,255,.035);
        font-size: 24px;
        font-weight: 350;
      }

      .composer-tools-toggle:hover,
      .composer-tools-toggle.active {
        color: var(--text);
        border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 42%, var(--line));
        background: rgba(255,255,255,.07);
      }

      .composer-format-btn,
      .composer-emoji-btn,
      .composer-gif-btn {
        display: none;
      }

      .inbox-format-clear { display: none; }
      .inbox-format-close { display: inline-grid; }

      .compose-input-stack {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 4px;
        min-height: 46px;
        border-radius: 23px;
        padding: 2px 5px 2px 10px;
        background: rgba(255,255,255,.045);
      }

      .compose-input-stack.has-gif { grid-template-rows: auto auto; }
      .compose-input-stack .compose-gif-preview { grid-column: 1 / -1; }

      .compose-input-stack .compose-editor {
        grid-column: 1;
        min-height: 40px;
        padding: 8px 4px 6px;
        font-size: 14px;
        line-height: 1.4;
      }

      .composer-emoji-inline {
        grid-column: 2;
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        align-self: end;
        border: 0;
        border-radius: 50%;
        padding: 0 0 2px;
        color: var(--muted);
        background: transparent;
        font-size: 18px;
      }

      .composer-emoji-inline:hover,
      .composer-emoji-inline.active { color: var(--text); background: rgba(255,255,255,.065); }

      .composer-bar .compose-send {
        width: 42px;
        height: 42px;
        border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line));
        color: color-mix(in srgb, var(--good) 86%, white);
        background: color-mix(in srgb, var(--good) 13%, rgba(255,255,255,.035));
      }

      .composer-bar .compose-send:hover {
        color: #fff;
        background: color-mix(in srgb, var(--good) 24%, rgba(255,255,255,.04));
      }

      .composer-tools-sheet {
        position: absolute;
        bottom: 62px;
        left: 0;
        z-index: 14;
        width: min(360px, calc(100% - 56px));
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 8px;
        background: color-mix(in srgb, var(--card) 96%, black);
        box-shadow: 0 18px 46px rgba(0,0,0,.42);
      }

      .composer-tools-sheet button {
        min-height: 58px;
        display: grid;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 12px;
        padding: 7px;
        color: var(--text);
        background: rgba(255,255,255,.045);
        font-size: 11px;
        font-weight: 750;
      }

      .composer-tools-sheet button:hover { background: rgba(255,255,255,.085); }
      .composer-tools-sheet button > :first-child { font-size: 17px; }

      .compose-meta {
        justify-content: flex-end;
        border: 0;
        padding: 0 51px 0 0;
        color: color-mix(in srgb, var(--muted) 76%, transparent);
        background: transparent;
        font-size: 10px;
        font-weight: 650;
      }
    }

    .empty-inbox {
      display: grid;
      gap: 6px;
      border: 1px dashed color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
      border-radius: 16px;
      padding: 24px;
      color: var(--muted);
      background: rgba(255,255,255,.025);
    }

    .empty-inbox strong {
      color: var(--text);
      font-size: 18px;
      font-weight: 950;
    }

    .empty-inbox span {
      color: var(--muted);
      font-size: 14px;
      font-weight: 750;
      line-height: 1.4;
    }

    .inbox-dialog-backdrop {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(5,8,18,.62);
      backdrop-filter: blur(10px);
    }

    .inbox-retention-backdrop {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(5,8,18,.68);
      backdrop-filter: blur(10px);
    }

    .inbox-retention-dialog {
      width: min(440px, 100%);
      display: grid;
      gap: 14px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 30%, var(--line));
      border-radius: 22px;
      padding: 20px;
      background: color-mix(in srgb, var(--card) 96%, black);
      box-shadow: 0 28px 80px rgba(0,0,0,.46);
    }

    .inbox-retention-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
    .inbox-retention-head > div { display: grid; gap: 3px; }
    .inbox-retention-head span { color: var(--today); font-size: 10px; font-weight: 950; letter-spacing: .08em; }
    .inbox-retention-head h2 { margin: 0; font-size: 22px; }
    .inbox-retention-dialog > p,
    .inbox-retention-dialog > small { margin: 0; color: var(--muted); line-height: 1.45; }
    .inbox-retention-dialog > p { font-size: 13px; }
    .inbox-retention-dialog > small { font-size: 11px; }
    .inbox-retention-options { display: grid; gap: 7px; }
    .inbox-retention-options button {
      min-height: 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px 13px;
      color: var(--text);
      background: rgba(255,255,255,.035);
      font: inherit;
      font-size: 13px;
      font-weight: 850;
    }
    .inbox-retention-options button.active {
      border-color: color-mix(in srgb, var(--good) 55%, var(--line));
      color: var(--good);
      background: color-mix(in srgb, var(--good) 10%, rgba(255,255,255,.035));
    }

    .inbox-dialog-card {
      width: min(420px, 100%);
      display: grid;
      gap: 18px;
      border: 1px solid color-mix(in srgb, var(--bad) 34%, var(--line));
      border-radius: 18px;
      padding: 18px;
      background:
        linear-gradient(135deg, rgba(255,92,122,.12), transparent 62%),
        rgba(21,27,47,.96);
      box-shadow: 0 28px 80px rgba(0,0,0,.42);
    }

    .inbox-dialog-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    .profile-shell {
      display: grid;
      grid-template-columns: minmax(0, 720px);
    }

    .profile-panel {
      display: grid;
      gap: 18px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 18px;
      background: rgba(21,27,47,.78);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }
.inbox-bubble-body a,
.message-body a {
  color: color-mix(in srgb, currentColor 74%, #5da9ff);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .inbox-page .inbox-shell.inbox-messenger{ border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
:where(body:not(.og-design)) .inbox-page .inbox-list-panel, :where(body:not(.og-design)) .inbox-page .inbox-compose-panel{ border-radius: 8px; box-shadow: none; backdrop-filter: none; }
:where(body:not(.og-design)) .inbox-page .message-card{ border-radius: 8px; box-shadow: none; }

.inbox-messenger .inbox-scroll .notification-card {
  margin-top: 5px;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
}

.inbox-messenger .inbox-scroll .notification-card:first-child {
  margin-top: 0;
}

.inbox-notification-origin {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}

.notification-card .message-identity,
.notification-card .message-heading {
  flex: 1 1 auto;
}

.notification-card .message-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.inbox-notification-copy {
  min-width: 0;
}

.inbox-notification-media {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
}

.inbox-notification-media .inbox-notification-emoji {
  width: 40px;
  height: 40px;
  font-size: 30px;
}

.inbox-notification-media .inbox-notification-emoji.is-shop-item,
.inbox-notification-media .inbox-notification-emoji.is-clothing {
  width: 42px;
  height: 42px;
  padding: 3px;
}

.inbox-notification-media .inbox-notification-emoji.is-achievement { width: 42px; height: 42px; }

.inbox-notification-currency {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  object-fit: contain;
}

.inbox-notification-sector {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
}

.inbox-notification-sector .bro-icon {
  width: 21px;
  height: 21px;
}

.inbox-messenger .inbox-notification-media .inbox-notification-sender {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  border: 2px solid var(--card);
  background: var(--card);
}

.inbox-messenger .inbox-notification-body .inbox-notification-actor-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border: 1px solid var(--line);
  background: var(--card);
}

.inbox-notification-body .message-avatar .game-avatar.compact {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: none;
}

.inbox-messenger .inbox-scroll .notification-card.unread {
  border-color: rgba(78, 197, 139, .48);
  background: rgba(78, 197, 139, .11);
  box-shadow: inset 3px 0 0 rgba(78, 197, 139, .88);
}

.inbox-messenger .inbox-scroll .notification-card:hover,
.inbox-messenger .inbox-scroll .notification-card:focus-visible {
  filter: brightness(1.15);
}

.inbox-messenger .inbox-scroll .notification-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Quelle: profile-games.css */
    .profile-color-list {
      display: grid;
      gap: 10px;
}

/* Zen-Refugium */
.zen-zoo-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.zen-zoo-card {
  overflow: hidden;
  border-color: rgba(255, 218, 112, .38);
  background: linear-gradient(145deg, rgba(29, 29, 40, .98), rgba(34, 24, 52, .98));
}

.zen-zoo-top {
  padding: 18px 20px;
}

.zen-zoo-pet-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow: auto;
  padding-right: 3px;
}

.zen-zoo-pet-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(10, 14, 25, .64);
}

.zen-zoo-pet-card.equipped {
  border-color: rgba(124, 238, 211, .62);
  box-shadow: inset 3px 0 #7ceed3;
}
.zen-zoo-pet-list[hidden] { display: none; }

.zen-zoo-pet-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 72px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--control-radius);
  color: var(--text);
  text-align: left;
  background: rgba(10, 14, 25, .64);
}

.zen-zoo-pet-row:hover { filter: brightness(1.14); }
.zen-zoo-pet-row.equipped { border-color: rgba(124, 238, 211, .62); }
.zen-zoo-pet-row.foraging { border-color: rgba(255, 220, 118, .62); }
.zen-zoo-pet-row.locked { opacity: .68; }
.zen-zoo-pet-row > img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.zen-zoo-pet-row.locked > img { filter: grayscale(1) brightness(.35); }
.zen-zoo-pet-row > span:not(.zen-zoo-pet-row-arrow) { display: grid; gap: 3px; min-width: 0; }
.zen-zoo-pet-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.zen-zoo-pet-row-arrow { color: #ffe078; font-size: 1.8rem; line-height: 1; }

.zen-zoo-pet-detail {
  display: grid;
  gap: 12px;
  width: min(820px, 100%);
  margin-inline: auto;
}
.zen-zoo-pet-detail[hidden] { display: none; }
.zen-zoo-pet-back { justify-self: start; }
.zen-zoo-pet-detail .zen-zoo-pet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  padding: 22px;
}
.zen-zoo-pet-card-head { display: flex; align-items: end; gap: 16px; min-width: 0; }
.zen-zoo-pet-card-head > span { display: grid; gap: 2px; margin-left: auto; padding-bottom: 9px; text-align: right; white-space: nowrap; }
.zen-zoo-pet-card-head > span small { color: var(--muted); }
.zen-zoo-pet-card-head > span b { color: #ffe6a0; }
.zen-zoo-pet-card-body {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  min-width: 0;
}
.zen-zoo-pet-card-body > img {
  width: min(220px, 100%);
  height: 220px;
  justify-self: center;
  object-fit: contain;
  image-rendering: pixelated;
}

@media (max-width: 680px) {
  .zen-zoo-pet-card-body { grid-template-columns: 1fr; }
  .zen-zoo-pet-card-body > img { width: min(180px, 70vw); height: min(180px, 70vw); }
}

.zen-stage.zen-refugium-stage {
  width: 100%;
  height: 610px;
  min-height: 610px;
  overflow: hidden;
  background: url("../assets/zen/zoo/refugium-background.jpg") center / cover no-repeat;
}

.zen-refugium-hud {
  width: auto;
  right: 14px;
  justify-content: space-between;
}

.zen-refugium-hud > span:last-child {
  text-align: right;
}

@media (max-width: 980px) {
  .zen-stage.zen-refugium-stage { height: 420px; min-height: 420px; }
}

@media (max-width: 640px) {
  .zen-stage.zen-refugium-stage { height: auto; min-height: 0; aspect-ratio: 1675 / 939; }
}


.zen-scene-edit-flip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--control-pad);
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-pill);
  background: rgba(8, 16, 28, .72);
  font-size: .78rem;
  font-weight: 800;
}

.zen-scene-accent-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--control-pad);
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-pill);
  background: rgba(8, 16, 28, .72);
  font-size: .76rem;
  font-weight: 800;
}

.zen-scene-depth-scale-control {
  display: inline-grid;
  grid-template-columns: auto minmax(90px, 150px) 42px;
  align-items: center;
  gap: 7px;
  min-height: var(--control-pad);
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-pill);
  background: rgba(8, 16, 28, .72);
  font-size: .76rem;
  font-weight: 800;
}
.zen-scene-depth-scale-control span { color: var(--muted); text-align: right; }

.zen-scene-accent-input {
  width: 32px;
  height: 26px;
  padding: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.zen-refugium-dialog .zen-info-dialog-card {
  width: min(940px, calc(100vw - 28px));
}

.zen-refugium-dialog .zen-info-content {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  padding: 14px 18px 20px;
}

/* Refugiumsdialoge bestehen aus vertikal angeordneten Vollbreiten-Bereichen
   und überschreiben bewusst das spätere dreispaltige Standard-Info-Raster. */
.zen-refugium-dialog .zen-zoo-pet-list,
.zen-refugium-dialog .zen-refugium-care-list,
.zen-refugium-dialog #zenZooTroughContent,
.zen-refugium-dialog .zen-zoo-shop-content {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.zen-zoo-shop-content { gap: 12px; }
.zen-zoo-shop-wallet {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 10px 14px;
  background: color-mix(in srgb, var(--card2) 92%, transparent);
  font-weight: 900;
}
.zen-zoo-shop-icon {
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--warn) 14%, rgba(255,255,255,.04));
}

.zen-zoo-shop-icon .zen-upgrade-icon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.zen-zoo-hearts { display: inline-flex; flex-wrap: wrap; gap: 2px; color: #ff83b6; }
.zen-zoo-hearts .golden {
  color: #ffd966;
  filter: drop-shadow(0 0 4px rgba(255,205,80,.48));
}
.zen-zoo-hearts .empty { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.zen-zoo-golden-heart-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.zen-zoo-golden-heart-buy {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid color-mix(in srgb, #ffd966 55%, var(--line));
  border-radius: 50%;
  color: #ffd966;
  background: color-mix(in srgb, #ffd966 12%, var(--card2));
  font-size: 12px;
  line-height: 1;
}

.zen-zoo-golden-heart-buy:disabled { opacity: .35; }
.zen-zoo-golden-heart-cost {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}
.zen-zoo-golden-heart-cost img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.zen-zoo-admin-toolbar,
.zen-zoo-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.zen-zoo-admin-toolbar {
  padding: 10px 12px;
  border: 1px dashed rgba(255, 224, 120, .42);
  border-radius: var(--control-radius);
  background: rgba(44, 31, 13, .42);
}

.zen-zoo-admin-toolbar strong { margin-right: auto; }

.zen-zoo-admin-actions {
  margin-top: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.zen-zoo-admin-actions button { min-height: 32px; padding: 5px 9px; }

.zen-refugium-care-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
}

.zen-refugium-care-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 126px;
  padding: 12px;
  border: 1px solid rgba(255, 224, 120, .24);
  border-radius: var(--control-radius);
  background: rgba(12, 15, 24, .72);
}

.zen-refugium-care-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  image-rendering: pixelated;
}

.zen-refugium-care-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: 7px 16px;
  min-width: 0;
}
.zen-refugium-care-card > div > strong,
.zen-refugium-care-card > div > small,
.zen-refugium-care-card > div > .zen-zoo-care-progress { grid-column: 1; }
.zen-refugium-care-card > div > button { grid-column: 2; grid-row: 1 / span 3; width: 100%; }
.zen-refugium-care-card small { color: var(--muted); }
.zen-zoo-care-all { justify-self: start; margin-bottom: 4px; }

@media (max-width: 680px) {
  .zen-refugium-care-card { grid-template-columns: 68px minmax(0, 1fr); min-height: 116px; }
  .zen-refugium-care-card img { width: 68px; height: 68px; }
  .zen-refugium-care-card > div { grid-template-columns: minmax(0, 1fr); }
  .zen-refugium-care-card > div > button { grid-column: 1; grid-row: auto; }
}
.zen-scene-roam-point-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.zen-scene-roam-point-actions .ghost-btn { min-height: 32px; padding: 5px 10px; }
.zen-scene-pet-frame-scales { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 7px; }
.zen-scene-pet-frame-scales label { padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; }
.zen-scene-pet-frame-scales label.active { border-color: #63e6be; background: rgba(99,230,190,.09); }

.zen-zoo-pet-card.foraging {
  border-color: rgba(255, 220, 118, .62);
  box-shadow: inset 3px 0 #ffe078;
}

.zen-zoo-pet-card.locked {
  opacity: .62;
}

.zen-zoo-pet-card.locked .zen-zoo-pet-card-body > img {
  filter: grayscale(1) brightness(.25);
}

.zen-zoo-pet-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.zen-zoo-pet-copy > span,
.zen-zoo-pet-copy > small {
  color: var(--muted);
}

.zen-zoo-pet-copy > span {
  color: #aeeadf;
  font-weight: 800;
}

.zen-zoo-pet-copy .zen-zoo-pet-bonus { display: grid; gap: 3px; }
.zen-zoo-pet-copy .zen-zoo-pet-bonus small { color: inherit; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.zen-zoo-pet-copy .zen-zoo-pet-bonus-value { display: inline; min-width: 0; }
.zen-zoo-pet-copy .zen-zoo-pet-bonus-value .zen-currency-icon { display: inline-block; margin-inline: .12em; }
.zen-zoo-pet-copy .zen-zoo-pet-bonus.inactive { color: var(--muted); opacity: .76; }
.zen-zoo-pet-copy .zen-zoo-unhappy { color: #ff9aab; }

.zen-zoo-pet-copy .zen-zoo-role {
  color: #ffe6a0;
  font-weight: 800;
}

.zen-zoo-pet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 6px;
}

.zen-zoo-pet-actions button {
  width: 100%;
  min-height: 34px;
  padding: 6px 11px;
}

@media (max-width: 980px) {
  .zen-zoo-layout {
    grid-template-columns: 1fr;
  }

}

.zen-inline-food-icon {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: -.22em;
  image-rendering: pixelated;
}

.zen-zoo-bond-progress { display: grid; gap: 5px; margin-top: 4px; }
.zen-zoo-bond-progress > span { display: flex; justify-content: space-between; gap: 10px; }
.zen-zoo-bond-progress strong { color: #ff8fbd; letter-spacing: .08em; }
.zen-zoo-bond-progress small { color: var(--muted); }
.zen-zoo-stat-info {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font: 900 11px/1 system-ui;
  vertical-align: middle;
}
.zen-zoo-stat-info:hover,
.zen-zoo-stat-info:focus-visible { color: var(--text); border-color: var(--profile-color, var(--today)); }
.zen-zoo-stat-panel {
  display: grid;
  gap: 3px;
  margin: 2px 0 5px;
  border: 1px solid color-mix(in srgb, #ff83b6 28%, var(--line));
  border-radius: 10px;
  padding: 9px 11px;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  background: rgba(255,255,255,.035);
  font-size: 12px;
  line-height: 1.45;
}
.zen-zoo-stat-panel[hidden] { display: none; }
.zen-zoo-pet-actions button small { font: inherit; color: color-mix(in srgb, currentColor 78%, var(--muted)); }
.zen-zoo-xp-action > i,
.zen-zoo-care-progress {
  display: block;
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-pill);
  background: rgba(6, 10, 18, .72);
}
.zen-zoo-xp-action > i > b,
.zen-zoo-care-progress > b {
  display: block;
  width: var(--zen-zoo-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f06da7, #ffd078);
}

.zen-zoo-xp-action { display: flex; align-items: center; gap: 7px; }
.zen-zoo-xp-action > i { flex: 1 1 auto; }
.zen-zoo-progression-buy {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}

.zen-zoo-pet-rename {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  align-items: end;
}

.zen-zoo-pet-rename label {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  color: var(--text-muted);
  font-size: .78rem;
}

.zen-zoo-pet-rename input {
  width: 100%;
  min-width: 0;
}

.zen-zoo-name-tag-shop {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 224, 120, .34);
  border-radius: var(--control-radius);
  background: rgba(42, 31, 12, .5);
}
.zen-zoo-name-tag-shop > img { width: 58px; height: 58px; object-fit: contain; image-rendering: pixelated; }
.zen-zoo-name-tag-shop > span { display: grid; gap: 3px; min-width: 0; }
.zen-zoo-name-tag-shop small { color: var(--muted); }
.zen-zoo-name-tag-shop b { color: #ffe078; }
.zen-zoo-name-tag-shop button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.zen-zoo-name-tag-assign { display: flex; flex: 1 1 auto; align-items: center; justify-content: space-between; gap: 10px; }
.zen-zoo-name-tag-assign button { display: inline-flex; align-items: center; gap: 6px; }
.zen-zoo-name-tag-assign button > img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }

@media (max-width: 680px) {
  .zen-zoo-name-tag-shop { grid-template-columns: 48px minmax(0, 1fr); }
  .zen-zoo-name-tag-shop > img { width: 48px; height: 48px; }
  .zen-zoo-name-tag-shop > button { grid-column: 1 / -1; width: 100%; }
  .zen-zoo-name-tag-assign { align-items: stretch; flex-direction: column; }
}

.zen-zoo-pet-detail .zen-zoo-admin-actions {
  margin-top: 4px;
}

@media (max-width: 680px) {
  .zen-zoo-pet-card-head, .zen-zoo-pet-rename { align-items: stretch; flex-direction: column; }
  .zen-zoo-pet-card-head > span { margin-left: 0; padding-bottom: 0; text-align: left; white-space: normal; }
  .zen-zoo-pet-actions { grid-template-columns: 1fr; }
  .zen-zoo-pet-detail .zen-zoo-pet-card { padding: 16px; }
}

    .admin-storage-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 18px;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 34%, var(--line));
      border-radius: 18px;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 9%, rgba(255,255,255,.045));
      box-shadow: var(--shadow);
    }

    .admin-storage-copy {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .admin-storage-toggle {
      display: inline-flex;
      flex: 0 0 auto;
      gap: 6px;
      padding: 5px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.045);
    }

    .admin-storage-toggle button {
      min-height: 36px;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 8px 12px;
      color: var(--muted);
      background: transparent;
      font-size: 13px;
      font-weight: 900;
    }

    .admin-storage-toggle button.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 58%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, rgba(255,255,255,.05));
    }

    .admin-storage-toggle button:disabled {
      cursor: not-allowed;
      opacity: .45;
    }

    .admin-usage-card {
      display: grid;
      gap: 16px;
      margin-top: 12px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(255,255,255,.035);
      box-shadow: var(--shadow);
    }

    .admin-usage-head,
    .admin-usage-title-row,
    .admin-usage-meter-head,
    .admin-usage-meta,
    .admin-usage-bucket-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .admin-usage-title-row {
      justify-content: flex-start;
      gap: 8px;
    }

    .admin-usage-info-button {
      display: inline-grid;
      width: 22px;
      height: 22px;
      min-height: 0;
      place-items: center;
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 50%;
      color: var(--muted);
      background: rgba(255,255,255,.045);
      font-family: Georgia, serif;
      font-size: 14px;
      font-weight: 900;
      line-height: 1;
    }

    .admin-usage-info-button:hover,
    .admin-usage-info-button.active {
      border-color: color-mix(in srgb, var(--today) 54%, var(--line));
      color: var(--text);
      background: color-mix(in srgb, var(--today) 12%, rgba(255,255,255,.045));
      filter: brightness(1.08);
    }

    .admin-usage-info {
      display: grid;
      gap: 12px;
      padding: 14px;
      border: 1px solid color-mix(in srgb, var(--today) 30%, var(--line));
      border-radius: var(--control-radius);
      background: color-mix(in srgb, var(--today) 7%, rgba(255,255,255,.03));
    }

    .admin-usage-info div {
      display: grid;
      grid-template-columns: 104px minmax(0, 1fr);
      gap: 10px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .admin-usage-info strong {
      color: var(--text);
    }

    .admin-usage-info p {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }

    .admin-usage-list,
    .admin-usage-meter {
      display: grid;
      gap: 10px;
    }

    .admin-usage-meter-head span,
    .admin-usage-meter-head strong {
      font-size: 14px;
    }

    .admin-usage-track {
      height: 10px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      background: rgba(255,255,255,.055);
    }

    .admin-usage-track span {
      display: block;
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: var(--good);
      transition: width .25s ease;
    }

    .admin-usage-meter.is-warning .admin-usage-track span {
      background: var(--warn);
    }

    .admin-usage-meter.is-critical .admin-usage-track span {
      background: var(--bad);
    }

    .admin-usage-meter.is-warning .admin-usage-meta {
      color: var(--warn);
    }

    .admin-usage-meter.is-critical .admin-usage-meta {
      color: var(--bad);
    }

    .admin-usage-meta,
    .admin-usage-note,
    .admin-usage-buckets summary,
    .admin-usage-bucket-row {
      color: var(--muted);
      font-size: 12px;
    }

    .admin-usage-buckets {
      padding-top: 4px;
      border-top: 1px solid var(--line);
    }

    .admin-usage-buckets summary {
      padding: 10px 0;
      cursor: pointer;
      font-weight: 900;
    }

    .admin-usage-bucket-row {
      padding: 7px 0;
    }

    .admin-usage-bucket-row > span {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .admin-usage-bucket-row > span > strong {
      color: var(--text);
      font-size: 13px;
    }

    .admin-usage-bucket-row small {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.35;
    }

    .admin-usage-error {
      padding: 12px;
      border: 1px solid color-mix(in srgb, var(--bad) 48%, var(--line));
      border-radius: var(--control-radius);
      color: var(--bad);
      background: color-mix(in srgb, var(--bad) 9%, transparent);
      font-size: 13px;
      font-weight: 800;
    }

    .admin-usage-note {
      margin: 0;
      line-height: 1.5;
    }

    .profile-color-card {
      display: grid;
      grid-template-columns: 76px minmax(0, 1fr);
      align-items: center;
      gap: 12px;
      border: 1px solid color-mix(in srgb, var(--profile-color) 34%, var(--line));
      border-radius: 16px;
      padding: 12px;
      background: color-mix(in srgb, var(--profile-color) 9%, rgba(255,255,255,.045));
    }

    .profile-color-card.active {
      border-color: color-mix(in srgb, var(--profile-color) 68%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 16%, transparent) inset;
    }

    .profile-main-card {
      grid-template-columns: 112px minmax(0, 1fr);
      align-items: flex-start;
      padding: 18px;
    }

    .profile-main-card .profile-color-preview,
    .profile-main-card .profile-color-preview .game-avatar {
      width: 104px;
      height: 104px;
    }

    .profile-main-card.is-editing {
      border-color: color-mix(in srgb, var(--profile-color) 78%, white);
    }

    .profile-edit-actions {
      margin-top: 14px;
    }

    .profile-other-list {
      display: grid;
      gap: 8px;
      opacity: .72;
    }

    .profile-other-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .profile-color-preview {
      width: 72px;
      height: 72px;
      display: grid;
      place-items: center;
    }

    .profile-color-preview .game-avatar {
      width: 72px;
      height: 72px;
    }

    .profile-color-copy {
      min-width: 0;
    }

    .profile-accent-control {
      display: grid;
      gap: 5px;
      width: fit-content;
      margin-top: 12px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .profile-accent-control input[type="color"] {
      width: 82px;
      height: 40px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 4px;
      background: rgba(255,255,255,.06);
      cursor: pointer;
    }

    .profile-accent-control input[type="color"]:disabled {
      cursor: not-allowed;
      opacity: .42;
    }

    .profile-color-name {
      font-size: 18px;
      font-weight: 950;
    }

    .profile-color-name-input {
      width: 100%;
      border: 1px solid transparent;
      border-radius: 10px;
      padding: 6px 8px;
      color: var(--text);
      background: transparent;
      font: inherit;
      font-size: 18px;
      font-weight: 950;
    }

    .profile-color-name-input:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--profile-color) 62%, white);
      background: rgba(255,255,255,.055);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--profile-color) 14%, transparent);
    }

    .profile-color-name-input:disabled {
      cursor: not-allowed;
      opacity: .58;
    }

    .profile-color-note {
      margin-top: 3px;
      color: var(--muted);
      font-size: 13px;
    }

    .avatar-editor {
      display: grid;
      gap: 12px;
      margin-top: 14px;
      border-top: 1px solid color-mix(in srgb, var(--profile-color) 28%, var(--line));
      padding-top: 14px;
    }

    .avatar-editor-group {
      display: grid;
      gap: 7px;
    }

    .avatar-editor-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .avatar-choice-row {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .avatar-choice {
      min-height: 34px;
      border-radius: 999px;
      padding: 7px 10px;
      color: var(--muted);
      background: rgba(255,255,255,.045);
      font-size: 12px;
      font-weight: 900;
    }

    .avatar-choice.active {
      color: var(--text);
      border-color: color-mix(in srgb, var(--profile-color) 68%, white);
      background: color-mix(in srgb, var(--profile-color) 18%, rgba(255,255,255,.05));
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-color) 14%, transparent) inset;
    }

    .avatar-color-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }

    .avatar-color-grid label {
      display: grid;
      gap: 5px;
      min-width: 0;
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
    }

    .avatar-color-grid input[type="color"] {
      width: 100%;
      min-width: 0;
      height: 38px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 4px;
      background: rgba(255,255,255,.06);
      cursor: pointer;
    }

    .avatar-editor-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .profile-color-card .avatar-color-grid input[type="color"] {
      width: 100%;
      min-width: 0;
      height: 38px;
    }

    .empty-inbox {
      color: var(--muted);
      border: 1px dashed var(--line);
      border-radius: 14px;
      padding: 16px;
      font-size: 13px;
    }

    .zen-layout {
      display: grid;
      grid-template-columns: minmax(420px, 1fr) minmax(300px, 340px) minmax(180px, 220px);
      gap: 16px;
      align-items: start;
      scrollbar-gutter: stable;
    }

    .zen-layout[hidden] {
      display: none;
    }

    .zen-garden-tabs {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 14px;
    }

    .zen-audio-toolbar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      margin: 0;
    }

    .zen-navigation-row {
      position: relative;
      z-index: 30;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-bottom: 14px;
    }

    .zen-navigation-row .zen-garden-tabs {
      order: 1;
      width: min(430px, 100%);
      margin: 0;
      justify-self: center;
    }

    .zen-navigation-row .zen-audio-toolbar {
      order: 2;
      justify-content: center;
    }

    @media (min-width: 760px) {
      .zen-navigation-row {
        display: grid;
        grid-template-columns: minmax(280px, 430px) auto;
        align-items: stretch;
        justify-content: center;
      }

      .zen-navigation-row .zen-garden-tabs {
        grid-column: 1;
      }

      .zen-navigation-row .zen-audio-toolbar {
        grid-column: 2;
      }

      .zen-navigation-row .game-audio-control,
      .zen-navigation-row .game-icon-btn {
        height: 100%;
      }
    }

    .zen-garden-tabs .profile-btn {
      justify-content: center;
      min-height: 42px;
    }

    .zen-garden-tabs .profile-btn:disabled {
      cursor: not-allowed;
      opacity: .52;
    }

    .zen-location-switcher {
      position: relative;
      display: block;
    }

    .zen-location-switcher.open {
      z-index: 140;
    }

    .zen-location-trigger {
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr) 22px;
      align-items: center;
      gap: 11px;
      width: 100%;
      min-height: 58px;
      padding: 7px 14px;
      border: 1px solid color-mix(in srgb, var(--today) 30%, var(--line));
      border-radius: var(--radius-pill);
      color: var(--text);
      background: rgba(7, 11, 24, .72);
      box-shadow: 0 10px 28px rgba(2, 6, 18, .22);
    }

    .zen-location-trigger:hover,
    .zen-location-switcher.open .zen-location-trigger {
      border-color: color-mix(in srgb, var(--today) 58%, var(--line));
      background: rgba(13, 19, 37, .94);
    }

    .zen-location-icon,
    .zen-location-option > span {
      display: grid;
      place-items: center;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      color: #fff0a8;
      background: rgba(238, 193, 73, .16);
      font-size: 20px;
      line-height: 1;
    }

    .zen-location-picker-copy {
      display: grid;
      gap: 1px;
      min-width: 0;
    }

    .zen-location-picker-copy small {
      color: var(--muted);
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .11em;
      text-transform: uppercase;
    }

    .zen-location-picker-copy strong {
      overflow: hidden;
      font-size: 15px;
      font-weight: 900;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .zen-location-trigger > .ui-dropdown-chevron { width: 18px; height: 18px; }

    .zen-location-menu {
      top: calc(100% + 8px);
      min-width: min(310px, calc(100vw - 32px));
      padding: 7px;
      border-color: color-mix(in srgb, var(--today) 30%, var(--line));
      border-radius: 20px;
      background: rgba(10, 15, 30, .98);
      box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
      backdrop-filter: blur(18px);
    }

    .zen-location-option {
      display: grid;
      grid-template-columns: 32px minmax(0, 1fr);
      min-height: 48px;
      border-radius: 14px;
      font-weight: 850;
    }

    .zen-location-option > span {
      width: 30px;
      height: 30px;
      font-size: 17px;
    }

    .zen-garden-card {
      position: relative;
      min-width: 0;
      background: rgba(21,27,47,.78);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 18px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .zen-stage {
      --profile-color: var(--today);
      --zen-growth: 0;
      position: relative;
      min-height: 520px;
      border: 1px solid color-mix(in srgb, var(--profile-color) 38%, rgba(255,255,255,.12));
      border-radius: 20px;
      overflow: hidden;
      background:
        radial-gradient(circle at 50% 68%, color-mix(in srgb, var(--profile-color) 12%, transparent), transparent 34%),
        linear-gradient(180deg, rgba(246,193,119,.16), rgba(246,193,119,.05) 42%, rgba(181,137,83,.14));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 20px 50px rgba(0,0,0,.28);
    }

    .zen-stage::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0;
      background:
        radial-gradient(ellipse at 36% 34%, rgba(125,211,252,.26), transparent 22%),
        linear-gradient(110deg, transparent 8%, rgba(125,211,252,.28) 12%, transparent 18%),
        linear-gradient(122deg, transparent 32%, rgba(125,211,252,.22) 37%, transparent 43%),
        linear-gradient(100deg, transparent 58%, rgba(125,211,252,.2) 62%, transparent 68%);
      transform: translateY(-10px);
    }

    .zen-stage.watering::after {
      animation: zenWaterSweep 1s ease-out;
    }

    /* Ruhigeres Garden-Dashboard: wichtige Werte liegen direkt in der Szene,
       während die umgebenden Karten visuell als ein System gelesen werden. */
    .zen-garden-tabs {
      width: min(760px, 100%);
      margin-inline: auto;
      padding: 5px;
      border: 1px solid color-mix(in srgb, var(--today) 22%, var(--line));
      border-radius: var(--radius-pill);
      background: rgba(7,11,24,.52);
      box-shadow: inset 0 1px rgba(255,255,255,.05);
    }

    .zen-garden-tabs .profile-btn {
      border-radius: var(--radius-pill);
    }

    .zen-layout > .zen-garden-card,
    .zen-layout > .zen-panel,
    .zen-layout > .zen-economy-panel .zen-economy-card {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 22%, var(--line));
      background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--profile-color, var(--today)) 10%, transparent), transparent 32%),
        rgba(18,24,43,.86);
    }

    .zen-stage {
      background:
        radial-gradient(ellipse at 50% 82%, color-mix(in srgb, var(--profile-color) 18%, transparent), transparent 44%),
        radial-gradient(circle at 78% 12%, rgba(246,193,119,.2), transparent 22%),
        url("../assets/zen/backgrounds/normal.jpg") center / cover no-repeat;
    }

    .zen-stage::before,
    .zen-royal-stage::before {
      content: "";
      position: absolute;
      z-index: 1;
      inset: auto 0 0;
      height: 38%;
      pointer-events: none;
      background: linear-gradient(180deg, transparent, rgba(4,7,15,.28));
    }

    .zen-stage-hud {
      position: absolute;
      z-index: 8;
      top: 14px;
      left: 14px;
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      pointer-events: none;
    }

    .zen-stage-hud span {
      display: grid;
      gap: 2px;
      min-width: 128px;
      padding: 8px 11px;
      border: 1px solid rgba(255,255,255,.13);
      border-radius: 12px;
      background: rgba(6,10,20,.66);
      box-shadow: 0 8px 24px rgba(0,0,0,.2);
      backdrop-filter: blur(10px);
    }

    .zen-stage-hud small {
      color: rgba(255,255,255,.6);
      font-size: 9px;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .zen-stage-hud strong {
      color: #fff;
      font-size: 13px;
    }

    .zen-royal-hud span {
      border-color: rgba(246,209,122,.28);
      background: rgba(35,22,4,.68);
    }

    .zen-claim-box {
      border-left: 3px solid color-mix(in srgb, var(--profile-color, var(--today)) 72%, #fff 8%);
    }

    .zen-upgrade {
      overflow: hidden;
      transition: filter .18s ease, border-color .18s ease, background-color .18s ease;
    }

    .zen-upgrade.affordable {
      border-color: color-mix(in srgb, var(--good) 52%, var(--line));
      box-shadow: inset 0 -3px color-mix(in srgb, var(--good) 42%, transparent);
    }

    .zen-upgrade.unaffordable {
      opacity: .42;
      filter: grayscale(.9) brightness(.7) saturate(.35);
    }

    .zen-upgrade.maxed {
      border-color: color-mix(in srgb, var(--good) 75%, var(--line));
      background: color-mix(in srgb, var(--good) 40%, rgba(10,20,15,.92));
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 34%, transparent), 0 0 24px color-mix(in srgb, var(--good) 38%, transparent);
      animation: zenMaxedGlow 2.6s ease-in-out infinite;
    }

    /* Ein eigener Erfolgsstatus unterscheidet fertig ausgebaute Upgrades klar
       von unbezahlbaren Karten. Das Abzeichen sitzt bewusst am Bild statt bei
       den Info-/Admin-Aktionen rechts oben. */
    .zen-upgrade.maxed::after,
    .zen-station-upgrade-card.maxed::after,
    .zen-decoration-action-card.maxed::after {
      content: "✓";
      position: absolute;
      z-index: 4;
      top: 5px;
      left: 5px;
      display: grid;
      width: 23px;
      height: 23px;
      place-items: center;
      border: 2px solid color-mix(in srgb, var(--good) 72%, #fff);
      border-radius: 50%;
      color: #07150d;
      background: color-mix(in srgb, var(--good) 84%, #fff);
      box-shadow: 0 3px 10px rgba(0,0,0,.42), 0 0 14px color-mix(in srgb, var(--good) 55%, transparent);
      font-size: 14px;
      font-weight: 1000;
      line-height: 1;
      pointer-events: none;
    }

    /* Fertige Upgrades sind ein Erfolg, kein Fehlschlag – die globale
       button:disabled-Abdunklung (siehe components.css) würde die satte
       Maxed-Füllung sonst wieder ausgrauen. */
    .maxed:disabled,
    .maxed :disabled {
      opacity: 1;
      filter: none;
      cursor: default;
    }

    @keyframes zenMaxedGlow {
      0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 34%, transparent), 0 0 24px color-mix(in srgb, var(--good) 38%, transparent); }
      50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 52%, transparent), 0 0 34px color-mix(in srgb, var(--good) 58%, transparent); }
    }

    .zen-upgrade:hover {
      filter: brightness(1.12);
    }

    @keyframes zenWaterSweep {
      0% { opacity: 0; transform: translateY(-18px); }
      18% { opacity: .95; }
      100% { opacity: 0; transform: translateY(36px); }
    }

    .zen-sky {
      position: absolute;
      inset: 0 0 auto;
      height: 42%;
      background:
        radial-gradient(circle at 18% 24%, color-mix(in srgb, var(--profile-color) 26%, transparent), transparent 22%),
        linear-gradient(180deg, rgba(138,180,255,.18), transparent);
    }

    .zen-sun {
      position: absolute;
      top: 44px;
      right: 58px;
      width: 78px;
      height: 78px;
      border-radius: 50%;
      background: color-mix(in srgb, var(--profile-color) 36%, var(--warn));
      box-shadow: 0 0 70px color-mix(in srgb, var(--profile-color) 34%, transparent);
    }

    .zen-rake-lines {
      position: absolute;
      inset: 42% 0 0;
      opacity: calc(.2 + var(--zen-growth) * .72);
      background:
        repeating-radial-gradient(ellipse at 48% 74%, transparent 0 16px, rgba(255,255,255,.22) 17px 19px, transparent 20px 32px),
        repeating-linear-gradient(168deg, transparent 0 22px, rgba(255,255,255,.11) 23px 25px, transparent 26px 44px);
    }

    .zen-bonsai {
      --bonsai-scale: 1;
      position: absolute;
      left: 14%;
      bottom: 58px;
      width: 170px;
      height: 220px;
      transform: scale(var(--bonsai-scale));
      transform-origin: bottom center;
      transition: transform .2s ease;
    }

    .zen-bonsai .trunk {
      position: absolute;
      left: 78px;
      bottom: 24px;
      width: 22px;
      height: 116px;
      border-radius: 999px 999px 8px 8px;
      background: linear-gradient(90deg, #5a3922, #9a6438);
      transform: rotate(8deg);
    }

    .zen-bonsai .leaf {
      position: absolute;
      border-radius: 55% 45% 58% 42%;
      background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.22), transparent 24%),
        color-mix(in srgb, var(--profile-color) 46%, var(--good));
      box-shadow: 0 12px 30px color-mix(in srgb, var(--profile-color) 28%, transparent);
    }

    .zen-bonsai .leaf-a {
      left: 20px;
      top: 48px;
      width: 96px;
      height: 74px;
      transform: rotate(-18deg);
    }

    .zen-bonsai .leaf-b {
      right: 6px;
      top: 18px;
      width: 106px;
      height: 82px;
      transform: rotate(14deg);
    }

    .zen-bonsai .leaf-c {
      left: 52px;
      top: 0;
      width: 88px;
      height: 66px;
    }

    .zen-pond {
      position: absolute;
      right: 10%;
      bottom: 76px;
      width: 220px;
      height: 94px;
      border-radius: 50%;
      opacity: 0;
      background:
        radial-gradient(ellipse at 34% 42%, rgba(255,255,255,.28), transparent 26%),
        color-mix(in srgb, var(--profile-color) 38%, #3fb8ff);
      box-shadow: inset 0 0 0 8px rgba(255,255,255,.08), 0 16px 42px rgba(0,0,0,.22);
      transition: opacity .2s ease;
    }

    .zen-pond.visible,
    .zen-torii.visible,
    .zen-statue.visible {
      opacity: 1;
    }

    .zen-torii {
      position: absolute;
      left: 44%;
      top: 118px;
      width: 154px;
      height: 148px;
      opacity: 0;
      border-top: 16px solid color-mix(in srgb, var(--profile-color) 50%, #ff5c7a);
      transition: opacity .2s ease;
    }

    .zen-torii::before,
    .zen-torii::after {
      content: "";
      position: absolute;
      top: 16px;
      width: 18px;
      height: 124px;
      border-radius: 999px 999px 0 0;
      background: color-mix(in srgb, var(--profile-color) 38%, #8b1e2d);
    }

    .zen-torii::before {
      left: 28px;
    }

    .zen-torii::after {
      right: 28px;
    }

    .zen-torii span {
      position: absolute;
      left: 12px;
      right: 12px;
      top: 44px;
      height: 12px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--profile-color) 44%, #ffb3c0);
    }

    .zen-stones span {
      position: absolute;
      width: 42px;
      height: 24px;
      border-radius: 50%;
      background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.06)), #6c7489;
      box-shadow: 0 8px 18px rgba(0,0,0,.22);
    }

    .zen-statue {
      position: absolute;
      right: 16%;
      top: 214px;
      width: 74px;
      height: 96px;
      display: grid;
      place-items: center;
      opacity: 0;
      border-radius: 28px 28px 16px 16px;
      color: #07120c;
      background: linear-gradient(180deg, var(--warn), color-mix(in srgb, var(--profile-color) 36%, var(--warn)));
      font-size: 18px;
      font-weight: 950;
      box-shadow: 0 18px 44px rgba(0,0,0,.26);
      transition: opacity .2s ease;
    }

    .zen-garden-actions {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      align-items: start;
      margin-top: 12px;
    }

    /* Gießen liegt als Overlay unten links auf der Garten-Stage (position:
       relative) – nicht im Actions-Bereich, sonst überlagert er die
       AsZENsion-Karte. */
    /* Admin-Editor für die Garten-Szene (siehe zenInitSceneEditor in
       js/zen-garden.js / setEditMode in js/zen-garden-scene.js): Drag zum
       Verschieben, Mausrad zum Skalieren, Export-Button zeigt den fertigen
       ZEN_SCENE_LAYOUT-Code. Nur für Admin-Profile sichtbar. */
    /* Normaler Fluss statt position:absolute auf der Stage: dort kollidierte
       der Button mit dem Produktions-HUD, dessen Breite je nach Textlänge
       schwankt (siehe zenRenderSceneEditToolbar - sitzt jetzt als eigene
       Zeile direkt unter .zen-navigation-row, für beide Gärten gemeinsam). */
    .zen-scene-edit-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      margin-bottom: 10px;
    }

    .zen-scene-edit-toolbar:empty {
      display: none;
    }

    .zen-scene-edit-toolbar .ghost-btn,
    .zen-scene-edit-toolbar .good {
      padding: 6px 10px;
      font-size: 11px;
      min-height: 0;
      width: auto;
    }

    .zen-scene-edit-tree-stage {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      font-size: 11px;
      font-weight: 800;
      color: var(--muted);
    }

    .zen-scene-edit-tree-stage button {
      min-width: 22px;
      height: 22px;
      padding: 0;
      border-radius: 50%;
      font-size: 13px;
      line-height: 1;
    }

    /* Mini-Menü fürs gerade angeklickte Objekt (zenRenderSceneEditSelection):
       legt fest, ob Drag/Mausrad Sprite, Schatten oder Notification trifft -
       macht das Bearbeiten überlappender Elemente eindeutig statt Trial-and-
       Error über sich überschneidende Hitboxen. */
    .zen-scene-edit-selection {
      flex-basis: 100%;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--surface-2, rgba(255, 255, 255, .04));
    }

    .zen-scene-edit-selection-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12px;
      font-weight: 800;
    }

    .zen-scene-edit-selection-head button {
      min-width: 22px;
      height: 22px;
      padding: 0;
      border-radius: 50%;
      font-size: 12px;
      line-height: 1;
    }

    .zen-scene-edit-selection-targets {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }

    .zen-scene-edit-target {
      padding: 5px 10px;
      font-size: 11px;
      min-height: 0;
      width: auto;
    }

    .zen-scene-edit-target.active {
      background: var(--accent, #4c8dff);
      color: #fff;
      border-color: transparent;
    }

    .zen-scene-edit-depth {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-left: auto;
    }

    .zen-scene-edit-depth button {
      min-width: 24px;
      height: 24px;
      padding: 0;
      font-size: 12px;
      line-height: 1;
    }

    .zen-scene-edit-depth-value {
      min-width: 22px;
      text-align: center;
      font-size: 11px;
      font-weight: 800;
      color: var(--muted);
    }

    .zen-scene-edit-alpha {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 700;
      color: var(--muted);
    }

    .zen-scene-edit-alpha input[type="range"] {
      flex: 1;
    }

    .zen-stage .zen-water-btn {
      position: absolute;
      left: 16px;
      bottom: 16px;
      z-index: 5;
      min-height: 0;
      width: auto;
      max-width: calc(100% - 32px);
      padding: 10px 14px;
      border-radius: 999px;
      background: color-mix(in srgb, var(--card) 72%, rgba(125,211,252,.22));
      box-shadow: 0 12px 30px rgba(0,0,0,.24);
    }

    .zen-ascension-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
      gap: 12px;
      align-items: center;
      border: 1px solid color-mix(in srgb, var(--warn) 44%, var(--line));
      border-radius: 14px;
      padding: 11px 12px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--warn) 12%, rgba(255,255,255,.04)), rgba(255,255,255,.035));
    }

    .zen-ascension-card .section-subtitle {
      margin-top: 3px;
    }

    .zen-ascension-card button {
      white-space: nowrap;
    }

    .zen-panel {
      min-width: 0;
      align-self: stretch;
    }

    .zen-daily-panel {
      align-self: start;
      align-content: start;
      grid-template-rows: none;
    }

    .zen-daily-panel .score-grid {
      align-items: start;
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: none;
    }

    .zen-daily-panel .mini {
      height: auto;
      min-height: 0;
      padding: 10px;
    }

    .zen-daily-panel .mini strong {
      font-size: 20px;
    }

    .zen-hero-mini {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 36%, var(--line));
      background: color-mix(in srgb, var(--profile-color, var(--today)) 10%, rgba(255,255,255,.04));
    }

    .zen-hero-mini span {
      font-size: 13px;
      font-weight: 900;
      letter-spacing: .02em;
    }

    .zen-hero-mini strong {
      font-size: 34px;
      line-height: 1;
    }

    .zen-currency-icon {
      width: 1.15em;
      height: 1.15em;
      vertical-align: -0.2em;
      filter: drop-shadow(0 1px 2px rgba(0,0,0,.18));
    }

    .zen-scene-hitbox-size {
      display: grid;
      grid-template-columns: repeat(2, minmax(90px, 1fr));
      gap: 8px;
    }

    .zen-scene-hitbox-size label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
    }

    .zen-scene-hitbox-size input {
      width: 100%;
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 6px 8px;
      color: var(--text);
      background: rgba(255,255,255,.06);
    }

    .zen-scene-hitbox-size small {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
    }

    .zen-scene-label-editor {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
    }

    .zen-scene-label-editor input {
      width: 100%;
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 9px;
      padding: 6px 8px;
      color: var(--text);
      background: rgba(255,255,255,.06);
    }

    .zen-scene-label-editor small {
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
    }

    .zen-scene-label-visibility {
      display: flex;
      align-items: center;
      gap: 7px;
      color: var(--text);
      font-size: 11px;
    }

    .zen-scene-label-editor .zen-scene-label-visible {
      width: 16px;
      min-height: 16px;
      margin: 0;
      padding: 0;
      accent-color: var(--today);
    }

    .zen-watering-emoji {
      width: 1.45em;
      height: 1.45em;
      object-fit: contain;
      vertical-align: -0.34em;
      filter: drop-shadow(0 1px 2px rgba(0,0,0,.28));
    }

    .zen-watering-emoji.golden {
      filter: sepia(1) saturate(2.2) hue-rotate(350deg) brightness(1.25) drop-shadow(0 1px 3px rgba(255,205,75,.45));
    }

    .zen-hero-mini .zen-currency-icon {
      width: 1.35em;
      height: 1.35em;
    }

    .zen-economy-panel {
      display: grid;
      align-content: start;
      gap: 16px;
      min-width: 0;
      text-align: left;
    }

    .zen-economy-card.highscore-panel {
      border-top: 0;
      padding: 18px;
    }

    .zen-shop-launcher {
      display: grid;
      gap: 12px;
      align-content: start;
      min-height: 0;
    }

    .zen-shop-launcher .section-title {
      font-size: 22px;
    }

    .zen-shop-launcher button {
      width: 100%;
    }

    /* Fester Dialog-Rahmen: Größe kommt vom Dialog selbst (Elementselektor
       schlägt die spätere .zen-info-dialog-Basisregel), die Card füllt ihn
       und nur die Upgrade-Liste scrollt – nichts wird mehr abgeschnitten. */
    dialog.zen-shop-dialog {
      width: min(1040px, calc(100vw - 28px));
      height: min(840px, calc(100vh - 32px));
      max-height: none;
    }

    .zen-shop-dialog-card {
      width: 100%;
      height: 100%;
      max-height: none;
    }

    .zen-shop-dialog .zen-upgrades {
      margin-top: 14px;
      min-height: 0;
      overflow: auto;
      padding-right: 4px;
      /* Feste Dialoghöhe darf die Zeilen nicht auseinanderziehen. */
      align-content: start;
    }

    /* Tabs bleiben beim Scrollen der Liste oben sichtbar. */
    .zen-shop-dialog .zen-shop-tabs {
      position: sticky;
      top: 0;
      z-index: 3;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      margin-top: -2px;
      padding: 2px 0 10px;
      background: rgba(21,27,47,.97);
    }

    .zen-shop-dialog .zen-upgrade-list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .zen-claim-box {
      display: grid;
      gap: 10px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
      border-radius: 16px;
      padding: 12px;
      background: rgba(255,255,255,.045);
    }

    .zen-claim-box[hidden] {
      display: none;
    }

    .zen-scene-claims-ready .zen-scene-claim-source {
      display: none;
    }

    .zen-claim-station-dialog {
      width: min(900px, calc(100vw - 24px));
      overflow: visible;
    }

    .zen-claim-station-body {
      display: grid;
      gap: 16px;
      min-height: 0;
      padding: 16px;
      overflow: auto;
    }

    .zen-claim-station-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .zen-claim-station-summary > span {
      display: grid;
      gap: 4px;
      border: 1px solid var(--line);
      border-radius: var(--control-radius);
      padding: 11px;
      background: rgba(255,255,255,.04);
    }

    .zen-claim-station-summary > .zen-station-storage-overview {
      gap: 7px;
    }

    .zen-station-storage-overview strong {
      flex-wrap: wrap;
    }

    .zen-station-storage-overview strong i {
      color: var(--muted);
      font-style: normal;
      font-weight: 700;
    }

    .zen-claim-station-summary small {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .zen-claim-station-summary strong {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 18px;
    }

    .zen-station-rewards {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .zen-station-reward-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-content: space-between;
      gap: 12px;
      min-width: 0;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 28%, var(--line));
      border-radius: 16px;
      padding: 14px;
      background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--profile-color, var(--today)) 14%, transparent), transparent 48%),
        rgba(255,255,255,.04);
    }

    .zen-station-reward-secondary {
      border-color: color-mix(in srgb, var(--warn) 30%, var(--line));
    }

    .zen-station-reward-card > div {
      display: grid;
      gap: 5px;
    }

    .zen-station-reward-card small {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .zen-station-reward-card strong {
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 24px;
      line-height: 1;
    }

    .zen-station-reward-card button {
      width: 100%;
      min-height: 42px;
    }

    .zen-station-tools {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      border-bottom: 1px solid var(--line);
      padding-bottom: 12px;
    }

    .zen-station-tools button {
      min-width: 132px;
    }

    .zen-station-storage-track {
      --zen-storage: 0%;
      height: 12px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      background: rgba(255,255,255,.06);
    }

    .zen-station-storage-track > i {
      display: block;
      width: var(--zen-storage);
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #57d9cc, #f4c85c);
    }

    /* AsZENded-Garten: durchgehend gold statt des teal-zu-gold-Verlaufs, wie
       bei allen anderen Notices/Badges dort (siehe idle-Badge in
       zen-garden-scene.js). */
    .zen-claim-station-summary.royal .zen-station-storage-track > i {
      background: #f4c85c;
    }

    .zen-station-missions {
      grid-template-columns: 1fr;
      border-top: 0;
      padding: 0;
      overflow: visible;
    }

    .zen-station-missions .zen-daily-progress-row {
      align-content: space-between;
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: rgba(255,255,255,.025);
    }

    .zen-station-missions .zen-daily-progress-top {
      gap: 8px;
    }

    .zen-station-mission-empty {
      display: grid;
      gap: 5px;
      border: 1px dashed color-mix(in srgb, var(--warn) 42%, var(--line));
      border-radius: 14px;
      padding: 14px;
      background: color-mix(in srgb, var(--warn) 7%, rgba(255,255,255,.025));
    }

    .zen-station-mission-empty strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .zen-station-mission-empty small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.45;
    }

    .zen-station-tabs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 5px;
      background: rgba(3,8,17,.28);
    }

    .zen-station-tabs button {
      min-height: 40px;
      border-color: transparent;
      background: transparent;
      color: var(--muted);
      font-weight: 950;
    }

    .zen-station-tabs button.active {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 48%, var(--line));
      background: color-mix(in srgb, var(--profile-color, var(--today)) 16%, rgba(255,255,255,.05));
      color: var(--text);
    }

    .zen-daily-mission-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
    }

    .zen-daily-mission-card {
      display: grid;
      grid-template-columns: 58px minmax(0, 1fr) minmax(170px, 230px) auto;
      align-items: center;
      gap: 12px;
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 14px;
      background: rgba(255,255,255,.035);
    }

    .zen-daily-mission-icon {
      display: grid;
      place-items: center;
      width: 52px;
      height: 52px;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 34%, var(--line));
      border-radius: 14px;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 9%, rgba(255,255,255,.035));
    }

    .zen-daily-mission-icon img {
      display: block;
      width: 46px;
      height: 46px;
      object-fit: contain;
      image-rendering: pixelated;
    }

    .zen-daily-mission-icon.placeholder {
      color: var(--warn);
      border-style: dashed;
      font-size: 22px;
      font-weight: 950;
    }

    .zen-daily-mission-card.locked {
      grid-template-columns: minmax(0, 1fr) auto;
    }

    .zen-daily-mission-card > button {
      width: auto;
      min-width: 118px;
      min-height: 36px;
      padding: 7px 11px;
      font-size: 10px;
      white-space: nowrap;
    }

    .zen-daily-mission-card.login,
    .zen-daily-mission-card.complete {
      border-color: color-mix(in srgb, var(--good) 50%, var(--line));
      background: color-mix(in srgb, var(--good) 9%, rgba(255,255,255,.035));
    }

    .zen-daily-mission-card.locked {
      border-style: dashed;
      opacity: .72;
    }

    .zen-daily-mission-card.locked.can-unlock {
      border-style: solid;
      border-color: color-mix(in srgb, var(--good) 58%, var(--line));
      opacity: 1;
      background: color-mix(in srgb, var(--good) 9%, rgba(255,255,255,.035));
      box-shadow: inset 0 -2px color-mix(in srgb, var(--good) 30%, transparent);
    }

    .zen-daily-slot-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      border: 1px dashed color-mix(in srgb, var(--warn) 46%, var(--line));
      border-radius: 16px;
      padding: 14px;
      background: color-mix(in srgb, var(--warn) 7%, rgba(255,255,255,.03));
    }

    .zen-daily-reroll-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 12px;
      padding: 12px 14px;
      border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
      border-radius: 16px;
      background: color-mix(in srgb, var(--accent) 7%, rgba(255,255,255,.03));
    }

    .zen-daily-reroll-bar > span {
      display: grid;
      gap: 3px;
    }

    .zen-daily-reroll-bar strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .zen-daily-reroll-bar small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
    }

    .zen-daily-slot-card > div {
      display: grid;
      gap: 4px;
    }

    .zen-daily-slot-card strong {
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .zen-daily-slot-card span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.4;
    }

    .zen-daily-slot-card > b {
      color: var(--good);
      font-size: 13px;
    }

    .zen-daily-slot-card.can-unlock {
      border-style: solid;
      border-color: color-mix(in srgb, var(--good) 60%, var(--line));
      background: color-mix(in srgb, var(--good) 9%, rgba(255,255,255,.035));
    }

    .zen-daily-slot-card.maxed {
      border-style: solid;
      border-color: color-mix(in srgb, var(--good) 42%, var(--line));
    }

    .zen-daily-slot-card > button {
      min-width: 112px;
      min-height: 38px;
      padding: 7px 11px;
    }

    .zen-daily-mission-card.claimed {
      opacity: .52;
      filter: grayscale(.65);
    }

    .zen-daily-mission-copy {
      display: grid;
      gap: 4px;
    }

    .zen-daily-mission-copy strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 950;
    }

    .zen-daily-mission-copy span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.4;
    }

    .zen-daily-mission-progress {
      display: grid;
      grid-template-columns: minmax(80px, 1fr) auto;
      align-items: center;
      gap: 8px;
    }

    .zen-daily-mission-progress > span {
      height: 9px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      background: rgba(255,255,255,.06);
    }

    .zen-daily-mission-progress i {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--profile-color, var(--today)), var(--good));
    }

    .zen-daily-mission-progress b {
      color: var(--warn);
      font-size: 10px;
      white-space: nowrap;
    }

    .zen-station-extra-rewards {
      grid-template-columns: 1fr;
    }

    .zen-station-upgrade-tab .zen-station-upgrades:first-child {
      border-top: 0;
      padding-top: 0;
    }

    .zen-station-upgrades {
      display: grid;
      gap: 10px;
      border-top: 1px solid var(--line);
      padding-top: 14px;
    }

    .zen-station-upgrades > summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-radius: 10px;
      padding: 4px 2px;
      cursor: pointer;
      list-style: none;
    }

    .zen-station-upgrades > summary::-webkit-details-marker {
      display: none;
    }

    .zen-station-upgrades > summary:hover,
    .zen-station-upgrades > summary:focus-visible {
      filter: brightness(1.16);
    }

    .zen-station-upgrades > summary > div {
      display: grid;
      gap: 3px;
    }

    .zen-station-upgrades > summary > span {
      width: 10px;
      height: 10px;
      border-right: 2px solid var(--muted);
      border-bottom: 2px solid var(--muted);
      rotate: 45deg;
      transition: rotate .18s ease;
    }

    .zen-station-upgrades[open] > summary > span {
      rotate: 225deg;
    }

    .zen-station-upgrades > summary strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 950;
    }

    .zen-station-upgrades > summary small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 750;
      line-height: 1.35;
    }

    .zen-station-upgrade-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .zen-station-upgrade-card {
      position: relative;
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-width: 0;
      min-height: 76px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px;
      color: var(--text);
      background:
        radial-gradient(circle at 0 50%, rgba(140,241,218,.08), transparent 44%),
        rgba(255,255,255,.035);
      text-align: left;
      cursor: pointer;
    }

    .zen-station-upgrade-card:hover,
    .zen-station-upgrade-card:focus-visible {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 60%, var(--line));
      filter: brightness(1.12);
    }

    .zen-upgrade[aria-disabled="true"],
    .zen-station-upgrade-card[aria-disabled="true"] {
      cursor: default;
    }

    .zen-station-upgrade-card.affordable {
      border-color: color-mix(in srgb, var(--good) 48%, var(--line));
      background:
        radial-gradient(circle at 0 50%, color-mix(in srgb, var(--good) 13%, transparent), transparent 48%),
        rgba(255,255,255,.045);
    }

    .zen-station-upgrade-card.unaffordable {
      opacity: .38;
      filter: grayscale(.95) brightness(.68) saturate(.3);
    }

    .zen-station-upgrade-card.maxed {
      border-color: color-mix(in srgb, var(--good) 72%, var(--line));
      background:
        radial-gradient(circle at 0 50%, color-mix(in srgb, var(--good) 24%, transparent), transparent 52%),
        color-mix(in srgb, var(--good) 15%, rgba(255,255,255,.04));
      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 18%, transparent), 0 0 18px color-mix(in srgb, var(--good) 22%, transparent);
    }

    .zen-station-upgrade-card .zen-upgrade-icon {
      width: 42px;
      height: 42px;
      margin: 0;
      border-radius: 12px;
    }

    .zen-station-upgrade-card .zen-upgrade-copy {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .zen-station-upgrade-card .zen-upgrade-copy strong {
      overflow: hidden;
      font-size: 12px;
      font-weight: 950;
      line-height: 1.2;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .zen-station-upgrade-card .zen-upgrade-effects {
      display: -webkit-box;
      overflow: hidden;
      margin: 0;
      border: 0;
      padding: 0;
      color: var(--muted);
      font-size: 10px;
      font-weight: 750;
      line-height: 1.3;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .zen-station-upgrade-card .zen-upgrade-meta {
      grid-column: auto;
      display: grid;
      justify-items: end;
      gap: 6px;
      min-width: 78px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      text-align: right;
    }

    .zen-station-upgrade-card .zen-upgrade-meta > span:first-child {
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      padding: 3px 7px;
      color: var(--text);
      background: rgba(255,255,255,.05);
      font-size: 10px;
    }

    .zen-station-upgrade-card .zen-upgrade-meta > span {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 4px;
    }

    .zen-station-upgrade-card .zen-upgrade-meta .zen-currency-icon {
      width: 1.35em;
      height: 1.35em;
    }

    #zenIdleClaimBtn {
      display: grid;
      gap: 3px;
      justify-items: center;
      line-height: 1.15;
    }

    #zenIdleClaimBtn small {
      color: color-mix(in srgb, currentColor 76%, transparent);
      font-size: 11px;
      font-weight: 850;
    }

    .zen-main-streak-settings {
      display: grid;
      gap: 8px;
      margin-top: 12px;
      border-top: 1px solid var(--line);
      padding-top: 12px;
    }

    .zen-main-streak-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
      align-items: center;
      gap: 10px;
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
    }

    .zen-main-streak-row select {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 8px 10px;
      color: var(--text);
      background: rgba(255,255,255,.06);
      font: inherit;
    }

    .zen-inline-stat {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
      margin-top: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 10px 12px;
      background: rgba(255,255,255,.04);
    }

    .zen-inline-stat span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .zen-inline-stat strong {
      color: var(--text);
      font-size: 22px;
      line-height: 1;
    }

    #zenAscendInfo {
      display: grid;
      gap: 5px;
      font-size: 12px;
      line-height: 1.32;
    }

    #zenAscendInfo strong {
      color: var(--warn);
    }

    .zen-ascension-progress {
      display: block;
      height: 8px;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line));
      border-radius: 999px;
      background: rgba(255,255,255,.06);
    }

    .zen-ascension-progress i {
      display: block;
      width: var(--zen-ascension-progress, 0%);
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--warn), var(--good));
    }

    .zen-daily-progress {
      display: grid;
      gap: 10px;
      border-top: 1px solid var(--line);
      padding-top: 12px;
    }

    .zen-daily-progress-row {
      display: grid;
      gap: 8px;
    }

    .zen-daily-progress-top {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 12px;
    }

    .zen-daily-progress-top span {
      display: grid;
      gap: 3px;
    }

    .zen-daily-progress-top strong {
      font-size: 13px;
    }

    .zen-daily-progress-top small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      line-height: 1.35;
    }

    .zen-daily-progress-top b {
      color: var(--warn);
      font-size: 12px;
      white-space: nowrap;
    }

    .zen-daily-progress-track {
      --zen-progress: 0%;
      height: 9px;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.06);
    }

    .zen-daily-progress-track span {
      display: block;
      width: var(--zen-progress);
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--profile-color, var(--today)), var(--good));
      transition: width .2s ease;
    }

    .zen-upgrades {
      display: grid;
      gap: 10px;
    }

    .zen-shop-tabs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .zen-shop-tabs .profile-btn {
      width: 100%;
      justify-content: center;
    }

    .zen-tab-count {
      display: inline-grid;
      place-items: center;
      min-width: 20px;
      height: 20px;
      margin-left: 7px;
      padding: 0 6px;
      border-radius: var(--radius-pill);
      color: #07140d;
      background: var(--good);
      box-shadow: 0 0 0 2px rgba(255,255,255,.08);
      font-size: 10px;
      font-weight: 950;
      line-height: 1;
    }

    .zen-upgrade-list {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      min-width: 0;
    }

    .zen-upgrade-list .zen-upgrade-group-heading {
      grid-column: 1 / -1;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .04em;
      text-transform: uppercase;
      opacity: .62;
      padding: 6px 2px 0;
    }

    .zen-upgrade-list .zen-upgrade-group-heading:first-child {
      padding-top: 0;
    }

    .zen-skill-tree {
      position: relative;
      min-width: 0;
      /* Kinder sind alle position:absolute mit left/top in % (siehe
         zenRenderRoyalGarden) – ohne definierte Höhe würden Top-Prozente
         gegen "auto" (=0) auflösen und alle auf denselben Punkt fallen. */
      min-height: 760px;
      padding: 8px 0 2px;
    }

    .zen-skill-tree .zen-upgrade {
      min-height: 118px;
    }

    .zen-skill-tree .zen-upgrade::before {
      content: "";
      position: absolute;
      left: 50%;
      top: -25px;
      width: 1px;
      height: 24px;
      background: var(--line);
    }

    .zen-skill-tree [data-skill-tier="0"]::before {
      content: none;
    }

    .zen-upgrade {
      position: relative;
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      align-items: start;
      gap: 10px;
      min-width: 0;
      text-align: left;
      padding: 12px;
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 24%, var(--line));
      background: color-mix(in srgb, var(--profile-color, var(--today)) 8%, rgba(255,255,255,.045));
    }

    .zen-upgrade-copy {
      align-content: start;
      gap: 5px;
    }

    .zen-upgrade-effects {
      margin-top: 2px;
    }

    /* Absolut positioniert statt Grid-Kind, damit sie in JEDEM Karten-
       Kontext (Gartenmarkt-Liste, Station-Dialog-Raster, AsZENded-Shop)
       funktioniert, ohne die dortigen grid-column-Regeln für Icon/Copy/Meta
       zu stören - siehe zenOpenUpgradeInfoDialog. */
    .zen-upgrade-info-btn {
      position: absolute;
      top: 6px;
      right: 6px;
      z-index: 3;
      display: grid;
      place-items: center;
      width: 19px;
      height: 19px;
      border: 1px solid var(--line);
      border-radius: 50%;
      background: rgba(10,14,20,.55);
      color: var(--muted);
      font-size: 11px;
      font-style: italic;
      font-weight: 800;
      line-height: 1;
      cursor: pointer;
    }

    .zen-upgrade-info-btn:hover,
    .zen-upgrade-info-btn:focus-visible {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 60%, var(--line));
      color: var(--text);
      background: rgba(10,14,20,.8);
    }

    /* Markiert Karten, die aSPX/AP kosten, aber im NORMALEN Garten liegen
       (Weitere Missionsslots, SPX-Speicherkapazität): grün+Anker, wenn
       Legacy Ledger im Schicksalsbaum sie vor der nächsten AsZENsion
       schützt, sonst amber+↺ als Reset-Warnung. Siehe zenStationUpgrade-
       ItemState (persistShield) und zenOpenUpgradeInfoDialog für den
       ausgeschriebenen Hinweis im Popup. */
    .zen-upgrade-persist-badge {
      position: absolute;
      top: 6px;
      left: 6px;
      z-index: 3;
      display: grid;
      place-items: center;
      width: 19px;
      height: 19px;
      border: 1px solid color-mix(in srgb, var(--good) 55%, var(--line));
      border-radius: 50%;
      background: color-mix(in srgb, var(--good) 22%, rgba(10,14,20,.65));
      color: var(--good);
      font-size: 11px;
      line-height: 1;
      cursor: help;
    }

    .zen-upgrade-persist-badge.unprotected {
      border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
      background: color-mix(in srgb, var(--warn) 22%, rgba(10,14,20,.65));
      color: var(--warn);
    }

    .zen-upgrade-persist-note {
      margin: 0;
      color: var(--good);
      font-size: 13px;
      font-weight: 750;
      line-height: 1.4;
    }

    .zen-upgrade-persist-note.unprotected {
      color: var(--warn);
    }

    .zen-shop-summary {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 10px;
      align-items: baseline;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 24%, var(--line));
      border-radius: 12px;
      padding: 9px 11px;
      background: rgba(255,255,255,.035);
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    .zen-shop-summary strong {
      color: var(--text);
      font-size: 13px;
    }

    .zen-shop-summary .zen-skill-reset {
      margin-left: auto;
      padding: 6px 10px;
      color: var(--muted);
      font-size: 11px;
    }

    .zen-upgrade.mechanic {
      border-color: color-mix(in srgb, var(--warn) 36%, var(--line));
      background: linear-gradient(135deg, color-mix(in srgb, var(--warn) 10%, rgba(255,255,255,.045)), rgba(255,255,255,.035));
    }

    .zen-upgrade.ascended {
      border-color: color-mix(in srgb, var(--good) 34%, var(--line));
      background: linear-gradient(135deg, color-mix(in srgb, var(--good) 12%, rgba(255,255,255,.045)), color-mix(in srgb, var(--profile-color, var(--today)) 7%, rgba(255,255,255,.035)));
    }

    .zen-upgrade.ascended.ap {
      border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
      background: linear-gradient(135deg, color-mix(in srgb, var(--warn) 14%, rgba(255,255,255,.045)), rgba(255,255,255,.035));
    }

    /* Gesperrte AsZENded-Upgrades: gedimmt, aber Name + Infotext lesbar. */
    .zen-upgrade.ascended.locked {
      filter: grayscale(.9) brightness(.7) saturate(.35);
      opacity: .42;
      border-style: dashed;
    }

    .zen-upgrade-lock {
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      align-self: start;
      border: 1px dashed color-mix(in srgb, var(--muted) 55%, var(--line));
      border-radius: 12px;
      color: var(--muted);
      background: rgba(255,255,255,.05);
    }

    .zen-upgrade-lock svg {
      width: 26px;
      height: 26px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .zen-upgrade-unlock {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      text-align: right;
    }

    .zen-water-btn:disabled {
      opacity: .6;
      cursor: not-allowed;
    }

    .zen-upgrade-icon {
      position: relative;
      width: 38px;
      height: 38px;
      align-self: start;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--zen-icon-accent, var(--profile-color, var(--today))) 46%, rgba(255,255,255,.22));
      border-radius: 12px;
      color: #fff;
      background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,.34), transparent 24%),
        linear-gradient(135deg, color-mix(in srgb, var(--zen-icon-accent, var(--profile-color, var(--today))) 72%, #fff 6%), color-mix(in srgb, var(--zen-icon-accent, var(--profile-color, var(--today))) 42%, #050812));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 22px rgba(0,0,0,.22);
    }

    .zen-upgrade-icon::after {
      content: "";
      position: absolute;
      right: -10px;
      bottom: -12px;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: rgba(255,255,255,.16);
    }

    .zen-upgrade-icon.has-image {
      display: grid;
      place-items: center;
      padding: 2px;
      background:
        radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--zen-icon-accent, var(--today)) 25%, transparent), transparent 72%),
        rgba(5, 8, 18, .7);
    }

    .zen-upgrade-icon.has-image::after {
      display: none;
    }

    .zen-upgrade-icon.has-image[data-icon-tier="2"],
    .zen-upgrade-icon.has-image[data-icon-tier="3"],
    .zen-upgrade-icon.has-image[data-icon-tier="4"] {
      border-color: color-mix(in srgb, var(--zen-icon-accent, var(--today)) 72%, #fff);
    }

    .zen-upgrade-icon.has-image[data-icon-tier="3"] {
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 12px color-mix(in srgb, var(--zen-icon-accent, var(--today)) 42%, transparent);
    }

    .zen-upgrade-icon.has-image[data-icon-tier="4"] {
      border-width: 2px;
      background:
        radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--zen-icon-accent, var(--today)) 46%, transparent), transparent 72%),
        rgba(5, 8, 18, .72);
      box-shadow: inset 0 0 8px color-mix(in srgb, var(--zen-icon-accent, var(--today)) 30%, transparent), 0 0 15px color-mix(in srgb, var(--zen-icon-accent, var(--today)) 52%, transparent);
    }

    .zen-upgrade-icon-image {
      position: relative;
      z-index: 1;
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .42));
      pointer-events: none;
    }

    .zen-upgrade-edit-btn {
      position: absolute;
      z-index: 3;
      top: 6px;
      right: 30px;
      display: grid;
      width: 19px;
      height: 19px;
      place-items: center;
      border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line));
      border-radius: 50%;
      color: var(--warn);
      background: rgba(10,14,20,.65);
      font-size: 12px;
      line-height: 1;
      cursor: pointer;
    }

    .zen-upgrade-edit-btn:hover,
    .zen-upgrade-edit-btn:focus-visible { filter: brightness(1.18); }

    .zen-upgrade-icon[data-upgrade-id="golden_sand"] .zen-upgrade-icon-image {
      width: 76%;
      height: 76%;
    }

    .zen-upgrade-icon.is-placeholder {
      display: grid;
      place-items: center;
      grid-template-rows: 1fr auto;
      padding: 4px 3px 3px;
      border: 2px dashed #ff6b7d;
      background:
        repeating-linear-gradient(135deg, rgba(255,107,125,.2) 0 5px, rgba(5,8,18,.88) 5px 10px);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 10px rgba(255,107,125,.26);
    }

    .zen-upgrade-icon.is-placeholder::after {
      display: none;
    }

    .zen-upgrade-icon-placeholder-mark {
      align-self: end;
      color: #fff;
      font-size: 19px;
      font-weight: 1000;
      line-height: .9;
      text-shadow: 0 0 7px #ff6b7d;
    }

    .zen-upgrade-icon-placeholder-label {
      color: #ffb3bd;
      font-size: 7px;
      font-weight: 1000;
      line-height: 1;
      letter-spacing: .08em;
    }

    .zen-icon-body,
    .zen-icon-detail,
    .zen-icon-spark {
      position: absolute;
      z-index: 1;
      display: block;
      pointer-events: none;
    }

    .zen-upgrade-icon[data-icon-tone="earth"] { --zen-icon-accent: #b6864b; }
    .zen-upgrade-icon[data-icon-tone="leaf"] { --zen-icon-accent: #55b878; }
    .zen-upgrade-icon[data-icon-tone="water"] { --zen-icon-accent: #45a6d9; }
    .zen-upgrade-icon[data-icon-tone="gate"] { --zen-icon-accent: #d1605c; }
    .zen-upgrade-icon[data-icon-tone="stone"] { --zen-icon-accent: #8d98ad; }
    .zen-upgrade-icon[data-icon-tone="prism"] { --zen-icon-accent: #b779f2; }
    .zen-upgrade-icon[data-icon-tone="arcade"] { --zen-icon-accent: #5fd0d6; }
    .zen-upgrade-icon[data-icon-tone="vault"] { --zen-icon-accent: #d7b85c; }
    .zen-upgrade-icon[data-icon-tone="sun"] { --zen-icon-accent: #f2b94b; }
    .zen-upgrade-icon[data-icon-tone="core"] { --zen-icon-accent: #7f8cff; }
    .zen-upgrade-icon[data-icon-tone="gold"] { --zen-icon-accent: #f0c35b; }
    .zen-upgrade-icon[data-icon-tone="diamond"] { --zen-icon-accent: #7fd8ff; }
    .zen-upgrade-icon[data-icon-tone="water-gold"] { --zen-icon-accent: #55c7c7; }
    .zen-upgrade-icon[data-icon-tone="eden"] { --zen-icon-accent: #8fcf6b; }

    .zen-upgrade-icon[data-icon-kind="sand"] .zen-icon-body {
      left: 8px;
      right: 8px;
      bottom: 10px;
      height: 15px;
      border-radius: 50% 50% 42% 42%;
      background: repeating-radial-gradient(ellipse at center, rgba(255,255,255,.42) 0 1px, transparent 2px 6px), #d9b957;
    }

    .zen-upgrade-icon[data-icon-kind="sand"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="foundation"] .zen-icon-detail {
      left: 10px;
      right: 10px;
      top: 14px;
      height: 10px;
      border-top: 2px solid rgba(255,255,255,.62);
      border-bottom: 2px solid rgba(255,255,255,.34);
      border-radius: 50%;
    }

    .zen-upgrade-icon[data-icon-kind="rake"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="engine"] .zen-icon-body {
      left: 21px;
      top: 8px;
      width: 4px;
      height: 27px;
      border-radius: 999px;
      background: #f3d491;
      transform: rotate(42deg);
      transform-origin: center;
    }

    .zen-upgrade-icon[data-icon-kind="rake"] .zen-icon-detail {
      left: 9px;
      bottom: 10px;
      width: 20px;
      height: 9px;
      border-top: 4px solid #f6e1aa;
      border-radius: 3px;
      background: repeating-linear-gradient(90deg, #f6e1aa 0 2px, transparent 2px 5px);
      transform: rotate(42deg);
    }

    .zen-upgrade-icon[data-icon-kind="bonsai"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="roots"] .zen-icon-body {
      left: 19px;
      bottom: 8px;
      width: 6px;
      height: 20px;
      border-radius: 999px 999px 3px 3px;
      background: linear-gradient(90deg, #6f451d, #d29a48);
      transform: rotate(-8deg);
    }

    .zen-upgrade-icon[data-icon-kind="bonsai"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="roots"] .zen-icon-detail {
      left: 7px;
      top: 7px;
      width: 27px;
      height: 20px;
      border-radius: 56% 44% 58% 42%;
      background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.38), transparent 22%), color-mix(in srgb, var(--zen-icon-accent) 62%, #69d27d);
      box-shadow: 9px 5px 0 -2px color-mix(in srgb, var(--zen-icon-accent) 72%, #b4f29d);
    }

    .zen-upgrade-icon[data-icon-kind="roots"] .zen-icon-spark {
      left: 13px;
      bottom: 6px;
      width: 18px;
      height: 10px;
      border-bottom: 2px solid #f9e6a3;
      border-left: 2px solid #f9e6a3;
      border-right: 2px solid #f9e6a3;
      border-radius: 0 0 14px 14px;
    }

    .zen-upgrade-icon[data-icon-kind="pond"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="fountain"] .zen-icon-body {
      left: 7px;
      right: 7px;
      bottom: 8px;
      height: 15px;
      border-radius: 50%;
      background: radial-gradient(ellipse at 35% 35%, rgba(255,255,255,.45), transparent 28%), #55c5e6;
      box-shadow: inset 0 0 0 3px rgba(255,255,255,.18);
    }

    .zen-upgrade-icon[data-icon-kind="pond"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="router"] .zen-icon-detail {
      left: 12px;
      top: 14px;
      width: 18px;
      height: 9px;
      border-top: 2px solid rgba(255,255,255,.74);
      border-radius: 50%;
    }

    .zen-upgrade-icon[data-icon-kind="fountain"] .zen-icon-detail {
      left: 18px;
      top: 9px;
      width: 7px;
      height: 19px;
      border-radius: 999px 999px 3px 3px;
      background: linear-gradient(180deg, #fff4bd, #4fc7ef);
    }

    .zen-upgrade-icon[data-icon-kind="fountain"] .zen-icon-spark {
      left: 11px;
      top: 7px;
      width: 20px;
      height: 15px;
      border-top: 3px solid rgba(255,255,255,.78);
      border-left: 2px solid rgba(255,255,255,.45);
      border-right: 2px solid rgba(255,255,255,.45);
      border-radius: 50% 50% 0 0;
    }

    .zen-upgrade-icon[data-icon-kind="gate"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="shrine"] .zen-icon-body {
      left: 9px;
      top: 10px;
      width: 24px;
      height: 20px;
      border-top: 5px solid #ffe09a;
      border-bottom: 3px solid rgba(255,255,255,.56);
    }

    .zen-upgrade-icon[data-icon-kind="gate"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="shrine"] .zen-icon-detail {
      left: 13px;
      top: 15px;
      width: 16px;
      height: 19px;
      border-left: 4px solid #f4bd63;
      border-right: 4px solid #f4bd63;
    }

    .zen-upgrade-icon[data-icon-kind="statue"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="throne"] .zen-icon-body {
      left: 14px;
      bottom: 9px;
      width: 15px;
      height: 18px;
      border-radius: 9px 9px 4px 4px;
      background: linear-gradient(135deg, rgba(255,255,255,.42), color-mix(in srgb, var(--zen-icon-accent) 58%, #6d7485));
    }

    .zen-upgrade-icon[data-icon-kind="statue"] .zen-icon-detail {
      left: 12px;
      top: 8px;
      width: 19px;
      height: 14px;
      border-radius: 50% 50% 42% 42%;
      background: color-mix(in srgb, var(--zen-icon-accent) 70%, #fff);
    }

    .zen-upgrade-icon[data-icon-kind="engine"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="reactor"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="core"] .zen-icon-detail {
      left: 11px;
      top: 11px;
      width: 20px;
      height: 20px;
      border: 4px solid rgba(255,255,255,.72);
      border-radius: 50%;
      box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--zen-icon-accent) 80%, #fff);
    }

    .zen-upgrade-icon[data-icon-kind="prism"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="diamond"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="firewall"] .zen-icon-body {
      left: 13px;
      top: 8px;
      width: 17px;
      height: 25px;
      clip-path: polygon(50% 0, 100% 38%, 78% 100%, 22% 100%, 0 38%);
      background: linear-gradient(135deg, rgba(255,255,255,.72), color-mix(in srgb, var(--zen-icon-accent) 76%, #86e8ff));
      box-shadow: 0 0 18px color-mix(in srgb, var(--zen-icon-accent) 50%, transparent);
    }

    .zen-upgrade-icon[data-icon-kind="arcade"] .zen-icon-body {
      left: 8px;
      top: 13px;
      width: 27px;
      height: 18px;
      border-radius: 7px;
      background: #233248;
      box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--zen-icon-accent) 74%, #fff);
    }

    .zen-upgrade-icon[data-icon-kind="arcade"] .zen-icon-detail {
      left: 14px;
      top: 19px;
      width: 7px;
      height: 7px;
      border-left: 2px solid #fff;
      border-bottom: 2px solid #fff;
    }

    .zen-upgrade-icon[data-icon-kind="arcade"] .zen-icon-spark {
      right: 11px;
      top: 20px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #ffd36f;
    }

    .zen-upgrade-icon[data-icon-kind="vault"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="treasury"] .zen-icon-body {
      left: 9px;
      top: 13px;
      width: 25px;
      height: 20px;
      border-radius: 5px;
      background: linear-gradient(135deg, #ffe38a, #906b20);
      box-shadow: inset 0 0 0 3px rgba(255,255,255,.18);
    }

    .zen-upgrade-icon[data-icon-kind="vault"] .zen-icon-detail,
    .zen-upgrade-icon[data-icon-kind="treasury"] .zen-icon-detail {
      left: 17px;
      top: 18px;
      width: 9px;
      height: 9px;
      border: 2px solid rgba(255,255,255,.75);
      border-radius: 50%;
    }

    .zen-upgrade-icon[data-icon-kind="seal"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="ledger"] .zen-icon-body,
    .zen-upgrade-icon[data-icon-kind="foundation"] .zen-icon-body {
      left: 11px;
      top: 10px;
      width: 21px;
      height: 23px;
      border-radius: 5px;
      background: linear-gradient(135deg, #fff3b3, #e3a63e);
      box-shadow: inset 0 -8px 0 rgba(0,0,0,.12);
    }

    .zen-upgrade-icon[data-icon-kind="seal"] .zen-icon-detail {
      left: 15px;
      top: 14px;
      width: 13px;
      height: 13px;
      border-radius: 50%;
      background: radial-gradient(circle, #fff8ca 0 28%, #d86d46 30% 100%);
    }

    .zen-upgrade-icon[data-icon-kind="ledger"] .zen-icon-detail {
      left: 15px;
      top: 15px;
      width: 13px;
      height: 12px;
      background: repeating-linear-gradient(180deg, rgba(255,255,255,.72) 0 2px, transparent 2px 5px);
    }

    .zen-upgrade-icon[data-icon-kind="eden"] .zen-icon-body {
      left: 11px;
      bottom: 8px;
      width: 20px;
      height: 23px;
      border-radius: 50% 50% 45% 45%;
      background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.48), transparent 19%), linear-gradient(180deg, #b9ed82, #487c45);
    }

    .zen-upgrade-icon[data-icon-kind="eden"] .zen-icon-detail {
      left: 17px;
      top: 7px;
      width: 8px;
      height: 25px;
      border-radius: 999px;
      background: #6b4a25;
    }

    .zen-upgrade-icon[data-icon-kind="oracle"] .zen-icon-body {
      left: 10px;
      top: 10px;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: radial-gradient(circle at center, #fff 0 18%, color-mix(in srgb, var(--zen-icon-accent) 88%, #72f0ff) 20% 42%, #25325d 44% 100%);
    }

    .zen-upgrade-icon[data-icon-kind="router"] .zen-icon-body {
      left: 9px;
      top: 16px;
      width: 24px;
      height: 13px;
      border-radius: 7px;
      background: linear-gradient(135deg, #e2fff7, color-mix(in srgb, var(--zen-icon-accent) 70%, #1d6579));
    }

    .zen-upgrade-icon[data-icon-kind="firewall"] .zen-icon-detail {
      left: 10px;
      top: 12px;
      width: 22px;
      height: 20px;
      border-radius: 4px 4px 12px 12px;
      border: 3px solid rgba(255,255,255,.68);
      background: linear-gradient(135deg, transparent 0 48%, rgba(255,255,255,.36) 50% 100%);
    }

    .zen-upgrade-icon[data-icon-kind="throne"] .zen-icon-detail {
      left: 10px;
      top: 11px;
      width: 23px;
      height: 22px;
      border-radius: 7px 7px 4px 4px;
      border-top: 5px solid #ffe49a;
      border-left: 4px solid #d5ae55;
      border-right: 4px solid #d5ae55;
      box-shadow: inset 0 -7px 0 rgba(0,0,0,.18);
    }

    .zen-upgrade-copy {
      display: grid;
      align-content: start;
      gap: 5px;
      min-width: 0;
    }

    .zen-ascended-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      align-items: stretch;
      border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line));
      border-radius: 14px;
      padding: 12px;
      background: color-mix(in srgb, var(--good) 8%, rgba(255,255,255,.04));
    }

    .zen-ascended-summary div {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .zen-ascended-summary strong {
      color: var(--text);
      font-size: 15px;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .zen-ascended-summary small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      line-height: 1.3;
    }

    .zen-ascended-summary button {
      align-self: center;
      grid-column: 1 / -1;
      white-space: nowrap;
    }

    .zen-royal-card {
      position: relative;
      align-self: start;
      overflow: hidden;
      border-color: color-mix(in srgb, #f6d17a 42%, var(--line));
      background:
        linear-gradient(160deg, rgba(246,209,122,.16), rgba(255,255,255,.035) 42%, rgba(142,95,24,.13)),
        color-mix(in srgb, var(--card) 88%, #261a05);
    }

    .zen-ascended-layout {
      align-items: start;
    }

    .zen-ascended-layout > *,
    .zen-ascended-layout .zen-panel,
    .zen-ascended-layout .zen-economy-panel,
    .zen-ascended-layout .zen-economy-card {
      align-self: start;
    }

    .zen-ascended-layout .zen-daily-panel {
      align-content: start;
      grid-template-rows: none;
    }

    .zen-ascended-layout .zen-daily-panel .score-grid {
      align-items: start;
      grid-template-rows: none;
    }

    .zen-ascended-layout .zen-daily-panel .mini {
      height: auto;
      min-height: 0;
    }

    .zen-royal-card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 14% 8%, rgba(255,255,255,.18), transparent 18%),
        radial-gradient(circle at 82% 16%, rgba(246,209,122,.22), transparent 20%);
      opacity: .8;
    }

    .zen-royal-card > * {
      position: relative;
      z-index: 1;
    }

    .zen-royal-card.locked {
      filter: saturate(.72);
    }

    .zen-royal-card.locked .zen-royal-stage,
    .zen-royal-card.locked .zen-royal-upgrades {
      opacity: .56;
    }

    .zen-royal-stage {
      --royal-power: 0;
      position: relative;
      min-height: 260px;
      margin-top: 14px;
      overflow: hidden;
      border: 1px solid rgba(246,209,122,.42);
      border-radius: 18px;
      background:
        radial-gradient(circle at 48% 68%, rgba(246,209,122,.22), transparent 34%),
        linear-gradient(180deg, rgba(112,76,23,.18), rgba(246,209,122,.08) 44%, rgba(99,61,18,.24));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 16px 38px rgba(0,0,0,.24);
    }

    .zen-ascended-layout .zen-royal-stage {
      min-height: 520px;
    }

    .zen-royal-sky {
      position: absolute;
      inset: 0 0 auto;
      height: 48%;
      background:
        linear-gradient(180deg, rgba(246,209,122,.24), transparent),
        radial-gradient(circle at 24% 28%, rgba(255,255,255,.2), transparent 18%);
    }

    .zen-royal-sun {
      position: absolute;
      top: 24px;
      right: 34px;
      width: 62px;
      height: 62px;
      border-radius: 50%;
      background: linear-gradient(135deg, #fff4b8, #d99b25);
      box-shadow: 0 0 calc(34px + var(--royal-power) * 54px) rgba(246,209,122,.58);
    }

    .zen-royal-gate {
      position: absolute;
      left: 9%;
      top: 72px;
      width: 126px;
      height: 112px;
      opacity: 0;
      border-top: 14px solid #f7d374;
      transition: opacity .2s ease;
    }

    .zen-royal-gate.visible {
      opacity: 1;
    }

    .zen-royal-gate::before,
    .zen-royal-gate::after {
      content: "";
      position: absolute;
      top: 12px;
      width: 16px;
      height: 98px;
      border-radius: 999px 999px 0 0;
      background: linear-gradient(180deg, #ffe6a0, #8a5a16);
    }

    .zen-royal-gate::before {
      left: 22px;
    }

    .zen-royal-gate::after {
      right: 22px;
    }

    .zen-royal-gate span {
      position: absolute;
      left: 10px;
      right: 10px;
      top: 38px;
      height: 10px;
      border-radius: 999px;
      background: #fff1aa;
    }

    .zen-royal-tree {
      --royal-tree-scale: 1;
      position: absolute;
      left: 45%;
      bottom: 34px;
      width: 138px;
      height: 174px;
      transform: translateX(-50%) scale(var(--royal-tree-scale));
      transform-origin: bottom center;
      transition: transform .2s ease;
    }

    .zen-royal-tree .royal-trunk {
      position: absolute;
      left: 62px;
      bottom: 18px;
      width: 20px;
      height: 90px;
      border-radius: 999px 999px 8px 8px;
      background: linear-gradient(90deg, #6c4516, #d79b3b);
      transform: rotate(-6deg);
    }

    .zen-royal-tree .royal-leaf {
      position: absolute;
      border-radius: 55% 45% 58% 42%;
      background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,.3), transparent 24%),
        linear-gradient(135deg, #fff1a8, #d19a24 58%, #6fbf73);
      box-shadow: 0 12px 34px rgba(246,209,122,.24);
    }

    .royal-leaf-a {
      left: 8px;
      top: 50px;
      width: 82px;
      height: 62px;
      transform: rotate(-18deg);
    }

    .royal-leaf-b {
      right: 2px;
      top: 20px;
      width: 88px;
      height: 70px;
      transform: rotate(13deg);
    }

    .royal-leaf-c {
      left: 44px;
      top: 0;
      width: 74px;
      height: 58px;
    }

    .zen-royal-fountain {
      position: absolute;
      right: 9%;
      bottom: 42px;
      width: 118px;
      height: 58px;
      opacity: 0;
      border-radius: 50%;
      background:
        radial-gradient(ellipse at 42% 34%, rgba(255,255,255,.42), transparent 24%),
        linear-gradient(135deg, #ffe7a2, #42bdf0);
      box-shadow: inset 0 0 0 7px rgba(255,255,255,.12), 0 13px 32px rgba(0,0,0,.25);
      transition: opacity .2s ease;
    }

    .zen-royal-fountain.visible {
      opacity: 1;
    }

    .zen-royal-coins span {
      position: absolute;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: linear-gradient(135deg, #fff6bb, #c98516);
      box-shadow: 0 6px 14px rgba(0,0,0,.22), inset 0 0 0 2px rgba(255,255,255,.24);
    }

    .zen-royal-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      align-items: stretch;
      margin-top: 12px;
      border: 1px solid rgba(246,209,122,.38);
      border-radius: 14px;
      padding: 12px;
      background: rgba(246,209,122,.08);
    }

    .zen-royal-summary div {
      display: grid;
      align-content: start;
      gap: 4px;
      min-width: 0;
      border: 1px solid rgba(246,209,122,.18);
      border-radius: 10px;
      padding: 10px;
      background: rgba(255,255,255,.035);
    }

    .zen-royal-summary strong {
      color: var(--text);
      font-size: 15px;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .zen-royal-summary small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      line-height: 1.3;
    }

    .zen-royal-summary button {
      align-self: center;
      grid-column: 1 / -1;
      white-space: nowrap;
    }

    .zen-royal-upgrades {
      display: grid;
      gap: 12px;
      margin-top: 12px;
    }

    .zen-royal-locked-note {
      border: 1px dashed rgba(246,209,122,.42);
      border-radius: 14px;
      padding: 13px;
      color: var(--muted);
      background: rgba(255,255,255,.035);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.4;
    }

    @media (max-width: 720px) {
      .zen-claim-station-dialog {
        width: min(900px, calc(100vw - 24px));
        max-width: none;
        max-height: min(88dvh, 760px);
        margin: auto;
        border-radius: 22px;
      }

      .zen-claim-station-dialog > .zen-formula-dialog-card {
        max-height: min(88dvh, 760px);
        border-radius: inherit;
      }

      .zen-claim-station-summary {
        grid-template-columns: 1fr;
      }

      .zen-station-rewards,
      .zen-station-missions,
      .zen-station-upgrade-grid,
      .zen-daily-mission-grid {
        grid-template-columns: 1fr;
      }

      .zen-station-tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .zen-station-tools button {
        min-width: 0;
      }

      .zen-station-storage-track {
        grid-column: 1;
      }

      .zen-daily-mission-card,
      .zen-daily-slot-card {
        grid-template-columns: minmax(0, 1fr);
      }

      .zen-daily-mission-card,
      .zen-daily-mission-card.locked {
        grid-template-columns: 52px minmax(0, 1fr);
      }

      .zen-daily-mission-progress,
      .zen-daily-mission-card > button {
        grid-column: 1 / -1;
      }

      .zen-daily-mission-card > button {
        width: 100%;
      }

      .zen-daily-slot-card > button {
        width: 100%;
      }

      .zen-daily-reroll-bar {
        align-items: stretch;
        flex-direction: column;
      }

      .zen-daily-reroll-bar > button {
        width: 100%;
      }

      .zen-shop-tabs,
      .zen-ascended-summary,
      .zen-royal-summary {
        grid-template-columns: 1fr;
      }

      .zen-ascended-summary button,
      .zen-royal-summary button {
        grid-column: auto;
      }
    }

    @media (max-width: 1180px) {
      .zen-layout {
        grid-template-columns: minmax(0, 1fr);
      }

      .zen-shop-dialog .zen-upgrade-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .zen-stage,
      .zen-ascended-layout .zen-royal-stage {
        min-height: 420px;
      }
    }

    @media (max-width: 640px) {
      .zen-garden-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .zen-garden-actions,
      .zen-ascension-card,
      .zen-upgrade-list,
      .zen-shop-dialog .zen-upgrade-list {
        grid-template-columns: 1fr;
      }

      .zen-stage .zen-water-btn {
        left: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
      }

      .zen-upgrade {
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: start;
      }

      .zen-upgrade-icon {
        width: 38px;
        height: 38px;
      }

      .zen-upgrade-meta {
        grid-column: 2;
        justify-content: flex-start;
      }

      .zen-stage,
      .zen-ascended-layout .zen-royal-stage {
        min-height: 340px;
      }
    }

    .zen-upgrade strong,
    .zen-upgrade small {
      display: block;
      min-width: 0;
    }

    .zen-upgrade small {
      margin-top: 6px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .zen-upgrade-effects {
      display: grid;
      gap: 3px;
      margin-top: 8px;
      border-top: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 22%, var(--line));
      padding-top: 7px;
      color: color-mix(in srgb, var(--text) 78%, var(--muted));
      font-size: 11px;
      font-weight: 850;
      line-height: 1.32;
      white-space: normal;
    }

    .zen-upgrade-effects span {
      display: block;
    }

    .zen-upgrade-effects span:nth-child(n + 3) {
      color: var(--muted);
    }

    .zen-upgrade-meta {
      grid-column: 2;
      display: flex;
      flex-wrap: wrap;
      gap: 5px 8px;
      justify-content: space-between;
      min-width: 0;
      color: var(--warn);
      font-size: 12px;
      font-weight: 950;
      white-space: normal;
    }

    .zen-upgrade-meta span {
      min-width: 0;
    }

    @media (max-width: 640px) {
      .zen-upgrade-meta {
        justify-content: flex-start;
      }
    }

    .zen-bonus-list {
      display: grid;
      gap: 10px;
    }

    .zen-bonus-list div {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      background: rgba(255,255,255,.045);
    }

    .zen-bonus-list span {
      display: grid;
      gap: 6px;
    }

    .zen-bonus-list strong {
      font-size: 13px;
    }

    .zen-bonus-list small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    .zen-bonus-list b {
      color: var(--warn);
      font-size: 13px;
      text-align: right;
      white-space: nowrap;
    }

    .zen-info-panel {
      padding: 0;
      overflow: hidden;
    }

    .zen-info-open {
      width: 100%;
      display: flex;
      align-items: center;
      gap: 12px;
      border-radius: 14px;
      padding: 12px 14px;
      text-align: left;
      color: var(--text);
      background: linear-gradient(135deg, color-mix(in srgb, var(--profile-color, var(--today)) 16%, rgba(255,255,255,.05)), rgba(255,255,255,.035));
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
    }

    .zen-info-open strong,
    .zen-info-open small {
      display: block;
    }

    .zen-info-open strong {
      font-size: 14px;
    }

    .zen-info-open small {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.3;
    }

    .zen-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .zen-formula-info-btn {
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border-radius: 999px;
      padding: 0;
      color: var(--text);
      background: color-mix(in srgb, var(--profile-color, var(--today)) 22%, rgba(255,255,255,.06));
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 36%, var(--line));
      font-size: 14px;
      font-weight: 950;
      font-family: Georgia, serif;
    }

    .zen-formula-info-btn:hover,
    .zen-formula-info-btn:focus-visible {
      background: color-mix(in srgb, var(--profile-color, var(--today)) 34%, rgba(255,255,255,.08));
    }

    .zen-info-dialog,
    .zen-ascension-dialog,
    .zen-formula-dialog {
      width: min(960px, calc(100vw - 32px));
      max-height: min(760px, calc(100vh - 32px));
      overflow: hidden;
      border: 0;
      padding: 0;
      color: var(--text);
      background: transparent;
    }

    .zen-formula-dialog {
      width: min(560px, calc(100vw - 32px));
    }

    .zen-ascension-dialog {
      width: min(640px, calc(100vw - 32px));
    }

    .zen-info-dialog::backdrop,
    .zen-ascension-dialog::backdrop,
    .zen-formula-dialog::backdrop {
      background: rgba(3,6,14,.76);
      backdrop-filter: blur(10px);
    }

    body.zen-dialog-open {
      overflow: hidden;
      overscroll-behavior: none;
    }

    body.zen-dialog-open .zen-phaser-world {
      pointer-events: none;
    }

    .zen-mission-heart-reward {
      color: #ff83b6;
      white-space: nowrap;
      text-shadow: 0 0 8px rgba(255, 93, 157, .28);
    }

    /* Deko-Käufe zeigen das echte Szenen-Sprite. Die kleinen Badges trennen
       Verstärken und AsZENdieren, ohne für jede Deko ein zweites Symbolsystem
       einzuführen. */
    .zen-decoration-purchase-icon,
    .zen-decoration-action-icon {
      overflow: visible;
    }

    .zen-decoration-purchase-icon .zen-upgrade-icon-image {
      transform: scale(1.08);
    }

    .zen-decoration-action-icon .zen-upgrade-icon-image {
      transform: scale(.86) translate(-3px, 2px);
    }

    .zen-decoration-action-badge {
      position: absolute;
      z-index: 2;
      right: -5px;
      bottom: -5px;
      display: grid;
      place-items: center;
      width: 20px;
      height: 20px;
      border: 2px solid #07101f;
      border-radius: 50%;
      box-shadow: 0 2px 6px rgba(0,0,0,.48);
      pointer-events: none;
    }

    .zen-decoration-action-badge svg {
      width: 13px;
      height: 13px;
      overflow: visible;
    }

    .zen-decoration-action-badge path:first-child {
      fill: #fff6cf;
    }

    .zen-decoration-action-badge path + path {
      fill: #09213d;
    }

    .zen-decoration-action-icon.is-amplify .zen-decoration-action-badge {
      background: #239e78;
    }

    .zen-decoration-action-icon.is-ascend .zen-decoration-action-badge {
      background: #8d5ce6;
    }

    .zen-mission-reward-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
      gap: 8px;
      margin-bottom: 12px;
    }

    .zen-mission-reward-summary > span {
      display: grid;
      gap: 3px;
      padding: 9px 11px;
      border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line));
      border-radius: var(--control-radius);
      background: color-mix(in srgb, var(--warn) 8%, rgba(255,255,255,.035));
    }

    .zen-mission-reward-summary small { color: var(--muted); }
    .zen-mission-reward-summary strong { color: var(--warn); }
    .zen-mission-milestones { display: grid; gap: 16px; padding: 14px 2px 4px; }
    .zen-mission-milestones > header { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
    .zen-mission-milestones > header > div { display: grid; gap: 3px; }
    .zen-mission-milestones > header small,
    .zen-mission-milestones > header span,
    .zen-mission-milestones > p { color: var(--muted); }
    .zen-mission-milestones > header strong { font-size: 18px; }
    .zen-mission-milestone-current { display: flex; align-items: center; gap: 10px; }
    .zen-mission-milestone-current > i { display: block; flex: 1 1 auto; height: 10px; overflow: hidden; border-radius: var(--radius-pill); background: rgba(255,255,255,.08); }
    .zen-mission-milestone-current b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--profile-color, var(--today)), #ffe38c); }
    .zen-mission-milestone-current span { min-width: 74px; color: var(--text); font-size: 12px; text-align: right; }
    .zen-mission-milestone-track { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
    .zen-mission-milestone-track article { display: flex; flex: 0 0 min(250px, 78vw); gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--control-radius); padding: 12px; background: rgba(255,255,255,.035); scroll-snap-align: start; }
    .zen-mission-milestone-track article > span { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.08); font-weight: 900; }
    .zen-mission-milestone-track article > div { display: grid; gap: 3px; }
    .zen-mission-milestone-track small { color: var(--muted); }
    .zen-mission-milestone-track em { color: var(--muted); font-size: 10px; font-style: normal; }
    .zen-mission-milestone-track article.reached { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); background: color-mix(in srgb, var(--good) 10%, transparent); }
    .zen-mission-milestone-track article.reached > span { color: #fff; background: var(--good); }
    .zen-mission-milestones.royal .zen-mission-milestone-current b { background: linear-gradient(90deg, #d5a93a, #fff0a8); }

    body.game-input-overlay-open .zen-phaser-world {
      pointer-events: none !important;
    }

    .zen-info-dialog-card,
    .zen-ascension-dialog-card,
    .zen-formula-dialog-card {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      max-height: min(760px, calc(100vh - 32px));
      border: 1px solid var(--line);
      border-radius: 18px;
      background: rgba(21,27,47,.97);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .zen-formula-dialog-card {
      max-height: min(680px, calc(100vh - 32px));
    }

    .zen-ascension-dialog-card {
      border-color: color-mix(in srgb, var(--warn) 44%, var(--line));
      background:
        radial-gradient(circle at 18% 0%, rgba(246,193,119,.16), transparent 34%),
        rgba(21,27,47,.98);
    }

    .zen-info-dialog-top {
      position: sticky;
      z-index: 6;
      top: 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      padding: 16px;
      border-bottom: 1px solid var(--line);
      background: rgb(21, 27, 47);
      box-shadow: 0 10px 24px rgba(0,0,0,.14);
    }

    .zen-ascension-dialog-top {
      border-bottom-color: color-mix(in srgb, var(--warn) 30%, var(--line));
    }

    .zen-info-close {
      width: 38px;
      height: 38px;
      flex: 0 0 auto;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      background: rgba(255,255,255,.055);
    }

    .zen-admin-market-open {
      margin-left: auto;
      border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
      color: var(--warn);
    }

    .zen-admin-lab-dialog {
      width: min(760px, calc(100vw - 24px));
    }

    .zen-admin-lab-dialog .admin-lab-card {
      padding: 0;
    }

    .zen-admin-lab-dialog .admin-lab-field {
      margin-top: 14px;
    }

    .zen-admin-lab-dialog:not(.content-only) .zen-admin-content-editor {
      display: none;
    }

    .zen-admin-lab-dialog.content-only .zen-info-content { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; padding: 18px; }
    .zen-admin-lab-dialog.content-only .zen-info-content > :not(.zen-admin-cheat-grid) { display: none; }
    .zen-admin-lab-dialog.content-only .zen-info-content > .zen-admin-cheat-grid { display: grid; grid-column: 1 / -1; width: 100%; }
    .zen-admin-lab-dialog.content-only .zen-info-content > .zen-admin-cheat-grid > :not(.zen-admin-content-editor) { display: none; }
    .zen-admin-lab-dialog.content-only .zen-admin-content-editor { display: grid; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .zen-admin-lab-dialog.content-only .zen-admin-content-editor > :first-child { display: none; }
    .zen-admin-lab-dialog.content-only .zen-admin-content-select-field { display: none; }
    .zen-admin-lab-dialog.content-only .zen-admin-content-name-field { grid-column: 1 / -1; }
    .zen-admin-lab-dialog.content-only .zen-admin-content-description-field,
    .zen-admin-lab-dialog.content-only .zen-admin-description-tokens,
    .zen-admin-lab-dialog.content-only .zen-admin-content-image-upload,
    .zen-admin-lab-dialog.content-only #zenAdminContentIconStatus,
    .zen-admin-lab-dialog.content-only .zen-admin-content-editor > .admin-reset-actions { grid-column: 1 / -1; }
    .zen-admin-content-balance { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--control-radius); }
    .zen-admin-content-balance[hidden] { display: none; }
    .zen-admin-content-balance legend { padding-inline: 6px; font-weight: 900; }
    .zen-admin-content-balance > small { grid-column: 1 / -1; color: var(--muted); }
    .zen-admin-content-cost-preview { grid-column: 1 / -1; display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--control-radius); background: color-mix(in srgb, var(--accent) 9%, var(--card2)); }
    .zen-admin-content-cost-preview span { color: var(--muted); }
    .zen-zoo-food-breakdown { display: grid; gap: 5px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: color-mix(in srgb, var(--accent) 7%, var(--card2)); }
    .zen-zoo-food-breakdown span, .zen-zoo-food-breakdown small { color: var(--muted); }
    .zen-admin-info-templates { position: relative; grid-column: 1 / -1; display: grid; gap: 9px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--control-radius); }
    .zen-admin-info-templates legend { padding-inline: 6px; font-weight: 900; }
    .zen-admin-info-templates > small { color: var(--muted); }
    #zenAdminInfoTemplateRows { display: grid; gap: 8px; }
    .zen-admin-info-template-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
    .zen-admin-info-template-row textarea { width: 100%; resize: vertical; }
    .zen-template-suggestions { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; left: 0; display: grid; max-height: 240px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--card2); box-shadow: var(--shadow); }
    .zen-template-suggestions[hidden] { display: none; }
    .zen-template-suggestions button { display: grid; grid-template-columns: minmax(130px, auto) minmax(0, 1fr); gap: 10px; width: 100%; color: var(--text); background: transparent; text-align: left; }
    .zen-template-suggestions button:hover, .zen-template-suggestions button:focus-visible { background: color-mix(in srgb, var(--accent) 14%, var(--card2)); filter: none; }
    .zen-template-suggestions code { color: var(--accent); }
    .zen-template-suggestions span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
    .zen-inline-content-icon { display: inline-block; width: 1.35em; height: 1.35em; margin-inline: .12em; object-fit: contain; vertical-align: -.3em; }
    .zen-inline-content-icon.golden { filter: sepia(1) saturate(2.2) hue-rotate(350deg) brightness(1.12); }
    .zen-admin-content-savebar { position: sticky; z-index: 5; bottom: -18px; grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin: 4px -18px -18px; padding: 14px 18px 18px; border-top: 1px solid var(--line); background: rgb(21, 27, 47); box-shadow: 0 -10px 24px rgba(0,0,0,.2); }
    .zen-info-dialog-card > .actions { position: sticky; z-index: 5; bottom: 0; margin: 0; padding: 14px 18px 18px; border-top: 1px solid var(--line); background: rgb(21, 27, 47); box-shadow: 0 -10px 24px rgba(0,0,0,.18); }
    .zen-skill-detail-edit { position: absolute; top: 18px; right: 72px; width: 42px; height: 42px; border-radius: 50%; }
    .zen-admin-description-tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
    .zen-admin-description-tokens > span { color: var(--muted); font-size: 12px; font-weight: 800; }
    .zen-admin-description-tokens .ghost-btn { min-height: 34px; padding: 6px 9px; }

    .zen-admin-cheat-grid {
      display: grid;
      gap: 10px;
    }

    .zen-admin-cheat-picker {
      align-items: end;
    }

    .zen-admin-cheat-picker .admin-lab-field {
      flex: 1 1 320px;
      margin-top: 0;
    }

    .zen-admin-content-editor {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      align-items: end;
      gap: 10px 14px;
      border-color: color-mix(in srgb, var(--warn) 34%, var(--line));
    }

    .zen-admin-content-editor > div:first-child,
    .zen-admin-content-editor .admin-reset-actions {
      grid-column: 1 / -1;
    }

    .zen-admin-content-editor .admin-lab-field {
      margin-top: 0;
    }

    .zen-admin-content-editor .zen-admin-content-description-field {
      grid-column: 1 / -1;
    }

    .zen-admin-content-description-field textarea {
      width: 100%;
      resize: vertical;
      min-height: 92px;
    }
    .zen-admin-content-description-field { position: relative; }

    .zen-admin-content-image-upload {
      grid-column: 1 / -1;
      display: grid;
      justify-items: start;
      gap: 8px;
    }

    .zen-admin-image-draft { width: 100%; display: grid; gap: 10px; }
    .zen-admin-image-draft > .good { justify-self: end; }

    .zen-admin-content-editor #zenAdminContentIconStatus {
      align-self: center;
      margin: 0;
    }

    .zen-admin-force-ascend {
      border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
      color: var(--warn);
    }

    .zen-info-summary {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px;
      cursor: pointer;
      list-style: none;
      border-radius: 12px;
      background: linear-gradient(135deg, color-mix(in srgb, var(--profile-color, var(--today)) 18%, rgba(255,255,255,.05)), rgba(255,255,255,.035));
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 24%, transparent);
    }

    .zen-info-dialog .zen-info-summary {
      padding: 0;
      cursor: default;
      background: transparent;
      border: 0;
    }

    .zen-info-summary::-webkit-details-marker {
      display: none;
    }

    .zen-info-summary::after {
      content: "+";
      margin-left: auto;
      color: var(--muted);
      font-size: 22px;
      font-weight: 950;
      line-height: 1;
    }

    .zen-info-dialog .zen-info-summary::after {
      content: none;
    }

    .zen-info-panel[open] .zen-info-summary::after {
      content: "-";
    }

    .zen-info-icon {
      width: 30px;
      height: 30px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border-radius: 999px;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 28%, rgba(255,255,255,.08));
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 42%, var(--line));
      color: #fff;
      font-size: 16px;
      font-weight: 950;
      font-family: Georgia, serif;
    }

    .zen-info-content {
      display: grid;
      gap: 12px;
      grid-template-columns: minmax(0, 1.45fr) minmax(170px, .85fr) minmax(190px, 1fr);
      align-items: start;
      padding: 12px 14px 14px;
      overflow: auto;
    }

    .zen-info-block {
      display: grid;
      gap: 8px;
      min-width: 0;
      height: 100%;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255,255,255,.032);
    }

    .zen-info-block:first-child {
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }

    .zen-formula {
      margin-top: 8px;
      color: var(--warn);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.4;
    }

    .zen-formula-detail {
      display: grid;
      gap: 12px;
      padding: 14px;
      overflow: auto;
    }

    .zen-ascension-body {
      display: grid;
      gap: 10px;
      padding: 14px;
      overflow: auto;
    }

    .zen-ascension-hero {
      display: grid;
      gap: 6px;
      border: 1px solid color-mix(in srgb, var(--warn) 42%, var(--line));
      border-radius: 14px;
      padding: 12px 14px;
      background:
        linear-gradient(135deg, color-mix(in srgb, var(--warn) 15%, rgba(255,255,255,.04)), rgba(255,255,255,.035));
    }

    .zen-ascension-hero span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .zen-ascension-hero strong {
      color: var(--warn);
      font-size: 24px;
      line-height: 1;
    }

    .zen-ascension-hero small {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.4;
    }

    .zen-ascension-impact {
      display: grid;
      gap: 6px;
    }

    .zen-ascension-impact div {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 9px 11px;
      background: rgba(255,255,255,.04);
    }

    .zen-ascension-impact span {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .zen-ascension-impact strong {
      font-size: 13px;
    }

    .zen-ascension-impact small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      line-height: 1.35;
    }

    .zen-ascension-impact b {
      color: var(--warn);
      font-size: 12px;
      white-space: nowrap;
    }

    .zen-ascension-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      border-top: 1px solid color-mix(in srgb, var(--warn) 24%, var(--line));
      padding-top: 2px;
    }

    .zen-ascension-confirm {
      display: grid;
      justify-items: center;
      gap: 2px;
      min-width: 210px;
      font-weight: 950;
    }

    .zen-ascension-confirm small {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      color: #3d2608;
      font-size: 11px;
    }

    .zen-ascension-confirm .zen-currency-icon {
      width: 1.15em;
      height: 1.15em;
    }

    @media (max-width: 560px) {
      .zen-ascension-impact div {
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .zen-ascension-impact b {
        white-space: normal;
      }

      .zen-ascension-actions {
        flex-direction: column-reverse;
      }

      .zen-ascension-actions button {
        width: 100%;
      }
    }

    .zen-formula-detail-summary {
      border: 1px solid color-mix(in srgb, var(--warn) 32%, var(--line));
      border-radius: 12px;
      padding: 12px;
      color: var(--warn);
      background: color-mix(in srgb, var(--warn) 8%, rgba(255,255,255,.04));
      font-size: 12px;
      font-weight: 900;
      line-height: 1.45;
    }

    .zen-formula-detail-rows {
      display: grid;
      gap: 8px;
    }

    .zen-formula-detail-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 11px 12px;
      background: rgba(255,255,255,.04);
    }

    .zen-formula-detail-row span {
      display: grid;
      gap: 4px;
    }

    .zen-formula-detail-row strong {
      font-size: 13px;
    }

    .zen-formula-detail-row small {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      line-height: 1.35;
    }

    .zen-formula-detail-row b {
      color: var(--warn);
      font-size: 12px;
      white-space: nowrap;
    }

    .zen-idea-list {
      display: grid;
      gap: 8px;
      margin: 0;
      padding-left: 18px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
      line-height: 1.35;
    }

    .zen-idea-list li::marker {
      color: var(--profile-color, var(--today));
    }

    /* ---- Zen Garden: Premium-Spieloberfläche ----------------------------- */
    .zen-layout {
      grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
      gap: 18px;
    }

    .zen-royal-summary.ap-only {
      display: block;
      border: 0;
      padding: 0;
      background: transparent;
    }

    .zen-royal-summary.ap-only .zen-ap-claim-box {
      display: grid;
      gap: 10px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
      border-radius: 16px;
      padding: 14px;
      background: rgba(255,255,255,.035);
    }

    .zen-royal-summary.ap-only .zen-ap-claim-box div {
      display: block;
      border: 0;
      padding: 0;
      background: transparent;
    }

    .zen-royal-summary.ap-only .zen-ap-claim-box .section-title {
      margin-bottom: 5px;
    }

    .zen-hero-mini > strong {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .zen-hero-mini > strong .spx-coin {
      width: 1.05em;
      height: 1.05em;
    }

    .zen-zenith-layout {
      --zenith-glow: #74e8ff;
      grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    }

    .zen-zenith-card,
    .zen-zenith-shop {
      border-color: rgba(116, 232, 255, .3);
      background:
        radial-gradient(circle at 50% 0%, rgba(116, 232, 255, .14), transparent 42%),
        linear-gradient(155deg, rgba(16, 22, 48, .98), rgba(7, 10, 25, .98));
    }

    .zen-zenith-stage {
      position: relative;
      min-height: 360px;
      display: grid;
      place-items: center;
      align-content: center;
      gap: 24px;
      overflow: hidden;
      border: 1px solid rgba(116, 232, 255, .22);
      border-radius: 28px;
      background:
        radial-gradient(circle at 20% 24%, rgba(255,255,255,.8) 0 1px, transparent 2px),
        radial-gradient(circle at 78% 36%, rgba(255,255,255,.65) 0 1px, transparent 2px),
        radial-gradient(circle at 64% 72%, rgba(116,232,255,.7) 0 1px, transparent 2px),
        linear-gradient(180deg, #111936, #070a19);
      text-align: center;
    }

    .zen-zenith-stage strong {
      display: block;
      color: #e8fbff;
      font-size: clamp(38px, 7vw, 76px);
      line-height: 1;
      text-shadow: 0 0 28px rgba(116, 232, 255, .5);
    }

    .zen-zenith-stage small {
      color: #9edbe8;
      font-weight: 900;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .zen-zenith-orb {
      width: 148px;
      aspect-ratio: 1;
      border-radius: 50%;
      background:
        radial-gradient(circle at 35% 30%, #fff 0 4%, #8af0ff 12%, #706eff 44%, #21184f 70%);
      box-shadow: 0 0 24px #74e8ff, 0 0 80px rgba(112, 110, 255, .7);
      animation: zenZenithPulse 3.6s ease-in-out infinite;
    }

    .zen-zenith-gate {
      grid-column: 1 / -1;
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 4px 14px;
      border-color: rgba(116, 232, 255, .34) !important;
      background: linear-gradient(120deg, rgba(67, 49, 139, .4), rgba(16, 109, 130, .3)) !important;
    }

    .zen-zenith-gate small,
    .zen-zenith-gate strong { grid-column: 1; }
    .zen-zenith-gate button { grid-column: 2; grid-row: 1 / 3; }

    @keyframes zenZenithPulse {
      50% { filter: brightness(1.2) saturate(1.15); box-shadow: 0 0 38px #74e8ff, 0 0 110px rgba(112, 110, 255, .82); }
    }

    @media (max-width: 820px) {
      .zen-zenith-layout { grid-template-columns: minmax(0, 1fr); }
      .zen-zenith-stage { min-height: 290px; }
      .zen-zenith-gate { grid-template-columns: minmax(0, 1fr); }
      .zen-zenith-gate button { grid-column: 1; grid-row: auto; width: 100%; }
    }

    .zen-layout > .zen-garden-card {
      grid-row: span 2;
    }

    .zen-layout > .zen-economy-panel {
      grid-column: 2;
    }

    .zen-garden-card {
      padding: 14px;
      border: 0;
      border-radius: 34px 10px 38px 14px;
      background: linear-gradient(155deg, rgba(20,31,43,.72), rgba(7,12,22,.58));
      box-shadow: 0 24px 70px rgba(0,0,0,.28);
    }

    .zen-stage {
      min-height: 610px;
      border-radius: 30px 8px 34px 12px;
      border-color: rgba(255,255,255,.2);
      background:
        radial-gradient(ellipse at 50% 82%, color-mix(in srgb, var(--profile-color) 18%, transparent), transparent 44%),
        radial-gradient(circle at 78% 12%, rgba(246,193,119,.2), transparent 22%),
        url("../assets/zen/backgrounds/normal.jpg") center / cover no-repeat;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.38);
    }

    .zen-phaser-world {
      position: absolute;
      z-index: 2;
      inset: 0;
      overflow: hidden;
      border-radius: inherit;
      opacity: 0;
    }

    .zen-stage.zen-canvas-loading > :not(.zen-canvas-status),
    .zen-royal-stage.zen-canvas-loading > :not(.zen-canvas-status),
    .zen-stage.zen-canvas-error > :not(.zen-canvas-status),
    .zen-royal-stage.zen-canvas-error > :not(.zen-canvas-status) {
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    .zen-canvas-status {
      position: absolute;
      z-index: 50;
      inset: 0;
      display: grid;
      place-content: center;
      gap: 14px;
      padding: 24px;
      color: #f3f7ff;
      background: rgba(7, 15, 27, .48);
      font-size: 14px;
      font-weight: 800;
      text-align: center;
      letter-spacing: .02em;
    }

    .zen-canvas-loading .zen-canvas-status::before {
      content: "";
      width: 34px;
      height: 34px;
      margin: 0 auto;
      border: 3px solid rgba(255, 255, 255, .22);
      border-top-color: #8cf1da;
      border-radius: 50%;
      animation: zen-canvas-loading-spin .8s linear infinite;
    }

    .zen-canvas-error .zen-canvas-status {
      color: #ffd0d4;
      background: rgba(31, 8, 14, .72);
    }

    @keyframes zen-canvas-loading-spin {
      to { rotate: 1turn; }
    }

    .phaser-ready > .zen-phaser-world {
      opacity: 1;
    }

    .zen-phaser-world canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
      touch-action: manipulation;
    }

    /* Die Shops werden direkt über die Gebäude in der Spielwelt geöffnet. */
    .zen-economy-panel {
      display: contents;
    }

    .zen-economy-panel > .zen-shop-launcher {
      display: none;
    }

    .zen-stage.phaser-ready > .zen-sky,
    .zen-stage.phaser-ready > .zen-sun,
    .zen-stage.phaser-ready > .zen-rake-lines,
    .zen-stage.phaser-ready > .zen-pond,
    .zen-stage.phaser-ready > .zen-torii,
    .zen-stage.phaser-ready > .zen-bonsai,
    .zen-stage.phaser-ready > .zen-stones,
    .zen-stage.phaser-ready > .zen-statue,
    .zen-royal-stage.phaser-ready > .zen-royal-sky,
    .zen-royal-stage.phaser-ready > .zen-royal-sun,
    .zen-royal-stage.phaser-ready > .zen-royal-gate,
    .zen-royal-stage.phaser-ready > .zen-royal-tree,
    .zen-royal-stage.phaser-ready > .zen-royal-fountain,
    .zen-royal-stage.phaser-ready > .zen-royal-coins {
      visibility: hidden;
    }

    .zen-stage.phaser-ready > .zen-water-btn {
      z-index: 5;
      width: 124px;
      height: 124px;
      min-width: 0;
      opacity: 0;
    }

    .zen-stage.phaser-ready > .zen-water-btn:focus-visible {
      opacity: .26;
      outline: 3px solid #bfefff;
      outline-offset: -5px;
    }

    .zen-stage.phaser-ready .zen-stage-hud,
    .zen-royal-stage.phaser-ready .zen-stage-hud {
      z-index: 8;
    }

    .zen-stage > .zen-sky,
    .zen-stage > .zen-sun,
    .zen-stage > .zen-rake-lines,
    .zen-stage > .zen-pond,
    .zen-stage > .zen-torii,
    .zen-stage > .zen-bonsai,
    .zen-stage > .zen-stones,
    .zen-stage > .zen-statue {
      display: block;
    }

    .zen-royal-stage {
      min-height: 610px;
      background:
        radial-gradient(circle at 48% 68%, rgba(246,209,122,.22), transparent 34%),
        url("../assets/zen/backgrounds/royal.jpg") center / cover no-repeat;
    }

    /* Beide Phaser-Gärten verwenden exakt dieselbe sichtbare Bühne. Die
       Quellbilder unterscheiden sich nur um wenige Pixel und werden durch
       cover ohne relevante Verzerrung auf diese gemeinsame Fläche gelegt. */
    .zen-stage,
    .zen-ascended-layout .zen-royal-stage {
      width: 100%;
      height: 610px;
      min-height: 610px;
      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;
    }

    @media (max-width: 980px) {
      .zen-stage,
      .zen-ascended-layout .zen-royal-stage {
        height: 420px;
        min-height: 420px;
      }
    }

    @media (max-width: 640px) {
      .zen-stage,
      .zen-ascended-layout .zen-royal-stage {
        /* Beide Hintergründe sind praktisch 16:9. Auf schmalen Geräten darf
           die Bühne deshalb nicht künstlich 340px hoch bleiben: cover würde
           sonst große Teile links/rechts abschneiden, während Phaser seine
           Objekte weiterhin relativ zur ganzen Bühne positioniert. */
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 1675 / 939;
      }
    }

    .zen-stage-hud {
      right: 14px;
      justify-content: space-between;
    }

    .zen-stage-hud span {
      min-width: 142px;
      border-color: rgba(255,255,255,.2);
      background: rgba(5,11,22,.76);
    }

    .zen-world-action {
      display: grid;
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto;
      column-gap: 9px;
      align-items: center;
      min-width: 154px;
      border: 1px solid rgba(164,222,255,.5);
      border-radius: 8px 20px 8px 18px;
      color: #fff;
      background: linear-gradient(145deg, rgba(35,119,157,.9), rgba(15,55,91,.94));
      box-shadow: 0 12px 30px rgba(3,12,24,.34), inset 0 1px rgba(255,255,255,.18);
    }

    .zen-world-action > span {
      grid-row: 1 / 3;
      font-size: 25px;
    }

    .zen-watering-can {
      position: relative;
      display: block;
      width: 66px;
      height: 66px;
      background: url("../assets/zen/watering-can-v1.png") center / contain no-repeat;
      filter: drop-shadow(0 8px 8px rgba(0,0,0,.35));
    }

    .zen-watering-can::before {
      content: none;
    }

    .zen-watering-can::after {
      content: none;
    }

    .zen-watering-can i {
      position: absolute;
      left: 1px;
      top: 43px;
      width: 7px;
      height: 9px;
      border-radius: 60% 40% 65% 35%;
      background: #8de5ff;
      opacity: 0;
      box-shadow: -7px 6px #8de5ff, 7px 8px #8de5ff;
    }

    .zen-watering-can.pouring { animation: zenCanPour 1.4s ease-in-out infinite; }
    .zen-watering-can.pouring i { opacity: 1; animation: zenWaterDrops .8s linear infinite; }
    .zen-watering-can.resting { filter: grayscale(.7); opacity: .62; }

    .zen-world-action b,
    .zen-world-action small {
      text-align: left;
    }

    .zen-world-action small {
      color: rgba(255,255,255,.7);
      font-size: 10px;
    }

    .zen-action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      border-radius: 7px 16px 7px 16px;
      font-weight: 950;
      box-shadow: inset 0 1px rgba(255,255,255,.15), 0 8px 20px rgba(0,0,0,.2);
    }

    .zen-action-btn > span[aria-hidden="true"],
    .zen-action-glyph {
      font-size: 18px;
    }

    .zen-action-btn small {
      color: rgba(255,255,255,.72);
      font-size: 10px;
    }

    .zen-action-ascend {
      border-color: rgba(249,208,100,.62);
      color: #241504;
      background: linear-gradient(145deg, #fff0a6, #e5a92d 62%, #b36b14);
    }

    .zen-route-button,
    .zen-shop-launcher {
      position: relative;
      overflow: hidden;
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 38%, var(--line));
      background:
        radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--profile-color, var(--today)) 32%, transparent), transparent 38%),
        linear-gradient(145deg, rgba(28,42,60,.95), rgba(10,17,30,.96));
    }

    .zen-route-button {
      grid-template-columns: auto minmax(0, 1fr) auto;
      border-radius: 8px 22px 8px 22px;
    }

    .zen-shop-launcher { border-radius: 26px 8px 26px 8px; }

    .zen-route-button > b {
      color: var(--muted);
      font-size: 28px;
    }

    .zen-route-icon {
      display: inline-grid;
      place-items: center;
      width: 44px;
      height: 44px;
      flex: 0 0 auto;
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 14px;
      background: rgba(255,255,255,.08);
      font-size: 22px;
    }

    .zen-route-icon.large {
      width: 58px;
      height: 58px;
      margin-bottom: 4px;
      border-radius: 18px;
      font-size: 30px;
    }

    .zen-claim-box {
      border-left: 0;
      border-radius: 18px 5px 18px 5px;
      border-color: rgba(255,255,255,.12);
      background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
      box-shadow: inset 0 1px rgba(255,255,255,.05);
    }

    .zen-shop-dialog-card {
      border-color: color-mix(in srgb, var(--profile-color, var(--today)) 34%, var(--line));
      background:
        radial-gradient(circle at 12% 0, color-mix(in srgb, var(--profile-color, var(--today)) 15%, transparent), transparent 28%),
        linear-gradient(160deg, rgba(22,33,48,.99), rgba(8,13,25,.99));
    }

    .zen-shop-tabs {
      gap: 7px;
      padding: 5px;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 8px 18px 8px 18px;
      background: rgba(3,8,17,.42);
    }

    .zen-shop-tabs .profile-btn {
      min-height: 45px;
      border-radius: 5px 13px 5px 13px;
    }

    .zen-tab-icon {
      font-size: 17px;
      line-height: 1;
    }

    .zen-upgrade-list .zen-upgrade {
      grid-template-columns: 54px minmax(0, 1fr);
      min-height: 132px;
      border-radius: 17px;
      padding: 13px;
      background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--zen-icon-accent, var(--profile-color, var(--today))) 16%, transparent), transparent 42%),
        linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
      box-shadow: inset 0 1px rgba(255,255,255,.07), 0 10px 24px rgba(0,0,0,.16);
    }

    .zen-upgrade-list .zen-upgrade-icon {
      width: 54px;
      height: 54px;
      border-radius: 16px;
    }

    .zen-upgrade-list .zen-upgrade-meta {
      grid-column: 1 / -1;
      justify-content: space-between;
      margin-top: auto;
      border-top: 1px solid rgba(255,255,255,.08);
      padding-top: 8px;
    }

    /* Eigener Scroll-/Zoom-Bereich für den Baum (siehe
       zenBindSkillTreePanZoom in js/zen-garden.js): overflow:hidden clippt
       den viel größeren, fest positionierten .zen-skill-tree-Canvas darunter,
       der per JS-Transform verschoben/skaliert wird. touch-action:none
       verhindert, dass iOS währenddessen eigene Scroll-/Zoom-Gesten der Seite
       auslöst; das würde sonst mit dem Pan/Zoom im Baum kollidieren. Eigener
       Viewport statt natives Scrollen von .zen-upgrades: Tabs/Summary
       darüber bleiben dadurch beim Wischen im Baum unberührt stehen. */
    .zen-skill-tree-viewport {
      position: relative;
      width: 100%;
      height: min(62vh, 620px);
      overflow: hidden;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
      cursor: grab;
      border-radius: 22px;
      border: 1px solid rgba(241,195,77,.28);
      box-shadow: inset 0 0 60px rgba(0,0,0,.35);
    }

    .zen-skill-tree-viewport.panning {
      cursor: grabbing;
    }

    .zen-skill-tree-viewport.edit-mode {
      min-height: 360px;
    }

    .zen-upgrades:has(.zen-skill-tree-viewport) {
      overflow: visible;
    }

    .zen-skill-tree {
      position: absolute;
      top: 0;
      left: 0;
      display: block;
      /* Muss zu ZEN_SKILL_TREE_WIDTH/HEIGHT in js/zen-garden.js passen -
         das JS positioniert die Knoten in diesem Koordinatensystem. */
      width: 4060px;
      height: 1920px;
      transform-origin: 0 0;
      will-change: transform;
      contain: layout paint style;
      user-select: none;
      -webkit-user-select: none;
      background:
        radial-gradient(circle at 50% 86%, rgba(240,185,55,.2), transparent 23%),
        radial-gradient(circle at 16% 40%, rgba(67,140,103,.12), transparent 28%),
        radial-gradient(circle at 84% 40%, rgba(71,122,158,.12), transparent 28%),
        linear-gradient(180deg, #080d1c, #101629 58%, #17130d);
    }

    .zen-skill-tree img {
      -webkit-user-drag: none;
      user-select: none;
    }

    .zen-skill-tree::after {
      content: "";
      position: absolute;
      left: 43%;
      right: 43%;
      bottom: -4%;
      height: 22%;
      border-radius: 50% 50% 12% 12%;
      background: linear-gradient(90deg, #4f3216, #b47a2e 48%, #5c3515);
      clip-path: polygon(36% 0, 64% 0, 72% 72%, 100% 100%, 54% 88%, 0 100%, 30% 70%);
      filter: drop-shadow(0 0 14px rgba(232,178,65,.25));
    }

    .zen-skill-tree.fully-grown::before {
      content: "";
      position: absolute;
      z-index: 0;
      left: 900px;
      top: 34px;
      width: 2200px;
      height: 1160px;
      pointer-events: none;
      border-radius: 46% 54% 42% 58%;
      opacity: .62;
      background:
        radial-gradient(ellipse at 50% 18%, rgba(79,176,100,.28), transparent 32%),
        radial-gradient(ellipse at 26% 52%, rgba(50,139,82,.22), transparent 34%),
        radial-gradient(ellipse at 74% 52%, rgba(70,157,91,.23), transparent 35%),
        radial-gradient(ellipse at 50% 72%, rgba(40,112,68,.16), transparent 38%);
      filter: drop-shadow(0 0 42px rgba(91,205,113,.18));
    }

    .zen-skill-branches {
      position: absolute;
      z-index: 1;
      inset: 0;
      width: 100%;
      height: 100%;
      overflow: visible;
      pointer-events: none;
    }

    .zen-skill-branches path {
      fill: none;
      stroke-linecap: round;
      vector-effect: non-scaling-stroke;
    }

    .zen-skill-branches .dormant { stroke: rgba(104,79,40,.14); stroke-width: 2; }
    .zen-skill-branches .growing {
      stroke: rgba(224, 190, 105, .62);
      stroke-width: 3;
      stroke-dasharray: 4 16;
    }
    .zen-skill-branches .grown {
      stroke: #d79e3b;
      stroke-width: 7;
    }

    /* Die gesamte SVG teilt sich eine grob getaktete Dash-Animation. Acht
       Schritte in vier Sekunden vermeiden permanente 60-FPS-Neuzeichnungen
       der 4060 x 1920 px großen Baumfläche. */
    .zen-skill-branches.has-growing-branches {
      animation: zenBranchGrow 4s steps(8, end) infinite;
    }

    .zen-skill-branches .branch-glow {
      animation: none;
      stroke-dasharray: none;
      pointer-events: none;
    }

    .zen-skill-branches .branch-glow.growing {
      stroke: rgba(255,211,95,.24);
      stroke-width: 14;
    }

    .zen-skill-branches .branch-glow.grown {
      stroke: rgba(238,184,65,.18);
      stroke-width: 15;
    }

    .zen-skill-branches .editing {
      stroke: rgba(244,200,92,.72);
      stroke-width: 4;
    }

    .zen-skill-branches .arrowhead {
      stroke: none;
      pointer-events: none;
    }

    .zen-skill-branches .arrowhead.dormant { fill: rgba(151,112,54,.62); }
    .zen-skill-branches .arrowhead.growing { fill: #ffe174; }
    .zen-skill-branches .arrowhead.grown { fill: #f0b94e; }
    .zen-skill-branches .arrowhead.editing {
      fill: #ffe174;
      filter: drop-shadow(0 0 5px rgba(255,211,95,.7));
    }
    /* Admin-Auswahl: Eingänge und Ausgänge bleiben auch in einem dichten
       Linienbereich anhand von Stärke und Farbe eindeutig verfolgbar. */
    .zen-skill-tree.edit-mode .zen-skill-branches .selection-muted {
      opacity: .12;
    }

    .zen-skill-tree.edit-mode .zen-skill-branches path.selection-incoming {
      stroke: #66e8ff;
      stroke-width: 9;
      opacity: 1;
      filter: drop-shadow(0 0 8px rgba(102,232,255,.9));
    }

    .zen-skill-tree.edit-mode .zen-skill-branches path.selection-outgoing {
      stroke: #ffe174;
      stroke-width: 10;
      opacity: 1;
      filter: drop-shadow(0 0 9px rgba(255,211,95,.95));
    }

    .zen-skill-tree.edit-mode .zen-skill-branches .arrowhead.selection-incoming {
      fill: #66e8ff;
      opacity: 1;
      filter: drop-shadow(0 0 7px rgba(102,232,255,.9));
    }

    .zen-skill-tree.edit-mode .zen-skill-branches .arrowhead.selection-outgoing {
      fill: #ffe174;
      opacity: 1;
      filter: drop-shadow(0 0 7px rgba(255,211,95,.95));
    }

    .zen-skill-tree .zen-upgrade {
      z-index: 2;
      position: absolute;
      width: 140px;
      min-height: 108px;
      padding: 9px;
      border: 1px solid rgba(245,205,94,.46);
      border-radius: 18px;
      background: rgba(5,10,22,.88);
      box-shadow: 0 0 0 3px rgba(225,171,45,.08), 0 10px 28px rgba(0,0,0,.46);
      transform: translate(-50%, -50%);
    }

    .zen-skill-tree .zen-upgrade.undiscovered {
      visibility: visible;
      opacity: .46;
      filter: grayscale(.85) blur(.25px);
      scale: .84;
      pointer-events: auto;
    }

    .zen-skill-tree .zen-upgrade.undiscovered .zen-upgrade-copy,
    .zen-skill-tree .zen-upgrade.undiscovered .zen-upgrade-meta {
      opacity: .9;
    }

    .zen-skill-tree .zen-node-preview {
      display: -webkit-box !important;
      overflow: hidden;
      color: rgba(235,240,248,.82);
      font-size: 9px;
      line-height: 1.25;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .zen-skill-tree .zen-upgrade.revealed {
      animation: zenSkillReveal .45s ease-out both;
    }

    .zen-skill-tree .zen-upgrade.ap { cursor: zoom-in; }

    .zen-skill-detail-dialog {
      width: min(520px, calc(100vw - 28px));
      max-height: min(760px, calc(100dvh - 28px));
      overflow: visible;
      border: 0;
      border-radius: 28px 9px 28px 9px;
      padding: 0;
      color: var(--text);
      background: transparent;
    }

    .zen-skill-detail-dialog::backdrop {
      background: rgba(2,5,12,.78);
      backdrop-filter: blur(8px);
    }

    .zen-skill-detail-card {
      position: relative;
      display: grid;
      gap: 18px;
      overflow: auto;
      max-height: min(760px, calc(100dvh - 28px));
      border: 1px solid rgba(246,205,91,.55);
      border-radius: inherit;
      padding: 24px;
      background:
        radial-gradient(circle at 18% 0, rgba(239,190,65,.19), transparent 34%),
        linear-gradient(155deg, #172034, #080d19 72%);
      box-shadow: 0 34px 90px rgba(0,0,0,.62), inset 0 1px rgba(255,255,255,.08);
    }

    .zen-skill-detail-close {
      position: absolute;
      z-index: 2;
      top: 14px;
      right: 14px;
      display: grid;
      place-items: center;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      padding: 0;
      font-size: 0;
      line-height: 1;
    }

    .zen-skill-detail-close::before,
    .zen-skill-detail-close::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 16px;
      height: 3px;
      border-radius: 999px;
      background: currentColor;
      transform: translate(-50%, -50%) rotate(45deg);
    }

    .zen-skill-detail-close::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }

    .zen-skill-detail-hero {
      display: grid;
      grid-template-columns: 74px minmax(0, 1fr);
      align-items: center;
      gap: 16px;
      padding-right: 38px;
    }

    .zen-skill-detail-hero .zen-upgrade-icon {
      width: 74px;
      height: 74px;
      border-radius: 24px 8px 24px 8px;
    }

    .zen-skill-detail-hero span { display: grid; gap: 5px; }
    .zen-skill-detail-hero small,
    .zen-skill-detail-footer small,
    .zen-skill-detail-requires small { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
    .zen-skill-detail-hero strong { font-size: clamp(21px, 5vw, 30px); line-height: 1.05; }
    .zen-skill-detail-card > p { margin: 0; color: rgba(241,245,252,.86); font-size: 15px; font-weight: 750; line-height: 1.55; }

    .zen-skill-detail-effects,
    .zen-skill-detail-requires { display: grid; gap: 8px; }
    .zen-skill-detail-effects span,
    .zen-skill-detail-requires span {
      border-left: 3px solid rgba(238,193,73,.66);
      padding: 9px 12px;
      background: rgba(255,255,255,.045);
      font-size: 13px;
      font-weight: 800;
    }

    .zen-skill-detail-footer {
      display: grid;
      grid-template-columns: auto minmax(180px, 1fr);
      align-items: center;
      gap: 16px;
      border-top: 1px solid rgba(255,255,255,.1);
      padding-top: 16px;
    }

    .zen-skill-detail-footer > span { display: grid; gap: 4px; }
    .zen-skill-detail-buy {
      min-height: 52px;
      border-radius: 7px 18px 7px 18px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .zen-skill-detail-unlearn {
      min-height: 52px;
      border-radius: 18px 7px 18px 7px;
    }

    /* Kleine Sprite-Version der geopferten Deko im "1 Lv X opfern"-Kauf-
       Button (siehe zenDecorationActionCardHtml) - steht kompakt für die
       Deko statt ihren Namen auszuschreiben, wie die Gießkanne anderswo. */
    .zen-keep-counterpart-icon {
      display: inline-flex;
      align-items: center;
      vertical-align: middle;
    }

    .zen-decoration-sprite-emoji {
      width: 2.15em;
      height: 2.15em;
      object-fit: contain;
      vertical-align: -.62em;
      filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
    }

    .zen-keep-counterpart-icon .zen-decoration-sprite-emoji {
      width: 30px;
      height: 30px;
      vertical-align: middle;
    }

    .zen-decoration-action-card {
      border-radius: 16px;
      padding: 18px;
      transition: filter .18s ease, border-color .18s ease, background-color .18s ease;
    }

    .zen-decoration-action-card.unaffordable {
      opacity: .55;
      filter: grayscale(.7) brightness(.82);
    }

    .zen-decoration-action-card.affordable {
      border-color: color-mix(in srgb, var(--good) 52%, var(--line));
    }

    .zen-decoration-action-card.maxed {
      border-color: color-mix(in srgb, var(--good) 75%, var(--line));
      background: color-mix(in srgb, var(--good) 40%, rgba(5,10,22,.88));
      animation: zenMaxedGlow 2.6s ease-in-out infinite;
    }

    .zen-skill-tree .zen-upgrade::before {
      content: none;
    }

    .zen-skill-tree .zen-upgrade-icon,
    .zen-skill-tree .zen-upgrade-lock {
      width: 38px;
      height: 38px;
      border-radius: 50%;
    }

    .zen-skill-tree .zen-upgrade-copy small {
      display: none;
    }

    .zen-skill-tree .zen-upgrade-effects {
      display: -webkit-box;
      overflow: hidden;
      color: rgba(235,240,248,.78);
      font-size: 9px;
      line-height: 1.25;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .zen-skill-tree .zen-upgrade-copy strong {
      font-size: 11px;
      line-height: 1.2;
    }

    .zen-skill-tree .zen-upgrade-meta {
      grid-column: 1 / -1;
      justify-content: space-between;
      font-size: 9px;
    }

    .zen-skill-tree [data-skill-id="ascension_momentum"] { left: 50%; top: 91%; }
    .zen-skill-tree [data-skill-id="memory_bark"] { left: 10%; top: 78%; }
    .zen-skill-tree [data-skill-id="nofap_oracle"] { left: 30%; top: 78%; }
    .zen-skill-tree [data-skill-id="paper_to_diamond"] { left: 50%; top: 78%; }
    .zen-skill-tree [data-skill-id="serenity_router"] { left: 70%; top: 78%; }
    .zen-skill-tree [data-skill-id="prosperity_seed"] { left: 90%; top: 78%; }
    .zen-skill-tree [data-skill-id="daily_conduit"] { left: 25%; top: 62%; }
    .zen-skill-tree [data-skill-id="streak_canopy"] { left: 35%; top: 52%; }
    .zen-skill-tree [data-skill-id="diamond_compound"] { left: 50%; top: 61%; }
    .zen-skill-tree [data-skill-id="royal_irrigation"] { left: 65%; top: 62%; }
    .zen-skill-tree [data-skill-id="arcade_bloom"] { left: 75%; top: 52%; }
    .zen-skill-tree [data-skill-id="prosperity_bloom"] { left: 86%; top: 64%; }
    .zen-skill-tree [data-skill-id="royal_dividend"] { left: 92%; top: 51%; }
    .zen-skill-tree [data-skill-id="deep_reservoir"] { left: 24%; top: 44%; }
    .zen-skill-tree [data-skill-id="diamond_singularity"] { left: 50%; top: 44%; }
    .zen-skill-tree [data-skill-id="eternal_spring"] { left: 64%; top: 44%; }
    .zen-skill-tree [data-skill-id="garden_echo"] { left: 24%; top: 27%; }
    .zen-skill-tree [data-skill-id="post_nut_clarity"] { left: 50%; top: 27%; }
    .zen-skill-tree [data-skill-id="monsoon_protocol"] { left: 64%; top: 27%; }
    .zen-skill-tree [data-skill-id="bonsai_shortcut"] { left: 50%; top: 11%; }
    .zen-skill-tree [data-skill-id="cycle_of_abundance"] { left: 16%; top: 14%; }
    .zen-skill-tree [data-skill-id="perfect_day"] { left: 42%; top: 34%; }
    .zen-skill-tree [data-skill-id="royal_watering_can"] { left: 80%; top: 34%; }
    .zen-skill-tree [data-skill-id="evergreen_crown"] { left: 58%; top: 10%; }

    .zen-skill-tree .zen-upgrade.affordable {
      border-color: #ffe78b;
      box-shadow: 0 0 0 4px rgba(244,196,68,.16), 0 0 30px rgba(244,196,68,.26);
    }

    .zen-skill-tree .zen-upgrade.maxed {
      border-color: #83f0b0;
      background: color-mix(in srgb, #57dd91 38%, rgba(10,20,15,.92));
      box-shadow: 0 0 30px rgba(87,221,145,.3), 0 10px 28px rgba(0,0,0,.46);
    }

    @keyframes zenSkillMaxedGlow {
      0%, 100% { box-shadow: 0 0 26px rgba(87,221,145,.2); }
      50% { box-shadow: 0 0 38px rgba(87,221,145,.4); }
    }

    /* Admin-Editor (siehe zenToggleTreeEditMode in js/zen-garden.js):
       Knoten sind per Pointer-Drag verschiebbar (grab-Cursor), ein Klick
       markiert einen Knoten zum Verbinden (gelber Ring), ein zweiter Klick
       auf einen anderen Knoten schaltet die Verbindung dazwischen um. */
    .zen-skill-tree.edit-mode {
      outline: 2px dashed rgba(244,196,68,.55);
      outline-offset: -2px;
    }

    .zen-skill-node-foliage {
      position: absolute;
      z-index: 1;
      width: 0;
      height: 0;
      pointer-events: none;
      transform: translate(-50%, -50%);
    }

    .zen-skill-node-foliage i {
      position: absolute;
      left: 0;
      top: 0;
      width: var(--leaf-size);
      height: calc(var(--leaf-size) * .62);
      border: 1px solid rgba(211,255,190,.24);
      border-radius: 95% 10% 95% 10%;
      background:
        linear-gradient(145deg, rgba(190,242,124,.92), rgba(48,141,77,.96) 55%, rgba(22,82,53,.98));
      box-shadow: 0 0 11px rgba(92,211,112,.24), inset 0 1px rgba(255,255,255,.24);
      transform:
        translate(-50%, -50%)
        rotate(var(--leaf-angle))
        translateX(var(--leaf-radius))
        rotate(var(--leaf-turn));
      transform-origin: center;
    }

    .zen-skill-node-foliage.crown-grown i {
      border-color: rgba(239,255,174,.4);
      background:
        linear-gradient(145deg, rgba(222,249,129,.96), rgba(66,168,82,.98) 52%, rgba(24,95,57,.98));
      box-shadow: 0 0 16px rgba(119,229,111,.4), inset 0 1px rgba(255,255,255,.3);
    }

    .zen-skill-node-foliage.golden-crown i,
    .zen-skill-node-foliage.golden-crown.crown-grown i {
      border-color: rgba(255,239,163,.52);
      background: linear-gradient(145deg, #fff2a8, #d8a938 54%, #7f5716);
      box-shadow: 0 0 16px rgba(247,207,92,.42), inset 0 1px rgba(255,255,255,.34);
    }

    /* Der Baum liegt auf einer 4060 x 1920 px großen, skalierten Fläche.
       Mobile WebKit/Chromium legen bei will-change, backdrop-filter und den
       vielen animierten Schatten dafür mehrere große GPU-Layer an. Zusammen
       mit der Phaser-Canvas dahinter konnte dieser Peak beim ersten Öffnen
       den Tab kurz beenden. Auf kleinen Geräten bleibt die Baumgrafik gleich,
       wird aber ohne die kostspieligen separaten Compositor-Layer gezeichnet. */
    @media (max-width: 720px), (hover: none) and (pointer: coarse) {
      body.zen-dialog-open .zen-phaser-world {
        visibility: hidden;
      }

      .zen-skill-tree {
        will-change: auto;
      }

      .zen-skill-tree .zen-upgrade {
        backdrop-filter: none;
      }

      .zen-skill-tree .zen-upgrade.revealed,
      .zen-skill-tree .zen-upgrade.maxed {
        animation: none;
      }

      .zen-skill-branches .growing,
      .zen-skill-branches .grown,
      .zen-skill-node-foliage i,
      .zen-skill-tree.fully-grown::before {
        filter: none;
      }
    }

    .zen-tree-edit-tools {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      min-width: min(100%, 360px);
      border: 1px solid rgba(140,241,218,.22);
      border-radius: var(--control-radius);
      padding: 6px;
      background: rgba(4,12,22,.42);
    }

    .zen-tree-edit-hint {
      display: none;
      color: rgba(235,244,248,.78);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.25;
    }

    .zen-skill-tree .zen-upgrade[data-skill-id] {
      cursor: default;
    }

    .zen-skill-tree.edit-mode .zen-upgrade[data-skill-id] {
      cursor: grab;
      touch-action: none;
      animation: none;
      backdrop-filter: none;
    }

    .zen-skill-tree.connect-mode .zen-upgrade[data-skill-id] {
      cursor: crosshair;
    }

    .zen-tree-node-actions {
      position: absolute;
      z-index: 7;
      display: grid;
      gap: 7px;
      translate: 49px -50%;
    }

    .zen-tree-node-info,
    .zen-tree-node-edit,
    .zen-tree-node-connect {
      display: grid;
      place-items: center;
      width: 36px;
      height: 36px;
      min-height: 0;
      border: 2px solid #8cf1da;
      border-radius: 50%;
      padding: 0;
      background: #0c2630;
      color: #efffff;
      box-shadow: 0 0 18px rgba(140,241,218,.48);
      font-size: 24px;
      font-weight: 950;
      line-height: 1;
      touch-action: none;
    }

    .zen-tree-node-info {
      border-color: #9fd9ff;
      background: #10253a;
      color: #f3fbff;
      font-family: Georgia, serif;
      font-size: 22px;
    }

    .zen-tree-node-connect.active {
      border-color: #ffe78b;
      background: #382b0d;
      color: #fff3b5;
      box-shadow: 0 0 0 3px rgba(255,231,139,.25), 0 0 22px rgba(255,211,95,.55);
    }

    .zen-tree-node-info:hover,
    .zen-tree-node-info:focus-visible,
    .zen-tree-node-connect:hover,
    .zen-tree-node-connect:focus-visible {
      filter: brightness(1.16);
    }

    .zen-tree-edge-remove {
      position: absolute;
      z-index: 8;
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border: 2px solid rgba(255,143,143,.9);
      border-radius: 50%;
      padding: 0;
      background: #351319;
      color: #ffdada;
      box-shadow: 0 0 14px rgba(255,94,94,.28);
      translate: -50% -50%;
      font-size: 21px;
      font-weight: 900;
      line-height: 1;
      touch-action: none;
    }

    .zen-tree-edge-remove:hover,
    .zen-tree-edge-remove:focus-visible {
      border-color: #ffd1d1;
      background: #5b1921;
      filter: brightness(1.08);
    }

    .zen-tree-node-tools {
      position: absolute;
      z-index: 5;
      display: flex;
      align-items: center;
      gap: 5px;
      border: 1px solid rgba(140,241,218,.5);
      border-radius: var(--control-radius);
      padding: 4px 5px;
      background: rgba(5,16,25,.96);
      box-shadow: 0 8px 18px rgba(0,0,0,.42);
      translate: -50% 62px;
      white-space: nowrap;
    }

    .zen-scene-hitbox-toggle.active {
      border-color: #ff496c;
      color: #ffd6de;
      background: rgba(255,73,108,.14);
    }

    .zen-scene-hitbox-legend {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
    }

    .zen-scene-hitbox-legend i {
      width: 10px;
      height: 10px;
      border: 2px solid #ff496c;
      border-radius: 2px;
      background: rgba(255,73,108,.2);
    }

    .zen-scene-hitbox-legend i + i {
      margin-left: 4px;
      border-color: #48e7ff;
      background: rgba(72,231,255,.12);
    }

    .zen-tree-node-tools label {
      display: flex;
      align-items: center;
      gap: 4px;
      color: #dffff8;
      font-size: 9px;
      font-weight: 850;
      text-transform: uppercase;
    }

    .zen-tree-node-price {
      width: 48px;
      min-height: 28px;
      border: 1px solid rgba(140,241,218,.38);
      border-radius: 7px;
      padding: 2px 4px;
      background: #091721;
      color: #fff;
      font: inherit;
      text-align: center;
    }

    .zen-tree-node-delete {
      display: grid;
      place-items: center;
      width: 29px;
      height: 29px;
      border: 1px solid rgba(255,143,143,.8);
      border-radius: 8px;
      padding: 0;
      background: #351319;
      color: #ffdada;
      font-size: 19px;
      font-weight: 900;
      line-height: 1;
    }

    .zen-tree-node-delete:hover,
    .zen-tree-node-delete:focus-visible {
      border-color: #ffd1d1;
      background: #5b1921;
      filter: brightness(1.08);
    }

    .zen-skill-tree .zen-upgrade.edit-selected {
      border-color: #8cf1da;
      box-shadow: 0 0 0 4px rgba(140,241,218,.28), 0 0 30px rgba(140,241,218,.34);
    }

    .zen-skill-tree.edit-mode .zen-upgrade.edit-connected-incoming {
      border-color: #66e8ff;
      box-shadow: 0 0 0 3px rgba(102,232,255,.22), 0 0 24px rgba(102,232,255,.26);
    }

    .zen-skill-tree.edit-mode .zen-upgrade.edit-connected-outgoing {
      border-color: #ffe174;
      box-shadow: 0 0 0 3px rgba(255,225,116,.22), 0 0 24px rgba(255,211,95,.28);
    }

    .zen-skill-tree.edit-mode .zen-upgrade.edit-selection-muted {
      opacity: .42;
      filter: saturate(.42) brightness(.72);
    }

    .zen-tree-edge-remove.selection-muted {
      opacity: .2;
    }

    .zen-tree-edge-remove.selection-incoming {
      border-color: #66e8ff;
      box-shadow: 0 0 15px rgba(102,232,255,.55);
    }

    .zen-tree-edge-remove.selection-outgoing {
      border-color: #ffe174;
      box-shadow: 0 0 15px rgba(255,211,95,.58);
    }

    .zen-skill-tree.edit-mode .zen-upgrade.tree-disconnected {
      border-color: #ff6f78;
      box-shadow: 0 0 0 5px rgba(255,74,87,.35), 0 0 34px rgba(255,55,70,.42);
    }

    .zen-tree-node-warning {
      position: absolute;
      z-index: 6;
      top: -12px;
      left: -12px;
      display: grid;
      place-items: center;
      width: 29px;
      height: 29px;
      border: 2px solid #ffd2d5;
      border-radius: 50%;
      background: #b81f2d;
      color: #fff;
      box-shadow: 0 0 16px rgba(255,55,70,.52);
      font-size: 17px;
      font-weight: 950;
    }

    .zen-tree-export-text {
      width: 100%;
      min-height: 320px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(3,8,17,.6);
      color: var(--text);
      font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
      font-size: 12px;
      line-height: 1.5;
      resize: vertical;
    }

    @media (max-width: 1180px) {
      .zen-layout {
        grid-template-columns: minmax(0, 1fr);
      }

      .zen-layout > .zen-garden-card,
      .zen-layout > .zen-economy-panel {
        grid-column: 1;
        grid-row: auto;
      }
    }

    @media (max-width: 720px) {
      .zen-stage,
      .zen-royal-stage {
        min-height: 440px;
      }

      .zen-stage-hud {
        right: 10px;
        top: 10px;
        left: 10px;
      }

      .zen-stage-hud span {
        min-width: 0;
        flex: 1 1 120px;
      }

      .zen-skill-detail-card { padding: 20px 16px; }
      .zen-skill-detail-footer { grid-template-columns: 1fr; }
    }

    .zen-currency-burst {
      position: fixed;
      z-index: 10000;
      width: 1px;
      height: 1px;
      pointer-events: none;
    }

    .zen-currency-burst span {
      position: absolute;
      width: var(--burst-size, 25px);
      height: var(--burst-size, 25px);
      margin: calc(var(--burst-size, 25px) / -2);
      background: center / contain no-repeat;
      filter: drop-shadow(0 3px 4px rgba(0,0,0,.45));
      animation: zenCurrencyPop .9s cubic-bezier(.18,.72,.25,1) var(--burst-delay) both;
    }

    .zen-currency-burst.ascended span {
      filter: drop-shadow(0 0 7px rgba(247,211,104,.72));
    }

    .zen-tree-canvas-hint { color: var(--muted); font-size: 12px; font-weight: 750; }

    .zen-tree-canvas-resize-top {
      position: absolute;
      z-index: 12;
      top: 8px;
      left: 50%;
      display: grid;
      place-items: center;
      gap: 5px;
      width: min(560px, 40%);
      min-height: 48px;
      padding: 7px 18px;
      border: 1px dashed color-mix(in srgb, var(--accent) 65%, var(--line));
      border-radius: var(--control-radius);
      color: var(--text);
      background: rgba(8,13,28,.9);
      translate: -50% 0;
      cursor: ns-resize;
      touch-action: none;
      user-select: none;
    }

    .zen-tree-canvas-resize-top span { width: 72px; height: 5px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 72%, white); }
    .zen-tree-canvas-resize-top b { font-size: 13px; }
    .zen-tree-canvas-resize-top.dragging { border-style: solid; border-color: var(--accent); filter: brightness(1.1); }

    .zen-tree-node-edit { border-color: #ffe78b; background: #382b0d; color: #fff3b5; font-size: 20px; }

    .zen-currency-burst.heart span {
      display: grid;
      place-items: center;
      color: #ff6687;
      font-size: var(--burst-size, 25px);
      font-weight: 950;
      line-height: 1;
      filter: drop-shadow(0 2px 5px rgba(92,11,34,.55));
    }

    @keyframes zenCanPour {
      0%, 100% { rotate: 0deg; translate: 0 0; }
      45%, 70% { rotate: -20deg; translate: -4px 2px; }
    }

    @keyframes zenWaterDrops {
      from { translate: 0 -3px; opacity: 1; }
      to { translate: -4px 16px; opacity: 0; }
    }

    @keyframes zenBranchGrow {
      to { stroke-dashoffset: -40; }
    }

    @keyframes zenSkillReveal {
      from { opacity: 0; scale: .7; }
      to { opacity: 1; scale: 1; }
    }

    @keyframes zenCurrencyPop {
      0% { translate: 0 0; scale: .35; opacity: 0; }
      18% { opacity: 1; }
      68% { translate: var(--burst-x) var(--burst-y); scale: 1.15; opacity: 1; }
      100% { translate: var(--burst-x) calc(var(--burst-y) + 22px); scale: .72; opacity: 0; }
    }

    /* ---- Charakter-Karte: Voxel-Avatar, Level & RPG-Stats ---------------- */

    .character-panel {
      display: grid;
      gap: 16px;
    }

    .character-hero {
      display: grid;
      grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
      align-items: center;
      gap: 18px;
    }

    .character-stage {
      position: relative;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 34%, var(--line));
      border-radius: 18px;
      background:
        radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--profile-color, var(--today)) 16%, transparent), transparent 70%),
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(8,12,26,.55));
      overflow: hidden;
    }

    .character-canvas {
      display: block;
      width: 100%;
      height: 260px;
      cursor: grab;
      touch-action: pan-y;
    }

    .character-canvas:active {
      cursor: grabbing;
    }

    .character-stage-hint {
      position: absolute;
      left: 50%;
      bottom: 8px;
      transform: translateX(-50%);
      padding: 3px 10px;
      border-radius: 999px;
      background: rgba(8, 12, 26, .6);
      color: var(--muted);
      font-size: 10px;
      font-weight: 850;
      letter-spacing: .04em;
      text-transform: uppercase;
      white-space: nowrap;
      pointer-events: none;
    }

    .character-summary {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .character-name {
      font-size: 20px;
      font-weight: 950;
      letter-spacing: .01em;
    }

    .character-title-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    .character-level-badge {
      padding: 4px 12px;
      border-radius: 999px;
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 62%, var(--line));
      background: color-mix(in srgb, var(--profile-color, var(--today)) 22%, rgba(255,255,255,.05));
      font-size: 13px;
      font-weight: 950;
    }

    .character-rank {
      color: var(--warn);
      font-size: 13px;
      font-weight: 900;
      letter-spacing: .05em;
      text-transform: uppercase;
    }

    .character-xp-bar {
      height: 10px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.06);
      overflow: hidden;
    }

    .character-xp-bar span {
      display: block;
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--profile-color, var(--today)), #f6c177);
      transition: width .5s ease;
    }

    .character-xp-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .character-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 14px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .character-meta b {
      color: var(--text);
    }

    .character-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 10px;
    }

    .character-stat {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.04);
    }

    .character-stat-icon {
      font-size: 20px;
      line-height: 1;
    }

    .character-stat-body {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .character-stat-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
    }

    .character-stat-label {
      font-size: 13px;
      font-weight: 900;
    }

    .character-stat-level {
      color: var(--warn);
      font-size: 12px;
      font-weight: 950;
    }

    .character-stat-bar {
      height: 6px;
      border-radius: 999px;
      background: rgba(255,255,255,.08);
      overflow: hidden;
    }

    .character-stat-bar span {
      display: block;
      height: 100%;
      border-radius: 999px;
      background: color-mix(in srgb, var(--profile-color, var(--today)) 78%, white);
      transition: width .5s ease;
    }

    .character-stat-xp {
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
      white-space: nowrap;
    }

    .character-gear {
      display: grid;
      gap: 10px;
    }

    .character-gear-slot {
      display: grid;
      grid-template-columns: 64px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
    }

    .character-gear-slot-label {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .03em;
      text-transform: uppercase;
    }

    .character-gear-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .character-gear-hint a {
      color: var(--profile-color, var(--today));
      font-weight: 950;
    }

    /* ---- Profilvergleich: zwei Bros, Showcases und laufende Streaks ------- */

    .profile-shell {
      width: 100%;
      max-width: 1180px;
      grid-template-columns: minmax(0, 1fr);
    }
    .profile-overview { display: grid; min-width: 0; }
    .profile-overview + .profile-section { border-top: 1px solid var(--line); padding-top: 28px; }

    .profile-comparison-panel {
      display: grid;
      gap: 20px;
      min-width: 0;
    }

    .profile-comparison-head,
    .profile-stat-comparison-head,
    .profile-showcase-picker-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 18px;
    }

    .profile-friend-picker {
      display: grid;
      gap: 6px;
      min-width: min(280px, 100%);
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .profile-friend-picker select,
    .profile-showcase-picker input[type="search"] {
      min-height: var(--control-h);
      border: 1px solid color-mix(in srgb, var(--today) 42%, var(--line));
      border-radius: var(--control-radius);
      padding: 0 12px;
      color: var(--text);
      background: rgba(8, 12, 26, .72);
      font: inherit;
      font-size: 13px;
      font-weight: 850;
      text-transform: none;
    }

    .profile-friend-picker select:focus,
    .profile-showcase-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--page-gutter); margin-top: var(--page-gutter); }
    .profile-showcase-choice { display: flex; flex-direction: column; align-items: center; min-width: 0; white-space: normal; }
    .profile-showcase-choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); }
    .profile-showcase-choice-art { display: block; width: 80px; height: 80px; flex: 0 0 80px; }
    .profile-showcase-picker input[type="search"]:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--today) 76%, white);
      box-shadow: 0 0 0 3px color-mix(in srgb, var(--today) 14%, transparent);
    }

    .profile-duel-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      min-width: 0;
    }

    .profile-duel-grid.is-solo {
      grid-template-columns: minmax(0, 1fr);
    }

    .profile-character-card {
      display: grid;
      align-content: start;
      gap: 16px;
      min-width: 0;
      border: 1px solid color-mix(in srgb, var(--profile-color) 45%, var(--line));
      border-radius: 20px;
      padding: 16px;
      background:
        radial-gradient(90% 70% at 8% 0%, color-mix(in srgb, var(--profile-color) 14%, transparent), transparent 72%),
        rgba(8, 12, 26, .36);
      box-shadow: 0 16px 36px rgba(0,0,0,.16);
    }

    .profile-character-kicker {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .profile-character-kicker > span,
    .profile-duel-tone {
      border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 48%, var(--line));
      border-radius: var(--radius-pill);
      padding: 4px 9px;
      color: color-mix(in srgb, var(--profile-color, var(--today)) 72%, white);
      background: color-mix(in srgb, var(--profile-color, var(--today)) 12%, transparent);
      font-size: 10px;
      font-weight: 950;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .profile-character-kicker > b,
    .profile-character-kicker > a {
      min-width: 0;
      overflow: hidden;
      font-size: 13px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .profile-character-kicker > a,
    .profile-character-card .character-name a { color: inherit; text-decoration: none; }
    .profile-character-kicker > a:hover,
    .profile-character-card .character-name a:hover { color: var(--profile-color); text-decoration: underline; }

    .profile-character-hero {
      display: grid;
      grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
      align-items: center;
      gap: 15px;
    }

    .profile-character-card .character-canvas {
      height: 210px;
    }

    .profile-character-card .character-name {
      font-size: 18px;
    }

    .profile-card-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 28px;
      color: var(--text);
      font-size: 12px;
      font-weight: 950;
    }

    .profile-running-streaks {
      display: grid;
      gap: 9px;
      border-top: 1px solid color-mix(in srgb, var(--profile-color) 22%, var(--line));
      padding-top: 12px;
    }

    .profile-showcase-edit {
      min-height: 28px;
      padding: 4px 9px;
      font-size: 10px;
    }

    .profile-showcase-list {
      display: grid;
      grid-template-columns: repeat(3, clamp(80px, 24vw, 112px));
      grid-auto-rows: 116px;
      gap: 7px;
    }

    .profile-showcase-slot { position: relative; width: 100%; height: 116px; min-width: 0; }
    .profile-showcase-slot > button:first-child { width: 100%; height: 116px; }
    .profile-showcase-remove { position: absolute; top: 2px; right: 2px; z-index: 1; }
    .profile-showcase-list .ui-add-tile { height: 116px; gap: 6px; padding: 7px; }
    .profile-showcase-list .ui-add-tile-icon { width: 38px; height: 38px; flex-basis: 38px; }
    .profile-showcase-list .ui-add-tile-icon .bro-icon { width: 23px; height: 23px; }
    .profile-showcase-list .ui-add-tile-copy strong { font-size: 11px; }
    .profile-showcase-price { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; }
    .profile-showcase-price img { width: 16px; height: 16px; }
    .profile-showcase-error { margin: 0; color: var(--danger, #ff8585); font-size: 12px; }
    .profile-visitor-shell { display: grid; gap: 12px; }
    .profile-visitor-intro { display: block; }
    .profile-visitor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .profile-visitor-stats { display: block; }
    .profile-visitor-stat-grid { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 12px; }
    .profile-visitor-stat-grid > div { display: grid; gap: 2px; }
    .profile-visitor-stats strong { font-size: 24px; }
    .profile-visitor-stats span { color: var(--muted); font-size: 13px; }

    .profile-main-showcase { gap: 10px; padding-block: 14px 18px; }
    .profile-main-showcase .profile-showcase-list {
      position: relative;
      grid-auto-flow: row;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      grid-auto-rows: auto;
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      scrollbar-width: none;
      gap: 8px;
      padding: 5px 4px 10px;
      background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.012) 60%, rgba(0,0,0,.16) 94%, rgba(255,255,255,.12) 97%, transparent);
    }
    .profile-main-showcase .profile-showcase-list::-webkit-scrollbar { display: none; }
    .profile-main-showcase .profile-showcase-slot,
    .profile-main-showcase .profile-showcase-slot > button:first-child,
    .profile-main-showcase .profile-showcase-badge,
    .profile-main-showcase .profile-showcase-list .ui-add-tile { height: auto; aspect-ratio: 1; }
    .profile-main-showcase .profile-showcase-badge { padding: 4px; }
    .profile-main-showcase .profile-showcase-badge .ui-achievement-badge-art { width: 92%; height: 92%; max-width: 240px; max-height: 240px; }
    .profile-main-showcase .profile-showcase-list .ui-add-tile { padding: 5px 3px; }
    .profile-main-showcase .profile-showcase-slot[draggable="true"] { cursor: grab; }
    .profile-main-showcase .profile-showcase-slot.is-dragging { opacity: .55; }
    .profile-duel-medals { display: flex; align-items: center; gap: 2px; min-width: 0; min-height: 44px; overflow-x: auto; scrollbar-width: none; }
    .profile-duel-medals::-webkit-scrollbar { display: none; }
    .profile-duel-medal { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 0; padding: 0; background: transparent; cursor: pointer; }
    .profile-duel-medal .ui-achievement-badge-art { width: 42px; height: 42px; }
    .profile-duel-medal .ui-achievement-badge-art,
    .profile-showcase-badge .ui-achievement-badge-art { border-radius: 50%; background: transparent; }
    .profile-duel-medal:hover { filter: brightness(1.15); }

    .profile-showcase-badge {
      display: grid;
      justify-items: center;
      place-items: center;
      min-width: 0;
      width: 100%;
      height: 116px;
      border: 0;
      border-radius: 50%;
      padding: 4px;
      background: transparent;
      color: var(--text);
      text-align: center;
      text-decoration: none;
      cursor: pointer;
    }

    .profile-showcase-badge:hover {
      background: transparent;
      filter: none;
    }
    .profile-showcase-badge:is(:hover, :focus-visible) .ui-achievement-badge-art { --badge-hover-exposure: .22; }
    .profile-showcase-badge:is(:hover, :focus-visible) .sticker-art { --sticker-hover-exposure: .22; }

    .profile-showcase-badge:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--profile-color) 74%, white);
      outline-offset: 2px;
    }

    .profile-showcase-badge .ui-achievement-badge-art,
    .profile-achievement-choice img {
      width: 48px;
      height: 48px;
      filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));
    }

    .profile-showcase-badge > span:not(.ui-achievement-badge-art):not(.sticker-art),
    .profile-achievement-choice > span:not(.profile-achievement-check) {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .profile-showcase-badge b {
      overflow: hidden;
      font-size: 10px;
      line-height: 1.25;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-showcase-badge small,
    .profile-achievement-choice small {
      overflow: hidden;
      color: var(--muted);
      font-size: 9px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-streak-chip-list {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .profile-streak-chip {
      display: grid;
      grid-template-columns: auto auto;
      align-items: baseline;
      gap: 1px 6px;
      border: 1px solid color-mix(in srgb, var(--profile-color) 34%, var(--line));
      border-radius: 12px;
      padding: 7px 9px;
      background: color-mix(in srgb, var(--profile-color) 8%, rgba(255,255,255,.03));
    }

    .profile-streak-chip b {
      color: color-mix(in srgb, var(--profile-color) 70%, white);
      font-size: 17px;
    }

    .profile-streak-chip span {
      font-size: 10px;
      font-weight: 900;
    }

    .profile-streak-chip small {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 8px;
      font-weight: 850;
    }

    .profile-card-section-head > small {
      color: var(--muted);
      font-size: 8px;
      font-weight: 850;
      letter-spacing: .04em;
      text-transform: uppercase;
    }

    .profile-streak-radar-list {
      display: grid;
      gap: 7px;
    }

    .profile-streak-radar-row {
      --streak-state-color: var(--muted);
      display: grid;
      grid-template-columns: 25px minmax(0, 1fr) auto 10px;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-height: 53px;
      border: 1px solid color-mix(in srgb, var(--streak-state-color) 35%, var(--line));
      border-radius: 12px;
      padding: 7px 8px;
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--streak-state-color) 10%, transparent), transparent 55%),
        rgba(255,255,255,.025);
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }

    .profile-streak-radar-row:hover {
      border-color: color-mix(in srgb, var(--streak-state-color) 62%, var(--line));
      filter: brightness(1.08);
    }

    .profile-streak-radar-row:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--streak-state-color) 75%, white);
      outline-offset: 2px;
    }

    .profile-streak-radar-row.is-success {
      --streak-state-color: var(--good);
    }

    .profile-streak-radar-row.is-open {
      --streak-state-color: #8ab4ff;
    }

    .profile-streak-radar-row.is-warning {
      --streak-state-color: var(--warn);
    }

    .profile-streak-radar-row.is-danger {
      --streak-state-color: var(--bad);
    }

    .profile-streak-state-icon {
      display: grid;
      place-items: center;
      width: 25px;
      height: 25px;
      border: 1px solid color-mix(in srgb, var(--streak-state-color) 55%, var(--line));
      border-radius: 50%;
      background: color-mix(in srgb, var(--streak-state-color) 16%, rgba(255,255,255,.04));
      color: color-mix(in srgb, var(--streak-state-color) 78%, white);
      font-size: 12px;
      font-weight: 950;
    }

    .profile-streak-radar-copy {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .profile-streak-radar-copy > span {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }

    .profile-streak-radar-copy b {
      overflow: hidden;
      font-size: 10px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-streak-radar-copy em {
      flex: 0 0 auto;
      border-radius: var(--radius-pill);
      padding: 2px 5px;
      background: color-mix(in srgb, var(--streak-state-color) 14%, rgba(255,255,255,.04));
      color: color-mix(in srgb, var(--streak-state-color) 76%, white);
      font-size: 7px;
      font-style: normal;
      font-weight: 950;
      letter-spacing: .035em;
      text-transform: uppercase;
    }

    .profile-streak-radar-copy small {
      overflow: hidden;
      color: var(--muted);
      font-size: 8px;
      font-weight: 750;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-streak-radar-score {
      display: grid;
      justify-items: end;
      gap: 0;
      min-width: 53px;
    }

    .profile-streak-radar-score b {
      color: color-mix(in srgb, var(--streak-state-color) 72%, white);
      font-size: 17px;
      line-height: 1;
    }

    .profile-streak-radar-score small {
      color: var(--muted);
      font-size: 7px;
      font-weight: 800;
      white-space: nowrap;
    }

    .profile-streak-radar-arrow {
      color: color-mix(in srgb, var(--streak-state-color) 65%, var(--muted));
      font-size: 18px;
      font-weight: 900;
    }

    .profile-streak-team-summary {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 13px;
      border: 1px solid color-mix(in srgb, var(--good) 34%, var(--line));
      border-radius: 16px;
      padding: 13px 15px;
      background:
        linear-gradient(110deg, color-mix(in srgb, var(--good) 12%, transparent), transparent 52%),
        rgba(255,255,255,.025);
    }

    .profile-streak-team-icon {
      display: grid;
      place-items: center;
      width: 39px;
      height: 39px;
      border: 1px solid color-mix(in srgb, var(--good) 42%, var(--line));
      border-radius: 13px;
      background: color-mix(in srgb, var(--good) 12%, rgba(255,255,255,.04));
      font-size: 19px;
    }

    .profile-streak-team-copy {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .profile-streak-team-copy small {
      color: color-mix(in srgb, var(--good) 72%, white);
      font-size: 8px;
      font-weight: 950;
      letter-spacing: .08em;
      text-transform: uppercase;
    }

    .profile-streak-team-copy b {
      font-size: 13px;
    }

    .profile-streak-team-copy span {
      color: var(--muted);
      font-size: 10px;
      font-weight: 750;
    }

    .profile-streak-team-counts {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 6px;
    }

    .profile-streak-team-counts > span {
      border: 1px solid var(--line);
      border-radius: var(--radius-pill);
      padding: 5px 8px;
      background: rgba(255,255,255,.035);
      color: var(--muted);
      font-size: 8px;
      font-weight: 850;
      white-space: nowrap;
    }

    .profile-streak-team-counts > .is-success {
      border-color: color-mix(in srgb, var(--good) 36%, var(--line));
      color: color-mix(in srgb, var(--good) 70%, white);
    }

    .profile-streak-team-counts > .is-open {
      border-color: color-mix(in srgb, #8ab4ff 36%, var(--line));
      color: color-mix(in srgb, #8ab4ff 72%, white);
    }

    .profile-streak-team-counts > .is-attention {
      border-color: color-mix(in srgb, var(--warn) 42%, var(--line));
      color: color-mix(in srgb, var(--warn) 76%, white);
    }

    .profile-card-empty {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      line-height: 1.4;
    }

    .profile-no-friend {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      border: 1px dashed var(--line);
      border-radius: 16px;
      padding: 18px;
    }

    .profile-no-friend > span {
      font-size: 28px;
    }

    .profile-no-friend > div {
      display: grid;
      gap: 3px;
    }

    .profile-no-friend small {
      color: var(--muted);
    }

    .profile-showcase-picker,
    .profile-stat-comparison {
      display: grid;
      gap: 14px;
      border: 1px solid color-mix(in srgb, var(--today) 24%, var(--line));
      border-radius: 18px;
      padding: 16px;
      background: rgba(8,12,26,.3);
    }

    .profile-showcase-picker input[type="search"] {
      width: min(260px, 100%);
    }

    .profile-achievement-choice-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 8px;
      max-height: 340px;
      overflow: auto;
      scrollbar-gutter: stable;
    }

    .profile-achievement-choice {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      min-width: 0;
      border-radius: 14px;
      padding: 9px;
      color: var(--text);
      background: rgba(255,255,255,.035);
      text-align: left;
    }

    .profile-achievement-choice b {
      overflow: hidden;
      font-size: 11px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-achievement-choice.selected {
      border-color: color-mix(in srgb, var(--good) 62%, white);
      background: color-mix(in srgb, var(--good) 12%, rgba(255,255,255,.04));
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 10%, transparent) inset;
    }

    .profile-achievement-choice:disabled {
      opacity: .42;
      cursor: not-allowed;
    }

    .profile-achievement-check {
      display: grid;
      place-items: center;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      color: var(--text);
      background: rgba(255,255,255,.08);
      font-size: 12px;
      font-weight: 950;
    }

    .profile-achievement-choice.selected .profile-achievement-check {
      color: #07140d;
      background: var(--good);
    }

    .profile-duel-tone {
      --profile-color: var(--good);
      white-space: nowrap;
    }

    .profile-stat-duel-list {
      display: grid;
      gap: 8px;
    }

    .profile-stat-duel-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
      align-items: center;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 10px 12px;
      background: rgba(255,255,255,.03);
    }

    .profile-stat-duel-side {
      display: grid;
      grid-template-columns: auto 1fr;
      align-items: baseline;
      gap: 4px 8px;
      min-width: 0;
    }

    .profile-stat-duel-side > strong {
      color: var(--warn);
      font-size: 12px;
    }

    .profile-stat-duel-side > span {
      color: var(--muted);
      font-size: 10px;
      font-weight: 850;
    }

    .profile-stat-duel-side.is-friend {
      text-align: right;
    }

    .profile-stat-duel-bar {
      grid-column: 1 / -1;
      height: 7px;
      border-radius: var(--radius-pill);
      background: rgba(255,255,255,.07);
      overflow: hidden;
    }

    .profile-stat-duel-bar i {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--today), #f6c177);
    }

    .profile-stat-duel-side.is-friend .profile-stat-duel-bar i {
      margin-left: auto;
      background: linear-gradient(90deg, #f6c177, var(--good));
    }

    .profile-stat-duel-label {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 1px 6px;
      text-align: center;
    }

    .profile-stat-duel-label > span {
      grid-row: 1 / 3;
      font-size: 18px;
    }

    .profile-stat-duel-label b {
      font-size: 12px;
    }

    .profile-stat-duel-label small {
      overflow: hidden;
      color: var(--muted);
      font-size: 8px;
      font-weight: 850;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-section {
      display: grid;
      gap: 24px;
      min-width: 0;
      width: 100%;
      padding: 12px 0 28px;
    }

    .profile-avatar-summary {
      display: grid;
      grid-template-columns: 180px minmax(0, 700px);
      grid-template-rows: 180px;
      height: 189px;
      gap: 20px;
      align-items: center;
      border-top: 1px solid var(--line);
      padding-top: 8px;
    }
    .profile-avatar-summary .profile-color-preview,
    .profile-avatar-summary .profile-color-preview .game-avatar { width: 180px; height: 180px; }
    .profile-avatar-preview-wrap { position: relative; width: 180px; height: 180px; }
    .profile-avatar-summary-media { display: flex; flex: 0 0 auto; min-width: 0; max-width: 160px; height: 100%; align-items: start; justify-content: start; }
    .profile-avatar-summary-media .profile-flavor-gif { max-width: 160px; max-height: 100%; }
    .profile-preview-edit.ui-icon-button {
      position: absolute;
      z-index: 2;
      top: 8px;
      right: 8px;
      width: 38px;
      min-width: 38px;
      height: 38px;
      border-radius: 50%;
      background: rgba(13, 19, 32, .9);
      box-shadow: 0 2px 12px rgba(0, 0, 0, .28);
    }
    .profile-preview-edit.ui-icon-button:hover { background: rgba(32, 43, 65, .98); }
    .profile-duel-open { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: rgba(13, 19, 32, .9); }
    .profile-duel-open:hover { color: var(--profile-color); background: rgba(32, 43, 65, .98); }
    .profile-duel-open .bro-icon { width: 18px; height: 18px; }
    .profile-settings-panel { gap: 10px; padding-bottom: 14px; }
    .profile-avatar-summary-copy { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; height: 180px; gap: 8px; }
    .profile-avatar-summary-identity { display: grid; justify-items: start; gap: 6px; min-width: 0; max-height: 90px; overflow: auto; }
    .profile-visitor-shell .profile-avatar-summary { grid-template-rows: minmax(180px, auto); height: auto; min-height: 189px; }
    .profile-visitor-shell .profile-avatar-summary-copy { height: auto; min-height: 180px; }
    .profile-visitor-shell .profile-avatar-summary-identity { max-height: none; overflow: visible; }
    .profile-avatar-summary-content { display: flex; align-items: start; gap: 12px; min-width: 0; min-height: 0; }
    .profile-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; max-width: 100%; }
    .profile-name-row > strong { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; font-size: 24px; }
    .profile-name-row .ui-icon-button { flex: 0 0 34px; width: 34px; min-width: 34px; height: 34px; min-height: 34px; aspect-ratio: 1; border-radius: 50%; padding: 0; }
    .profile-name-inline-input { flex: 1 1 150px; width: min(100%, 280px); min-width: 80px; max-width: 280px; border: 0; border-bottom: 2px solid color-mix(in srgb, var(--profile-color) 70%, var(--line)); border-radius: 0; padding: 2px 1px 3px; color: var(--text); background: transparent; box-shadow: none; font: inherit; font-size: 24px; font-weight: 900; }
    .profile-name-inline-input:focus { outline: 0; border-bottom-color: var(--profile-color); box-shadow: 0 2px 0 color-mix(in srgb, var(--profile-color) 24%, transparent); }
    .profile-color-picker { position: relative; display: grid; width: 30px; height: 30px; margin-right: 7px; place-items: center; cursor: pointer; }
    .profile-color-picker input { width: 26px; height: 26px; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; padding: 0; overflow: hidden; background: transparent; box-shadow: 0 0 0 2px rgba(0,0,0,.2); cursor: pointer; }
    .profile-color-picker input::-webkit-color-swatch-wrapper { padding: 0; }
    .profile-color-picker input::-webkit-color-swatch { border: 0; border-radius: 50%; }
    .profile-color-picker input::-moz-color-swatch { border: 0; border-radius: 50%; }
    .profile-field-editor { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 850; }
    .profile-field-editor input[type="text"] { width: 100%; }
    @media (max-width: 600px) {
      .profile-avatar-summary,
      .profile-avatar-summary.has-media { grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: 120px 108px; height: 249px; gap: 12px; align-items: start; }
      .profile-avatar-summary .profile-color-preview,
      .profile-avatar-summary .profile-color-preview .game-avatar { width: 120px; height: 120px; }
      .profile-avatar-preview-wrap { width: 120px; height: 120px; }
      .profile-avatar-summary-copy { display: contents; }
      .profile-avatar-summary-identity { grid-column: 2; grid-row: 1; max-height: 120px; }
      .profile-visitor-shell .profile-avatar-summary { grid-template-rows: minmax(120px, auto) 108px; height: auto; }
      .profile-visitor-shell .profile-avatar-summary:not(.has-flavor):not(.has-media) { grid-template-rows: minmax(120px, auto); }
      .profile-visitor-shell .profile-avatar-summary:not(.has-flavor):not(.has-media) .profile-avatar-summary-content { display: none; }
      .profile-visitor-shell .profile-avatar-summary-identity { max-height: none; overflow: visible; }
      .profile-avatar-summary-content { grid-column: 1 / -1; grid-row: 2; height: 108px; }
      .profile-avatar-summary-media { max-width: 120px; }
      .profile-avatar-summary-media .profile-flavor-gif { max-width: 120px; }
      .profile-name-row > strong { font-size: 20px; }
      .profile-name-inline-input { font-size: 20px; }
    }
    .profile-section + .profile-section {
      border-top: 1px solid var(--line);
      padding-top: 28px;
    }
    .profile-section + .profile-main-showcase { padding-top: 14px; }
    :where(body:not(.og-design)) .profile-section .profile-main-card {
      border: 0;
      border-radius: 0;
      padding: 0;
      background: none;
      box-shadow: none;
    }
    :where(body:not(.og-design)) .profile-section .profile-character-card {
      border-radius: 8px;
      background: rgba(255,255,255,.025);
      box-shadow: none;
    }
    :where(body:not(.og-design)) .games-page .zen-garden-card {
      border: 0;
      border-radius: 0;
      padding: 14px 0;
      background: transparent;
      box-shadow: none;
      backdrop-filter: none;
    }
    .profile-privacy-link {
      display: inline-flex;
      align-items: center;
      margin-left: 12px;
      padding: 3px 8px;
      font-size: 12px;
      font-weight: 700;
      vertical-align: middle;
    }

    .profile-settings-panel {
      width: 100%;
    }
    .profile-avatar-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 24px; align-items: start; }
    .profile-avatar-layout > * { min-width: 0; }
    body.og-design .profile-section {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 18px;
      background: rgba(21,27,47,.78);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }
    body.og-design .profile-settings-panel { width: min(720px, 100%); }
    body.og-design .profile-avatar-layout { grid-template-columns: minmax(0, 1fr); }
    .profile-avatar-layout .character-gear { margin-top: 0; }
    @media (max-width: 920px) {
      .profile-avatar-layout { grid-template-columns: minmax(0, 1fr); }
    }

    @media (max-width: 920px) {
      .profile-duel-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .profile-character-card {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    @media (max-width: 640px) {
      .character-hero {
        grid-template-columns: minmax(0, 1fr);
      }

      .character-canvas {
        height: 240px;
      }

      .character-gear-slot {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
      }

      .profile-comparison-head,
      .profile-stat-comparison-head,
      .profile-showcase-picker-head {
        align-items: stretch;
        flex-direction: column;
      }

      .profile-friend-picker,
      .profile-showcase-picker input[type="search"] {
        width: 100%;
      }

      .profile-character-hero {
        grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
      }

      .profile-character-card .character-canvas {
        height: 180px;
      }

      .profile-stat-duel-row {
        grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
        gap: 7px;
        padding: 9px 8px;
      }

      .profile-stat-duel-side {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
      }

      .profile-stat-duel-label {
        grid-template-columns: minmax(0, 1fr);
      }

      .profile-stat-duel-label > span {
        grid-row: auto;
      }

      .profile-stat-duel-label small {
        white-space: normal;
      }

      .profile-no-friend {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .profile-no-friend .good {
        grid-column: 1 / -1;
      }

      .profile-streak-team-summary {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .profile-streak-team-counts {
        grid-column: 1 / -1;
        justify-content: flex-start;
      }
    }

    @media (max-width: 430px) {
      .profile-character-hero {
        grid-template-columns: minmax(0, 1fr);
      }

      .profile-showcase-list {
        grid-template-columns: repeat(3, clamp(80px, 24vw, 112px));
      }

      .profile-main-showcase .profile-showcase-list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 132px;
        grid-auto-rows: 142px;
      }
      .profile-main-showcase .profile-showcase-slot,
      .profile-main-showcase .profile-showcase-slot > button:first-child,
      .profile-main-showcase .profile-showcase-badge,
      .profile-main-showcase .profile-showcase-list .ui-add-tile { height: 142px; }
      .profile-main-showcase .profile-showcase-badge .ui-achievement-badge-art { width: 124px; height: 124px; }

      .profile-streak-radar-row {
        grid-template-columns: 25px minmax(0, 1fr) auto;
      }

      .profile-streak-radar-arrow {
        display: none;
      }

      .profile-streak-team-summary {
        padding: 11px;
      }
    }

    /* OG Design: alte Zen-Garten-Darstellung, neue Spiellogik. */
    .games-page.og-design .zen-garden-tabs {
      width: 100%;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .games-page.og-design .zen-garden-tabs .profile-btn {
      border-radius: var(--control-radius);
    }

    .games-page.og-design .zen-layout {
      grid-template-columns: minmax(420px, 1fr) minmax(300px, 340px) minmax(180px, 220px);
      gap: 16px;
    }

    .games-page.og-design .zen-layout > .zen-garden-card {
      grid-row: auto;
    }

    .games-page.og-design .zen-layout > .zen-economy-panel {
      display: grid;
      grid-column: auto;
      align-content: start;
      gap: 16px;
    }

    .games-page.og-design .zen-economy-panel > .zen-shop-launcher {
      display: grid;
    }

    .games-page.og-design .zen-garden-card {
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21,27,47,.78);
      box-shadow: var(--shadow);
      backdrop-filter: blur(12px);
    }

    .games-page.og-design .zen-stage,
    .games-page.og-design .zen-royal-stage {
      min-height: 520px;
      border-radius: 20px;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 20px 50px rgba(0,0,0,.28);
    }

    .games-page.og-design .zen-stage {
      border-color: color-mix(in srgb, var(--profile-color) 38%, rgba(255,255,255,.12));
      background:
        radial-gradient(circle at 50% 68%, color-mix(in srgb, var(--profile-color) 12%, transparent), transparent 34%),
        url("../assets/zen/backgrounds/normal.jpg") center / cover no-repeat;
    }

    .games-page.og-design .zen-royal-stage {
      background:
        radial-gradient(circle at 48% 68%, rgba(246,209,122,.22), transparent 34%),
        url("../assets/zen/backgrounds/royal.jpg") center / cover no-repeat;
    }

    .games-page.og-design .zen-phaser-world {
      display: none;
    }

    .games-page.og-design .zen-stage.phaser-ready > .zen-sky,
    .games-page.og-design .zen-stage.phaser-ready > .zen-sun,
    .games-page.og-design .zen-stage.phaser-ready > .zen-rake-lines,
    .games-page.og-design .zen-stage.phaser-ready > .zen-pond,
    .games-page.og-design .zen-stage.phaser-ready > .zen-torii,
    .games-page.og-design .zen-stage.phaser-ready > .zen-bonsai,
    .games-page.og-design .zen-stage.phaser-ready > .zen-stones,
    .games-page.og-design .zen-stage.phaser-ready > .zen-statue,
    .games-page.og-design .zen-royal-stage.phaser-ready > .zen-royal-sky,
    .games-page.og-design .zen-royal-stage.phaser-ready > .zen-royal-sun,
    .games-page.og-design .zen-royal-stage.phaser-ready > .zen-royal-gate,
    .games-page.og-design .zen-royal-stage.phaser-ready > .zen-royal-tree,
    .games-page.og-design .zen-royal-stage.phaser-ready > .zen-royal-fountain,
    .games-page.og-design .zen-royal-stage.phaser-ready > .zen-royal-coins {
      visibility: visible;
    }

    .games-page.og-design .zen-stage.phaser-ready > .zen-water-btn {
      width: auto;
      height: auto;
      opacity: 1;
    }

    .games-page.og-design .zen-stage-hud,
    .games-page.og-design .zen-watering-can {
      display: none;
    }

    .games-page.og-design .zen-world-action {
      display: inline-flex;
      min-width: 0;
      padding: 10px 14px;
    }

    .games-page.og-design .zen-world-action,
    .games-page.og-design .zen-action-btn,
    .games-page.og-design .zen-route-button,
    .games-page.og-design .zen-shop-launcher,
    .games-page.og-design .zen-claim-box {
      border-radius: var(--control-radius);
      box-shadow: none;
    }

    .games-page.og-design .zen-claim-box {
      border-left: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
      background: rgba(255,255,255,.035);
    }

    .zen-og-station-open {
      display: none;
    }

    .games-page.og-design .zen-og-station-open {
      display: inline-flex;
      width: 100%;
      justify-content: center;
    }

    .games-page.og-design .zen-shop-tabs {
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
    }

    .games-page.og-design .zen-shop-tabs .profile-btn,
    .games-page.og-design .zen-upgrade-list .zen-upgrade,
    .games-page.og-design .zen-upgrade-list .zen-upgrade-icon {
      border-radius: 12px;
    }

    .games-page.og-design .zen-upgrade-list .zen-upgrade {
      grid-template-columns: 38px minmax(0, 1fr);
      min-height: 0;
      padding: 12px;
      box-shadow: none;
    }

    .games-page.og-design .zen-upgrade-list .zen-upgrade-icon {
      width: 38px;
      height: 38px;
    }

    .games-page.og-design .zen-upgrade-list .zen-upgrade-meta {
      grid-column: 2;
      margin-top: 0;
      border-top: 0;
      padding-top: 0;
    }

    .games-page.og-design .zen-skill-tree {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 24px 12px;
      min-height: 0;
      overflow: visible;
      border: 0;
      border-radius: 0;
      padding: 8px 0 2px;
      background:
        linear-gradient(var(--line), var(--line)) 50% 44px / 66.66% 1px no-repeat,
        linear-gradient(var(--line), var(--line)) 50% 44px / 1px calc(100% - 58px) no-repeat;
      box-shadow: none;
    }

    .games-page.og-design .zen-skill-tree::after,
    .games-page.og-design .zen-skill-branches {
      display: none;
    }

    .games-page.og-design .zen-skill-tree .zen-upgrade {
      position: relative;
      left: auto !important;
      top: auto !important;
      width: auto;
      min-height: 118px;
      padding: 12px;
      border-radius: 12px;
      transform: none;
      scale: 1;
      backdrop-filter: none;
    }

    .games-page.og-design .zen-skill-tree .zen-upgrade.undiscovered {
      width: auto;
      scale: 1;
    }

    .games-page.og-design .zen-skill-tree .zen-upgrade-copy strong { font-size: 13px; }
    .games-page.og-design .zen-skill-tree .zen-upgrade-effects { display: grid; font-size: 11px; }
    .games-page.og-design .zen-skill-tree .zen-upgrade-meta { font-size: 12px; }

    @media (max-width: 1180px) {
      .games-page.og-design .zen-layout { grid-template-columns: minmax(0, 1fr); }
      .games-page.og-design .zen-layout > .zen-economy-panel { grid-column: 1; }
    }

    @media (max-width: 640px) {
      .games-page.og-design .zen-garden-tabs,
      .games-page.og-design .zen-upgrade-list,
      .games-page.og-design .zen-skill-tree { grid-template-columns: minmax(0, 1fr); }
      .games-page.og-design .zen-stage,
      .games-page.og-design .zen-royal-stage { min-height: 340px; }
      .games-page.og-design .zen-skill-tree .zen-upgrade { min-height: 0; }
    }

    /* Nach erfolgreichem Canvas-Start liegen Claims, Buch und Währungen in
       der Gartengrafik. Dialoge bleiben über display:contents erreichbar. */
    .games-page:not(.og-design) .zen-layout.zen-canvas-controls-ready {
      grid-template-columns: minmax(0, 1fr);
    }

    .games-page:not(.og-design) .zen-layout.zen-canvas-controls-ready > .zen-daily-panel,
    .games-page:not(.og-design) .zen-layout.zen-canvas-controls-ready .zen-garden-actions {
      display: none;
    }

    .games-page:not(.og-design) .zen-layout.zen-canvas-controls-ready > .zen-garden-card {
      grid-column: 1;
      grid-row: auto;
    }

    .games-page:not(.og-design) .zen-layout.zen-canvas-controls-ready > .zen-economy-panel {
      display: contents;
    }

    .games-page:not(.og-design) .zen-layout.zen-canvas-controls-ready > .zen-economy-panel > .zen-shop-launcher {
      display: none;
    }

    /* Die Bühnenaktion bleibt bewusst innerhalb der Szene: Auch iOS-PWAs,
       die Element-Fullscreen nicht unterstützen, bekommen so einen echten
       bildschirmfüllenden Fokusmodus. */
    body.game-focus-fullscreen-open {
      overflow: hidden;
      overscroll-behavior: none;
    }

    .game-card.game-focus-fullscreen,
    .td-shell.game-focus-fullscreen {
      position: fixed;
      z-index: 1000;
      inset: 0;
      width: 100dvw;
      height: 100dvh;
      max-width: none;
      max-height: none;
      overflow: auto;
      border: 0;
      border-radius: 0;
      background: var(--bg);
      box-shadow: none;
    }

    /* Zen nimmt im Vollbild die komplette Spieloberfläche mit: Location,
       Sound und Exit bleiben erreichbar. Desktop nutzt :fullscreen, der
       identische Klassenpfad ist der iOS-/PWA-Fallback. */
    .game-shell[data-game-panel="zen"]:fullscreen,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen {
      position: fixed;
      z-index: 1000;
      inset: 0;
      display: block;
      width: 100vw;
      width: 100dvw;
      height: 100vh;
      height: 100dvh;
      max-width: none;
      max-height: none;
      overflow: hidden;
      padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
      background: #030711;
    }

    .game-shell[data-game-panel="zen"]:fullscreen > .zen-navigation-row,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen > .zen-navigation-row {
      position: absolute;
      z-index: 20;
      top: max(8px, env(safe-area-inset-top));
      right: max(8px, env(safe-area-inset-right));
      left: auto;
      width: min(310px, calc(100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))));
      height: auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 6px;
      margin: 0;
      pointer-events: none;
    }

    .game-shell[data-game-panel="zen"]:fullscreen > .zen-navigation-row > *,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen > .zen-navigation-row > * {
      pointer-events: auto;
      opacity: .72;
      transition: opacity .18s ease;
    }

    .game-shell[data-game-panel="zen"]:fullscreen > .zen-navigation-row > *:hover,
    .game-shell[data-game-panel="zen"]:fullscreen > .zen-navigation-row > *:focus-within,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen > .zen-navigation-row > *:hover,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen > .zen-navigation-row > *:focus-within {
      opacity: 1;
    }

    .game-shell[data-game-panel="zen"]:fullscreen .zen-location-trigger,
    .game-shell[data-game-panel="zen"]:fullscreen .game-audio-control,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen .zen-location-trigger,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen .game-audio-control {
      min-height: 40px;
      height: 40px;
      border-color: rgba(255,255,255,.16);
      background: rgba(3,7,17,.62);
      box-shadow: 0 6px 20px rgba(0,0,0,.24);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .game-shell[data-game-panel="zen"]:fullscreen > .zen-layout:not([hidden]),
    .game-shell[data-game-panel="zen"].game-focus-fullscreen > .zen-layout:not([hidden]) {
      position: absolute;
      inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
      display: grid !important;
      width: auto;
      height: auto;
      min-height: 0;
      place-items: center;
    }

    .game-shell[data-game-panel="zen"]:fullscreen .zen-garden-card,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen .zen-garden-card {
      display: grid;
      width: 100%;
      height: 100%;
      min-height: 0;
      place-items: center;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }

    .game-shell[data-game-panel="zen"]:fullscreen .zen-garden-card > .game-top,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen .zen-garden-card > .game-top {
      display: none;
    }

    .game-shell[data-game-panel="zen"]:fullscreen .zen-stage,
    .game-shell[data-game-panel="zen"]:fullscreen .zen-royal-stage,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen .zen-stage,
    .game-shell[data-game-panel="zen"].game-focus-fullscreen .zen-royal-stage {
      position: relative;
      top: auto;
      left: auto;
      width: min(100%, calc((100dvh - 16px) * 1.787));
      height: min(100%, calc((100dvw - 16px) / 1.787));
      min-height: 0;
      max-height: none;
      aspect-ratio: 1675 / 937;
      border-radius: 10px;
      background-size: cover;
      box-shadow: 0 18px 60px rgba(0,0,0,.42);
      transform: none;
    }

    .zen-stage.game-focus-fullscreen,
    .zen-royal-stage.game-focus-fullscreen {
      position: fixed;
      z-index: 1000;
      top: 50%;
      left: 50%;
      width: min(100vw, calc(100vh * 1.787));
      width: min(100dvw, calc(100dvh * 1.787));
      height: min(100vh, calc(100vw / 1.787));
      height: min(100dvh, calc(100dvw / 1.787));
      min-height: 0;
      border: 0;
      border-radius: 0;
      aspect-ratio: 1675 / 937;
      background-size: cover;
      box-shadow: 0 0 0 100vmax #030711;
      transform: translate(-50%, -50%);
    }

    /* Auf Touch-Geräten übernimmt die Hardware-Lautstärke die Feinregelung.
       Der Musik-Toggle bleibt sichtbar, nur der zusätzliche Slider entfällt –
       auch im Querformat oberhalb des schmalen Mobile-Breakpoints. */
    @media (hover: none) and (pointer: coarse) {
      .games-page .game-audio-control input[type="range"] {
        display: none;
      }
    }

    @media (max-width: 720px) {
      /* Ohne :has-Abhängigkeit: In älteren iOS-WebViews darf der Slider den
         dahinterliegenden Vollbild-Button nicht aus der Toolbar schieben. */
      .game-shell[data-game-panel="zen"] .zen-navigation-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        margin-bottom: 10px;
      }

      .game-shell[data-game-panel="zen"] .zen-navigation-row .zen-garden-tabs,
      .game-shell[data-game-panel="zen"] .zen-navigation-row .zen-audio-toolbar {
        order: initial;
        width: auto;
        min-width: 0;
      }

      .game-shell[data-game-panel="zen"] .zen-navigation-row .game-audio-control {
        height: 48px;
      }

      .game-shell[data-game-panel="zen"] .zen-navigation-row .game-audio-control input {
        display: none;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) {
        padding-bottom: calc(var(--mobile-nav-space, 92px) + env(safe-area-inset-bottom) + 18px);
      }

      /* Dieselbe kompakte Spieleleiste bleibt auf jeder Games-Unterseite
         sichtbar; nur ihr Inhalt scrollt horizontal, statt in mehrere
         unterschiedlich hohe Zeilen umzubrechen. */
      .games-page > .game-tabs {
        gap: 7px;
        margin-bottom: 10px;
        padding-bottom: 4px;
      }

      .games-page > .game-tabs .profile-btn {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 7px 11px;
      }

      .games-page .game-toolbar {
        display: flex;
        align-items: center;
        gap: 7px;
      }

      .games-page .game-toolbar > .game-audio-control {
        order: 1;
      }

      .games-page .game-toolbar > [data-game-fullscreen-target] {
        order: 2;
      }

      .games-page .game-toolbar .game-audio-control input {
        display: none;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-navigation-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        margin-bottom: 10px;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-navigation-row .zen-garden-tabs,
      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-navigation-row .zen-audio-toolbar {
        order: initial;
        width: auto;
        min-width: 0;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-location-trigger {
        min-height: 48px;
        grid-template-columns: 30px minmax(0, 1fr) 16px;
        gap: 8px;
        padding: 5px 10px;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-location-icon {
        width: 30px;
        height: 30px;
        font-size: 17px;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-location-picker-copy small {
        display: none;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-navigation-row .game-audio-control {
        height: 48px;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-navigation-row .game-audio-control input {
        display: none;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-garden-card {
        padding: 0;
        border-radius: 18px;
      }

      .games-page:has([data-game-panel="zen"]:not([hidden])) .zen-garden-card > .game-top {
        display: none;
      }

      .games-page:not(.og-design) .zen-stage,
      .games-page:not(.og-design) .zen-ascended-layout .zen-royal-stage {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 1675 / 937;
        border-radius: 18px;
        /* Beide Quellbilder liegen praktisch in diesem Seitenverhältnis.
           Dadurch können Hintergrund und Phaser-Bühne gemeinsam skalieren,
           ohne den Garten zu strecken oder unabhängig zu beschneiden. */
        background-size: cover;
      }

      .zen-stage-hud {
        top: 8px;
        right: 8px;
        left: 8px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
      }

      .zen-stage-hud.zen-refugium-hud {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .zen-stage-hud span {
        min-width: 0;
        padding: 5px 7px;
        border-radius: 9px;
      }

      .zen-stage-hud small {
        overflow: hidden;
        font-size: 7px;
        letter-spacing: .045em;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .zen-stage-hud strong {
        overflow: hidden;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .zen-stage.game-focus-fullscreen,
      .zen-royal-stage.game-focus-fullscreen {
        width: min(100dvw, calc(100dvh * 1.787));
        height: min(100dvh, calc(100dvw / 1.787));
        min-height: 0;
        border-radius: 0;
      }
    }
.zen-zoo-pet-detail-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 760px);
  margin: 0 auto 18px;
}

.zen-zoo-pet-detail-nav .zen-zoo-pet-back { justify-self: center; }

.zen-zoo-pet-nav-arrow {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}
.zen-water-effect-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #72d7ff 38%, var(--line));
  border-radius: var(--control-radius);
  background: color-mix(in srgb, #72d7ff 9%, rgba(255,255,255,.035));
}
.zen-water-effect-note strong { color: #9ee7ff; }
.zen-water-effect-note small { color: var(--muted); }
.profile-flavor { position: relative; display: flex; flex: 1 1 0; align-items: start; gap: 8px; max-width: 100%; min-width: 0; height: 100%; }
.profile-flavor-body { flex: 1 1 0; min-width: 0; height: 100%; max-width: 100%; overflow: auto; line-height: 1.5; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.profile-flavor-body p, .profile-flavor-body div { margin: 0; }
.profile-flavor-body ul, .profile-flavor-body ol { padding-left: 24px; margin: 6px 0; }
.profile-flavor-edit.ui-icon-button { position: static; flex-shrink: 0; }
.profile-flavor-gif { display: block; flex: 0 1 auto; width: auto; height: auto; max-width: min(100%, 220px); max-height: 180px; object-fit: contain; object-position: left center; border-radius: 6px; }
.profile-flavor-add { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.profile-flavor-add svg { width: 16px; height: 16px; }
.profile-flavor-gif-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.achievement-medal-save-error { position: absolute; z-index: 12; bottom: 12px; left: 12px; right: 12px; padding: 10px 12px; border: 1px solid var(--bad); border-radius: 6px; color: var(--text); background: var(--bg); overflow-wrap: anywhere; font-size: 13px; }

/* Quelle: recovery-care.css */
.recovery-care-panel {
  display: grid;
  gap: var(--control-pad);
  border-color: color-mix(in srgb, #6bd3a9 44%, var(--line));
  background:
    radial-gradient(circle at 92% 12%, rgba(107, 211, 169, .18), transparent 34%),
    var(--card);
}

.recovery-care-head,
.recovery-care-status-head,
.recovery-care-actions,
.recovery-care-date-row,
.recovery-care-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--control-pad);
}

.recovery-care-title {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.recovery-care-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(107, 211, 169, .16);
  font-size: 1.45rem;
}

.recovery-care-title strong,
.recovery-care-status-head strong {
  display: block;
  color: var(--text);
}

.recovery-care-title small,
.recovery-care-status-head small,
.recovery-care-date-row,
.recovery-care-note {
  color: var(--muted);
}

.recovery-care-status {
  display: grid;
  gap: .8rem;
  padding: var(--control-pad);
  border: 1px solid rgba(107, 211, 169, .28);
  border-radius: var(--control-radius);
  background: rgba(107, 211, 169, .08);
}

.recovery-care-message {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.recovery-care-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.recovery-care-dialog-form,
.recovery-care-field {
  display: grid;
  gap: .55rem;
}

.recovery-care-dialog-form {
  gap: 1rem;
}

.recovery-care-popup {
  width: min(92vw, 30rem);
  border-color: rgba(107, 211, 169, .5);
  background:
    radial-gradient(circle at 50% 0, rgba(107, 211, 169, .2), transparent 38%),
    var(--card);
}

.recovery-care-popup-copy {
  display: grid;
  justify-items: center;
  gap: .85rem;
  text-align: center;
}

.recovery-care-popup-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.8rem);
}

.recovery-care-popup-icon {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(107, 211, 169, .14);
  font-size: 2.35rem;
  box-shadow: 0 0 0 .65rem rgba(107, 211, 169, .055);
}

.recovery-care-popup .recovery-care-actions {
  justify-content: center;
}

.recovery-care-field > span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.recovery-care-field textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.recovery-care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: var(--control-pad);
  margin-bottom: var(--control-pad);
}

.recovery-care-card {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid color-mix(in srgb, #6bd3a9 42%, var(--line));
  border-radius: var(--control-radius);
  background:
    radial-gradient(circle at 92% 8%, rgba(107, 211, 169, .17), transparent 38%),
    var(--card);
  box-shadow: var(--shadow);
}

.recovery-care-badge {
  color: #83e4bd;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.recovery-care-card h2 {
  margin: .15rem 0 0;
  font-size: clamp(1.3rem, 4vw, 1.75rem);
}

.recovery-care-progress {
  height: .55rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
}

.recovery-care-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54c99a, #a5f0d2);
  transition: width .25s ease;
}

.recovery-care-quests {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.recovery-care-quest,
.recovery-care-drop {
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  text-align: left;
}

.recovery-care-quest {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 3.5rem;
  padding: .7rem;
}

.recovery-care-quest:hover,
.recovery-care-drop:hover {
  filter: brightness(1.12);
  border-color: rgba(107, 211, 169, .5);
}

.recovery-care-quest.is-done {
  border-color: rgba(107, 211, 169, .55);
  background: rgba(107, 211, 169, .12);
}

.recovery-care-quest-mark {
  width: 1.3rem;
  color: #83e4bd;
  font-weight: 900;
  text-align: center;
}

.recovery-care-drops {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.recovery-care-drop {
  padding: .62rem .8rem;
}

.recovery-care-drop:disabled {
  cursor: default;
  opacity: .55;
}

.recovery-care-drop-log {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  color: var(--muted);
  font-size: .82rem;
}

.recovery-care-drop-log span {
  padding: .3rem .55rem;
  border-radius: var(--radius-pill);
  background: rgba(107, 211, 169, .09);
}

@media (max-width: 620px) {
  .recovery-care-head,
  .recovery-care-status-head,
  .recovery-care-date-row,
  .recovery-care-progress-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .recovery-care-quests {
    grid-template-columns: 1fr;
  }
}

/* Quelle: shop.css */
.shop-page {
  display: grid;
  align-content: start;
  gap: 18px;
}

.shop-shell {
  display: grid;
  align-content: start;
  gap: 16px;
}

.shop-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.shop-search {
  width: min(420px, 48vw);
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: 0 11px;
  background: rgba(255,255,255,.045);
}
.shop-search:focus-within { border-color: var(--accent); }
.shop-search-icon { width: 19px; height: 19px; color: var(--muted); }
.shop-search-icon .bro-icon { width: 100%; height: 100%; }
.shop-search input { width: 100%; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--text); outline: 0; }

.shop-top-actions,
.inventory-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
}

.shop-icon-link {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 38%, var(--line));
  border-radius: 12px;
  color: color-mix(in srgb, var(--active-profile-color, var(--today)) 78%, white);
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 12%, rgba(255,255,255,.04));
  text-decoration: none;
}

.shop-icon-link .bro-icon {
  width: 18px;
  height: 18px;
}

.shop-wallet {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.shop-seal-grant-field {
  display: grid;
  gap: 8px;
}

.shop-wallet > span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--active-profile-color, var(--today)) 8%, rgba(255,255,255,.04));
  font-size: 12px;
  font-weight: 900;
}

.shop-wallet b {
  color: var(--text);
  font-size: 13px;
}

.shop-community-actions,
.shop-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-community-actions { justify-content: flex-end; }
.shop-seal-admin-actions { display: flex; justify-content: flex-end; margin: 8px 0; }
.shop-seal-recalculation { display: grid; gap: 12px; }
.shop-seal-recalculation p { margin: 0; color: var(--muted); }
.shop-seal-recalculation-list { max-height: min(40vh, 360px); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--control-radius); }
.shop-seal-recalculation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.shop-seal-recalculation-row:last-child { border-bottom: 0; }
.shop-seal-recalculation-row small { grid-column: 1 / -1; color: var(--muted); }
.shop-seal-recalculation-confirm { display: grid; gap: 6px; }
.shop-proceeds-trigger { display: inline-flex; align-items: center; gap: 10px; }
.shop-proceeds-trigger > span:last-child { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
.shop-proceeds-list { display: grid; max-height: min(52vh, 460px); overflow-y: auto; }
.shop-proceeds-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.shop-proceeds-item { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.05); font-size: 24px; }
.shop-proceeds-item img { width: 40px; height: 40px; object-fit: contain; }
.shop-proceeds-copy { display: grid; gap: 2px; min-width: 0; }
.shop-proceeds-copy strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.shop-proceeds-copy > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.shop-proceeds-copy time { color: var(--muted); font-size: 11px; }
.shop-proceeds-avatar { width: 20px; height: 20px; flex: 0 0 auto; display: inline-grid; overflow: hidden; border-radius: 50%; }
.shop-proceeds-avatar .game-avatar { width: 100%; height: 100%; }
.shop-proceeds-avatar svg { width: 100%; height: 100%; display: block; }
.shop-proceeds-amount,.shop-proceeds-total strong { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.shop-proceeds-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; color: var(--muted); }
.shop-proceeds-total strong { color: var(--text); font-size: 17px; }
@media (max-width: 520px) { .shop-proceeds-row { grid-template-columns: 40px minmax(0, 1fr) auto; } .shop-proceeds-item { width: 40px; height: 40px; } .shop-proceeds-item img { width: 35px; height: 35px; } }
.shop-review-actions > button { flex: 1; }
.shop-item-preview .shop-status { position: absolute; left: 8px; top: 8px; z-index: 2; border-radius: var(--radius-pill); padding: 5px 8px; background: rgba(12,14,24,.9); color: var(--text); font-size: 11px; font-weight: 900; }
.shop-item-admin-tools { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 6px; }
.shop-item-admin-tools .shop-edit-btn, .shop-item-admin-tools .shop-delete-btn { position: static; }
.shop-item.status-pending { border-style: dashed; }
.shop-item.status-rejected { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.shop-edit-btn { background: rgba(12,14,24,.9); color: var(--text); }
.shop-editor-grid { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.15fr); gap: 20px; align-items: start; }
.shop-editor-fields { display: grid; gap: 12px; }
.shop-editor-fields label { display: grid; gap: 6px; color: var(--muted); font-weight: 800; }
.shop-editor-fields input,.shop-editor-fields textarea,.shop-editor-fields select { width: 100%; }
.shop-editor-media { display: grid; gap: 10px; min-width: 0; }
.shop-avatar-guide-control { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: var(--control-radius); padding: 10px 12px; background: rgba(255,255,255,.035); }
.shop-avatar-guide-control > span { display: grid; gap: 2px; min-width: 0; }
.shop-avatar-guide-control strong { color: var(--text); font-size: 13px; }
.shop-avatar-guide-control small { color: var(--muted); line-height: 1.35; }
.shop-deposit-note { margin: 0; border: 1px solid color-mix(in srgb, var(--today) 35%, var(--line)); border-radius: var(--control-radius); padding: 10px; color: var(--muted); }
.shop-tracker-emoji-note { display: grid; gap: 5px; border-left: 3px solid color-mix(in srgb, var(--today) 72%, var(--line)); padding: 4px 0 4px 12px; }
.shop-tracker-emoji-note strong { color: var(--text); font-size: 16px; }
.shop-tracker-emoji-note span { color: var(--muted); line-height: 1.45; }
@media (max-width: 760px) { .shop-editor-grid { grid-template-columns: minmax(0,1fr); } }

.shop-owned-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.shop-owned-toggle input {
  accent-color: var(--good);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-auto-rows: 340px;
  align-content: start;
  align-items: start;
  gap: 12px;
}

.shop-item {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  width: 100%;
  height: 340px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.045);
}

.shop-grid .shop-create-card { height: 340px; }

.shop-item.unlocked {
  border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 32%, var(--line));
}

.shop-item.owned {
  border-color: color-mix(in srgb, var(--good) 42%, var(--line));
  background: color-mix(in srgb, var(--good) 8%, rgba(255,255,255,.045));
}

.shop-item.locked {
  opacity: .72;
}

.shop-item-preview {
  position: relative;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 12%, rgba(255,255,255,.04)), rgba(255,255,255,.035));
  font-size: 44px;
  font-weight: 950;
}

.shop-item-preview .game-avatar {
  width: 104px;
  height: 104px;
}

.shop-furniture-preview {
  width: min(86%, 190px);
  height: 104px;
  display: block;
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, .28));
}

.shop-emoji-img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.shop-unlock-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 38px;
  height: 38px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.shop-unlock-badge-link {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 2;
  border-radius: 8px;
}

.shop-unlock-badge-link .shop-unlock-badge {
  position: static;
  display: block;
}

.shop-unlock-badge-link:hover,
.shop-unlock-badge-link:focus-visible {
  filter: brightness(1.25);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shop-item-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.shop-item-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.shop-item-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.shop-item-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.shop-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.shop-item-meta span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 11px;
  font-weight: 900;
}

.shop-buy-btn {
  min-height: 40px;
  min-width: 0;
  width: 100%;
  padding-inline: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.shop-buy-btn .spx-coin { width: 1em; height: 1em; }

.shop-item-actions > a {
  min-width: 0;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  padding: var(--control-pad);
  color: var(--text);
  background: rgba(255,255,255,.08);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease, filter .12s ease;
}

.shop-item-actions > a:hover { filter: brightness(1.1); }
.shop-item-actions > .shop-equip-btn { border-color: rgba(51,209,122,.45); background: rgba(51,209,122,.15); }

.shop-item-actions {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 8px;
}

.shop-item-actions > :only-child { grid-column: 1 / -1; }
.shop-item-actions > .shop-try-on-btn { border-radius: var(--radius-pill); color: var(--muted); background: rgba(255,255,255,.045); font-size: 12px; }

.shop-buy-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.shop-buy-locked .bro-icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.shop-buy-locked-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-buy-btn:disabled {
  cursor: not-allowed;
  opacity: .52;
}

button.shop-buy-btn.is-achievement-locked:disabled {
  border-color: color-mix(in srgb, var(--muted) 36%, var(--line));
  color: var(--muted);
  background: rgba(255,255,255,.045);
  font-size: 13px;
  opacity: 1;
}

.inventory-avatar-link {
  text-decoration: none;
}

.inventory-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 16px;
}

.inventory-shell .inventory-top {
  margin-bottom: 0;
}

.inventory-shell .inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-content: start;
}

.inventory-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-theme-row {
  justify-content: flex-end;
}

.inventory-default-theme.active,
.inventory-item.theme.active {
  border-color: color-mix(in srgb, var(--good) 68%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 28%, transparent);
}

.inventory-item.purchased {
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-color: color-mix(in srgb, var(--good) 38%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--good) 10%, transparent), transparent 58%),
    rgba(255,255,255,.045);
}

.inventory-purchase-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 26%, var(--line));
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  font-size: 28px;
  font-weight: 950;
  overflow: hidden;
}

.inventory-purchase-preview img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.inventory-purchase-preview .game-avatar.compact {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

@media (max-width: 720px) {
  .shop-top {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-search { width: 100%; }

  .inventory-top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-top-actions {
    align-items: center;
    justify-content: flex-end;
    width: 100%;
  }

  .inventory-top-actions {
    width: 100%;
  }

  .shop-icon-link {
    align-self: flex-start;
  }

  .shop-wallet {
    justify-content: flex-start;
  }

  .shop-owned-toggle {
    width: fit-content;
  }

  .shop-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Ausrüstungs-Vorschau (Voxel-Gear) im Shop-Grid. */
.shop-item.gear .shop-item-preview {
  font-size: 40px;
}

.shop-gear-preview {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .shop-page .shop-item{ border-radius: 8px; box-shadow: none; }
.sticker-scene-dialog { width: min(94vw, 760px); height: min(88dvh, 720px); padding: 0; display: flex; flex-direction: column; overflow: hidden; background: #090d18; }
.sticker-tuning-toggle.ui-icon-button { position: absolute; z-index: 6; top: 14px; left: 14px; width: 42px; min-width: 42px; height: 42px; background: rgba(12, 18, 28, .86); border: 1px solid rgba(255, 255, 255, .3); }
.sticker-tuning-panel { position: absolute; z-index: 7; top: 64px; left: 14px; width: min(270px, calc(100% - 28px)); max-height: calc(100% - 78px); overflow: auto; display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: rgba(10, 17, 29, .97); }
.sticker-tuning-panel > strong { font-size: 14px; }
.sticker-scene { position: relative; flex: 1; min-height: 0; background: radial-gradient(ellipse at top left, #30251f, #080b12 75%); }
.sticker-3d-space { position: absolute; inset: 0; overflow: hidden; }
.sticker-3d-space canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.sticker-3d-space canvas:active { cursor: grabbing; }
.sticker-loading { background: #111318; z-index: 1; }
.sticker-scene-footer { position: absolute; bottom: var(--page-gutter); left: var(--page-gutter); right: var(--page-gutter); display: flex; justify-content: space-between; align-items: end; gap: var(--page-gutter); flex-wrap: wrap; }
.sticker-details { display: flex; align-items: center; gap: var(--page-gutter); justify-content: space-between; }
.sticker-details > div { display: grid; gap: 6px; min-width: 140px; }
.sticker-details span { font-size: 13px; color: var(--muted); }
.sticker-xp-help { max-width: 280px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.sticker-details button { flex-shrink: 0; }
.sticker-error { position: absolute; inset: auto var(--page-gutter) 100px; color: #ff9ca7; }
.sticker-variant-controls { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2; }
.sticker-scene:has(.sticker-tuning-toggle) .sticker-variant-controls { left: 70px; }
.sticker-variant-controls .ui-variant-picker { gap: 8px; flex-wrap: nowrap; }
.sticker-variant-controls .ui-select { min-width: 0; }
.sticker-admin-level { display: flex; align-items: center; gap: var(--page-gutter); flex-wrap: wrap; }
.sticker-scene.is-embedded { height: 400px; }
.profile-showcase-badge > .sticker-art, .profile-duel-medal > .sticker-art { width: 92%; height: 92%; }
.profile-main-showcase .profile-showcase-badge:has(> .sticker-art) { background: transparent; box-shadow: none; }
@media (max-width: 600px) {
  .sticker-scene-dialog { width: calc(100vw - 20px); height: min(86dvh, 680px); }
  .sticker-variant-controls .ui-variant-picker { flex-wrap: wrap; }
  .sticker-variant-controls .ui-variant-picker > .ghost-btn { margin-left: auto; }
  .sticker-details > div { min-width: 100px; }
  .sticker-admin-level { gap: 8px; }
}
.inventory-sticker-preview { border: 0; background: none; padding: 0; width: 120px; height: 120px; font-size: 80px; cursor: pointer; }
.inventory-sticker-preview:is(:hover, :focus-visible) { background: transparent; filter: none; }
.inventory-sticker-preview:is(:hover, :focus-visible) .sticker-art { --sticker-hover-exposure: .22; }
.inventory-catalog-item.emoji { position: relative; border-color: color-mix(in srgb, var(--sticker-current) 45%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--sticker-current) 30%, #141a25), color-mix(in srgb, var(--sticker-current) 12%, #101522)); }
.inventory-catalog-item.emoji:has(.inventory-sticker-material-pearl) { background: radial-gradient(circle at 15% 14%, rgba(223, 169, 221, .32), transparent 65%), radial-gradient(circle at 88% 75%, rgba(117, 210, 218, .22), transparent 62%), #202432; }
.inventory-catalog-item.emoji .shop-item-preview { background: color-mix(in srgb, var(--sticker-current) 13%, #17202c); }
.inventory-catalog-item.emoji .achievement-showcase-action.ui-icon-button { top: 18px; right: 18px; background: rgba(12, 18, 28, .82); }
.inventory-sticker-rank { color: var(--muted); font-weight: 800; line-height: 1; white-space: nowrap; }
.inventory-sticker-rank-bronze { color: #d6a779; }
.inventory-sticker-rank-silver { color: #d9e4eb; }
.inventory-sticker-rank-gold { color: #f5d45e; }
.inventory-sticker-rank-pearl { color: #f5c9e9; text-shadow: 0 0 8px rgba(153, 222, 231, .65); }
.inventory-sticker-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inventory-sticker-favorite[aria-pressed="true"] { color: var(--warn); border-color: var(--warn); }
.inventory-sticker-favorite[aria-pressed="true"] svg { fill: currentColor; }
.inventory-sticker-progress { display: grid; gap: 6px; align-self: end; min-width: 0; }
.inventory-sticker-xp { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.inventory-sticker-xp > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.inventory-sticker-xp-track { height: 7px; overflow: hidden; border-radius: var(--radius-pill); background: rgba(7, 12, 20, .68); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.inventory-sticker-xp-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sticker-progress-from), var(--sticker-next)); transition: width .25s ease; }
.inventory-sticker-sort { max-width: 260px; margin: 12px 0; }

/* Quelle: responsive.css */
    .settings-page {
      width: 100%;
    }

    .settings-shell {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      align-items: start;
      width: 100%;
      max-width: 720px;
      margin: 0 auto;
    }

    .settings-search {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(21,27,47,.78);
      box-shadow: var(--shadow);
      cursor: text;
    }

    .settings-search svg {
      width: 18px;
      height: 18px;
      flex: none;
      fill: none;
      stroke: var(--muted);
      stroke-width: 2;
      stroke-linecap: round;
    }

    .settings-search input {
      flex: 1;
      min-width: 0;
      border: none;
      background: none;
      outline: none;
      color: var(--text);
      font: inherit;
      font-size: 14px;
      font-weight: 600;
    }

    .settings-search input::placeholder {
      color: var(--muted);
    }

    /* Eine Karte, darin alle Bereiche als Linien untereinander. */
    .settings-list {
      display: grid;
      gap: 0;
      padding: 2px 16px;
    }

    .settings-section + .settings-section {
      border-top: 1px solid var(--line);
    }

    .settings-section.dimmed .settings-section-head {
      opacity: .4;
    }

    .settings-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      width: 100%;
      padding: 12px 2px;
      border: none;
      background: none;
      color: inherit;
      font: inherit;
      text-align: left;
      cursor: pointer;
    }

    .settings-section-title {
      font-size: 15px;
      font-weight: 900;
      letter-spacing: .01em;
    }

    .settings-update-badge {
      margin-left: 6px;
    }

    .settings-version-row {
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }

    .settings-section-chevron {
      flex: none;
      width: 20px;
      height: 20px;
      color: var(--muted);
      transition: transform .2s ease;
    }

    .settings-section-chevron svg {
      width: 100%;
      height: 100%;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .settings-section-chevron.open {
      transform: rotate(180deg);
    }

    /* Inhalte hängen eingerückt an einer Führungslinie unter dem Titel. */
    .settings-section-body {
      display: grid;
      gap: 2px;
      margin: 0 2px 14px 7px;
      padding: 2px 0 2px 14px;
      border-left: 2px solid color-mix(in srgb, var(--line) 85%, transparent);
    }

    .settings-subheading {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--muted);
    }

    /* Untergruppen (z. B. "Benachrichtigen bei"): Zeilen rücken unter ihre
       Zwischenüberschrift ein, damit die Hierarchie sichtbar bleibt. */
    .settings-group {
      display: grid;
      gap: 4px;
      padding-top: 6px;
    }

    .settings-group + .settings-group {
      margin-top: 8px;
    }

    .settings-group-rows {
      display: grid;
      gap: 2px;
      padding-left: 12px;
    }

    /* Einzelne Einstellungen: schlichte Zeilen ohne Box. */
    .settings-toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 6px 0;
      cursor: pointer;
    }

    .settings-toggle-text {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .settings-toggle-label {
      font-weight: 800;
      font-size: 14px;
      color: var(--text);
    }

    .settings-toggle-hint {
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }

    .settings-toggle-row input[type="checkbox"] {
      width: 19px;
      height: 19px;
      flex: none;
      accent-color: var(--active-profile-color, var(--today));
      cursor: pointer;
    }

    .settings-toggle-row input[type="checkbox"]:disabled {
      opacity: .5;
      cursor: not-allowed;
    }

    .settings-inline-btn {
      flex: none;
      min-height: 30px;
      padding: 5px 12px;
      font-size: 12.5px;
    }

    .push-settings-list {
      display: grid;
      gap: 2px;
    }

    /* Unterpunkte (Lautstärke, Uhrzeit): eine Stufe weiter eingerückt. */
    .settings-subrow {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 13px;
      padding: 0 0 6px 14px;
    }

    .settings-subrow.disabled {
      opacity: .5;
    }

    .feedback-volume-row input[type="range"] {
      flex: 1;
      min-width: 0;
      max-width: 56%;
      margin-left: auto;
      accent-color: var(--active-profile-color, var(--today));
    }

    .feedback-volume-row input[type="range"]:disabled {
      cursor: not-allowed;
    }

    .feedback-test-row {
      padding-top: 8px;
    }

    .settings-group-rows.disabled {
      opacity: .45;
    }

    .reminder-time {
      padding: 5px 10px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      color: var(--text);
      font-size: 13px;
      cursor: pointer;
    }

    .reminder-time:disabled {
      opacity: .5;
      cursor: not-allowed;
    }

    .feedback-pulse {
      animation: feedbackPulse .7s ease;
    }

    .feedback-success {
      animation: feedbackSuccess .85s ease;
    }

    .feedback-fail {
      animation: feedbackFail .62s ease;
    }

    .feedback-burst {
      position: absolute;
      z-index: 1000;
      width: 10px;
      height: 10px;
      pointer-events: none;
      border-radius: 999px;
      transform: translate(-50%, -50%);
      border: 2px solid var(--good);
      box-shadow: 0 0 0 0 rgba(103, 232, 166, .42);
      animation: feedbackBurst .72s ease-out forwards;
    }

    .feedback-burst.fail {
      border-color: var(--bad);
      box-shadow: 0 0 0 0 rgba(251, 113, 133, .38);
    }

    @keyframes feedbackPulse {
      0% { transform: scale(1); }
      35% { transform: scale(1.035); filter: brightness(1.18); }
      62% { transform: scale(.992); }
      100% { transform: scale(1); filter: none; }
    }

    @keyframes feedbackSuccess {
      0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(103, 232, 166, .5), var(--shadow); filter: brightness(1); }
      34% { transform: scale(1.045); box-shadow: 0 0 0 4px rgba(103, 232, 166, .32), 0 0 34px rgba(103, 232, 166, .28), var(--shadow); filter: brightness(1.18); }
      68% { transform: scale(.994); box-shadow: 0 0 0 10px rgba(103, 232, 166, .08), var(--shadow); }
      100% { transform: scale(1); box-shadow: none; }
    }

    @keyframes feedbackFail {
      0%, 100% { transform: translateX(0); }
      14% { transform: translateX(-8px) rotate(-.8deg); box-shadow: 0 0 0 3px rgba(255,92,122,.32), var(--shadow); filter: brightness(1.12); }
      32% { transform: translateX(8px) rotate(.8deg); }
      50% { transform: translateX(-6px) rotate(-.5deg); }
      68% { transform: translateX(5px) rotate(.4deg); box-shadow: 0 0 0 8px rgba(255,92,122,.08), var(--shadow); }
      84% { transform: translateX(-2px); }
    }

    @keyframes feedbackBurst {
      0% { opacity: .9; width: 8px; height: 8px; }
      100% { opacity: 0; width: 74px; height: 74px; box-shadow: 0 0 0 14px rgba(103, 232, 166, 0); }
    }

    @media (prefers-reduced-motion: reduce) {
      .feedback-pulse,
      .feedback-success,
      .feedback-fail,
      .feedback-burst {
        animation: none;
      }
    }

    @media (max-width: 1200px) {
      .zen-layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
      }

      .zen-garden-card {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 900px) {
      body { padding: 16px; }
      header { flex-direction: column; }
      .game-shell,
      .zen-layout,
      .planner-shell,
      .inbox-shell { grid-template-columns: 1fr; }
      .game-shell[data-game-panel="zen"] { min-width: 0; }
      .game-top { flex-direction: column; align-items: flex-start; }
      .inbox-top { flex-direction: column; }
      .inbox-tabs { justify-content: flex-start; }
      .inbox-bulk-actions { flex-direction: column; align-items: stretch; }
      .inbox-bulk-buttons { justify-content: flex-start; }
      .planner-grid { grid-template-columns: 1fr; }
      .planner-day { min-height: auto; }
      .zen-info-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .zen-info-block:first-child { grid-column: 1 / -1; }
    }

    @media (max-width: 620px) {
      .zen-info-content { grid-template-columns: 1fr; }
      .zen-info-block:first-child { grid-column: auto; }
    }

    @media (max-width: 560px) {
      .date-range-inputs {
        grid-template-columns: 1fr;
      }

      .profile-color-card {
        grid-template-columns: 72px minmax(0, 1fr);
      }

      .profile-main-card {
        grid-template-columns: minmax(0, 1fr);
      }

      .profile-main-card .profile-color-preview {
        justify-self: center;
      }

      .profile-color-card input[type="color"] {
        grid-column: 2;
        justify-self: start;
      }

      .profile-main-card input[type="color"] {
        grid-column: auto;
      }

      .avatar-color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .player-head {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .player-head .pill {
        grid-column: 1 / -1;
        justify-self: start;
      }
    }

    @media (min-width: 1500px) {
      .site-nav {
        position: fixed;
        top: 136px;
        left: calc((100vw - 1180px) / 2 - 164px);
        width: 148px;
        flex-direction: column;
      }

      .nav-link {
        width: 100%;
      }
    }

    @media (max-width: 720px) {
      body {
        --mobile-nav-space: 70px;
        --mobile-player-space: 148px;
        --toast-bottom-offset: calc(var(--mobile-nav-space) + env(safe-area-inset-bottom) + 14px);
        padding-bottom: calc(var(--mobile-nav-space) + env(safe-area-inset-bottom));
      }

      body.spa-page {
        padding-top: 0;
      }

      body.nav-more-open {
        overflow: hidden;
      }

      body.music-player-active {
        --toast-bottom-offset: calc(var(--mobile-nav-space) + var(--mobile-player-space) + env(safe-area-inset-bottom) + 14px);
        padding-bottom: calc(var(--mobile-nav-space) + var(--mobile-player-space) + env(safe-area-inset-bottom));
      }

      .app {
        width: 100%;
      }

      .spa-header {
        position: sticky;
        top: 0;
        z-index: 80;
        height: calc(54px + env(safe-area-inset-top));
        min-height: calc(54px + env(safe-area-inset-top));
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 0 -16px 16px;
        border-top: 0;
        border-bottom: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, var(--line));
        padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
        background: color-mix(in srgb, var(--bg) 91%, rgba(18, 25, 44, .96));
        box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
        backdrop-filter: blur(20px) saturate(1.2);
      }

      body:not(.og-design) .spa-header {
        margin-inline: calc(-1 * var(--page-gutter));
        padding-inline: var(--page-gutter);
      }

      .spa-header > :first-child {
        min-width: 0;
        flex: 1 1 auto;
      }

      .spa-header h1 {
        overflow: hidden;
        font-size: 22px;
        line-height: 1;
        letter-spacing: -.035em;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .spa-header .subtitle {
        display: none;
      }

      .spa-header .header-actions {
        width: auto;
        flex: 0 0 auto;
        justify-items: end;
      }

      .spa-header .header-top-actions {
        max-width: none;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 4px;
        padding: 0;
        overflow: visible;
      }

      .spa-header .header-top-actions > :not(#spaInboxShortcut):not(.session-actions) {
        display: none;
      }

      .spa-header .session-actions {
        order: 2;
        z-index: 81;
      }

      .spa-header #spaInboxShortcut {
        order: 1;
      }

      .spa-header .session-icon-btn,
      .spa-header .user-hub-trigger {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
      }

      .spa-header #spaInboxShortcut {
        border-color: transparent;
        color: var(--muted);
        background: transparent;
        box-shadow: none;
      }

      .spa-header #spaInboxShortcut.has-unread {
        color: var(--text);
        border-color: color-mix(in srgb, var(--good) 24%, transparent);
        background: color-mix(in srgb, var(--good) 9%, transparent);
      }

      .spa-header .user-hub-trigger {
        grid-template-columns: 34px;
        gap: 0;
        border-radius: 50%;
        padding: 3px;
        border-color: color-mix(in srgb, var(--profile-color) 36%, var(--line));
        background: color-mix(in srgb, var(--profile-color) 8%, rgba(255,255,255,.025));
        box-shadow: none;
      }

      .spa-header .user-hub-name,
      .spa-header .user-hub-caret {
        display: none;
      }

      .spa-header .user-hub-menu {
        top: calc(100% + 9px);
        right: 0;
        left: auto;
        width: min(216px, calc(100vw - 32px));
      }

      .spa-header .user-hub-menu::before {
        right: 16px;
        left: auto;
      }

      .spa-header .user-hub-desktop-links {
        display: none;
      }

      .site-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(6px + env(safe-area-inset-bottom));
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1px;
        margin: 0;
        padding: 3px 4px;
        overflow-x: hidden;
        overflow-y: hidden;
        border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, var(--line));
        border-radius: 22px;
        background:
          linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)),
          color-mix(in srgb, var(--bg) 91%, black);
        box-shadow: 0 14px 38px rgba(0,0,0,.34);
        backdrop-filter: blur(20px) saturate(1.15);
      }

      .nav-link {
        min-width: 0;
        width: 100%;
        min-height: 54px;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 2px;
        border: 0;
        border-radius: 14px;
        padding: 4px 2px 3px;
        color: color-mix(in srgb, var(--muted) 90%, transparent);
        background: transparent;
        box-shadow: none;
        font-size: 10px;
        text-align: center;
      }

      .nav-link:hover {
        filter: brightness(1.15);
      }

      .nav-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: transparent;
        box-shadow: none;
      }

      .nav-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        line-height: 1.1;
      }

      .nav-link.active::before {
        display: none;
      }

      .nav-link.active {
        color: color-mix(in srgb, var(--active-profile-color, var(--today)) 76%, white);
        background: transparent;
        box-shadow: none;
      }

      .nav-link.active .nav-icon {
        color: color-mix(in srgb, var(--active-profile-color, var(--today)) 74%, white);
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 20%, rgba(255,255,255,.045));
        box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
        transform: none;
      }

      .nav-link.active .nav-label {
        color: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
        font-weight: 950;
      }

      .nav-badge {
        position: absolute;
        top: 2px;
        right: 4px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
      }

      .nav-more-badge {
        top: 1px;
        right: calc(50% - 25px);
        min-width: 18px;
        color: #180b17;
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, #ff78d8);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
      }

      .nav-more-toggle.has-unread .nav-icon {
        color: color-mix(in srgb, var(--active-profile-color, var(--today)) 82%, white);
      }

      /* Mobile: nur Kern-Tabs in der Leiste, der Rest hinter "Mehr". */
      .nav-link-secondary {
        display: none;
      }

      .spa-nav .nav-more-toggle {
        display: grid;
      }

      .nav-more-backdrop {
        z-index: 95;
        animation: navMoreFade .16s ease;
      }

      .nav-more-menu {
        z-index: 96;
        width: 100%;
        max-height: min(82dvh, 720px);
        gap: 0;
        padding-right: 16px;
        padding-left: 16px;
        overflow: hidden;
        background:
          linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
          color-mix(in srgb, var(--bg) 92%, #11182b);
        backdrop-filter: blur(24px) saturate(1.2);
        animation: navMoreRise .22s ease;
      }

      .nav-more-handle-zone {
        margin-right: -16px;
        margin-left: -16px;
      }

      .nav-more-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 2px 0 14px;
      }

      .nav-more-eyebrow {
        margin: 0 0 2px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 850;
        letter-spacing: .08em;
        text-transform: uppercase;
      }

      .nav-more-head h2 {
        margin: 0;
        font-size: 25px;
        letter-spacing: -.035em;
      }

      .nav-more-close {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        border: 0;
        padding: 0;
        color: var(--muted);
        background: rgba(255,255,255,.07);
      }

      .nav-more-close .bro-icon {
        width: 18px;
        height: 18px;
      }

      .nav-more-content {
        min-height: 0;
        display: grid;
        gap: 18px;
        padding-bottom: 4px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
      }

      .nav-more-content::-webkit-scrollbar {
        display: none;
      }

      .nav-more-section {
        display: grid;
        gap: 8px;
      }

      .nav-more-section-title {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
        font-weight: 900;
      }

      .nav-more-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }

      .nav-more-item {
        position: relative;
        min-width: 0;
        min-height: 76px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 10px 5px;
        border: 1px solid rgba(255,255,255,.065);
        border-radius: 16px;
        color: var(--muted);
        background: rgba(255,255,255,.035);
        font-size: 12px;
        font-weight: 900;
        text-align: center;
        text-decoration: none;
        transition: background .14s ease, border-color .14s ease, color .14s ease;
      }

      .nav-more-item .nav-icon {
        width: 30px;
        height: 30px;
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, rgba(255,255,255,.035));
      }

      .nav-more-item.active,
      .nav-more-item:hover {
        color: var(--text);
        border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 30%, var(--line));
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255,255,255,.05));
      }

      .nav-more-item-label {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .nav-more-quick-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .nav-more-quick {
        min-width: 0;
        min-height: 58px;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        gap: 9px;
        border: 1px solid rgba(255,255,255,.065);
        border-radius: 16px;
        padding: 8px 10px;
        color: var(--text);
        background: rgba(255,255,255,.035);
        text-align: left;
      }

      .nav-more-quick-icon {
        position: relative;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        color: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, rgba(255,255,255,.04));
      }

      .nav-more-item > .user-hub-menu-new {
        top: 7px;
        right: 7px;
      }

      .nav-more-quick-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        min-width: 17px;
        height: 17px;
        display: grid;
        place-items: center;
        padding: 0 4px;
        border: 2px solid var(--card);
        border-radius: 999px;
        color: #fff;
        background: var(--bad);
        font-size: 9px;
        line-height: 1;
      }

      .nav-more-quick-icon .bro-icon {
        width: 17px;
        height: 17px;
      }

      .nav-more-quick-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
      }

      .nav-more-quick-copy strong {
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .nav-more-quick-copy small {
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
      }

      @keyframes navMoreFade {
        from { opacity: 0; }
        to { opacity: 1; }
      }

      @keyframes navMoreRise {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: none; }
      }

      .spa-app {
        min-height: calc(100vh - 32px - var(--mobile-nav-space));
      }

      .spa-frame {
        min-height: calc(100vh - 190px - var(--mobile-nav-space));
      }

      .quote-shell {
        gap: 10px;
        margin-bottom: 12px;
        border-radius: 14px;
        padding: 11px 12px;
      }

      .quote-copy {
        width: 100%;
        flex: 0 1 auto;
      }

      .quote-kicker {
        margin-bottom: 5px;
        font-size: 10px;
      }

      .quote-shell blockquote {
        font-size: 15px;
        line-height: 1.32;
        font-weight: 850;
      }

      .quote-source {
        margin-top: 6px;
        font-size: 11px;
      }

      .quote-meta {
        width: 100%;
        gap: 6px;
        justify-content: flex-start;
        font-size: 10px;
      }

      .quote-meta span {
        padding: 5px 7px;
      }

      .quote-details-toggle {
        min-height: 28px;
        padding: 5px 8px;
        font-size: 11px;
      }

      .quote-rating-panel,
      .quote-archive {
        padding-top: 10px;
      }

      .calendar-shell {
        border-radius: 18px;
        padding: 12px;
      }

      .calendar-shell .calendar-top {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        margin-bottom: 10px;
      }

      .calendar-shell .calendar-title {
        min-width: 0;
        font-size: 20px;
        text-align: center;
      }

      .calendar-shell .calendar-top button {
        min-height: 40px;
        border-radius: 14px;
        padding: 8px 10px;
      }

      .calendar-shell .month-buttons {
        display: grid;
        grid-template-columns: auto 42px;
        gap: 7px;
      }

      .legend {
        flex-wrap: nowrap;
        gap: 6px;
        margin: 0 -12px 10px;
        padding: 0 12px 2px;
        overflow-x: auto;
        scrollbar-width: none;
        font-size: 11px;
      }

      .legend::-webkit-scrollbar {
        display: none;
      }

      .legend-item {
        flex: 0 0 auto;
        padding: 5px 7px;
      }

      .legend-item:last-child {
        display: none;
      }

      .calendar-grid {
        gap: 4px;
      }

      .calendar-grid .weekday {
        min-height: 22px;
        padding: 3px 0;
        font-size: 10px;
      }

      .day {
        min-height: 56px;
        border-radius: 12px;
        padding: 6px 4px;
        gap: 5px;
        cursor: pointer;
      }

      .day.selected {
        border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 74%, white);
        box-shadow:
          0 0 0 2px color-mix(in srgb, var(--active-profile-color, var(--today)) 20%, transparent),
          inset 0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
      }

      .date-number {
        justify-content: center;
        font-size: 12px;
      }

      .date-number .badge {
        position: absolute;
        width: 6px;
        height: 6px;
        min-width: 0;
        margin-top: 27px;
        padding: 0;
        overflow: hidden;
        color: transparent;
      }

      .day .check-row {
        display: none;
      }

      .mobile-check-dots {
        min-height: 16px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 3px;
      }

      .mobile-check-dot {
        width: 14px;
        height: 14px;
        min-width: 14px;
        min-height: 14px;
        display: inline-grid;
        place-items: center;
        margin: 0;
        border: 0;
        padding: 0;
        border-radius: 999px;
        background: color-mix(in srgb, var(--profile-color) 42%, rgba(255,255,255,.16));
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--profile-color) 34%, rgba(255,255,255,.12));
        color: #06120b;
        font-size: 10px;
        font-weight: 950;
        line-height: 1;
        cursor: pointer;
        touch-action: manipulation;
      }

      .mobile-check-dot.read-only {
        cursor: default;
        opacity: .72;
      }

      .mobile-check-dot.done {
        background: var(--good);
        box-shadow:
          0 0 0 1px color-mix(in srgb, var(--good) 64%, white),
          0 0 0 3px rgba(51,209,122,.12);
      }

      .mobile-check-dot.done::before {
        content: "✓";
      }

      .mobile-check-dot.fail {
        border-radius: 4px;
        background: var(--bad);
        color: #21050a;
        box-shadow:
          0 0 0 1px color-mix(in srgb, var(--bad) 62%, white),
          0 0 0 3px rgba(255,92,122,.11);
      }

      .mobile-check-dot.fail::before {
        content: "×";
      }

      .mobile-check-dot.fixed {
        border-radius: 5px;
        border-color: color-mix(in srgb, #7398ff 70%, white);
        background: rgba(71,124,255,.28);
        box-shadow: 0 0 0 2px rgba(71,124,255,.13);
      }

      .mobile-check-dot.fixed img { width: 13px; height: 13px; object-fit: contain; }

      .mobile-check-dot.open {
        width: 11px;
        height: 11px;
        background: transparent;
        border: 1px solid color-mix(in srgb, var(--profile-color) 52%, rgba(255,255,255,.3));
        box-shadow: none;
      }

      .tracker-mobile-day {
        display: grid;
        gap: 9px;
        margin-top: 12px;
        border-top: 1px solid var(--line);
        padding-top: 12px;
      }

      .tracker-mobile-day-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 950;
        text-transform: uppercase;
      }

      .tracker-mobile-day-head strong {
        min-width: 46px;
        height: 24px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: var(--today);
        border: 1px solid rgba(138,180,255,.3);
        background: rgba(138,180,255,.12);
        font-size: 10px;
      }

      .tracker-mobile-day-actions {
        display: grid;
        gap: 7px;
      }

      .tracker-mobile-status {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border-left: 4px solid var(--profile-color);
        border-radius: 13px;
        padding: 9px 10px;
        background: color-mix(in srgb, var(--profile-color) 10%, rgba(255,255,255,.045));
        text-align: left;
      }

      .tracker-mobile-status span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .tracker-mobile-status strong {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 950;
        white-space: nowrap;
      }

      .tracker-mobile-status strong::before {
        content: "";
        width: 14px;
        height: 14px;
        display: inline-grid;
        place-items: center;
        border-radius: 999px;
        border: 1px solid color-mix(in srgb, var(--profile-color) 52%, rgba(255,255,255,.3));
        color: #06120b;
        font-size: 10px;
        font-weight: 950;
        line-height: 1;
      }

      .tracker-mobile-status.done strong {
        color: var(--good);
      }

      .tracker-mobile-status.done strong::before {
        content: "✓";
        border-color: color-mix(in srgb, var(--good) 64%, white);
        background: var(--good);
      }

      .tracker-mobile-status.fail strong {
        color: var(--bad);
      }

      .tracker-mobile-status.fail strong::before {
        content: "×";
        border-color: color-mix(in srgb, var(--bad) 62%, white);
        border-radius: 4px;
        background: var(--bad);
        color: #21050a;
      }

      .tracker-mobile-status.fixed {
        border-color: rgba(115,152,255,.46);
        background: rgba(71,124,255,.13);
      }

      .tracker-mobile-status.fixed strong { color: #a9beff; }
      .tracker-mobile-status.fixed strong::before { display: none; }
      .tracker-mobile-status.fixed strong img { width: 20px; height: 20px; object-fit: contain; }

      .planner-shell {
        gap: 12px;
      }

      .planner-card,
      .planner-panel {
        border-radius: 18px;
        padding: 12px;
      }

      .planner-card {
        margin-inline: -8px;
        padding-inline: 8px;
      }

      .planner-viewswitch {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .planner-viewswitch-btn {
        min-width: 0;
        min-height: 40px;
        padding-inline: 8px;
      }

      .planner-zoom-surface {
        touch-action: pan-y;
      }

      .planner-gesture-hint {
        display: block;
        margin-top: 9px;
        color: color-mix(in srgb, var(--muted) 72%, transparent);
        font-size: 10px;
        font-weight: 800;
        text-align: center;
      }

      .calendar-top {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        margin-bottom: 12px;
      }

      .calendar-title {
        min-width: 0;
        font-size: 20px;
        text-align: center;
      }

      .calendar-top button {
        min-height: 42px;
        border-radius: 14px;
        padding: 9px 11px;
      }

      .month-buttons {
        display: grid;
        grid-template-columns: auto 42px;
        gap: 7px;
      }

      .planner-filters {
        flex-wrap: nowrap;
        gap: 7px;
        margin: 0 -12px 12px;
        padding: 6px 12px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-padding-block: 6px;
        scrollbar-width: none;
      }

      .planner-filters::-webkit-scrollbar {
        display: none;
      }

      .planner-filters .profile-btn {
        min-height: 38px;
        flex: 0 0 auto;
        border-radius: 999px;
        padding: 8px 11px;
      }

      .planner-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        column-gap: 2px;
        row-gap: 4px;
      }

      .planner-grid .weekday {
        min-height: 24px;
        padding: 4px 0;
        color: var(--muted);
        font-size: 10px;
        text-align: center;
      }

      .planner-day {
        --planner-day-inline-pad: 3px;
        min-height: clamp(80px, 23vw, 96px);
        border-radius: 9px;
        padding: 5px var(--planner-day-inline-pad);
        gap: 3px;
        overflow: hidden;
      }

      .planner-day.outside {
        opacity: .28;
      }

      .planner-date {
        justify-content: center;
        font-size: 12px;
      }

      .planner-week-badge {
        display: none;
      }

      .planner-date .badge {
        position: absolute;
        width: 6px;
        height: 6px;
        min-width: 0;
        margin-top: 28px;
        padding: 0;
        overflow: hidden;
        color: transparent;
      }

      .planner-day .planner-events {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: 17px;
        gap: 2px;
      }

      .planner-day-markers {
        display: none;
      }

      .planner-day .planner-chip {
        min-height: 17px;
        height: 17px;
        border-left-width: 2px;
        border-radius: 4px;
        padding: 1px 3px;
      }

      .planner-day .planner-chip-title {
        font-size: 10px;
        line-height: 1.15;
      }

      .planner-day .planner-chip-more {
        min-height: 14px;
        padding-inline: 2px;
        font-size: 9px;
      }

      .planner-day .planner-chip-more-label {
        display: none;
      }

      .planner-day-view-head {
        padding-left: 40px;
      }

      .planner-day-view-head strong {
        font-size: 16px;
      }

      .planner-day-allday,
      .planner-day-grid {
        grid-template-columns: 38px minmax(0, 1fr);
      }

      .planner-day-body {
        max-height: 58dvh;
      }

      .planner-day-event {
        padding: 5px 8px;
      }

      .planner-day-event .week-event-title {
        font-size: 12px;
      }

      .planner-day-event .week-event-time {
        font-size: 10px;
      }

      .planner-mobile-sheet-actions {
        position: sticky;
        bottom: 0;
        padding-top: 8px;
        background: color-mix(in srgb, var(--card) 94%, #0b1020);
      }

      .planner-mobile-agenda {
        display: grid;
        gap: 9px;
        margin-top: 12px;
        border-top: 1px solid var(--line);
        padding-top: 12px;
      }

      .planner-mobile-agenda-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 950;
        text-transform: uppercase;
      }

      .planner-mobile-agenda-head strong {
        min-width: 28px;
        height: 24px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #07120c;
        background: var(--good);
        font-size: 12px;
      }

      .planner-mobile-agenda-list {
        display: grid;
        gap: 7px;
      }

      .planner-mobile-agenda-item {
        width: 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 4px 9px;
        align-items: center;
        border-color: color-mix(in srgb, var(--profile-color, var(--today)) 38%, var(--line));
        border-left: 4px solid var(--profile-color, var(--today));
        border-radius: 13px;
        padding: 9px 10px;
        text-align: left;
        background: color-mix(in srgb, var(--profile-color, var(--today)) 10%, rgba(255,255,255,.045));
      }

      .planner-mobile-agenda-item[data-profile-team] {
        border-left-color: color-mix(in srgb, var(--profile-color) 50%, var(--profile-color-2));
      }

      .planner-mobile-agenda-item .event-time {
        grid-row: span 2;
        min-width: 58px;
        color: var(--text);
        font-size: 11px;
        font-weight: 950;
      }

      .planner-mobile-agenda-item .event-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
      }

      .planner-mobile-agenda-item .event-person {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .planner-mobile-empty {
        border: 1px dashed var(--line);
        border-radius: 14px;
        padding: 14px;
        color: var(--muted);
        background: rgba(255,255,255,.035);
        font-size: 13px;
        font-weight: 850;
        text-align: center;
      }

      .planner-form-head {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
      }

      .planner-form-icon {
        width: 32px;
        height: 32px;
        border-radius: 12px;
        font-size: 15px;
      }

      .planner-form-head .section-subtitle,
      .date-range-hint {
        display: none;
      }

      .event-form {
        gap: 11px;
      }

      .event-person-options {
        padding: 6px;
        gap: 6px;
        border-radius: 14px;
      }

      .event-person-btn {
        min-height: 42px;
        padding: 7px 8px;
      }

      .date-range-picker {
        padding: 10px;
        border-radius: 14px;
      }

      .date-range-inputs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      @media (max-width: 520px) {
        .date-range-inputs { grid-template-columns: 1fr; }
      }

      .date-range-inputs label {
        font-size: 11px;
      }

      .time-row {
        gap: 8px;
      }

      .planner-time-control {
        border-radius: 14px;
        padding: 5px;
      }

      .planner-time-control input {
        min-height: 34px;
        padding: 7px 4px;
      }

      .planner-submit {
        min-height: 48px;
      }

      .inbox-shell {
        gap: 12px;
      }

      .inbox-list-panel,
      .inbox-compose-panel {
        border-radius: 18px;
        padding: 12px;
      }

      .inbox-top {
        display: grid;
        gap: 11px;
        margin-bottom: 12px;
      }

      .inbox-top > * {
        min-width: 0;
      }

      #inboxSummary {
        flex-wrap: nowrap;
        gap: 6px;
        margin: 6px -12px 0;
        padding: 0 12px 2px;
        overflow-x: auto;
        scrollbar-width: none;
      }

      #inboxSummary::-webkit-scrollbar {
        display: none;
      }

      #inboxSummary span {
        flex: 0 0 auto;
        padding: 5px 7px;
        font-size: 11px;
      }

      .inbox-tabs {
        width: auto;
        margin: 0 -12px;
        padding: 0 12px 2px;
        gap: 7px;
      }

      .inbox-tabs .profile-btn {
        min-height: 38px;
        padding: 8px 11px;
        border-radius: 999px;
      }

      /* Suche auf dem Handy: geöffnet volle Breite in eigener Zeile. */
      .inbox-tabs .inbox-search.open { width: 100%; }
      .inbox-tabs .inbox-search.open input { max-width: none; flex: 1 1 auto; }

      /* Messenger füllt den Platz zwischen Header und fixer Bottom-Nav. Die
         feste 78vh-Höhe war auf dem Handy zu groß: der Composer landete hinter
         der Nav/unter dem Viewport und die Flex-Items (Tab-Zeile!) wurden
         vertikal auf wenige Pixel zusammengequetscht. */
      .inbox-shell.inbox-messenger {
        height: calc(100vh - 210px - var(--mobile-nav-space));
        height: calc(100dvh - 210px - var(--mobile-nav-space));
        max-height: none;
      }

      /* Fixe (nicht scrollende) Bereiche dürfen nicht schrumpfen –
         nur .inbox-scroll absorbiert die Resthöhe. */
      .inbox-messenger > .inbox-top,
      .inbox-messenger > .inbox-tabs,
      .inbox-messenger > .inbox-partners,
      .inbox-messenger > .inbox-bulk-actions {
        flex-shrink: 0;
      }

      .inbox-tab-count {
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        font-size: 10px;
      }

      .message-list {
        gap: 8px;
      }

      .message-card {
        gap: 10px;
        border-radius: 15px;
        padding: 12px;
      }

      .message-card.selecting {
        padding-left: 42px;
      }

      .message-select {
        top: 13px;
        left: 12px;
      }

      .message-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
      }

      .message-title {
        min-width: 0;
        font-size: 14px;
        line-height: 1.25;
      }

      .message-status-stack {
        justify-content: flex-start;
      }

      .message-body {
        font-size: 13px;
        line-height: 1.45;
      }

      .message-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
      }

      .message-actions button {
        min-width: 0;
        min-height: 38px;
        padding: 8px 9px;
      }

      .inbox-bulk-actions {
        gap: 9px;
        border-radius: 14px;
        padding: 10px;
      }

      .inbox-bulk-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .compose-head {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
      }

      .compose-icon {
        width: 32px;
        height: 32px;
        border-radius: 12px;
        font-size: 15px;
      }

      .compose-head .section-subtitle {
        display: none;
      }

      .inbox-compose-panel .event-person-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 6px;
        gap: 6px;
        border-radius: 14px;
      }

      .compose-recipient-btn {
        min-height: 42px;
        padding: 7px 8px;
      }

      .message-form textarea {
        min-height: 112px;
      }

      .compose-meta {
        display: none;
      }

      .header-actions {
        width: 100%;
        justify-items: start;
      }

      .header-top-actions,
      .profile-switch,
      .tracker-tabs,
      .tracker-view-switch,
      .inventory-tabs,
      .inbox-tabs,
      .journal-mode-tabs,
      .quote-archive-tabs,
      .planner-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        max-width: 100%;
        padding-top: 6px;
        padding-bottom: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scroll-padding-block: 6px;
        scrollbar-width: none;
      }

      .header-top-actions,
      .session-actions {
        flex-wrap: wrap;
        overflow: visible;
      }

      .session-actions {
        position: relative;
        z-index: 60;
      }

      .user-hub-menu {
        right: auto;
        left: 0;
        width: min(216px, calc(100vw - 48px));
      }

      .user-hub-menu::before {
        right: auto;
        left: 24px;
      }

      .header-top-actions::-webkit-scrollbar,
      .profile-switch::-webkit-scrollbar,
      .tracker-tabs::-webkit-scrollbar,
      .tracker-view-switch::-webkit-scrollbar,
      .inventory-tabs::-webkit-scrollbar,
      .inbox-tabs::-webkit-scrollbar,
      .journal-mode-tabs::-webkit-scrollbar,
      .quote-archive-tabs::-webkit-scrollbar,
      .planner-filters::-webkit-scrollbar {
        display: none;
      }

      .profile-btn,
      .journal-mode-btn,
      .quote-tab {
        flex: 0 0 auto;
        min-height: 38px;
        white-space: nowrap;
      }

      .tracker-view-switch {
        width: 100%;
        padding: 5px;
      }

      .tracker-view-switch .profile-switch {
        min-width: max-content;
      }

    }
    .settings-privacy-error { margin: 4px 0 0; color: var(--danger, #ff8585); font-size: 12px; }

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .settings-shell { max-width: var(--page-content-width); }
:where(body:not(.og-design)) .settings-page .settings-list{ border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
:where(body:not(.og-design)) .settings-page .settings-search{ border-radius: 8px; box-shadow: none; background: rgba(255,255,255,.025); }
.settings-game-group { border-top: 1px solid var(--line); }
.settings-game-group > summary { list-style: none; }
.settings-game-group > summary::-webkit-details-marker { display: none; }
.settings-game-group[open] > summary .settings-section-chevron { transform: rotate(180deg); }
.settings-game-children { padding-left: 16px; }
.settings-channel-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 48px; gap: 12px; }
.settings-channel { display: grid; justify-items: center; gap: 6px; font-size: 11px; color: var(--muted); }

/* Quelle: account-deletion.css */
.account-deletion-card,
.account-admin-card {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.035);
}

.account-deletion-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.account-deletion-card > div,
.account-admin-head > div,
.account-admin-row > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.account-deletion-card p,
.account-admin-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-deletion-open,
.account-admin-row .danger {
  border-color: color-mix(in srgb, var(--bad) 45%, var(--line));
  color: color-mix(in srgb, var(--bad) 82%, white);
}

.account-deletion-open:hover,
.account-admin-row .danger:hover {
  border-color: color-mix(in srgb, var(--bad) 70%, var(--line));
  background: color-mix(in srgb, var(--bad) 12%, rgba(255,255,255,.04));
}

.account-admin-head,
.account-admin-row,
.account-deletion-dialog-head,
.account-deletion-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-admin-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.account-admin-row {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.account-admin-row small,
.account-admin-empty {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.account-deletion-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5,8,18,.78);
  backdrop-filter: blur(8px);
}

.account-deletion-dialog {
  display: grid;
  gap: 16px;
  width: min(94vw, 520px);
  max-height: min(88vh, 760px);
  overflow: auto;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--bad) 36%, var(--line));
  border-radius: 22px;
  background: color-mix(in srgb, var(--card) 94%, #080b15);
  box-shadow: 0 30px 90px rgba(0,0,0,.48);
}

.account-deletion-dialog-head h2 {
  margin: 4px 0 0;
  font-size: clamp(21px, 5vw, 28px);
}

.account-deletion-dialog-head .icon-btn {
  flex: 0 0 auto;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.account-deletion-loading,
.account-deletion-target,
.account-deletion-warning,
.account-deletion-error,
.account-deletion-success {
  padding: 13px 14px;
  border-radius: var(--control-radius);
  font-size: 13px;
  line-height: 1.5;
}

.account-deletion-loading,
.account-deletion-target {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
}

.account-deletion-target {
  display: grid;
  gap: 4px;
}

.account-deletion-target span,
.account-deletion-target small {
  color: var(--muted);
}

.account-deletion-target small {
  overflow-wrap: anywhere;
}

.account-deletion-preview {
  display: grid;
  gap: 14px;
}

.account-deletion-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.account-deletion-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  text-align: center;
}

.account-deletion-summary strong {
  font-size: 19px;
}

.account-deletion-summary small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.account-deletion-warning,
.account-deletion-error {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--bad) 45%, var(--line));
  color: color-mix(in srgb, var(--bad) 74%, white);
  background: color-mix(in srgb, var(--bad) 10%, rgba(255,255,255,.025));
}

.account-deletion-success {
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line));
  color: color-mix(in srgb, var(--good) 76%, white);
  background: color-mix(in srgb, var(--good) 9%, rgba(255,255,255,.025));
}

.account-deletion-confirmation {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-deletion-confirmation strong {
  color: var(--text);
}

.account-deletion-confirmation input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  outline: none;
  color: var(--text);
  background: var(--soft);
  font: inherit;
}

.account-deletion-confirmation input:focus {
  border-color: color-mix(in srgb, var(--bad) 58%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 14%, transparent);
}

.account-deletion-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.account-deletion-confirm {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid color-mix(in srgb, var(--bad) 72%, #fff);
  border-radius: var(--control-radius);
  color: #fff;
  background: color-mix(in srgb, var(--bad) 78%, #641b28);
  font: inherit;
  font-weight: 900;
}

.account-deletion-confirm:hover:not(:disabled) {
  filter: brightness(1.1);
}

.account-deletion-confirm:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 620px) {
  .account-deletion-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .account-deletion-open {
    width: 100%;
  }

  .account-admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  .account-admin-head > button {
    width: 100%;
  }

  .account-deletion-backdrop {
    align-items: end;
    padding: 10px;
  }

  .account-deletion-dialog {
    width: 100%;
    max-height: min(92dvh, 820px);
    padding: 18px;
    border-radius: 22px 22px 16px 16px;
  }

  .account-deletion-summary {
    grid-template-columns: 1fr;
  }

  .account-deletion-summary > span {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    text-align: left;
  }

  .account-deletion-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-deletion-actions button {
    width: 100%;
  }
}

@media (pointer: coarse) {
  .account-admin-row button,
  .account-deletion-open,
  .account-deletion-actions button {
    min-height: 48px;
  }
}

/* Quelle: music.css */
    /* ============================================================
       MUSIK-PLAYER
       ============================================================ */

    .music-shell {
      padding: 0 0 20px;
    }

    @media (min-width: 721px) {
      body.music-player-active {
        padding-bottom: calc(156px + env(safe-area-inset-bottom));
      }

      /* Die Shell streckt sich sonst auf volle Viewporthöhe (min-height mit
         24px Body-Padding gerechnet) und das Leisten-Padding kommt obendrauf:
         Seiten, die eigentlich passen (z. B. Rückblick), müssten grundlos
         scrollen. Mit aktiver Leiste wird deren Platz hier eingerechnet –
         kurze Seiten enden dann exakt über der Leiste, ohne Scroll. */
      body.music-player-active .spa-app {
        min-height: calc(100vh - 24px - 156px - env(safe-area-inset-bottom));
      }

      /* Der statische 760px-Floor der Frames erzeugt bei kurzen Seiten
         (z. B. Rückblick) Totraum, der mit Leiste erscrollbar würde. Mit
         aktiver Leiste stabilisiert die .spa-app-Mindesthöhe das Layout –
         der Frame darf sich dann nach dem echten Inhalt richten. */
      body.music-player-active .spa-frame {
        min-height: 0;
      }
    }

    .music-shell.has-player {
      padding-bottom: 120px;
    }

    @media (max-width: 720px) {
      .music-shell.has-player {
        padding-bottom: 0;
      }
    }

    .music-lib-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 18px 16px 12px;
    }

    .music-add-btn {
      flex-shrink: 0;
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 900;
    }

    /* ---- Song Grid ---- */

    .music-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
      gap: 12px;
      padding: 0 12px;
    }

    @media (max-width: 480px) {
      .music-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
      }
    }

    .music-empty {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 60px 20px;
      text-align: center;
      color: var(--muted);
    }

    .music-empty-icon {
      font-size: 48px;
      opacity: .3;
    }

    .music-empty-text {
      font-size: 15px;
      font-weight: 800;
    }

    .music-empty-hint {
      font-size: 13px;
      opacity: .7;
    }

    /* ---- Song Card ---- */

    .song-card {
      display: flex;
      flex-direction: column;
      content-visibility: auto;
      contain-intrinsic-size: auto 360px;
      border-radius: 14px;
      border: 1px solid var(--line);
      background:
        linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)),
        rgba(255,255,255,.025);
      overflow: hidden;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s, border-color .15s;
    }

    .song-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,0,0,.35);
      border-color: rgba(255,255,255,.18);
    }

    .song-card.active {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 60%, var(--line));
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 30%, transparent);
    }

    .song-cover {
      position: relative;
      width: 100%;
      aspect-ratio: 1;
      overflow: hidden;
      background: rgba(255,255,255,.04);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .song-cover-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .song-cover-placeholder {
      font-size: 40px;
      opacity: .2;
    }

    .song-info {
      padding: 10px 10px 8px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
    }

    .song-title {
      font-size: 13px;
      font-weight: 900;
      color: var(--text);
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.3;
    }

    .song-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .song-tag {
      font-size: 10px;
      font-weight: 800;
      color: var(--muted);
      background: rgba(255,255,255,.07);
      border-radius: 999px;
      padding: 2px 7px;
    }

    .song-footer {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: auto;
    }

    .song-by {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: var(--muted);
      font-weight: 800;
      flex: 1;
      min-width: 0;
      overflow: hidden;
      white-space: nowrap;
    }

    .song-by .profile-dot,
    .song-by svg {
      flex-shrink: 0;
    }

    .song-duration {
      font-size: 11px;
      color: var(--muted);
      font-weight: 800;
      white-space: nowrap;
    }

    .song-plays {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      font-size: 11px;
      color: var(--muted);
      font-weight: 800;
      white-space: nowrap;
    }

    .song-plays-icon,
    .song-plays-icon svg {
      width: 11px;
      height: 11px;
      display: block;
    }

    .song-download-btn {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      color: var(--muted);
      font-size: 11px;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s, color .15s, border-color .15s;
    }

    .song-delete-btn {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--muted);
      font-size: 11px;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: opacity .15s, background .15s, color .15s;
    }

    .song-card:hover .song-delete-btn {
      opacity: 1;
    }

    .song-download-btn .bro-icon {
      width: 13px;
      height: 13px;
      stroke-width: 2.4;
    }

    .song-download-btn:hover {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 55%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
      color: var(--text);
    }

    .song-delete-btn:hover {
      background: rgba(255,80,80,.15);
      color: #ff5555;
    }

    /* "Als Nächstes"-Button – immer sichtbar (auch ohne Hover/Touch). */
    .song-queue-btn {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      color: var(--muted);
      font-size: 13px;
      line-height: 1;
      cursor: pointer;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s, color .15s, border-color .15s;
    }

    .song-queue-btn:hover {
      color: var(--text);
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 55%, var(--line));
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
    }

    /* ---- Bibliothek: Suche + Warteschlange ---- */
    .music-controls {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 16px 12px;
    }

    .music-search {
      flex: 1 1 auto;
      min-width: 0;
      padding: 9px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 14px;
    }

    .music-search:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, var(--line));
    }

    .music-sort {
      flex: 0 0 auto;
      max-width: 44%;
      padding: 9px 12px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.04);
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
    }

    .music-sort:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 45%, var(--line));
    }

    .music-sort option {
      background: var(--card2);
      color: var(--text);
    }

    .music-queue {
      margin: 0 16px 14px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,.03);
    }

    .music-queue-head {
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .04em;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .music-queue-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .music-queue-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
    }

    .music-queue-pos {
      flex-shrink: 0;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: rgba(255,255,255,.07);
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .music-queue-title {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .music-queue-remove {
      flex-shrink: 0;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--muted);
      font-size: 11px;
      cursor: pointer;
    }

    .music-queue-remove:hover {
      background: rgba(255,80,80,.15);
      color: #ff5555;
    }

    /* ---- Player Bar ---- */

    .music-player-bar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 70;
      display: grid;
      grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.55fr) minmax(150px, 1fr);
      align-items: center;
      gap: 16px;
      min-height: 72px;
      padding: 8px 14px;
      background: rgba(24, 25, 31, 0.97);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-top: 1px solid rgba(255,255,255,.1);
    }

    .music-player-bar[hidden] {
      display: none;
    }

    .music-player-bar button,
    .music-player-bar input {
      cursor: pointer;
    }

    .mpb-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .mpb-center {
      display: grid;
      justify-items: center;
      gap: 4px;
      min-width: 0;
    }

    .mpb-right {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      min-width: 0;
    }

    .mpb-volume-btn {
      width: 32px;
      height: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 0;
      border-radius: 50%;
      padding: 0;
      color: var(--muted);
      background: transparent;
    }

    .mpb-volume-btn:hover {
      color: var(--text);
      background: rgba(255,255,255,.1);
    }

    .mpb-volume-btn .bro-icon {
      width: 17px;
      height: 17px;
    }

    .mpb-row2 {
      display: grid;
      grid-template-columns: 42px minmax(220px, 1fr) 42px;
      align-items: center;
      gap: 8px;
      min-width: 0;
      width: min(100%, 660px);
    }

    .mpb-cover {
      width: 46px;
      height: 46px;
      border-radius: 6px;
      overflow: hidden;
      background: rgba(255,255,255,.07);
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .mpb-cover:hover {
      outline: 1px solid rgba(255,255,255,.26);
    }

    .mpb-cover-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .mpb-cover-placeholder {
      font-size: 18px;
      opacity: .3;
    }

    .mpb-info {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      cursor: pointer;
      outline: none;
    }

    .mpb-info:hover .mpb-title,
    .mpb-info:focus-visible .mpb-title {
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .mpb-title {
      font-size: 14px;
      font-weight: 900;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mpb-meta {
      font-size: 12px;
      color: var(--muted);
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .mpb-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .mpb-btn {
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: transparent;
      color: var(--muted);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .12s, color .12s;
    }

    .mpb-btn:hover {
      background: rgba(255,255,255,.1);
      color: var(--text);
    }

    .mpb-close {
      position: relative;
      width: 32px;
      height: 32px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 32px;
      border: 0;
      border-radius: 999px;
      padding: 0;
      color: var(--muted);
      background: rgba(255,255,255,.07);
      font-size: 16px;
      line-height: 0;
      cursor: pointer;
      justify-self: end;
      margin-left: 8px;
    }

    .mpb-close::before {
      content: "";
      position: absolute;
      left: -9px;
      top: 7px;
      width: 1px;
      height: 18px;
      background: var(--line);
      pointer-events: none;
    }

    .mpb-close:hover {
      color: var(--text);
      background: rgba(255,92,122,.16);
    }

    .mpb-close .bro-icon {
      width: 16px;
      height: 16px;
      margin: 0;
    }

    .mpb-queue-panel {
      position: absolute;
      right: 14px;
      bottom: calc(100% + 10px);
      width: min(390px, calc(100vw - 28px));
      max-height: min(56vh, 480px);
      overflow: auto;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(24, 25, 31, .98);
      box-shadow: 0 18px 46px rgba(0,0,0,.42);
    }

    .mpb-queue-panel[hidden] { display: none; }
    .mpb-queue-head, .mpb-queue-item { display: flex; align-items: center; }
    .mpb-queue-head { justify-content: space-between; gap: 12px; margin-bottom: 10px; }
    .mpb-queue-head strong { font-size: 14px; }
    .mpb-queue-head button { border: 0; cursor: pointer; color: var(--muted); background: rgba(255,255,255,.07); }
    .mpb-queue-head button { width: 26px; height: 26px; border-radius: 50%; font-size: 17px; }
    .mpb-queue-section + .mpb-queue-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
    .mpb-queue-section > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
    .mpb-queue-section ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
    .mpb-queue-item { min-height: 32px; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 13px; cursor: grab; touch-action: none; user-select: none; }
    .mpb-queue-item:active, .mpb-queue-item.dragging { cursor: grabbing; opacity: .55; }
    .mpb-queue-item.drag-over { background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent); outline: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 40%, var(--line)); }
    .mpb-queue-item.auto { cursor: default; touch-action: auto; user-select: text; }
    .mpb-queue-number { display: grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--muted); font-size: 10px; font-weight: 800; }
    .mpb-queue-song { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mpb-queue-grip { color: var(--muted); font-size: 18px; line-height: 1; letter-spacing: -4px; transform: rotate(90deg); }
    .mpb-queue-empty { padding: 5px 2px; color: var(--muted); font-size: 13px; }

    .music-now-playing-backdrop {
      position: fixed;
      inset: 0;
      z-index: 320;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding: 16px;
      background: rgba(3,6,14,.68);
      backdrop-filter: blur(14px);
    }

    .music-now-playing {
      position: relative;
      width: min(100%, 940px);
      max-height: min(92vh, 980px);
      display: grid;
      gap: 18px;
      overflow: auto;
      overflow-x: hidden;
      border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 28%, var(--line));
      border-radius: 24px 24px 18px 18px;
      padding: 20px;
      background:
        linear-gradient(180deg, color-mix(in srgb, var(--active-profile-color, var(--today)) 14%, rgba(21,27,47,.96)), rgba(10,14,28,.98)),
        var(--card2);
      box-shadow: 0 28px 72px rgba(0,0,0,.48);
    }

    .mnp-hero {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
      align-items: center;
      gap: 28px;
      min-width: 0;
    }

    .mnp-song-info {
      display: grid;
      align-content: center;
      gap: 12px;
      min-width: 0;
    }

    .mnp-title-edit,
    .mnp-tags-edit {
      display: grid;
      gap: 10px;
      min-width: 0;
    }

    .mnp-title-read,
    .mnp-tags-read {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .mnp-title-read[hidden],
    .mnp-tags-read[hidden] {
      display: none;
    }

    .mnp-title-read h2 {
      min-width: 0;
    }

    .mnp-tags-read {
      align-items: flex-start;
    }

    .mnp-hero-edit {
      opacity: .72;
    }

    .mnp-title-read:hover .mnp-hero-edit,
    .mnp-tags-read:hover .mnp-hero-edit,
    .mnp-cover-wrap:hover .mnp-cover-edit {
      opacity: 1;
    }

    .mnp-hero-editor {
      display: grid;
      gap: 10px;
      max-width: min(100%, 680px);
    }

    .mnp-hero-editor[hidden] {
      display: none;
    }

    .mnp-hero-input {
      min-height: 54px;
      font-size: 20px;
      font-weight: 900;
    }

    .mnp-hero-editor-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .mnp-sticky-head {
      position: sticky;
      top: -20px;
      z-index: 3;
      min-height: 48px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin: -20px -20px 0;
      padding: 12px 12px 8px 20px;
      background:
        linear-gradient(180deg, rgba(10,14,28,.98), rgba(10,14,28,.86));
      backdrop-filter: blur(14px);
    }

    .mnp-drag-handle {
      display: none;
    }

    .mnp-sticky-title {
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .mnp-close {
      position: static;
      flex: 0 0 auto;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 0;
      border-radius: 999px;
      color: color-mix(in srgb, var(--text) 88%, var(--muted));
      background: rgba(0,0,0,.32);
      cursor: pointer;
      padding: 0;
      line-height: 0;
    }

    .mnp-close .bro-icon {
      width: 20px;
      height: 20px;
      margin: 0;
    }

    .mnp-close:hover {
      color: var(--text);
      background: rgba(255,255,255,.12);
    }

    .mnp-cover-wrap {
      position: relative;
      width: 100%;
      max-width: 420px;
      justify-self: end;
    }

    .mnp-cover {
      position: relative;
      width: 100%;
      aspect-ratio: 1;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 22px;
      background: rgba(255,255,255,.07);
      box-shadow: 0 22px 52px rgba(0,0,0,.36);
    }

    .mnp-cover-edit {
      position: absolute;
      top: 12px;
      right: 12px;
      width: 36px;
      height: 36px;
      opacity: .82;
      background: rgba(3,6,14,.62);
      backdrop-filter: blur(12px);
    }

    .mnp-cover-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .mnp-cover-placeholder {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 75%, white);
      font-size: 72px;
      opacity: .8;
    }

    .mnp-kicker {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
      font-size: 11px;
      font-weight: 950;
      text-transform: uppercase;
    }

    .music-now-playing h2 {
      margin: 0;
      font-size: clamp(34px, 6vw, 64px);
      line-height: 1.05;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }

    .mnp-meta {
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .mnp-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .mnp-tags span {
      border-radius: 999px;
      padding: 5px 8px;
      color: var(--text);
      background: rgba(255,255,255,.08);
      font-size: 11px;
      font-weight: 900;
    }

    .mnp-player {
      display: grid;
      gap: 16px;
      margin: 2px 0 4px;
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 18px;
      padding: 18px 22px;
      background: rgba(255,255,255,.045);
      position: relative;
      z-index: 1;
    }

    .mnp-time-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: var(--muted);
      font-size: 11px;
      font-weight: 850;
    }

    .mnp-seek {
      width: 100%;
      height: 4px;
      -webkit-appearance: none;
      appearance: none;
      border-radius: 999px;
      background: rgba(255,255,255,.18);
      outline: none;
    }

    .mnp-seek::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 14px;
      height: 14px;
      border-radius: 999px;
      background: var(--text);
      box-shadow: 0 0 0 5px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent);
    }

    .mnp-volume-toggle .bro-icon {
      width: 19px;
      height: 19px;
    }

    .mnp-volume-popover {
      position: absolute;
      z-index: 4;
      right: 16px;
      bottom: 76px;
      display: grid;
      place-items: center;
      width: 46px;
      height: 156px;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 999px;
      background: rgba(3,6,14,.72);
      backdrop-filter: blur(14px);
      box-shadow: 0 12px 28px rgba(0,0,0,.28);
    }

    .mnp-volume-popover[hidden] {
      display: none;
    }

    .mnp-volume {
      width: 5px;
      height: 124px;
      accent-color: var(--text);
      writing-mode: vertical-lr;
      direction: rtl;
    }

    .mnp-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 22px;
      min-height: 78px;
    }

    .mnp-control {
      width: 56px;
      height: 56px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 0;
      border-radius: 999px;
      color: var(--text);
      background: rgba(255,255,255,.08);
      font-size: 34px;
      font-weight: 950;
      line-height: 1;
      cursor: pointer;
      padding: 0 0 3px;
      text-align: center;
    }

    .mnp-play {
      width: 74px;
      height: 74px;
      color: #07120c;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 70%, white);
      font-size: 28px;
      box-shadow: 0 12px 26px color-mix(in srgb, var(--active-profile-color, var(--today)) 24%, transparent);
      padding-bottom: 2px;
    }

    .mnp-side {
      font-size: 19px;
    }

    .mnp-mode.active {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 90%, white);
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, rgba(255,255,255,.08));
    }

    .mnp-controls {
      position: relative;
      display: block;
      width: 100%;
    }

    .mnp-controls .mnp-control {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
    }

    .mnp-controls .mnp-mode { left: 0; }
    .mnp-controls [data-mnp-action="prev"] { left: 60px; }
    .mnp-controls [data-mnp-action="next"] { right: 120px; }
    .mnp-controls [data-mnp-action="queue"] { right: 60px; }
    .mnp-controls .mnp-volume-toggle { right: 0; }
    .mnp-controls .mnp-play {
      left: 50%;
      transform: translate(-50%, -50%);
    }

    /* Kompakter Cover-Hero: die wichtigsten Infos und die Steuerung liegen
       direkt auf dem Artwork, damit die Lyrics ohne langen Vorspann folgen. */
    .mnp-hero {
      position: relative;
      display: block;
      width: min(100%, 700px);
      margin: 0 auto;
    }

    .mnp-cover-wrap {
      max-width: none;
    }

    .mnp-cover {
      aspect-ratio: 1;
    }

    .mnp-cover::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(3,6,14,.78) 0%, rgba(3,6,14,.08) 34%, rgba(3,6,14,.08) 52%, rgba(3,6,14,.86) 100%);
      pointer-events: none;
    }

    .mnp-song-info {
      position: absolute;
      z-index: 2;
      right: 28px;
      top: 28px;
      bottom: auto;
      left: 28px;
      align-content: start;
      gap: 8px;
      color: white;
    }

    .mnp-meta {
      color: rgba(255,255,255,.78);
    }

    .mnp-tags span {
      background: rgba(0,0,0,.3);
      backdrop-filter: blur(8px);
    }

    .mnp-player {
      z-index: 2;
      width: min(calc(100% - 40px), 660px);
      gap: 10px;
      margin: -248px auto 0;
      padding: 12px 18px 16px;
      border: 0;
      border-radius: 0;
      background: transparent;
      backdrop-filter: none;
    }

    .mnp-controls {
      min-height: 58px;
    }

    .mnp-control {
      width: 46px;
      height: 46px;
    }

    .mnp-play {
      width: 60px;
      height: 60px;
    }

    .mnp-details-form {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      border: 0;
      border-radius: 0;
      padding: 0;
      background: transparent;
      position: relative;
      z-index: 1;
    }

    .mnp-detail-row[data-detail-field="lyrics"],
    .mnp-detail-row[data-detail-field="prompt"] {
      grid-column: 1 / -1;
    }

    .mnp-details-head {
      grid-column: 1 / -1;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
    }

    .mnp-details-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex: 0 0 auto;
    }

    .mnp-details-hint,
    .mnp-save-status {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .mnp-save-status {
      grid-column: 1 / -1;
      min-height: 16px;
    }

    .mnp-detail-row {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .mnp-detail-row[data-detail-field="prompt"],
    .mnp-detail-row[data-detail-field="lyrics"] {
      grid-column: 1 / -1;
    }

    .mnp-detail-row[data-detail-field="prompt"] {
      --mnp-detail-block-height: 160px;
    }

    .mnp-detail-row[data-detail-field="lyrics"] {
      --mnp-detail-block-height: 420px;
      --mnp-lyrics-edit-height: 560px;
    }

    .mnp-detail-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .mnp-field-edit {
      flex: 0 0 auto;
      width: 30px;
      height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 999px;
      color: var(--text);
      background: rgba(255,255,255,.06);
      font-size: 15px;
      line-height: 1;
      cursor: pointer;
    }

    .mnp-field-edit:hover {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 46%, rgba(255,255,255,.18));
      background: rgba(255,255,255,.11);
    }

    .mnp-detail-editor {
      display: grid;
      gap: 10px;
    }

    .mnp-detail-editor[hidden] {
      display: none;
    }

    .mnp-detail-input {
      min-height: 48px;
    }

    .mnp-detail-input-large {
      line-height: 1.45;
    }

    .mnp-detail-row[data-detail-field="prompt"] .mnp-detail-input,
    .mnp-detail-row[data-detail-field="lyrics"] .mnp-detail-input {
      height: var(--mnp-detail-block-height);
      min-height: var(--mnp-detail-block-height);
      max-height: var(--mnp-detail-block-height);
      overflow: auto;
      resize: none;
      line-height: 1.55;
    }

    .mnp-detail-row[data-detail-field="lyrics"] .mnp-detail-input {
      display: none;
    }

    .mnp-detail-editor-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      flex-wrap: wrap;
    }

    .mnp-empty-value {
      color: var(--muted);
      font-weight: 800;
    }

    .mnp-detail-cover-preview {
      width: min(100%, 220px);
      aspect-ratio: 1;
      display: block;
      border-radius: 14px;
      object-fit: cover;
      background: rgba(255,255,255,.06);
    }

    .mnp-field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .mnp-details-form:not(.is-editing) .mnp-field {
      display: none;
    }

    .mnp-details-form.is-editing .mnp-readonly {
      display: none;
    }

    .mnp-details-form input:disabled,
    .mnp-details-form textarea:disabled {
      color: var(--text);
      opacity: .9;
    }

    .mnp-field span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
    }

    .mnp-textarea {
      min-height: 220px;
      resize: vertical;
    }

    .mnp-lyrics-input {
      min-height: 520px;
      line-height: 1.45;
      resize: vertical;
    }

    .mnp-lyrics-field {
      grid-column: 1 / -1;
    }

    .mnp-readonly {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
      gap: 16px;
    }

    .mnp-read-block {
      display: grid;
      gap: 8px;
      min-width: 0;
    }

    .mnp-read-title {
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
    }

    .mnp-read-text {
      height: var(--mnp-detail-block-height, 160px);
      min-height: var(--mnp-detail-block-height, 160px);
      max-height: var(--mnp-detail-block-height, 160px);
      overflow: auto;
      white-space: pre-wrap;
      color: color-mix(in srgb, var(--text) 86%, var(--muted));
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 16px;
      padding: 16px;
      background: rgba(255,255,255,.045);
      font-size: 15px;
      line-height: 1.55;
    }

    .mnp-read-lyrics {
      min-height: var(--mnp-detail-block-height, 420px);
      font-size: 21px;
      line-height: 1.72;
    }

    .mnp-lyrics-lines {
      display: grid;
      gap: 5px;
      white-space: normal;
    }

    .mnp-lyric-line {
      min-height: 42px;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      align-items: start;
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 8px 12px;
      color: color-mix(in srgb, var(--text) 82%, var(--muted));
      background: transparent;
      font: inherit;
      line-height: 1.62;
      text-align: left;
      white-space: pre-wrap;
    }

    .mnp-lyric-line:not(.timed) {
      grid-template-columns: 1fr;
    }

    .mnp-lyric-line.timed {
      width: 100%;
      cursor: pointer;
    }

    .mnp-lyric-line.timed:hover,
    .mnp-lyric-line.active {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 34%, var(--line));
      color: var(--text);
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 11%, rgba(255,255,255,.04));
    }

    .mnp-lyric-line.active {
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 64%, white);
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, rgba(255,255,255,.05));
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--active-profile-color, var(--today)) 18%, transparent) inset;
    }

    .mnp-lyric-text {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .mnp-lyrics-sync-editor {
      height: var(--mnp-lyrics-edit-height, var(--mnp-detail-block-height));
      min-height: var(--mnp-lyrics-edit-height, var(--mnp-detail-block-height));
      display: grid;
      grid-template-columns: 138px minmax(0, 1fr);
      gap: 10px;
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 16px;
      padding: 12px;
      background: rgba(255,255,255,.035);
    }

    .mnp-lyrics-time-rail {
      overflow-x: hidden;
      overflow-y: auto;
      display: grid;
      align-content: start;
      gap: 0;
      padding-right: 2px;
    }

    .mnp-lyrics-sync-row {
      display: grid;
      grid-template-columns: minmax(0, 72px) 52px;
      gap: 7px;
      align-items: center;
      min-height: 36px;
      max-width: 100%;
    }

    .mnp-lyrics-sync-row.empty {
      visibility: hidden;
    }

    .mnp-lyrics-time-input,
    .mnp-lyrics-plain-input {
      width: 100%;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 8px;
      padding: 8px 9px;
      color: var(--text);
      background: rgba(255,255,255,.055);
      font: inherit;
      font-size: 13px;
      font-weight: 800;
    }

    .mnp-lyrics-time-input {
      min-height: 36px;
    }

    .mnp-lyrics-time-input {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 72%, white);
      text-align: center;
    }

    .mnp-lyrics-time-input:disabled,
    .mnp-lyrics-now:disabled {
      cursor: not-allowed;
      opacity: .38;
    }

    .mnp-lyrics-plain-input {
      height: 100%;
      min-height: 100%;
      resize: none;
      overflow: auto;
      font-size: 16px;
      line-height: 36px;
      font-weight: 750;
      white-space: pre;
    }

    .mnp-lyrics-now {
      min-height: 36px;
      padding: 7px 8px;
      font-size: 12px;
    }

    .mnp-lyrics-add-row {
      justify-self: start;
      min-height: 36px;
    }

    /* ---- Desktop: zentriertes Zwei-Spalten-Fenster ----
       Statt des mobilen Cover-Hero (Steuerung auf dem Artwork, unten
       angeklebt) liegen links Cover + Steuerung, rechts Lyrics + Prompt. */
    @media (min-width: 861px) {
      .music-now-playing-backdrop {
        align-items: center;
      }

      .music-now-playing {
        width: min(100%, 1060px);
        max-height: min(88vh, 900px);
        grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
        grid-template-areas:
          "head   head"
          "hero   details"
          "player details";
        align-content: start;
        column-gap: 30px;
        row-gap: 14px;
        padding: 20px 26px 26px;
        border-radius: 22px;
      }

      .mnp-sticky-head { grid-area: head; }
      .mnp-details-form { grid-area: details; align-content: start; }

      /* Hero entstapeln: Cover oben, Infos darunter – kein Overlay. */
      .mnp-hero {
        grid-area: hero;
        align-self: start;
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        margin: 0;
      }

      .mnp-hero .mnp-cover-wrap { order: 1; }
      .mnp-hero .mnp-song-info { order: 2; }

      .mnp-cover::after { display: none; }

      .mnp-song-info {
        position: static;
        inset: auto;
        align-content: start;
        gap: 8px;
        padding: 0;
        color: var(--text);
      }

      .mnp-meta { color: var(--muted); }

      .mnp-tags span {
        background: color-mix(in srgb, var(--active-profile-color, var(--today)) 16%, rgba(255,255,255,.06));
        backdrop-filter: none;
      }

      /* Player normal unter den Infos – kein negativer Overlay-Margin. */
      .mnp-player {
        grid-area: player;
        align-self: start;
        position: relative;
        z-index: auto;
        width: 100%;
        margin: 0;
        padding: 0;
      }

      /* Steuerung als zentrierte Flex-Reihe (die absoluten Positionen waren
         auf das breite Overlay getuned und kollidieren in der schmalen Spalte). */
      .mnp-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        min-height: 0;
        width: 100%;
      }

      .mnp-controls .mnp-control {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
      }

      .mnp-control { width: 48px; height: 48px; font-size: 26px; }
      .mnp-play { width: 58px; height: 58px; font-size: 24px; }
      .mnp-side { font-size: 18px; }

      /* Rechte Spalte: Lyrics und Prompt einspaltig untereinander. */
      .mnp-details-form {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    @media (max-width: 860px) {
      /* Bottom-Sheet bündig mit der echten Bildschirmkante (kein Rand mehr
         sichtbar): Backdrop reserviert unten nichts, die Karte hat dafür
         eckige statt runde Bodenecken und holt sich ihren Sicherheitsabstand
         zur Home-Indicator-Leiste selbst über Padding (env(...)).
         Oben bleibt ein Mindestabstand zur Notch/Statusleiste bestehen -
         die installierte PWA rendert dort (viewport-fit=cover) wirklich bis
         unter die Systemleiste, ein Safari-Tab dagegen nie (Safaris eigene
         Chrome belegt den Bereich). Ohne diese Reserve landet der
         Drag-Handle in der System-Geste-Zone und lässt sich zum Schliessen
         nicht mehr zuverlässig antippen/ziehen. */
      .music-now-playing-backdrop {
        padding: max(8px, env(safe-area-inset-top)) 8px 0;
      }

      .music-now-playing {
        width: 100%;
        max-height: 94vh;
        max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
        gap: 12px;
        border-radius: 20px 20px 0 0;
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom)) 16px;
      }

      .mnp-hero {
        position: relative;
        display: block;
      }

      .mnp-song-info {
        position: absolute;
        z-index: 2;
        right: 18px;
        top: 20px;
        bottom: auto;
        left: 18px;
        gap: 6px;
        color: white;
      }

      .mnp-sticky-head {
        top: -16px;
        margin: -16px -16px 0;
        padding: 12px 12px 8px 16px;
      }

      .mnp-cover {
        width: 100%;
      }

      .mnp-cover-wrap {
        width: min(100%, 360px);
        justify-self: center;
      }

      .music-now-playing h2 {
        font-size: clamp(25px, 7vw, 34px);
        text-shadow: 0 2px 16px rgba(0,0,0,.55);
      }

      .mnp-kicker {
        display: none;
      }

      .mnp-meta {
        color: rgba(255,255,255,.76);
      }

      .mnp-tags span {
        padding: 4px 7px;
        background: rgba(0,0,0,.3);
        backdrop-filter: blur(8px);
      }

      .mnp-player {
        z-index: 2;
        margin: -220px 10px 0;
        gap: 8px;
        padding: 10px 12px 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
      }

      .mnp-controls {
        min-height: 52px;
        gap: 14px;
      }

      .mnp-control {
        width: 42px;
        height: 42px;
      }

      .mnp-play {
        width: 54px;
        height: 54px;
      }

      .mnp-details-head {
        flex-direction: column;
      }

      .mnp-details-actions {
        width: 100%;
      }

      .mnp-edit,
      .mnp-save {
        width: 100%;
      }

      .mnp-details-form {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        border: 0;
        background: transparent;
      }

      .mnp-detail-editor-actions {
        display: grid;
        grid-template-columns: 1fr;
      }

      .mnp-readonly {
        grid-template-columns: 1fr;
      }

      .mnp-textarea {
        min-height: 180px;
      }

      .mnp-lyrics-input {
        min-height: 420px;
      }

      .mnp-detail-row[data-detail-field="prompt"] {
        --mnp-detail-block-height: 140px;
      }

      .mnp-detail-row[data-detail-field="lyrics"] {
        --mnp-detail-block-height: 360px;
        --mnp-lyrics-edit-height: 440px;
      }

      .mnp-lyrics-sync-row {
        grid-template-columns: 64px 48px;
        gap: 6px;
      }

      .mnp-lyrics-sync-editor {
        grid-template-columns: 120px minmax(0, 1fr);
      }
    }

    @media (max-width: 480px) {
      .mnp-controls {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
      }

      .mnp-controls .mnp-mode { grid-column: 1; }
      .mnp-controls [data-mnp-action="prev"] { grid-column: 2; }
      .mnp-controls .mnp-play { grid-column: 3; }
      .mnp-controls [data-mnp-action="next"] { grid-column: 4; }
      .mnp-controls [data-mnp-action="queue"] { grid-column: 5; }

      .mnp-control,
      .mnp-play {
        position: static !important;
        transform: none !important;
        width: 100%;
        height: 40px;
        min-width: 0;
        font-size: 20px;
      }

      .mnp-play {
        font-size: 22px;
      }
    }

    .mnp-section-title {
      margin-top: 4px;
      color: var(--text);
      font-size: 13px;
      font-weight: 950;
    }

    .mnp-lyrics {
      white-space: pre-wrap;
      color: color-mix(in srgb, var(--text) 82%, var(--muted));
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 16px;
      padding: 12px;
      background: rgba(255,255,255,.045);
      font-size: 13px;
      line-height: 1.5;
    }

    .mpb-btn.active {
      color: color-mix(in srgb, var(--active-profile-color, var(--today)) 90%, white);
    }

    .mpb-play {
      width: 40px;
      height: 40px;
      background: rgba(255,255,255,.1);
      color: var(--text);
      font-size: 16px;
    }

    .mpb-play:hover {
      background: rgba(255,255,255,.18);
    }

    .mpb-btn-sm {
      width: 28px;
      height: 28px;
      font-size: 12px;
    }

    .mpb-time {
      font-size: 10px;
      color: var(--muted);
      font-weight: 800;
      white-space: nowrap;
      min-width: 30px;
    }

    .mpb-time:last-of-type {
      text-align: right;
    }

    .mpb-seek {
      flex: 1;
      height: 3px;
      -webkit-appearance: none;
      appearance: none;
      background: rgba(255,255,255,.15);
      border-radius: 999px;
      cursor: pointer;
      outline: none;
    }

    .mpb-seek::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--text);
      cursor: pointer;
    }

    .mpb-volume {
      width: 70px;
      flex: 0 0 70px;
    }

    @media (max-width: 720px) {
      .music-player-bar {
        grid-template-columns: 1fr;
        left: 10px;
        right: 10px;
        bottom: calc(var(--mobile-nav-space, 78px) + env(safe-area-inset-bottom));
        gap: 8px;
        padding: 9px 10px 10px;
        border: 1px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 22%, var(--line));
        border-radius: 18px;
        box-shadow: 0 18px 46px rgba(0,0,0,.36);
      }

      .mpb-left {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px 10px;
        width: 100%;
      }

      .mpb-cover {
        width: 38px;
        height: 38px;
      }

      .mpb-center {
        justify-items: stretch;
      }

      .mpb-row2 {
        width: 100%;
        gap: 6px;
      }

      .mpb-right {
        position: absolute;
        right: 10px;
        top: 9px;
        display: none;
      }

      .mpb-close {
        display: none;
      }

      .mpb-left {
        touch-action: none;
      }

      .mpb-queue-panel {
        right: 0;
        bottom: calc(100% + 8px);
      }

      .mpb-volume {
        display: none;
      }

      .mnp-volume-toggle,
      .mnp-volume-popover {
        display: none !important;
      }

      .music-now-playing-backdrop {
        transition: background .2s ease, backdrop-filter .2s ease;
      }

      .mnp-sticky-head {
        touch-action: none;
      }

      .mnp-close {
        display: none;
      }

      .mnp-drag-handle {
        display: block;
        position: absolute;
        top: 6px;
        left: 50%;
        width: 38px;
        height: 4px;
        margin: 0;
        border-radius: 999px;
        background: rgba(255,255,255,.28);
        transform: translateX(-50%);
      }

      .mpb-right.volume-open {
        z-index: 1;
      }

      .mpb-right.volume-open .mpb-volume {
        display: block;
        position: absolute;
        right: 42px;
        bottom: calc(100% + 10px);
        width: min(62vw, 240px);
        height: 42px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(24, 25, 31, .98);
        box-shadow: 0 12px 30px rgba(0,0,0,.32);
      }
    }

    @media (max-width: 400px) {
      .mpb-volume { display: none; }
      .mpb-right.volume-open .mpb-volume { display: block; }
      .mpb-controls { gap: 5px; }
      .mpb-btn-sm { display: inline-flex; }
    }

    /* Tastatur-Fokus auf Song-Karten sichtbar machen. */
    .song-card:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--active-profile-color, var(--today)) 70%, white);
      outline-offset: 2px;
    }

    /* ---- Touch-Geraete: keine :hover-Steuerung, groessere Trefferflaechen ---- */
    @media (hover: none) {
      /* Song-Aktionen dauerhaft sichtbar (sonst auf dem Handy unauffindbar). */
      .song-delete-btn,
      .song-download-btn { opacity: 1; }
      .song-delete-btn,
      .song-download-btn,
      .song-queue-btn {
        width: 30px;
        height: 30px;
        font-size: 15px;
      }
      /* Transport-Buttons der Player-Bar fingerfreundlich (>= 44px). */
      .mpb-btn { width: 44px; height: 44px; font-size: 16px; }
      .mpb-play { width: 52px; height: 52px; font-size: 18px; }
      .mpb-volume-btn { width: 44px; height: 44px; }
    }

    /* Seek-Slider auf Touch besser greifbar (groesserer Daumen, hoehere Spur). */
    @media (pointer: coarse) {
      .mpb-seek { height: 6px; }
      .mpb-seek::-webkit-slider-thumb { width: 20px; height: 20px; }
      .mpb-seek::-moz-range-thumb { width: 20px; height: 20px; border: 0; }
      .mnp-seek { height: 7px; }
      .mnp-seek::-webkit-slider-thumb { width: 24px; height: 24px; }
      .mnp-seek::-moz-range-thumb { width: 24px; height: 24px; border: 0; }
    }

    /* ---- Upload-Fortschritt (indeterminate) ---- */
    .music-upload-progress {
      height: 4px;
      margin: 4px 0 2px;
      border-radius: 999px;
      background: rgba(255,255,255,.1);
      overflow: hidden;
    }

    .music-upload-bar {
      width: 40%;
      height: 100%;
      border-radius: 999px;
      background: color-mix(in srgb, var(--active-profile-color, var(--today)) 70%, white);
      animation: music-upload-slide 1.1s ease-in-out infinite;
    }

    @keyframes music-upload-slide {
      0% { margin-left: -40%; }
      100% { margin-left: 100%; }
    }

    @media (prefers-reduced-motion: reduce) {
      .music-upload-bar { animation-duration: 2.2s; }
    }

    /* ---- Bestaetigungs-Modal (statt native confirm) ---- */
    .music-confirm-backdrop {
      position: fixed;
      inset: 0;
      z-index: 400;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: rgba(0,0,0,.6);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }

    .music-confirm {
      width: min(360px, 100%);
      padding: 20px;
      border-radius: 18px;
      border: 1px solid var(--line);
      background: var(--card);
      box-shadow: var(--shadow);
    }

    .music-confirm-text {
      font-size: 15px;
      font-weight: 700;
      line-height: 1.45;
      color: var(--text);
    }

    .music-confirm-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 18px;
    }

    .music-confirm-yes {
      padding: 9px 16px;
      border: 0;
      border-radius: 999px;
      font-weight: 800;
      cursor: pointer;
      color: #fff;
      background: var(--bad);
    }

    .music-confirm-yes:hover {
      filter: brightness(1.08);
    }

    /* ---- Add Song Modal ---- */

    .music-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 300;
      background: rgba(0,0,0,.65);
      backdrop-filter: blur(6px);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding: 0;
    }

    @media (min-width: 600px) {
      .music-modal-backdrop {
        align-items: center;
        padding: 20px;
      }
    }

    .music-modal {
      width: 100%;
      max-width: 520px;
      max-height: 90vh;
      overflow-y: auto;
      border-radius: 20px 20px 0 0;
      border: 1px solid rgba(255,255,255,.12);
      background:
        linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03)),
        rgba(15, 20, 40, .98);
      padding: 20px 20px 32px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    @media (min-width: 600px) {
      .music-modal {
        border-radius: 20px;
        max-height: 80vh;
      }
    }

    .music-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .music-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .music-field {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .music-label {
      font-size: 12px;
      font-weight: 900;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .04em;
    }

    .music-input {
      width: 100%;
      padding: 9px 12px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,.12);
      background: rgba(255,255,255,.05);
      color: var(--text);
      font-size: 14px;
      font-family: inherit;
      font-weight: 700;
      box-sizing: border-box;
    }

    .music-input:focus {
      outline: none;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 60%, rgba(255,255,255,.2));
    }

    .music-textarea {
      resize: vertical;
      min-height: 72px;
    }

    .music-form-actions {
      display: flex;
      gap: 10px;
      padding-top: 4px;
    }

    .music-file-pick {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      background: rgba(255,255,255,.06);
      border: 1.5px dashed rgba(255,255,255,.2);
      border-radius: 10px;
      cursor: pointer;
      font-size: 13px;
      color: rgba(255,255,255,.5);
      transition: border-color .15s, background .15s, color .15s;
    }

    .music-file-pick:hover {
      border-color: rgba(255,255,255,.4);
      background: rgba(255,255,255,.1);
      color: rgba(255,255,255,.8);
    }

    .music-file-pick.has-file {
      border-style: solid;
      border-color: color-mix(in srgb, var(--active-profile-color, var(--today)) 60%, rgba(255,255,255,.2));
      color: var(--text);
    }

    .music-file-icon {
      font-size: 16px;
      flex-shrink: 0;
    }

    .music-item-new {
      position: absolute;
      z-index: 2;
      top: -5px;
      right: -5px;
      box-shadow: 0 3px 9px rgba(0,0,0,.3);
    }

/* Offene Abschnitte, dezente Objektkarten. */
:where(body:not(.og-design)) .music-page .song-card{ border-radius: 8px; box-shadow: none; }

/* Quelle: tictactoe-friends.css */
    /* ── Super Tic Tac Toe ─────────────────────────────── */

    .sttt-board {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      max-width: 420px;
      margin: 0 auto;
    }

    .sttt-mini-board {
      position: relative;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
      padding: 8px;
      border-radius: 14px;
      border: 2px solid rgba(255,255,255,.18);
      background: rgba(255,255,255,.06);
      transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
    }

    .sttt-mini-board.sttt-mb--active {
      border-color: rgba(138,180,255,.55);
      background: rgba(138,180,255,.06);
      box-shadow: 0 0 14px rgba(138,180,255,.18);
      transform: scale(1.02);
    }

    .sttt-mini-board.sttt-mb--won.sttt-mb--x {
      border-color: rgba(51,209,122,.45);
      background: rgba(51,209,122,.07);
    }

    .sttt-mini-board.sttt-mb--won.sttt-mb--o {
      border-color: rgba(255,92,122,.45);
      background: rgba(255,92,122,.07);
    }

    .sttt-mini-board.sttt-mb--draw {
      border-color: rgba(154,164,191,.25);
      background: rgba(154,164,191,.04);
    }

    .sttt-mini-board.sttt-mb--win-line {
      animation: sttt-board-pulse 1.4s ease infinite;
    }

    @keyframes sttt-board-pulse {
      0%, 100% { box-shadow: 0 0 12px rgba(138,180,255,.3); }
      50%       { box-shadow: 0 0 24px rgba(138,180,255,.6); }
    }

    /* winner overlay — display:none default; flex only when not hidden */
    .sttt-mb-overlay {
      display: none;
      position: absolute;
      inset: 0;
      align-items: center;
      justify-content: center;
      background: rgba(11,16,32,.82);
      backdrop-filter: blur(3px);
      border-radius: 12px;
      z-index: 4;
    }

    .sttt-mb-overlay:not([hidden]) {
      display: flex;
    }

    .sttt-big-x {
      position: relative;
      width: 52px;
      height: 52px;
    }

    .sttt-bx-l {
      position: absolute;
      top: 50%;
      left: 0;
      width: 100%;
      height: 10px;
      border-radius: 5px;
      background: linear-gradient(90deg, #33d17a, #5ee898);
      transform-origin: center;
    }

    .sttt-bx-l:first-child { transform: translateY(-50%) rotate(45deg); }
    .sttt-bx-l:last-child  { transform: translateY(-50%) rotate(-45deg); }

    .sttt-big-o {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      border: 10px solid #ff5c7a;
      box-shadow: 0 0 12px rgba(255,92,122,.35);
    }

    /* cells */
    .sttt-cell {
      aspect-ratio: 1;
      border-radius: 7px;
      border: 1px solid rgba(255,255,255,.22);
      background: rgba(255,255,255,.08);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s, border-color .15s, transform .15s;
      cursor: default;
      min-height: 28px;
    }

    .sttt-cell.sttt-cell--clickable {
      cursor: pointer;
      border-color: rgba(138,180,255,.5);
      background: rgba(138,180,255,.08);
    }

    .sttt-cell.sttt-cell--clickable:hover {
      background: rgba(138,180,255,.2);
      border-color: rgba(138,180,255,.8);
      transform: scale(1.1);
    }

    .sttt-cell.sttt-cell--just-played {
      animation: sttt-cell-flash .45s ease;
    }

    @keyframes sttt-cell-flash {
      0%, 100% { background: rgba(255,255,255,.03); }
      50%       { background: rgba(138,180,255,.18); }
    }

    /* X mark */
    .sttt-x {
      position: relative;
      width: 65%;
      aspect-ratio: 1;
      animation: sttt-pop .2s cubic-bezier(.34,1.56,.64,1);
    }

    .sttt-x-l {
      position: absolute;
      top: 50%;
      left: 0;
      width: 100%;
      height: 2.5px;
      border-radius: 2px;
      background: #33d17a;
      transform-origin: center;
    }

    .sttt-x-l:first-child { transform: translateY(-50%) rotate(45deg); }
    .sttt-x-l:last-child  { transform: translateY(-50%) rotate(-45deg); }

    /* O mark */
    .sttt-o {
      width: 55%;
      aspect-ratio: 1;
      border-radius: 50%;
      border: 2.5px solid #ff5c7a;
      animation: sttt-pop .2s cubic-bezier(.34,1.56,.64,1);
    }

    @keyframes sttt-pop {
      0%   { transform: scale(.4); opacity: 0; }
      100% { transform: scale(1);  opacity: 1; }
    }

    /* status */
    .sttt-status {
      padding: 12px 16px;
      border-radius: 14px;
      font-weight: 900;
      font-size: 15px;
      text-align: center;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.05);
      transition: background .25s, border-color .25s, color .25s;
    }

    .sttt-status[data-status="player"] {
      border-color: rgba(138,180,255,.4);
      background: rgba(138,180,255,.08);
      color: var(--today);
    }

    .sttt-status[data-status="computer"] {
      border-color: rgba(154,164,191,.25);
      background: rgba(255,255,255,.04);
      color: var(--muted);
      animation: sttt-thinking 1.6s ease-in-out infinite;
    }

    @keyframes sttt-thinking {
      0%, 100% { opacity: 1; }
      50%       { opacity: .55; }
    }

    .sttt-status[data-status="win"] {
      border-color: rgba(51,209,122,.5);
      background: rgba(51,209,122,.1);
      color: var(--good);
    }

    .sttt-status[data-status="lose"] {
      border-color: rgba(255,92,122,.4);
      background: rgba(255,92,122,.08);
      color: var(--bad);
    }

    .sttt-status[data-status="draw"] {
      border-color: rgba(246,193,119,.35);
      background: rgba(246,193,119,.08);
      color: var(--warn);
    }

    /* legend */
    .sttt-legend {
      display: grid;
      gap: 8px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: rgba(255,255,255,.03);
    }

    .sttt-legend-row {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .sttt-legend-x {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      position: relative;
    }

    .sttt-legend-x::before,
    .sttt-legend-x::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      width: 100%;
      height: 2.5px;
      border-radius: 2px;
      background: #33d17a;
      transform-origin: center;
    }

    .sttt-legend-x::before { transform: translateY(-50%) rotate(45deg); }
    .sttt-legend-x::after  { transform: translateY(-50%) rotate(-45deg); }

    .sttt-legend-o {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      border: 2.5px solid #ff5c7a;
      flex-shrink: 0;
    }

    .sttt-legend-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    /* mode switch */
    .sttt-mode-switch {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .sttt-mode-switch .profile-btn {
      text-align: center;
      justify-content: center;
    }

    /* multiplayer panel */
    #stttMultiPanel {
      display: grid;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: rgba(255,255,255,.03);
    }

    #stttMultiPanel[hidden] { display: none; }

    #stttMultiPanel .section-title { font-size: 13px; }

    .sttt-opponent-picker {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .sttt-opponent-picker .profile-btn {
      flex: 1;
      text-align: center;
      justify-content: center;
    }

    .sttt-opponent-picker .profile-btn.active {
      border-color: rgba(138,180,255,.55);
      background: rgba(138,180,255,.12);
      color: var(--today);
    }

/* ---- Login: Wechsel Anmelden/Registrieren ---- */
.access-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted, #9aa4bf);
}
.access-switch {
  margin-top: 0.4rem;
  background: none;
  border: none;
  color: color-mix(in srgb, var(--profile-color, var(--today)) 72%, white);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.3rem;
}

/* ---- Freunde-Seite ---- */
.friends-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: var(--page-content-width);
  margin: 0 auto;
}
body.og-design .friends-shell { gap: 1rem; max-width: 720px; }
body.og-design .friends-section { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: rgba(21,27,47,.78); box-shadow: var(--shadow); }
body.og-design .friends-code-card { display: block; }
body.og-design .friends-list .friends-row { border-radius: .8rem; }
.friends-section { padding: 20px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.friends-code-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.friends-new-summary { display: grid; gap: 8px; padding: 14px; border: 1px solid color-mix(in srgb, var(--new-indicator-color) 55%, var(--line)); border-radius: var(--control-radius); background: color-mix(in srgb, var(--new-indicator-color) 9%, var(--card)); }
.friends-new-summary strong { color: var(--new-indicator-color); }
.friends-new-summary p { margin: 0; overflow-wrap: anywhere; }
.friends-new-summary .ghost-btn { justify-self: start; }
.friends-care-field { display: grid; gap: 8px; margin-bottom: 16px; }
.friends-care-field input, .friends-care-field textarea { width: 100%; min-width: 0; }
.friends-name .friends-care-status { color: var(--good, #6ee7a8); margin-top: 4px; }
.friends-actions button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.friends-actions svg, .friends-code-row button svg { width: 18px; height: 18px; }
.friends-code-card .friends-code { letter-spacing: 0; border-radius: 6px; }
.friends-list .friends-row { border-radius: 8px; }
.friends-row .friends-name { overflow-wrap: anywhere; }
@media (max-width: 540px) {
  .friends-row { flex-wrap: wrap; }
  .friends-actions { width: 100%; justify-content: flex-end; }
  .friends-section { padding: 16px 0; }
}
.friends-code-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.friends-code {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.8rem;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--profile-color, var(--today)) 12%, rgba(255,255,255,.04));
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 40%, var(--line));
}
.friends-search-input {
  width: 100%;
  min-width: 0;
  margin-top: 0.6rem;
  padding: var(--control-pad);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
}
.friends-search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.friends-search-results {
  width: 100%;
}
.friends-feedback {
  margin-top: 0.6rem;
  font-size: 0.88rem;
}
.friends-feedback.is-ok { color: #6ee7a8; }
.friends-feedback.is-error { color: #ff9b9b; }
.friends-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.friends-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--profile-color, var(--today)) 8%, rgba(255,255,255,.03));
  border: 1px solid color-mix(in srgb, var(--profile-color, var(--today)) 30%, var(--line));
}
.friends-row-new {
  flex: 0 0 auto;
}
.friends-avatar {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.friends-avatar svg { width: 100%; height: 100%; }
.friends-name {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}
.friends-profile-link { color: inherit; text-decoration: none; }
.friends-profile-link:hover, .friends-profile-link:focus-visible { color: var(--today, #8ed7ff); text-decoration: underline; }
.friends-name small {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted, #9aa4bf);
}
.friends-actions {
  display: flex;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.friends-pending {
  font-size: 0.82rem;
  color: var(--muted, #9aa4bf);
}
.friends-actions .danger {
  color: #ff9b9b;
}

/* Quelle: tower-defense.css */
/* Mind Defense (Tower Defense) – Premium-Game-Layout im BTD6-Stil.
   Aufbau: geschlossener Spielrahmen (.tdx-frame) mit Topbar-HUD, Spielfeld-
   Bühne (.tdx-stage, Phaser-Canvas) und Turm-Dock rechts. Rangliste + Legende
   liegen unterhalb des Rahmens. Das Markup lebt in js/views/games.js, die
   Engine in js/tower-defense.js. */

.game-shell.td-shell {
  --tdx-gold: #ffc94d;
  --tdx-gold-soft: #ffdf9b;
  --tdx-green: #46e08c;
  --tdx-red: #ff5c7a;
  --tdx-blue: #8ab4ff;
  --tdx-ink: #060a14;
  --tdx-panel: linear-gradient(180deg, #17233f, #0d1527);
  --tdx-panel-flat: #101a30;
  --tdx-line: rgba(148, 178, 240, .22);
  --tdx-line-strong: rgba(170, 198, 255, .38);
  display: block;
}

.game-shell.td-shell[hidden] { display: none; }

/* =========================================================================
   Spielrahmen: eine geschlossene "Konsole" mit Bezel, Glanzkante und Glow.
   ========================================================================= */
.tdx-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--tdx-line);
  overflow: hidden;
  background:
    radial-gradient(1100px 480px at 30% -14%, rgba(84, 134, 255, .18), transparent 60%),
    radial-gradient(800px 380px at 92% 0%, rgba(70, 224, 140, .08), transparent 55%),
    linear-gradient(180deg, #0c1426, #070c18);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 255, 255, .07);
}

/* =========================================================================
   Topbar-HUD: Ressourcen links, Wellen-Banner mittig, Fenster-Buttons rechts.
   ========================================================================= */
.tdx-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 178, 240, .16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 55%),
    rgba(6, 10, 20, .55);
}

.tdx-res-group {
  display: flex;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}

.tdx-res {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 4px 14px 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--tdx-line);
  background: linear-gradient(180deg, rgba(20, 31, 58, .95), rgba(9, 15, 30, .95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .3);
}

.tdx-res[hidden] { display: none; }

.tdx-res-ico {
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}

.tdx-res strong {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .55);
}

/* CSS-Goldmünze statt 🪙-Emoji (U+1FA99 fehlt in Windows 10 / Segoe UI Emoji). */
.tdx-coin {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  vertical-align: -2px;
  background:
    radial-gradient(circle at 35% 28%, #fff3c4, #ffd056 48%, #e09a1e 78%, #a86c0c);
  box-shadow:
    inset 0 -2px 3px rgba(122, 77, 10, .75),
    inset 0 1px 2px rgba(255, 255, 255, .75),
    0 0 0 1.5px rgba(122, 77, 10, .55),
    0 1px 3px rgba(0, 0, 0, .5);
}

.tdx-coin-sm { width: 12px; height: 12px; vertical-align: -1px; }

.tdx-res-hp { border-color: rgba(255, 92, 122, .42); }
.tdx-res-hp strong { color: #ff8ba1; }
.tdx-res-dp { border-color: rgba(255, 201, 77, .42); }
.tdx-res-dp strong { color: var(--tdx-gold); }
.tdx-res-streak { border-color: rgba(255, 147, 94, .42); }
.tdx-res-streak strong { color: #ffab7a; }

.tdx-wave {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
  min-width: 130px;
  padding: 3px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 201, 77, .3);
  background: linear-gradient(180deg, rgba(64, 48, 15, .55), rgba(30, 23, 10, .55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}

.tdx-wave-label {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 223, 155, .75);
}

.tdx-wave-num {
  font-size: 19px;
  font-weight: 900;
  color: var(--tdx-gold-soft);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

.tdx-wave-level {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(223, 231, 255, .6);
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tdx-topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 1 1 0;
  min-width: 0;
}

.tdx-player {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 170px;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
}

.tdx-icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  color: #dfe7ff;
  border-radius: 11px;
  border: 1px solid var(--tdx-line);
  background: linear-gradient(180deg, rgba(38, 52, 88, .9), rgba(16, 24, 45, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 10px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: transform .1s ease, border-color .12s ease, filter .12s ease;
}

.tdx-icon-btn:hover { border-color: var(--tdx-line-strong); filter: brightness(1.12); }
.tdx-icon-btn:active { transform: translateY(1px); }
.tdx-icon-btn.is-open,
.tdx-icon-btn.is-paused {
  border-color: rgba(255, 201, 77, .6);
  color: var(--tdx-gold);
  box-shadow: 0 0 0 1px rgba(255, 201, 77, .35) inset, 0 4px 10px rgba(0, 0, 0, .3);
}

/* =========================================================================
   Settings-Flyout (Zahnrad in der Topbar)
   ========================================================================= */
.tdx-settings[hidden] { display: none; }

.tdx-settings {
  position: absolute;
  top: 60px;
  right: 12px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 230px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--tdx-line-strong);
  background: linear-gradient(180deg, rgba(22, 33, 60, .97), rgba(10, 16, 32, .97));
  box-shadow: 0 24px 56px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: tdxPopIn .16s ease;
}

@keyframes tdxPopIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.tdx-settings-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(223, 231, 255, .6);
}

.tdx-settings button {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--tdx-line);
  background: rgba(255, 255, 255, .06);
  color: var(--text, #eef2ff);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s ease, filter .12s ease;
}

.tdx-settings button:hover { border-color: var(--tdx-line-strong); filter: brightness(1.12); }

.tdx-settings .tdx-danger {
  border-color: rgba(255, 92, 122, .45);
  background: linear-gradient(180deg, rgba(88, 30, 52, .8), rgba(52, 20, 38, .8));
  color: #ffb9c8;
}

.tdx-volume {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(223, 231, 255, .75);
  border: 1px solid var(--tdx-line);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, .04);
}

/* =========================================================================
   Hauptbereich: Bühne (Canvas) + Turm-Dock rechts, nahtlos verbunden.
   ========================================================================= */
.tdx-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
}

/* Bühne: 4:3 wie das Phaser-Board (640x480). Overlays + Buttons liegen drauf. */
.board-wrap.td-wrap.tdx-stage {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #060b15;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55);
}

.td-game-mount {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 50% 40%, rgba(38, 58, 105, .35), transparent 70%),
    #060b15;
}

/* Zentrierung über inset+margin:auto. Phaser (FIT/CENTER_BOTH) setzt eigene
   Inline-Margins zum Zentrieren – die addieren sich mit top:50%/translate und
   schieben das Canvas aus der Mitte, sobald die Bühne nicht exakt 4:3 ist
   (z. B. Fullscreen). margin:auto !important neutralisiert das. */
.td-wrap canvas {
  position: absolute;
  inset: 0;
  margin: auto !important;
  touch-action: none;
  cursor: crosshair;
}

/* Vignette über dem Spielfeld – nimmt dem Canvas die Flachheit. */
.tdx-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(120% 100% at 50% 45%, transparent 62%, rgba(3, 6, 12, .4)),
    linear-gradient(180deg, rgba(3, 6, 12, .22), transparent 12%);
}

/* Boss-HP-Leiste: groß, oben mittig über dem Spielfeld (BTD6-Bossfight-Look).
   Der Boss bekommt dafür keinen Mini-Balken am Sprite. */
.tdx-bossbar[hidden] { display: none; }

.tdx-bossbar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  width: min(430px, 62%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  animation: tdxPopIn .2s ease;
}

.tdx-bossbar-name {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #ffb9c8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .85), 0 0 18px rgba(255, 92, 122, .5);
}

.tdx-bossbar-track {
  display: block;
  width: 100%;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 92, 122, .6);
  background: rgba(6, 10, 20, .78);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 1px 3px rgba(0, 0, 0, .6);
}

.tdx-bossbar-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8ba1, #d92b52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: width .15s linear;
}

/* Enrage-Phase (unter 50 % HP): Leiste glüht und pulsiert. */
.tdx-bossbar-fill.is-enraged {
  background: linear-gradient(180deg, #ffb36b, #e0331f);
  animation: tdxEnrage .5s ease-in-out infinite;
}

@keyframes tdxEnrage {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}

/* Fehlermeldungen ("Nicht genug Discipline") als Toast über dem Feld. */
.tdx-toast[hidden] { display: none; }

.tdx-toast {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .5);
  background: rgba(10, 14, 26, .92);
  color: var(--tdx-gold-soft);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
  pointer-events: none;
}

.tdx-toast.show { animation: tdxToast 1.4s ease forwards; }

@keyframes tdxToast {
  0% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  12%, 78% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

/* =========================================================================
   Hero ("Dein Bro"): Ability-Buttons unten links, Panel im Dock, Menü-Wahl.
   ========================================================================= */
.tdx-abilities[hidden] { display: none; }

.tdx-abilities {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.tdx-ability {
  position: relative;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 201, 77, .55);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #33456f, #17203a);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), 0 3px 0 rgba(9, 14, 28, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .1s ease, filter .12s ease;
}

.tdx-ability:hover:not(:disabled) { filter: brightness(1.12); }
.tdx-ability:active:not(:disabled) { transform: translateY(1px); }

/* Cooldown-Ring: läuft per conic-gradient ab (--cd = Restzeit in %). */
.tdx-ability::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(rgba(4, 8, 16, .78) calc(var(--cd, 0) * 1%), transparent 0);
  pointer-events: none;
}

.tdx-ability.is-ready {
  animation: tdxAbilityPulse 2s ease-in-out infinite;
  border-color: rgba(255, 226, 122, .95);
}

@keyframes tdxAbilityPulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(255, 201, 77, .25), 0 3px 0 rgba(9, 14, 28, .9), inset 0 1px 0 rgba(255, 255, 255, .2); }
  50% { box-shadow: 0 8px 26px rgba(255, 201, 77, .6), 0 3px 0 rgba(9, 14, 28, .9), inset 0 1px 0 rgba(255, 255, 255, .2); }
}

.tdx-ability.is-locked {
  cursor: not-allowed;
  filter: grayscale(.85) brightness(.6);
}

.tdx-ability:disabled:not(.is-locked) { cursor: default; }

.tdx-ability.is-paused {
  filter: saturate(.72) brightness(.82);
}

.tdx-ability-key {
  position: absolute;
  left: -3px;
  top: -5px;
  z-index: 2;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .7);
  background: linear-gradient(180deg, #fff2b8, #f6c177);
  color: #1b1407;
  font-size: 11px;
  font-weight: 1000;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
  pointer-events: none;
}

.tdx-ability-ico {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 23px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}

.tdx-ability-ico img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.tdx-ability-sub {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-size: 9px;
  font-weight: 900;
  color: var(--tdx-gold-soft);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  pointer-events: none;
}

/* Hero-Panel im Dock */
.tdx-hero-panel[hidden] { display: none; }

.tdx-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tdx-hero-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 154, 60, .45);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 154, 60, .12), transparent 60%),
    linear-gradient(180deg, #1c2a4c, #0f1830);
  color: #f2f6ff;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .28);
  transition: transform .1s ease, border-color .12s ease, box-shadow .12s ease;
}

.tdx-hero-card:hover { transform: translateY(-1px); border-color: rgba(255, 180, 100, .7); }

.tdx-hero-card.is-armed {
  border-color: rgba(255, 201, 77, .85);
  box-shadow: 0 0 0 1px rgba(255, 201, 77, .5) inset, 0 0 20px rgba(255, 201, 77, .25);
}

.tdx-hero-card .tdx-hero-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 24px;
  border-radius: 10px;
  background: rgba(6, 10, 20, .5);
  border: 1px solid var(--tdx-line);
  overflow: hidden;
}

.tdx-hero-card .tdx-hero-ico img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
}

.tdx-hero-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tdx-hero-name { font-weight: 900; font-size: 12.5px; }
.tdx-hero-status { font-size: 10.5px; color: rgba(223, 231, 255, .65); }

.tdx-hero-lv {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .45);
  background: rgba(6, 10, 20, .5);
  color: var(--tdx-gold);
  font-size: 11px;
  font-weight: 900;
}

.tdx-hero-detail[hidden] { display: none; }

.tdx-hero-xp {
  display: grid;
  gap: 5px;
}

.tdx-hero-xp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(223, 231, 255, .62);
  font-size: 10.5px;
  font-weight: 800;
}

.tdx-hero-xp-top strong {
  color: var(--tdx-gold-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tdx-hero-xp-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .25);
  background: rgba(6, 10, 20, .55);
}

.tdx-hero-xp-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff9a3c, #ffd662);
  box-shadow: 0 0 12px rgba(255, 201, 77, .28);
}

.tdx-hero-detail-abilities {
  display: grid;
  gap: 6px;
}

.tdx-hero-detail-ability {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148, 178, 240, .18);
  background: rgba(6, 10, 20, .32);
  color: rgba(223, 231, 255, .68);
  font-size: 11px;
  font-weight: 800;
}

.tdx-hero-detail-ability img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tdx-hero-detail-ability b {
  color: rgba(223, 231, 255, .48);
  font-size: 10px;
}

.tdx-hero-detail-ability.is-ready {
  border-color: rgba(70, 224, 140, .32);
  color: #eafdf3;
}

.tdx-hero-level-btn {
  width: 100%;
}

/* Hero-Wahl im Startmenü */
.td-menu-heroes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.td-menu-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--tdx-line);
  background: linear-gradient(180deg, #182647, #0e1730);
  color: var(--text, #eef2ff);
  cursor: pointer;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 6px 14px rgba(0, 0, 0, .3);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.td-menu-hero:hover { transform: translateY(-3px); border-color: var(--tdx-line-strong); }

.td-menu-hero.is-active {
  border-color: rgba(255, 201, 77, .8);
  box-shadow: 0 0 0 1px rgba(255, 201, 77, .5) inset, 0 0 24px rgba(255, 201, 77, .22), 0 8px 18px rgba(0, 0, 0, .34);
}

.td-menu-hero .tdx-hero-ico {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 30px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
}

.td-menu-hero .tdx-hero-ico img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  display: block;
}

.td-menu-hero .lvl-meta { max-width: 26ch; }

/* Kompakter Kit-Hinweis auf der Menü-Karte (Details im Kompendium) */
.tdx-kit-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .35);
  background: rgba(6, 10, 20, .5);
  color: var(--tdx-gold-soft);
}

.tdx-kit-mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.tdx-kit-mini-chip img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55));
}

/* Hero-Kit: Passiv + Abilities mit Unlock-Level & Cooldown (Menü + Kompendium) */
.tdx-hero-kit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 178, 240, .3);
  text-align: left;
}

.tdx-kit-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  grid-template-areas: "ico name badge" "ico desc desc";
  align-items: center;
  column-gap: 7px;
  row-gap: 1px;
}

.tdx-kit-row i {
  grid-area: ico;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-style: normal;
  font-size: 16px;
  text-align: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
}

.tdx-kit-row i img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.tdx-kit-row em {
  grid-area: name;
  font-style: normal;
  font-weight: 900;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tdx-kit-row b {
  grid-area: badge;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .4);
  background: rgba(6, 10, 20, .5);
  color: var(--tdx-gold-soft);
  white-space: nowrap;
}

.tdx-kit-desc {
  grid-area: desc;
  font-size: 10px;
  line-height: 1.35;
  color: rgba(223, 231, 255, .62);
}

/* Kompendium-Overlay: Tabs + scrollende Steckbrief-Liste */
.tdx-comp-overlay { z-index: 30; }

/* Doppelte Klasse: muss die späteren .td-menu-card-Regeln (center) schlagen. */
.td-menu-card.tdx-comp-card {
  max-width: 620px;
  text-align: left;
  align-items: stretch;
}

.tdx-comp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.tdx-comp-tabs {
  align-self: center;
}

.tdx-comp-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.tdx-comp-item {
  /* Steckbriefe nutzen die Selection-Panel-Optik, aber neutraler Rahmen */
  border-color: var(--tdx-line);
}

/* Wellen-Vorschau: was als Nächstes kommt, über dem Start-Button. */
.tdx-nextwave[hidden] { display: none; }

.tdx-nextwave {
  position: absolute;
  right: 14px;
  bottom: 104px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  max-width: 300px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 178, 240, .3);
  background: rgba(6, 10, 20, .82);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .07);
  pointer-events: none;
}

.tdx-nw-label {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tdx-gold-soft);
}

.tdx-nw-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 8px;
}

.tdx-nw-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(223, 231, 255, .8);
  font-variant-numeric: tabular-nums;
}

.tdx-nw-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}

.tdx-nw-item.is-boss { color: #ff8ba1; }
.tdx-nw-item.is-boss img { width: 28px; height: 28px; }

/* =========================================================================
   Start-Welle + Speed: große runde Buttons unten rechts auf dem Spielfeld.
   ========================================================================= */
.tdx-actions {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.tdx-start {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 88px;
  height: 88px;
  padding: 0;
  border-radius: 50%;
  border: 4px solid rgba(202, 255, 221, .62);
  background:
    radial-gradient(circle at 50% 21%, rgba(255, 255, 255, .52), rgba(255, 255, 255, 0) 38%),
    radial-gradient(circle at 50% 64%, rgba(104, 255, 164, .35), rgba(104, 255, 164, 0) 58%),
    linear-gradient(180deg, #67e99a 0%, #28b965 54%, #14763f 100%);
  color: #04220f;
  cursor: pointer;
  box-shadow:
    0 16px 32px rgba(46, 204, 113, .38),
    0 6px 0 rgba(7, 64, 31, .95),
    0 0 0 2px rgba(13, 36, 20, .7),
    inset 0 2px 0 rgba(255, 255, 255, .5),
    inset 0 -8px 16px rgba(8, 62, 33, .28);
  transition: transform .1s ease, filter .12s ease, box-shadow .12s ease;
  animation: tdxStartPulse 2.4s ease-in-out infinite;
}

.tdx-start::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .12));
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, .18), inset 0 -5px 10px rgba(0, 0, 0, .22);
  pointer-events: none;
}

@keyframes tdxStartPulse {
  0%, 100% { box-shadow: 0 16px 32px rgba(46, 204, 113, .34), 0 6px 0 rgba(7, 64, 31, .95), 0 0 0 2px rgba(13, 36, 20, .7), inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -8px 16px rgba(8, 62, 33, .28); }
  50% { box-shadow: 0 16px 44px rgba(46, 204, 113, .68), 0 6px 0 rgba(7, 64, 31, .95), 0 0 0 2px rgba(13, 36, 20, .7), inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -8px 16px rgba(8, 62, 33, .28); }
}

.tdx-start:hover:not(:disabled) { transform: translateY(-2px) scale(1.04); filter: brightness(1.08); }
.tdx-start:active:not(:disabled) { transform: translateY(1px) scale(.98); }

.tdx-start:disabled {
  cursor: default;
  animation: none;
  filter: saturate(.35) brightness(.75);
  box-shadow: 0 9px 22px rgba(0, 0, 0, .35), 0 4px 0 rgba(20, 30, 25, .9), inset 0 2px 0 rgba(255, 255, 255, .18);
}

.tdx-start.is-running {
  filter: none;
  border-color: rgba(255, 214, 130, .55);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, #f4c05c, #d88924 54%, #8f5010);
  color: #2b1802;
}

.tdx-start-ico {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 2px 5px rgba(0, 0, 0, .22);
  font-size: 23px;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .32);
}

.tdx-start-label {
  position: relative;
  z-index: 1;
  max-width: 64px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .24);
}

.tdx-speed {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--tdx-line-strong);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #33456f, #17203a);
  color: #eef2ff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), 0 3px 0 rgba(9, 14, 28, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .1s ease, filter .12s ease;
}

.tdx-speed:hover { filter: brightness(1.12); }
.tdx-speed:active { transform: translateY(1px); }

.tdx-speed.is-fast {
  border-color: rgba(255, 201, 77, .6);
  color: var(--tdx-gold);
}

/* =========================================================================
   Turm-Dock rechts: Shop-Kacheln + Auswahl/Upgrade-Panel.
   ========================================================================= */
.tdx-dock {
  position: relative;
  min-width: 0;
  border-left: 1px solid rgba(148, 178, 240, .16);
  background:
    linear-gradient(180deg, rgba(23, 34, 62, .92), rgba(11, 17, 33, .95));
}

.tdx-dock-inner {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  scrollbar-width: thin;
}

.tdx-dock-head {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tdx-gold-soft);
  text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

.tdx-shop {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tdx-shop-hint {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(223, 231, 255, .55);
  min-height: 15px;
}

.td-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* BTD6-artige Turm-Kachel: Portrait groß, Name klein, Kosten als Gold-Plakette. */
.td-shop-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 7px;
  border-radius: 12px;
  border: 1px solid var(--tdx-line);
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(255, 255, 255, .09), transparent 60%),
    linear-gradient(180deg, #1c2a4c, #0f1830);
  color: #f2f6ff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .28);
  transition: transform .1s ease, border-color .12s ease, box-shadow .12s ease, filter .12s ease;
}

.td-shop-btn:hover {
  border-color: var(--tdx-line-strong);
  filter: brightness(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 10px 20px rgba(0, 0, 0, .36);
}

.td-shop-btn.is-active {
  border-color: rgba(255, 201, 77, .75);
  box-shadow:
    0 0 0 1px rgba(255, 201, 77, .45) inset,
    0 0 22px rgba(255, 201, 77, .22),
    0 6px 14px rgba(0, 0, 0, .34);
  transform: translateY(-1px);
}

.td-shop-btn.is-disabled {
  cursor: not-allowed;
  filter: grayscale(.75) brightness(.62);
}

/* Hotkey-Plakette (Q-Z) oben links auf der Turm-Kachel, wie bei den Abilities. */
.td-shop-key {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 2;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(10, 16, 32, .82);
  color: rgba(223, 231, 255, .82);
  font-size: 10px;
  font-weight: 1000;
  pointer-events: none;
}

.td-shop-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}

.td-shop-icon img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45));
}

.td-shop-name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

.td-shop-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .45);
  background: linear-gradient(180deg, rgba(78, 56, 14, .9), rgba(46, 33, 9, .9));
  color: var(--tdx-gold);
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

/* ---- Auswahl / Upgrades (BTD6-Stil) ---- */
.td-selection[hidden] { display: none; }

.td-selection {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 201, 77, .32);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(255, 201, 77, .1), transparent 60%),
    linear-gradient(180deg, #22304f, #101a30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 20px rgba(0, 0, 0, .3);
}

/* Kopf: großes Turm-Portrait + Name + Tier-Pips */
.tdx-sel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tdx-sel-portrait {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 201, 77, .4);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #1c2a4c, #0c1428);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 10px rgba(0, 0, 0, .35);
}

.tdx-sel-portrait img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .5));
}

.tdx-sel-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tdx-sel-name {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tdx-sel-tier {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 800;
  color: rgba(223, 231, 255, .6);
}

/* Momentum-Bonus: abschmelzender Chip links neben dem Start-Button */
.tdx-momentum[hidden] { display: none; }

.tdx-momentum {
  position: absolute;
  right: 162px;
  bottom: 30px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 223, 155, .65);
  background: rgba(6, 10, 20, .88);
  color: var(--tdx-gold-soft);
  font-size: 12.5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
  animation: tdxMomentumPulse 1s ease-in-out infinite;
}

@keyframes tdxMomentumPulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(255, 201, 77, .15); }
  50% { box-shadow: 0 8px 26px rgba(255, 201, 77, .5); }
}

/* ---- Kauf-Vorschau (Shop-Info): Stats + Ausbau-Pfade vor dem Kauf ---- */
.tdx-shop-info { border-color: rgba(148, 178, 240, .4); }

.tdx-shop-info-syn,
.tdx-stat-chip.tdx-stat-syn {
  color: #9adfff;
}

.tdx-shop-info-syn {
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}

.tdx-stat-chip.tdx-stat-syn { border-color: rgba(122, 215, 255, .4); }

.tdx-shop-info-desc {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(223, 231, 255, .68);
}

.tdx-upg-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 178, 240, .3);
}

.tdx-upg-preview-label {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tdx-gold-soft);
}

.tdx-upg-preview-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: rgba(223, 231, 255, .85);
}

.tdx-upg-preview-row img,
.tdx-upg-preview-emoji {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  object-fit: contain;
  display: grid;
  place-items: center;
  font-size: 14px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4));
}

.tdx-upg-preview-row b {
  flex: none;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid rgba(148, 178, 240, .4);
  background: rgba(6, 10, 20, .55);
  font-size: 8.5px;
  font-weight: 900;
  color: rgba(223, 231, 255, .7);
}

.tdx-upg-preview-row em {
  font-style: normal;
  font-weight: 800;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tdx-upg-preview-cost {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--tdx-gold);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* Tier-Pips: 3 Ausbau-Stufen wie BTD6-Upgrade-Kästchen */
.tdx-pips {
  display: inline-flex;
  gap: 3px;
}

.tdx-pips i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(148, 178, 240, .4);
  background: rgba(6, 10, 20, .6);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}

.tdx-pips i.on {
  border-color: rgba(255, 223, 155, .9);
  background: linear-gradient(180deg, #ffdf9b, #e09a1e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 8px rgba(255, 201, 77, .45);
}

/* Stat-Chips statt Textwurst */
.tdx-sel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tdx-stat-chip {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 178, 240, .24);
  background: rgba(6, 10, 20, .55);
  font-size: 10px;
  font-weight: 800;
  color: rgba(223, 231, 255, .78);
  white-space: nowrap;
}

.tdx-stat-chip.tdx-stat-run {
  border-color: rgba(255, 201, 77, .32);
  background: rgba(55, 42, 18, .48);
  color: #fff1b8;
  font-variant-numeric: tabular-nums;
}

/* Targeting-Priorität (nur Schadens-Türme): zyklischer Umschalter */
.tdx-target-btn[hidden] { display: none; }

.tdx-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.tdx-target-btn {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 178, 240, .35);
  background: linear-gradient(180deg, rgba(38, 52, 88, .85), rgba(16, 24, 45, .85));
  color: rgba(223, 231, 255, .85);
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, filter .12s ease;
}

.tdx-target-btn strong { color: #fff; font-weight: 900; }
.tdx-target-btn:hover { border-color: var(--tdx-line-strong); filter: brightness(1.12); }

.tdx-camo-target-btn {
  min-width: 52px;
  min-height: 38px;
  padding: 4px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 12px;
  font-size: 10px;
  line-height: 1;
}

.tdx-camo-icon {
  font-size: 15px;
  line-height: 1;
}

.tdx-camo-target-btn strong {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0;
}

.tdx-target-btn.tdx-camo-target-btn.is-active {
  border-color: rgba(201, 168, 255, .95);
  background: linear-gradient(180deg, rgba(113, 73, 188, .96), rgba(62, 39, 119, .96));
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(232, 218, 255, .26) inset, 0 0 16px rgba(201, 168, 255, .32);
}

.tdx-target-btn.is-active {
  border-color: rgba(138, 180, 255, .72);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(138, 180, 255, .35) inset, 0 0 14px rgba(138, 180, 255, .18);
}

.td-upgrade-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Upgrade-Karte: Icon-Kachel links, Pfad-Badge + Name + Beschreibung,
   Gold-Preis rechts. Grün = kaufbar, grau = zu teuer. */
.td-upgrade-btn {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-areas:
    "ico text";
  align-items: center;
  gap: 0 9px;
  min-height: 92px;
  padding: 9px 8px 31px;
  border-radius: 11px;
  border: 1px solid rgba(110, 226, 155, .4);
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(140, 240, 178, .12), transparent 60%),
    linear-gradient(180deg, #2a6844, #16402c);
  color: #eafff2;
  cursor: pointer;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 3px 0 rgba(7, 34, 21, .9),
    0 6px 14px rgba(0, 0, 0, .3);
  transition: transform .1s ease, border-color .12s ease, filter .12s ease, box-shadow .12s ease;
}

.td-upgrade-btn:hover:not(.is-disabled) {
  border-color: rgba(160, 250, 195, .7);
  filter: brightness(1.1);
}

.td-upgrade-btn:active:not(.is-disabled) {
  transform: translateY(1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 0 rgba(7, 34, 21, .9);
}

.td-upgrade-btn.is-disabled {
  cursor: not-allowed;
  border-color: rgba(128, 143, 170, .26);
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(140, 155, 178, .08), transparent 62%),
    linear-gradient(180deg, rgba(42, 50, 66, .92), rgba(20, 26, 38, .94));
  color: rgba(203, 213, 232, .48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 2px 0 rgba(4, 8, 16, .75),
    0 5px 10px rgba(0, 0, 0, .2);
  filter: grayscale(.42) saturate(.42) brightness(.78);
}

.td-upgrade-btn.is-disabled .td-upg-ico {
  border-color: rgba(163, 174, 196, .2);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #576174, #2e3749);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 4px rgba(0, 0, 0, .25);
  opacity: .72;
}

.td-upgrade-btn.is-disabled .td-upg-desc,
.td-upgrade-btn.is-disabled .td-upg-path {
  color: rgba(203, 213, 232, .38);
}

.td-upgrade-btn.is-disabled .td-upg-cost {
  border-color: rgba(255, 92, 122, .42);
  background: rgba(62, 22, 34, .62);
  color: #ff9aaa;
}

.td-upgrade-btn .td-upg-ico {
  grid-area: ico;
  align-self: center;
  justify-self: center;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 21px;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid rgba(198, 255, 222, .4);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, #3ecf7d, #1d8a4f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 6px rgba(0, 0, 0, .3);
  text-shadow: 0 2px 3px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.td-upgrade-btn .td-upg-ico img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4));
}

.td-upgrade-btn .td-upg-text {
  grid-area: text;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.td-upgrade-btn .td-upg-path {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(198, 255, 222, .65);
}

.td-upgrade-btn .td-upg-name { font-weight: 900; font-size: 12.5px; line-height: 1.05; }
.td-upgrade-btn .td-upg-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 10.5px;
  line-height: 1.15;
  color: rgba(234, 255, 242, .68);
}

.td-upgrade-btn .td-upg-cost {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 77, .45);
  background: rgba(6, 10, 20, .5);
  color: var(--tdx-gold);
  font-weight: 900;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tdx-sel-max {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 201, 77, .45);
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--tdx-gold-soft);
  background: rgba(255, 201, 77, .07);
}

.td-sell-btn {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 92, 122, .42);
  background: linear-gradient(180deg, rgba(88, 30, 52, .8), rgba(52, 20, 38, .8));
  color: #ffb9c8;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  transition: filter .12s ease;
}

.td-sell-btn:hover { filter: brightness(1.15); }

/* =========================================================================
   Overlays: Menü, Perk-Karten, Game Over – alle über der Bühne.
   ========================================================================= */
.td-menu-overlay[hidden],
.td-perk-overlay[hidden],
.td-gameover-overlay[hidden] {
  display: none;
}

.td-menu-overlay,
.td-perk-overlay,
.td-gameover-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background:
    radial-gradient(120% 90% at 50% -12%, rgba(80, 130, 255, .26), transparent 58%),
    linear-gradient(180deg, rgba(6, 10, 20, .78), rgba(6, 10, 20, .92));
  backdrop-filter: blur(4px);
}

.td-menu-card,
.td-perk-card-wrap,
.td-gameover-card {
  width: 100%;
  max-width: 500px;
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 22px;
  border-radius: 20px;
  border: 1px solid var(--tdx-line-strong);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(96, 140, 255, .14), transparent 55%),
    linear-gradient(180deg, rgba(16, 25, 47, .96), rgba(8, 13, 26, .96));
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .09);
  animation: tdMenuIn .32s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes tdMenuIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.td-menu-logo { display: flex; flex-direction: column; gap: 5px; }

.td-menu-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--tdx-gold);
  text-shadow: 0 0 18px rgba(255, 201, 77, .45);
}

.td-menu-title {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.015em;
  background: linear-gradient(180deg, #ffffff 8%, #a8c4ff 55%, #5e86ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 28px rgba(80, 130, 255, .4));
}

.td-menu-tag {
  color: rgba(223, 231, 255, .66);
  font-size: 13px;
  max-width: 32ch;
  margin: 0 auto;
}

.td-menu-section-label {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(223, 231, 255, .5);
}

/* Level-Karten mit Map-Vorschau (Thumbnail wird in buildLevelSelect gesetzt). */
.td-menu-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.td-menu-level {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 8px;
  border-radius: 14px;
  border: 1px solid var(--tdx-line);
  background: linear-gradient(180deg, #182647, #0e1730);
  color: var(--text, #eef2ff);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 6px 14px rgba(0, 0, 0, .3);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.td-menu-level:hover { transform: translateY(-3px); border-color: var(--tdx-line-strong); }

.td-menu-level.is-active {
  border-color: rgba(255, 201, 77, .8);
  box-shadow:
    0 0 0 1px rgba(255, 201, 77, .5) inset,
    0 0 26px rgba(255, 201, 77, .25),
    0 8px 18px rgba(0, 0, 0, .34);
}

.td-menu-level.is-locked { cursor: not-allowed; }
.td-menu-level.is-locked .lvl-thumb { filter: grayscale(1) brightness(.42); }
.td-menu-level.is-locked .lvl-name,
.td-menu-level.is-locked .lvl-meta { opacity: .55; }

.td-menu-level .lvl-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(148, 178, 240, .2);
  margin-bottom: 7px;
  display: grid;
  place-items: center;
}

.td-menu-level .lvl-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, .1), transparent 40%, rgba(6, 10, 20, .45));
}

.td-menu-level .lvl-lock {
  position: relative;
  z-index: 1;
  font-size: 22px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .7));
}

.td-menu-level .lvl-name { font-weight: 900; font-size: 12.5px; }
.td-menu-level .lvl-meta { font-size: 10.5px; color: rgba(223, 231, 255, .58); }

.td-admin-progress[hidden] { display: none; }

.td-admin-progress {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 0 2px;
  border-top: 1px solid rgba(148, 178, 240, .18);
}

.td-admin-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(223, 231, 255, .68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.td-admin-progress-head strong {
  color: var(--tdx-gold-soft);
  font-size: 11px;
  white-space: nowrap;
}

.td-admin-progress-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.td-admin-progress-actions button {
  min-width: 0;
  padding: 8px 7px;
  border-radius: 10px;
  border: 1px solid rgba(255, 201, 77, .28);
  background: rgba(6, 10, 20, .45);
  color: rgba(255, 223, 155, .9);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.td-admin-progress-actions button:hover {
  border-color: rgba(255, 201, 77, .58);
  background: rgba(255, 201, 77, .1);
}

.td-admin-progress-note {
  color: rgba(223, 231, 255, .55);
  font-size: 11px;
  min-height: 14px;
}

/* Schwierigkeit als Segmented Control */
.td-menu-diff {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--tdx-line);
  background: rgba(6, 10, 20, .6);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35);
}

.td-menu-diff button {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(223, 231, 255, .6);
  font-weight: 900;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.td-menu-diff button.is-active {
  background: linear-gradient(180deg, #6f96ff, #4a6ee0);
  border-color: rgba(200, 218, 255, .5);
  color: #061027;
  box-shadow: 0 6px 16px rgba(80, 130, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.td-menu-diff-desc {
  font-size: 12px;
  color: rgba(223, 231, 255, .6);
  min-height: 16px;
}

.td-menu-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.td-menu-play {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 14px 38px;
  border-radius: 999px;
  border: 2px solid rgba(198, 255, 222, .55) !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #3ecf7d, #1d8a4f) !important;
  color: #04220f !important;
  box-shadow:
    0 12px 30px rgba(46, 204, 113, .4),
    0 4px 0 rgba(9, 63, 34, .9),
    inset 0 2px 0 rgba(255, 255, 255, .35);
  animation: tdPlayPulse 2.2s ease-in-out infinite;
  transition: transform .1s ease, filter .12s ease;
}

.td-menu-play:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.07); }
.td-menu-play:active { transform: translateY(1px); }

@keyframes tdPlayPulse {
  0%, 100% { box-shadow: 0 12px 26px rgba(46, 204, 113, .32), 0 4px 0 rgba(9, 63, 34, .9), inset 0 2px 0 rgba(255, 255, 255, .35); }
  50% { box-shadow: 0 12px 40px rgba(46, 204, 113, .62), 0 4px 0 rgba(9, 63, 34, .9), inset 0 2px 0 rgba(255, 255, 255, .35); }
}

.td-menu-help[hidden] { display: none; }

.td-menu-help {
  text-align: left;
  border: 1px solid var(--tdx-line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 12.5px;
  background: rgba(6, 10, 20, .55);
  color: var(--text, #eef2ff);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 430px;
}

.td-menu-help p { margin: 0; line-height: 1.55; }
.td-menu-help strong { color: var(--tdx-blue); }
.td-menu-help em { color: var(--tdx-gold); font-style: normal; font-weight: 800; }

/* ---- Perk-Karten ---- */
.td-perk-title { font-size: 22px; font-weight: 900; }

.td-perk-subtitle {
  color: rgba(223, 231, 255, .62);
  font-size: 13px;
}

.td-perk-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 560px) {
  .td-perk-cards { grid-template-columns: 1fr; }
}

.td-perk-card {
  background: linear-gradient(180deg, #1c2a4c, #0f1830);
  border: 1px solid var(--tdx-line);
  border-radius: 16px;
  padding: 14px 12px;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  color: var(--text, #eef2ff);
}

.td-perk-card:hover,
.td-perk-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 201, 77, .7);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 22px rgba(255, 201, 77, .18);
  outline: none;
}

.td-perk-card .td-perk-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  font-size: 30px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
}

.td-perk-card .td-perk-icon img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  display: block;
}
.td-perk-card .td-perk-name { font-weight: 900; }
.td-perk-card .td-perk-desc { font-size: 12px; color: rgba(223, 231, 255, .6); }
.td-perk-card.is-curse { border-color: rgba(255, 92, 122, .55); }

/* ---- Game Over ---- */
.td-gameover-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--tdx-red);
  text-shadow: 0 6px 26px rgba(255, 92, 122, .35);
}

.td-gameover-info {
  color: rgba(223, 231, 255, .7);
  font-size: 13.5px;
}

/* ---- Run-Zusammenfassung im Game-Over-Overlay ---- */
.tdx-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.tdx-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.tdx-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--tdx-line);
  background: rgba(6, 10, 20, .5);
}

.tdx-summary-cell span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(223, 231, 255, .55);
}

.tdx-summary-cell strong {
  font-size: 15px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.tdx-summary-mvp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 201, 77, .4);
  background: rgba(255, 201, 77, .08);
  font-size: 12px;
}

.tdx-summary-mvp img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4));
}

.tdx-summary-mvp em {
  font-style: normal;
  font-weight: 900;
  color: var(--tdx-gold);
}

.tdx-summary-perks {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(223, 231, 255, .7);
}

.tdx-share-btn {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--tdx-line-strong);
  background: linear-gradient(180deg, rgba(38, 52, 88, .9), rgba(16, 24, 45, .9));
  color: #dfe7ff;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .12s ease, filter .12s ease;
}

.tdx-share-btn:hover { border-color: rgba(255, 201, 77, .55); filter: brightness(1.12); }

@media (max-width: 640px) {
  .tdx-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.td-gameover-actions {
  display: flex;
  gap: 9px;
  justify-content: center;
  flex-wrap: wrap;
}

.td-gameover-actions button[hidden] { display: none; }

.td-gameover-actions button {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
}

/* Endless-Modus: der Gold-Button nach dem Sieg */
.tdx-endless-btn {
  border: 2px solid rgba(255, 223, 155, .6) !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #e8a33c, #a56412) !important;
  color: #2b1802 !important;
  box-shadow: 0 10px 24px rgba(232, 163, 60, .4), 0 3px 0 rgba(90, 55, 8, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* =========================================================================
   Unter dem Rahmen: Rangliste + Urge-Legende.
   ========================================================================= */
.tdx-below {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.td-score-panel {
  align-content: start;
}

.td-score-panel .highscore-row {
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
}

.td-score-panel .highscore-row strong {
  white-space: nowrap;
}

.tdx-score-filters {
  display: grid;
  gap: 7px;
}

.tdx-sf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tdx-sf-row button {
  min-height: 30px;
  border: 1px solid rgba(148, 178, 240, .24);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(6, 10, 20, .38);
  color: rgba(223, 231, 255, .72);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.tdx-sf-row button:hover,
.tdx-sf-row button:focus-visible {
  border-color: rgba(122, 215, 255, .5);
  color: #fff;
  outline: none;
}

.tdx-sf-row button.is-active {
  border-color: rgba(255, 201, 77, .58);
  background: rgba(255, 201, 77, .12);
  color: var(--tdx-gold-soft);
}

.tdx-score-kills {
  justify-self: end;
  white-space: nowrap;
  border: 1px solid rgba(122, 215, 255, .3);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(122, 215, 255, .08);
  color: rgba(223, 231, 255, .74);
  font-size: 11px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.td-legend .item-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.td-legend .legend-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--tdx-line);
}

.td-legend-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
}

.td-legend-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4));
}

/* =========================================================================
   Fullscreen: Rahmen füllt den Screen, Rest verschwindet.
   ========================================================================= */
.game-shell.td-shell:fullscreen {
  display: flex;
  flex-direction: column;
  /* .game-shell setzt align-items:start – ohne stretch bleibt der Rahmen
     bei Inhaltsbreite statt den Screen zu füllen. */
  align-items: stretch;
  width: 100vw;
  height: 100vh;
  padding: 0;
  background: #05070d;
}

.game-shell.td-shell:fullscreen .tdx-frame {
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.game-shell.td-shell:fullscreen .tdx-main {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(216px, 18vw, 280px);
}

.game-shell.td-shell:fullscreen .board-wrap.td-wrap.tdx-stage {
  aspect-ratio: auto;
  height: 100%;
}

.game-shell.td-shell:fullscreen .tdx-below { display: none; }

.game-shell.td-shell:fullscreen .td-shop-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* =========================================================================
   Responsive: Dock rutscht unters Spielfeld, Topbar darf umbrechen.
   ========================================================================= */
@media (max-width: 900px) {
  .tdx-main {
    grid-template-columns: 1fr;
  }

  .tdx-dock {
    border-left: 0;
    border-top: 1px solid rgba(148, 178, 240, .16);
  }

  .tdx-dock-inner {
    position: static;
    inset: auto;
    overflow: visible;
  }

  .td-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tdx-below {
    grid-template-columns: 1fr;
  }

  .td-score-panel .highscore-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .td-score-panel .tdx-score-kills {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .tdx-topbar {
    flex-wrap: wrap;
    padding: 8px 10px;
  }

  .tdx-res-group { order: 1; flex: 1 1 auto; }
  .tdx-topbar-right { order: 2; flex: 0 0 auto; }
  .tdx-wave { order: 3; flex: 1 1 100%; flex-direction: row; gap: 8px; justify-content: center; padding: 6px 10px; }

  .tdx-player { display: none; }

  .tdx-res { min-height: 32px; padding: 3px 11px 3px 8px; }
  .tdx-res strong { font-size: 14px; }

  .td-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tdx-start { width: 70px; height: 70px; border-width: 3px; }
  .tdx-start::before { inset: 8px; }
  .tdx-start-ico { width: 27px; height: 27px; font-size: 18px; }
  .tdx-start-label { max-width: 52px; font-size: 9px; }
  .tdx-speed { width: 42px; height: 42px; }

  .td-menu-levels { grid-template-columns: 1fr; }
  .td-admin-progress-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-menu-heroes { grid-template-columns: 1fr; }
  .td-menu-level .lvl-thumb { aspect-ratio: 21 / 9; }
}

/* Quelle: birthday-surprise.css */
/* Vuongs Geburtstagswelt; außerhalb des Datums wird keine Klasse gesetzt. */
.birthday-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid color-mix(in srgb, #ff4fc8 68%, var(--line));
  border-radius: var(--radius-pill);
  color: #fff7cf;
  background:
    linear-gradient(120deg, rgba(255, 79, 200, .28), rgba(56, 189, 248, .2), rgba(250, 204, 21, .2)),
    rgba(14, 22, 40, .94);
  box-shadow: 0 0 22px rgba(255, 79, 200, .25), 0 10px 26px rgba(56, 189, 248, .14);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.birthday-tracker-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 17px 18px;
  border: 1px solid color-mix(in srgb, #ff4fc8 62%, var(--line));
  border-radius: var(--control-radius);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 20%, rgba(250, 204, 21, .24), transparent 28%),
    linear-gradient(115deg, rgba(255, 79, 200, .2), rgba(139, 92, 246, .16), rgba(56, 189, 248, .17)),
    rgba(255, 255, 255, .045);
  box-shadow: 0 0 30px rgba(255, 79, 200, .12), 0 16px 38px rgba(0, 0, 0, .18);
}

.birthday-tracker-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: rgba(251, 191, 36, .16);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .2) inset;
  font-size: 27px;
}

.birthday-tracker-kicker {
  margin-bottom: 3px;
  color: #fbbf24;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.birthday-tracker-shine {
  position: absolute;
  inset: -80% auto -80% -25%;
  width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .42), transparent);
  transform: rotate(18deg);
  animation: birthday-card-shine 4.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes birthday-card-shine {
  0%, 55% { left: -25%; }
  85%, 100% { left: 125%; }
}

.birthday-tracker-title {
  font-size: 18px;
  font-weight: 950;
}

.birthday-tracker-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.birthday-hat-host {
  position: relative;
  overflow: visible;
}

.birthday-avatar-shell {
  overflow: visible;
}

.birthday-party-hat {
  position: absolute;
  z-index: 4;
  top: -17%;
  left: 50%;
  width: 35%;
  min-width: 14px;
  height: 43%;
  min-height: 17px;
  transform: translateX(-55%) rotate(-12deg);
  transform-origin: 50% 100%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 48% 62%, #fff 0 8%, transparent 9%),
    linear-gradient(105deg, #38bdf8 0 24%, #ff4fc8 25% 49%, #facc15 50% 74%, #8b5cf6 75%);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35));
  pointer-events: none;
}

.birthday-party-hat::after {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff7cf;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, .45);
  content: "";
  transform: translateX(-50%);
}

.birthday-welcome-toast {
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  width: min(440px, calc(100vw - 30px));
  border-color: color-mix(in srgb, #fbbf24 62%, var(--line));
  background:
    linear-gradient(120deg, rgba(251, 191, 36, .2), rgba(251, 113, 133, .12)),
    #0e1628;
  color: #fff7cf;
  font-weight: 900;
  text-align: center;
  z-index: 220;
}

.birthday-confetti {
  position: fixed;
  z-index: 210;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.birthday-confetti span {
  position: absolute;
  top: -24px;
  left: var(--birthday-x);
  width: 9px;
  height: 16px;
  border-radius: 3px;
  background: var(--birthday-color);
  opacity: 0;
  animation: birthday-confetti-fall var(--birthday-duration) cubic-bezier(.18, .75, .28, 1) var(--birthday-delay) forwards;
}

.birthday-page-decor {
  position: fixed;
  z-index: 32;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.birthday-bunting {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 48px;
  justify-content: space-around;
  border-top: 3px solid rgba(250, 204, 21, .78);
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, .3));
}

.birthday-bunting i {
  width: clamp(24px, 4vw, 58px);
  height: clamp(26px, 4vw, 52px);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: hsl(calc(var(--i) * 43deg + 300deg) 88% 62%);
  transform-origin: top center;
  animation: birthday-flag-wave 2.4s ease-in-out calc(var(--i) * -90ms) infinite alternate;
}

@keyframes birthday-flag-wave { to { transform: skewX(5deg) rotate(2deg); filter: brightness(1.22); } }

.birthday-balloon-cluster {
  position: absolute;
  top: 11%;
  width: 100px;
  height: 210px;
  animation: birthday-balloon-float 4s ease-in-out infinite alternate;
}

.birthday-balloon-left { left: 8px; }
.birthday-balloon-right { right: 8px; animation-delay: -2s; transform: scaleX(-1); }

.birthday-balloon-cluster i {
  position: absolute;
  width: 48px;
  height: 62px;
  border-radius: 50% 50% 48% 48%;
  background: linear-gradient(135deg, rgba(255,255,255,.55), transparent 25%), #ff4fc8;
  box-shadow: inset -8px -10px 15px rgba(0,0,0,.18), 0 0 18px rgba(255,79,200,.25);
}

.birthday-balloon-cluster i::after {
  position: absolute;
  top: 59px;
  left: 50%;
  width: 1px;
  height: 105px;
  background: rgba(255,255,255,.42);
  content: "";
}

.birthday-balloon-cluster i:nth-child(2) { top: 32px; left: 42px; background-color: #38bdf8; }
.birthday-balloon-cluster i:nth-child(3) { top: 74px; left: 8px; background-color: #facc15; }

@keyframes birthday-balloon-float { to { translate: 0 -14px; rotate: 2deg; } }

.birthday-side-streamer {
  position: absolute;
  top: 30%;
  width: 15px;
  height: 48%;
  opacity: .7;
  background: repeating-linear-gradient(180deg, #ff4fc8 0 22px, #8b5cf6 22px 44px, #38bdf8 44px 66px, #facc15 66px 88px);
  mask: linear-gradient(90deg, transparent, #000 35% 65%, transparent);
  animation: birthday-streamer-pulse 3s ease-in-out infinite alternate;
}

.birthday-side-streamer-left { left: 0; }
.birthday-side-streamer-right { right: 0; animation-delay: -1.5s; }
@keyframes birthday-streamer-pulse { to { filter: brightness(1.5); scale: 1 1.04; } }

.birthday-sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: hsl(calc(var(--i) * 57deg + 40deg) 95% 70%);
  font-size: calc(13px + var(--i) * .25px);
  opacity: .28;
  text-shadow: 0 0 12px currentColor;
  animation: birthday-sparkle-pulse 1.8s ease-in-out calc(var(--i) * -110ms) infinite alternate;
}

.birthday-hidden-gift {
  position: absolute;
  z-index: 8;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(250, 204, 21, .48);
  border-radius: 50%;
  color: #facc15;
  background: radial-gradient(circle, rgba(255,255,255,.24), rgba(250,204,21,.12) 58%, rgba(15,23,42,.32));
  box-shadow: 0 0 14px rgba(250,204,21,.26);
  font-size: 21px;
  opacity: .78;
  text-shadow: 0 0 9px currentColor;
  cursor: pointer;
  animation: birthday-gift-pulse 2.8s ease-in-out infinite alternate;
}

.birthday-gift-host { position: relative; }
.birthday-hidden-gift-spark { right: 18px; bottom: 18px; }
.birthday-hidden-gift-balloon { left: 10px; top: 52%; color: #ff77d5; }
.birthday-hidden-gift-cake { right: 14px; top: 16%; color: #8b5cf6; }
.birthday-hidden-gift:hover,
.birthday-hidden-gift:focus-visible { opacity: 1; filter: brightness(1.4); }
@keyframes birthday-gift-pulse { to { opacity: .68; scale: 1.13; rotate: 5deg; } }

.birthday-gift-progress {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid rgba(250, 204, 21, .42);
  border-radius: var(--radius-pill);
  color: #fff8cf;
  background: linear-gradient(120deg, rgba(250,204,21,.14), rgba(255,79,200,.12)), rgba(14,22,40,.9);
  box-shadow: 0 0 16px rgba(250,204,21,.1);
  font-weight: 950;
}

.birthday-gift-progress span { font-size: 18px; }

.birthday-gift-reset {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, .42);
  border-radius: 50%;
  color: #fecaca;
  background: rgba(127, 29, 29, .28);
  font-size: 20px;
  font-weight: 950;
}

.birthday-gift-reset:hover,
.birthday-gift-reset:focus-visible { filter: brightness(1.35); }

.birthday-reward-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 19, .78);
  backdrop-filter: blur(8px);
}

.birthday-reward-dialog {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 79, 200, .62);
  border-radius: 26px;
  color: #fff;
  background: radial-gradient(circle at 50% 0, rgba(250, 204, 21, .2), transparent 38%), linear-gradient(145deg, #291641, #121e48);
  box-shadow: 0 0 60px rgba(255, 79, 200, .28);
  text-align: center;
}

.birthday-reward-dialog h2 { margin: 5px 0 9px; font-size: 28px; }
.birthday-reward-dialog p { margin: 0 0 20px; color: rgba(255,255,255,.78); line-height: 1.55; }
.birthday-reward-icon { font-size: 58px; filter: drop-shadow(0 0 18px rgba(250,204,21,.48)); }

.birthday-theme-toggle {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 79, 200, .45);
  border-radius: var(--radius-pill);
  color: #fff;
  background: linear-gradient(120deg, rgba(255,79,200,.22), rgba(56,189,248,.18));
  font-weight: 900;
}

.birthday-party-theme-owned body::before {
  position: fixed;
  z-index: 1;
  inset: 0;
  background: radial-gradient(circle at 5% 15%, rgba(255,79,200,.11), transparent 24%), radial-gradient(circle at 95% 78%, rgba(56,189,248,.1), transparent 27%);
  content: "";
  pointer-events: none;
}

@keyframes birthday-sparkle-pulse { to { opacity: .9; transform: scale(1.55) rotate(35deg); } }

@keyframes birthday-confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: .85;
    transform: translate3d(var(--birthday-drift), calc(100vh + 50px), 0) rotate(var(--birthday-spin));
  }
}

@media (max-width: 620px) {
  .birthday-header-badge {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .birthday-tracker-card {
    align-items: flex-start;
    padding: 15px;
  }

  .birthday-tracker-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 23px;
  }

  .birthday-bunting { height: 34px; }
  .birthday-balloon-cluster { top: 16%; scale: .7; opacity: .75; }
  .birthday-balloon-left { left: -19px; }
  .birthday-balloon-right { right: -19px; }
  .birthday-hidden-gift { width: 32px; height: 32px; font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .birthday-confetti {
    display: none;
  }

  .birthday-page-decor * { animation: none !important; }
}

/* Quelle: avatar-room.css */
.avatar-room { grid-column: 1 / -1; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); outline-offset: -3px; }
.avatar-room-heading { position: absolute; z-index: 5; top: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--control-pad); padding: 14px 16px; background: linear-gradient(#08131ee8, transparent); pointer-events: none; }
.avatar-room-heading > * { pointer-events: auto; }
.avatar-room-heading > div { display: grid; gap: 2px; color: #f3fbff; }
.avatar-room-heading strong { font-size: 17px; }
.avatar-room-heading small { color: #89a6b5; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.avatar-room-heading > .avatar-room-heading-actions { display: flex; align-items: center; gap: 6px; }
.avatar-room-heading-actions .ui-icon-button { background: #0b1925d9; backdrop-filter: blur(8px); }
.avatar-room-audio-settings { display: grid; gap: 16px; padding-block: 4px; }
.avatar-room-audio-volume { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.avatar-room-audio-volume > span { display: flex; justify-content: space-between; gap: 12px; }
.avatar-room-audio-volume strong { color: var(--text); font-variant-numeric: tabular-nums; }
.avatar-room-audio-volume input { width: 100%; accent-color: #7bd0c3; }
.avatar-room-audio-volume.disabled { opacity: .5; }
.avatar-room-audio-muted { margin: 0; color: #f3c88e; font-size: 12px; line-height: 1.5; }
.avatar-room-homes { border-top: 1px solid #ffffff25; padding-top: 8px; }
.avatar-room-homes summary { cursor: pointer; color: #e7f7f4; font-weight: 800; }
.avatar-room-homes > p,.avatar-room-homes-list > p { color: #b9d0d7; font-size: 12px; }
.avatar-room-homes-list { display: grid; gap: 7px; margin-top: 10px; }
.avatar-room-home-entry { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #ffffff22; border-radius: 12px; padding: 8px 10px; background: #ffffff09; }
.avatar-room-home-entry span { display: grid; gap: 2px; min-width: 0; }
.avatar-room-home-entry strong { overflow: hidden; color: #effbf7; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.avatar-room-home-entry small { color: #a4bec6; font-size: 11px; }
.avatar-room-homes-refresh { margin-top: 9px; }
.avatar-room-home-settings { display: grid; gap: 14px; }
.avatar-room-home-settings label { display: grid; gap: 5px; }
.avatar-room-home-settings input { width: 100%; }
.avatar-room-home-settings p { margin: 0; color: var(--muted); font-size: 12px; }
.avatar-room-lobby { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 20px 12px; }
.avatar-room-join { display: flex; flex: 1; gap: 8px; min-width: 0; }
.avatar-room-join input { min-width: 0; width: 140px; flex: 1; text-transform: uppercase; }
.avatar-room-connection { display: grid; gap: 3px; flex: 1; font-size: 12px; }
.avatar-room-code { user-select: all; letter-spacing: .08em; }
.avatar-room-message { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 12px; }
.avatar-room-friends { flex-basis: 100%; max-height: min(32dvh, 230px); overflow: auto; font-size: 12px; }
.avatar-room-friends summary { cursor: pointer; padding-block: 8px; }
.avatar-room-friends p { color: var(--muted); }
.avatar-room-friends ul { list-style: none; padding: 0; margin: 0; }
.avatar-room-friends li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 6px; }
.avatar-room-friends small { display: block; color: var(--muted); }
.avatar-room-invitation { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.avatar-room-invitation > span { flex: 1 1 100%; }
.avatar-room-stage { position: relative; height: clamp(560px, 76dvh, 760px); background: #0c151f; overflow: hidden; }
.avatar-room-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.avatar-room-hud { position: absolute; z-index: 1; top: 54px; inset-inline: 0; display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px 42px; background: linear-gradient(#0b1427b8, transparent); pointer-events: none; }
.avatar-room-hud > div { display: grid; gap: 4px; }
.avatar-room-hud small { color: #8aa5b5; font-size: 10px; letter-spacing: .14em; }
.avatar-room-hud strong { font-size: 17px; color: #f3fbff; }
.avatar-room-hud span { font-size: 12px; color: #c4d7e3; }
.avatar-room-hud .avatar-room-hearts { color: #ff9b91; font-size: 22px; letter-spacing: 4px; }
.avatar-room-hud .avatar-room-held-item { display: inline-flex; align-items: center; gap: 7px; width: max-content; max-width: 170px; margin-top: 2px; border: 1px solid #b9d3d94d; border-radius: var(--radius-pill); padding: 4px 8px 4px 4px; background: #0d2230d9; box-shadow: 0 5px 16px #0004; }
.avatar-room-held-item > i { display: grid; place-items: center; width: 29px; height: 29px; flex: none; border-radius: 50%; color: #d6f8f2; background: #31556c; font-size: 18px; font-style: normal; }
.avatar-room-held-item > i.avatar-room-held-item-coin { border: 2px double #fff1b3; color: #62400c; background: #e8b44b; font-size: 7px; font-weight: 950; }
.avatar-room-held-item > span { display: grid; gap: 1px; min-width: 0; }
.avatar-room-hud .avatar-room-held-item small { font-size: 8px; letter-spacing: .1em; }
.avatar-room-hud .avatar-room-held-item strong { overflow: hidden; color: #e8f9f5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.avatar-room-score { text-align: right; }
.avatar-room-basket-score { position: absolute; top: 155px; right: 16px; z-index: 2; display: grid; gap: 4px; color: #ffcd8f; font-size: 13px; text-align: right; pointer-events: none; text-shadow: 0 2px 4px #000; }
.avatar-room-basket-score small { color: #c4d7e3; font-size: 10px; }
.avatar-room-basket-score strong { color: #83f0ca; animation: avatar-room-basket-pop .35s ease-out; }
.avatar-room-table-score { position: absolute; top: 150px; right: 16px; z-index: 2; display: grid; gap: 4px; max-width: min(250px, 48vw); border: 1px solid #f1ce9090; border-radius: 12px; padding: 10px 12px; color: #f7dfb6; background: #172534d9; box-shadow: 0 8px 24px #0006; text-align: right; pointer-events: none; }
.avatar-room-table-score small { color: #b8d4d6; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.avatar-room-table-score strong { color: #ffdda8; font-size: 14px; }
.avatar-room-table-score span { color: #e5eef1; font-size: 11px; }
@keyframes avatar-room-basket-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
.avatar-room-furnisher > * { min-width: 0; }
.avatar-room-style-colors input { flex-shrink: 0; }
.avatar-room-area-apartment .avatar-room-score strong,
.avatar-room-area-bridge .avatar-room-score strong { color: #f2cf91; }
.avatar-room-area-apartment .avatar-room-score span,
.avatar-room-area-bridge .avatar-room-score span { color: #dfc7aa; }
.avatar-room-hint { position: absolute; bottom: 14px; inset-inline: 12px; text-align: center; pointer-events: none; color: #e0f8f1; font-size: 12px; text-shadow: 0 2px 4px #000; }
.avatar-room-sit-prompt { position: absolute; z-index: 2; left: 50%; bottom: 42px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border: 1px solid #70dcc5aa; border-radius: var(--radius-pill); padding: 7px 12px; color: #e8fff9; background: #102b31e8; box-shadow: 0 8px 24px #0008, inset 0 1px #ffffff14; font: inherit; font-size: 12px; font-weight: 900; backdrop-filter: blur(10px); }
.avatar-room-sit-prompt:hover { filter: brightness(1.12); }
.avatar-room-sit-prompt kbd { min-width: 22px; border: 1px solid #ffffff30; border-radius: 6px; padding: 2px 5px; color: #bfeee3; background: #ffffff0c; font: inherit; font-size: 10px; }
.avatar-room-utility-controls { position: absolute; z-index: 2; left: 16px; bottom: 50px; display: flex; align-items: flex-end; gap: 8px; }
.avatar-room-utility-controls button { border: 1px solid #668b987a; color: #e8f9fa; background: #0b1b27e8; box-shadow: 0 10px 28px #0007, inset 0 1px #ffffff12; backdrop-filter: blur(10px); font: inherit; font-size: 11px; font-weight: 850; }
.avatar-room-utility-controls button:hover { filter: brightness(1.14); }
.avatar-room-utility-controls kbd { border: 1px solid #ffffff24; border-radius: 5px; padding: 1px 4px; color: #a9d9d3; background: #ffffff0b; font: inherit; font-size: 9px; }
.avatar-room-ball-action,.avatar-room-table-action,.avatar-room-emote-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; border-radius: var(--radius-pill); padding: 7px 11px; }
.avatar-room-ball-action > span { color: #ef8d48; font-size: 18px; text-shadow: 0 0 10px #ef8d4899; }
.avatar-room-table-action > span { color: #f2c987; font-size: 18px; }
.avatar-room-table-action:disabled { opacity: .65; cursor: default; }
.avatar-room-emote-toggle > span { color: #73dfca; font-size: 17px; }
.avatar-room-emote-layer { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at center, #09172210 0 115px, #050b1270 280px); touch-action: none; }
.avatar-room-emote-wheel { position: relative; width: 256px; height: 256px; border: 1px solid #89adbb80; border-radius: 50%; background: conic-gradient(from -60deg, #203b46e8 0 32.5%, #172d3ae8 33.5% 66%, #342b3ee8 67% 99%, #203b46e8 100%); box-shadow: 0 24px 70px #000c, inset 0 0 0 12px #08151db8, inset 0 0 34px #7be3d422; backdrop-filter: blur(12px); }
.avatar-room-emote-wheel::before { content: ""; position: absolute; inset: 68px; border: 1px solid #9bbcc77a; border-radius: 50%; background: #08151ded; box-shadow: 0 8px 28px #000b, inset 0 1px #ffffff1c; }
.avatar-room-emote-choice { position: absolute; z-index: 2; display: grid; place-items: center; gap: 2px; width: 72px; height: 72px; border: 1px solid transparent; border-radius: 50%; padding: 5px; color: #edfdfb; background: transparent; font: inherit; }
.avatar-room-emote-choice:hover,.avatar-room-emote-choice.active { border-color: #a6f5e5b8; background: #7be3d42e; filter: brightness(1.14); box-shadow: 0 0 28px #72e4d15c; }
.avatar-room-emote-choice span { color: #ffd5df; font-size: 29px; line-height: 1; filter: drop-shadow(0 3px 5px #0008); }
.avatar-room-emote-choice small { color: #d7e9ed; font-size: 10px; font-weight: 850; }
.avatar-room-emote-wave { left: 9px; top: 135px; }
.avatar-room-emote-cheer { left: 92px; top: 8px; }
.avatar-room-emote-heart { right: 9px; top: 135px; }
.avatar-room-emote-center { position: absolute; z-index: 1; inset: 79px; display: grid; place-content: center; gap: 3px; border-radius: 50%; text-align: center; pointer-events: none; }
.avatar-room-emote-center strong { color: #f0fbfc; font-size: 13px; }
.avatar-room-emote-center small { max-width: 70px; color: #8fb0bc; font-size: 8px; line-height: 1.25; }
.avatar-room-inventory { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; color: #edf6fc; }
.avatar-room-inventory-storage { min-width: 0; }
.avatar-room-inventory-caption { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; color: #9fb4c6; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.avatar-room-chest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.avatar-room-chest-grid .avatar-room-inventory-slot { position: relative; display: grid; justify-items: center; align-content: start; gap: 5px; min-width: 0; min-height: 155px; padding: 12px 8px; border: 1px solid #63788e55; border-radius: var(--control-radius); background: radial-gradient(ellipse at 50% 30%, #34465c70, transparent 75%), #142235; color: #e7f1fa; text-align: center; }
.avatar-room-chest-grid .avatar-room-inventory-slot:hover { border-color: #91b4c9; background-color: #1b2c40; }
.avatar-room-chest-grid .avatar-room-inventory-slot.selected { border-color: #96dfcf; background-color: #203c43; box-shadow: inset 0 0 0 1px #96dfcf, 0 0 18px #6accb00d; }
.avatar-room-chest-grid .avatar-room-inventory-slot:focus-visible { outline: 3px solid #e8cf8b; outline-offset: 2px; }
.avatar-room-inventory-slot strong { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.avatar-room-inventory-slot small { color: #afc2d4; font-size: 10px; line-height: 1.4; }
.avatar-room-inventory-slot.equipped small { color: #a8ebd7; }
.avatar-room-inventory-slot.unavailable .avatar-room-inventory-art { opacity: .5; }
.avatar-room-inventory-equipped { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #9ad9c5; color: #102b30; font-size: 12px; }
.avatar-room-inventory-art { display: block; width: 82px; height: 82px; }
.avatar-room-inventory-art svg, .avatar-room-inventory-hero svg { display: block; width: 100%; height: 100%; }
.avatar-room-inventory-detail { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); }
.avatar-room-inventory-hero { width: 100%; height: 200px; display: grid; place-items: center; background: radial-gradient(ellipse, #72c8c524, transparent 67%); }
.avatar-room-inventory-detail-coin .avatar-room-inventory-hero { background: radial-gradient(ellipse, #e8bd6c26, transparent 67%); }
.avatar-room-inventory-detail-training-hammer .avatar-room-inventory-hero { background: radial-gradient(ellipse, #aa93df26, transparent 67%); }
.avatar-room-inventory-detail .avatar-room-inventory-caption { margin: 0; }
.avatar-room-inventory-detail h3 { margin: 0; font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.avatar-room-inventory-detail p { margin: 0; color: #b7c9d8; font-size: 12px; line-height: 1.6; }
.avatar-room-inventory-status { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: #badcd3; font-size: 12px; line-height: 1.6; width: 100%; }
@media (max-width: 600px) {
  .avatar-room-inventory { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .avatar-room-chest-grid .avatar-room-inventory-slot { min-height: 122px; padding: 10px 8px; }
  .avatar-room-inventory-art { width: 56px; height: 56px; }
  .avatar-room-inventory-detail { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 6px 14px; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .avatar-room-inventory-hero { width: 86px; height: 80px; grid-row: 1 / 5; align-self: center; }
  .avatar-room-inventory-detail h3 { font-size: 17px; }
  .avatar-room-inventory-status { grid-column: 2; margin: 0; padding-top: 8px; font-size: 11px; }
}
.avatar-room-overlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto; text-align: center; padding: 76px 24px 24px; background: linear-gradient(100deg, #07111eea, #11293cba 58%, #07111ee3), radial-gradient(circle at 72% 22%, #438f9770, transparent 48%); backdrop-filter: blur(6px); }
.avatar-room-overlay strong { font-size: 24px; }
.avatar-room-overlay p { max-width: 380px; color: var(--muted); line-height: 1.5; }
.avatar-room-menu-card { width: min(560px, 100%); display: grid; gap: 18px; max-height: 100%; overflow-y: auto; border: 1px solid #6c899a70; border-radius: 22px; padding: 28px; color: #eaf8fb; background: linear-gradient(135deg, #142537f2, #0a1724f5 68%); box-shadow: 0 28px 80px #000b, inset 0 1px #ffffff18; text-align: left; }
.avatar-room-main-menu { width: min(850px, 100%); }
.avatar-room-pause-card { width: min(760px, 100%); }
.avatar-room-menu-intro { display: grid; gap: 8px; padding: 2px 0 8px; border-bottom: 1px solid #ffffff22; }
.avatar-room-menu-intro p { max-width: 620px; margin: 0; color: #aec3cc; font-size: 13px; line-height: 1.5; }
.avatar-room-menu-intro .avatar-room-eyebrow span { color: #8ca9b8; padding-inline: 4px; }
.avatar-room-menu-section-label { display: block; color: #85a5b6; font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.avatar-room-menu-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); grid-template-areas: 'primary social' 'world social'; gap: 14px 26px; min-width: 0; }
.avatar-room-menu-primary,.avatar-room-menu-social { display: grid; align-content: start; gap: 11px; min-width: 0; }
.avatar-room-menu-primary { grid-area: primary; }
.avatar-room-menu-social { grid-area: social; border-left: 1px solid #ffffff22; padding-left: 26px; }
.avatar-room-menu-world { grid-area: world; display: grid; align-content: start; gap: 11px; }
.avatar-room-menu-card h2 { margin: 0; font-size: clamp(25px, 4vw, 36px); line-height: 1.05; }
.avatar-room-menu-card > p { max-width: none; margin: 0; }
.avatar-room-eyebrow { color: #73dfca; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.avatar-room-start-actions { display: grid; gap: 9px; }
.avatar-room-start-actions > button { min-height: 78px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; align-content: center; gap: 3px 12px; border-radius: 14px; padding: 13px 17px; text-align: left; }
.avatar-room-start-actions > button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #93e8d780; border-radius: 9px; color: #baf7e6; background: #0d3b3f77; font-size: 18px; }
.avatar-room-start-actions > button > strong { font-size: 16px; line-height: 1.25; }
.avatar-room-start-actions > button > small { color: #afc4c9; font-size: 11px; }
.avatar-room-start-actions .avatar-room-solo-start { border-color: #69d5b486; background: linear-gradient(110deg, #285f56, #183c40); box-shadow: inset 0 1px #c6fff02e, 0 8px 24px #030d1240; }
.avatar-room-start-actions .avatar-room-create { border-color: #7a9bb66b; background: #2638479c; }
.avatar-room-menu-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.avatar-room-menu-shortcuts > button { min-height: 64px; display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 10px; text-align: left; }
.avatar-room-menu-shortcuts > button > span:first-child { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; color: #a8e6db; font-size: 20px; }
.avatar-room-menu-shortcuts > button > span:last-child { display: grid; gap: 2px; min-width: 0; }
.avatar-room-menu-shortcuts strong { color: #e9f5f4; font-size: 12px; }
.avatar-room-menu-shortcuts small { color: #9fb4c0; font-size: 10px; }
.avatar-room-join { display: grid; gap: 6px; min-width: 0; }
.avatar-room-join label { color: #8da6b4; font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.avatar-room-join > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.avatar-room-join input { min-width: 0; width: 100%; text-transform: uppercase; letter-spacing: .12em; }
.avatar-room-menu-social .avatar-room-join label { color: #c5dbe1; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.avatar-room-menu-social .avatar-room-join input { min-height: 42px; border-color: #69859585; border-radius: 10px; color: #eaf5f7; background: #071724ba; }
.avatar-room-menu-social .avatar-room-join input::placeholder { color: #98aeb8; text-transform: none; letter-spacing: 0; }
.avatar-room-menu-social .avatar-room-join button { min-width: 86px; }
.avatar-room-roomcode { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; align-items: center; border: 1px solid #69d9c264; border-radius: 16px; padding: 12px 14px; background: #15313a99; }
.avatar-room-roomcode small { grid-column: 1; color: #8faeb8; font-size: 9px; letter-spacing: .14em; }
.avatar-room-roomcode strong { grid-column: 1; font-size: 27px; letter-spacing: .15em; user-select: all; }
.avatar-room-roomcode button { grid-column: 2; grid-row: 1 / 3; }
.avatar-room-message { margin: 0; border-radius: 10px; padding: 8px 10px; color: #c9dce4; background: #ffffff0b; }
.avatar-room-friends { border-top: 1px solid #ffffff14; font-size: 12px; }
.avatar-room-friends summary { cursor: pointer; padding: 11px 2px 5px; color: #dcecf0; font-weight: 800; }
.avatar-room-friends summary span { color: #80dcca; font-weight: 600; }
.avatar-room-friends p { margin: 8px 0; }
.avatar-room-friends ul { max-height: 150px; overflow-y: auto; }
.avatar-room-friends li { border-bottom: 1px solid #ffffff0c; }
.avatar-room-menu-social .avatar-room-friends { margin-top: 3px; }
.avatar-room-menu-social .avatar-room-friends summary { padding-top: 12px; }
.avatar-room-menu-social .avatar-room-friends ul { max-height: 190px; }
.avatar-room-menu-social .avatar-room-friends li button { min-width: 78px; }
.avatar-room-invitation { border: 1px solid #68d8c267; border-radius: 13px; padding: 9px; background: #17353c99; }
.avatar-room-pause-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 26px; }
.avatar-room-pause-main,.avatar-room-pause-side,.avatar-room-pause-actions { display: grid; align-content: start; gap: 9px; min-width: 0; }
.avatar-room-pause-side { border-left: 1px solid #ffffff22; padding-left: 26px; }
.avatar-room-resume { min-height: 68px; display: flex; align-items: center; gap: 14px; border-radius: 13px; padding: 10px 16px; text-align: left; background: linear-gradient(110deg, #285f56, #183c40); }
.avatar-room-resume > span:first-child { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #a2f1da88; border-radius: 50%; color: #c8ffe9; }
.avatar-room-resume > span:last-child { display: grid; gap: 2px; }
.avatar-room-resume strong { font-size: 15px; }
.avatar-room-resume small { color: #bbd5ce; font-size: 11px; }
.avatar-room-pause-actions { margin-top: 13px; }
.avatar-room-pause-actions button { min-height: 47px; display: grid; grid-template-columns: 22px 1fr 16px; align-items: center; gap: 10px; border-radius: 10px; padding: 10px 13px; text-align: left; }
.avatar-room-pause-actions button span:first-child { color: #9de3d6; font-size: 18px; text-align: center; }
.avatar-room-pause-actions button span:last-child { color: #7d9ba9; text-align: right; }
.avatar-room-pause-side > button { min-height: 42px; border-radius: 10px; text-align: left; }
.avatar-room-pause-side > .avatar-room-menu-section-label { margin-top: 4px; }
.avatar-room-pause-side > .avatar-room-leave { margin-top: 7px; border-color: #a8757669; color: #f2c7c7; }
.avatar-room-menu-button { position: absolute; z-index: 6; top: 14px; right: 112px; min-height: 34px; padding: 6px 10px; color: #d7e9ed; background: #0b1925d9; backdrop-filter: blur(8px); }
.avatar-room-decorating .avatar-room-canvas { touch-action: none; cursor: grab; }
.avatar-room-decorating .avatar-room-canvas:active { cursor: grabbing; }
.avatar-room-decorating .avatar-room-hud { opacity: .38; }
.avatar-room-decorating .avatar-room-hint { display: none; }
.avatar-room-furnisher { position: absolute; z-index: 3; left: 50%; bottom: 16px; width: min(760px, calc(100% - 28px)); transform: translateX(-50%); display: grid; gap: 10px; border: 1px solid #66839299; border-radius: 18px; padding: 12px; background: #0b1823dc; box-shadow: 0 18px 54px #02080db3, inset 0 1px #ffffff12; backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.avatar-room-furnisher-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.avatar-room-furnisher-head > div { display: grid; gap: 3px; }
.avatar-room-furnisher-head small,.avatar-room-furniture-empty,.avatar-room-placement-status { color: #a9bfca; font-size: 12px; }
.avatar-room-area-tabs { --switcher-accent: #66e3c4; display: flex; gap: 7px; }
.avatar-room-area-tabs > button { min-height: 34px; padding: 6px 12px; }
.avatar-room-area-tabs > button.active { border-color: #66e3c4; color: #e9fff9; background: #66e3c421; box-shadow: inset 0 0 0 1px #66e3c433; }
.avatar-room-balcony-focus { display: flex; flex-wrap: wrap; gap: 7px; }
.avatar-room-balcony-focus .ghost-btn { min-height: 30px; padding: 5px 11px; font-size: 12px; }
.avatar-room-style-panel { border: 1px solid #ffffff18; border-radius: 13px; padding: 0 10px; background: #ffffff08; }
.avatar-room-style-panel summary { cursor: pointer; padding: 8px 2px; color: #dcecf0; font-size: 12px; font-weight: 800; }
.avatar-room-style-palettes { display: flex; gap: 6px; overflow-x: auto; padding: 1px 0 8px; }
.avatar-room-style-palettes > button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 9px; white-space: nowrap; }
.avatar-room-style-palettes i { width: 28px; height: 18px; flex: 0 0 auto; border: 1px solid #ffffff2b; border-radius: 6px; background: linear-gradient(90deg, var(--floor) 0 33%, var(--wall) 33% 66%, var(--accent) 66%); box-shadow: inset 0 1px #ffffff18; }
.avatar-room-style-colors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding-bottom: 9px; }
.avatar-room-style-colors label { display: flex; align-items: center; justify-content: space-between; gap: 7px; border: 1px solid #ffffff12; border-radius: 9px; padding: 5px 7px; color: #a9bfca; font-size: 11px; }
.avatar-room-style-colors input { width: 34px; height: 25px; border: 0; border-radius: 6px; padding: 0; background: transparent; cursor: pointer; }
.avatar-room-furniture-list { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.avatar-room-furniture-list > button { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 7px; min-width: 132px; min-height: 46px; padding: 7px 10px; border-radius: 13px; text-align: left; }
.avatar-room-furniture-list > button > span { grid-row: 1 / 3; font-size: 21px; }
.avatar-room-furniture-icon { width: 28px; height: 28px; display: grid; place-items: center; overflow: hidden; }
.avatar-room-furniture-icon .shop-furniture-preview { display: block; width: 32px; height: 25px; }
.avatar-room-furniture-list > button > small { color: #9cb1bc; font-size: 10px; }
.avatar-room-furniture-list > button.active { border-color: #66e3c4; background: #66e3c421; box-shadow: inset 0 0 0 1px #66e3c433; }
.avatar-room-furniture-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #ffffff12; padding-top: 10px; }
.avatar-room-furniture-variant { display: flex; align-items: center; gap: 8px; min-width: 190px; color: #a9bfca; font-size: 12px; }
.avatar-room-furniture-variant .ui-select { flex: 1; min-width: 0; }
.avatar-room-furniture-variant .ui-dropdown-menu { top: auto; bottom: calc(100% + 6px); max-height: 150px; overflow-y: auto; }
.avatar-room-furniture-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.avatar-room-furniture-actions button { min-height: 36px; padding: 7px 11px; }
.avatar-room-placement-status { display: inline-flex; align-items: center; gap: 7px; margin: 0; white-space: nowrap; }
.avatar-room-placement-status i { width: 8px; height: 8px; border-radius: 50%; background: #66e3c4; box-shadow: 0 0 12px #66e3c499; }
.avatar-room-placement-status.invalid { color: #ff9b91; }
.avatar-room-placement-status.invalid i { background: #ff6f78; box-shadow: 0 0 12px #ff6f7899; }
.avatar-room-furniture-empty { margin: 0; }
.avatar-room-controls { position: absolute; z-index: 2; inset-inline: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; gap: 14px; background: linear-gradient(transparent, #091722ed 42%); pointer-events: none; }
.avatar-room-controls > * { pointer-events: auto; }
.avatar-room-keyboard { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; gap: 8px 20px; color: #abc0ca; font-size: 11px; }
.avatar-room-keyboard kbd { color: #e0f8f1; font: inherit; font-weight: 700; }
.avatar-room-stick { position: relative; width: 112px; height: 112px; flex-shrink: 0; border-radius: 50%; background: radial-gradient(circle, #365a68 0%, #1a3343 66%); border: 1px solid #5a7b88; touch-action: none; user-select: none; -webkit-user-select: none; }
.avatar-room-stick i { position: absolute; left: 33px; top: 33px; width: 44px; height: 44px; border-radius: 50%; background: #a4d8d5; border: 4px solid #d2f4eb; box-shadow: 0 5px 14px #05182199; pointer-events: none; }
.avatar-room-stick-label { position: absolute; bottom: 7px; width: 100%; text-align: center; font-size: 8px; letter-spacing: .12em; color: #9dbbc5; }
.avatar-room-actions { display: flex; gap: 12px; }
.avatar-room-area-apartment .avatar-room-actions { justify-content: flex-end; }
.avatar-room-actions button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 82px; min-height: 86px; padding: 10px; border-radius: var(--control-radius); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.avatar-room-actions button > span { font-size: 26px; line-height: 1; }
.avatar-room-actions small { font-size: 10px; opacity: .65; }
.avatar-room-jump { background: #235765; border-color: #498594; color: #d9fff7; }
.avatar-room-drink { background: #1e5960; border-color: #59acb3; color: #e6fcf4; }
.avatar-room-attack { background: #835233; border-color: #b47d4d; color: #fff0d0; }
.avatar-room-footer { display: flex; align-items: center; gap: 18px; justify-content: space-between; padding: 16px 20px; }
.avatar-room-footer p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; max-width: 570px; }
.avatar-room-footer > div { display: flex; flex-shrink: 0; gap: 8px; }
.avatar-room.game-focus-fullscreen { position: fixed; z-index: 1000; inset: 0; width: 100dvw; height: 100dvh; border: 0; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.avatar-room.game-focus-fullscreen .avatar-room-stage { height: 100%; min-height: 0; }
.avatar-room.game-focus-fullscreen .avatar-room-canvas { height: 100%; }
.avatar-room.game-focus-fullscreen .avatar-room-heading > :first-child,
.avatar-room.game-focus-fullscreen .avatar-room-footer p,
.avatar-room.game-focus-fullscreen .avatar-room-keyboard { display: none; }
.avatar-room.game-focus-fullscreen .avatar-room-heading { position: absolute; top: env(safe-area-inset-top); right: env(safe-area-inset-right); z-index: 4; padding: 12px; }
.avatar-room.game-focus-fullscreen .avatar-room-menu-button { top: max(12px, env(safe-area-inset-top)); right: max(112px, calc(env(safe-area-inset-right) + 112px)); }
.avatar-room.game-focus-fullscreen .avatar-room-footer { position: absolute; top: env(safe-area-inset-top); left: 50%; transform: translateX(-50%); z-index: 3; padding: 12px; }
.avatar-room.game-focus-fullscreen .avatar-room-hud { top: 52px; }
.avatar-room.game-focus-fullscreen .avatar-room-controls { position: absolute; inset-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); padding: 0; background: none; border: 0; pointer-events: none; }
.avatar-room.game-focus-fullscreen .avatar-room-controls > * { pointer-events: auto; }
.avatar-room-touch.game-focus-fullscreen .avatar-room-hint { bottom: 145px; }
.avatar-room-touch .avatar-room-utility-controls { bottom: 130px; }
.avatar-room-touch.game-focus-fullscreen .avatar-room-utility-controls { bottom: max(128px, calc(env(safe-area-inset-bottom) + 116px)); }
@media (max-height: 500px) and (orientation: landscape) {
  .avatar-room-menu-card { width: min(680px, 100%); padding: 14px 18px; gap: 8px; }
  .avatar-room-main-menu { width: min(850px, 100%); }
  .avatar-room-pause-card { width: min(760px, 100%); }
  .avatar-room-menu-card h2 { font-size: 23px; }
  .avatar-room-start-actions > button { min-height: 62px; }
  .avatar-room-menu-layout,.avatar-room-pause-layout { gap: 18px; }
  .avatar-room-menu-social,.avatar-room-pause-side { padding-left: 18px; }
  .avatar-room-overlay { justify-content: flex-start; padding-top: 58px; }
  .avatar-room-touch.game-focus-fullscreen .avatar-room-stick { width: 88px; height: 88px; }
  .avatar-room-touch.game-focus-fullscreen .avatar-room-stick i { left: 21px; top: 21px; }
  .avatar-room-touch.game-focus-fullscreen .avatar-room-actions button { min-height: 64px; }
  .avatar-room-touch.game-focus-fullscreen .avatar-room-hint { bottom: 112px; }
  .avatar-room-touch.game-focus-fullscreen .avatar-room-utility-controls { bottom: max(98px, calc(env(safe-area-inset-bottom) + 88px)); }
}
@media (max-width: 620px) {
  .avatar-room-stage { height: min(720px, calc(100dvh - 92px)); min-height: 580px; }
  .avatar-room-heading { align-items: flex-start; padding: 16px; }
  .avatar-room-overlay { justify-content: flex-start; padding: 68px 10px 12px; }
  body.music-player-active .avatar-room-menu-card { max-height: calc(100% - 260px); }
  .avatar-room-menu-card { border-radius: 18px; padding: 18px; gap: 11px; }
  .avatar-room-menu-layout { grid-template-columns: 1fr; grid-template-areas: 'primary' 'social' 'world'; gap: 18px; }
  .avatar-room-pause-layout { grid-template-columns: 1fr; gap: 18px; }
  .avatar-room-menu-social,.avatar-room-pause-side { border-left: 0; border-top: 1px solid #ffffff22; padding: 18px 0 0; }
  .avatar-room-start-actions { grid-template-columns: 1fr; }
  .avatar-room-start-actions > button { min-height: 68px; }
  .avatar-room-roomcode strong { font-size: 22px; }
  .avatar-room-pause-actions { grid-template-columns: 1fr; }
  .avatar-room-controls { padding: 12px; gap: 8px; }
  .avatar-room-actions { gap: 8px; }
  .avatar-room-actions button { min-width: 72px; font-size: 12px; }
  .avatar-room-utility-controls { left: 10px; }
  .avatar-room-emote-wheel { width: 226px; height: 226px; }
  .avatar-room-emote-wheel::before { inset: 60px; }
  .avatar-room-emote-choice { width: 66px; height: 66px; }
  .avatar-room-emote-wave { left: 5px; top: 118px; }
  .avatar-room-emote-cheer { left: 80px; top: 5px; }
  .avatar-room-emote-heart { right: 5px; top: 118px; }
  .avatar-room-emote-center { inset: 70px; }
  .avatar-room-footer { flex-direction: column; align-items: stretch; }
  .avatar-room-footer > div { justify-content: flex-end; }
  .avatar-room-furnisher { bottom: 10px; width: calc(100% - 20px); max-height: min(42%, 250px); overflow-y: auto; border-radius: 16px; padding: 10px; }
  .avatar-room-furnisher-head small { max-width: 260px; }
  .avatar-room-area-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .avatar-room-style-colors { grid-template-columns: 1fr; }
  .avatar-room-furniture-toolbar { align-items: stretch; flex-direction: column; }
  .avatar-room-furniture-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .avatar-room-furniture-actions button { min-width: 0; padding-inline: 7px; font-size: 11px; }
}
.avatar-room-telescope-overlay { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 18px; background: #030913dc; backdrop-filter: blur(8px); }
.avatar-room-telescope-panel { width: min(560px, 100%); max-height: 100%; overflow: auto; display: grid; justify-items: center; gap: 10px; border: 1px solid #8bb9c66b; border-radius: 20px; padding: 18px; color: #e6f6fa; background: linear-gradient(145deg, #15283a, #081320); box-shadow: 0 24px 80px #000b; text-align: center; }
.avatar-room-telescope-heading { width: 100%; display: flex; align-items: start; justify-content: space-between; gap: 12px; text-align: left; }
.avatar-room-telescope-heading small { color: #85d8d0; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; }
.avatar-room-telescope-heading h2 { margin: 5px 0 0; font-size: clamp(20px, 4vw, 27px); }
.avatar-room-telescope-sky { position: relative; width: min(56vw, 280px); aspect-ratio: 1; overflow: hidden; border: 8px solid #2b4554; border-radius: 50%; background: radial-gradient(circle at 36% 38%, #263f5a 0, #101c30 42%, #050c19 77%); box-shadow: inset 0 0 0 2px #a7c2c970, inset 0 0 65px #000, 0 8px 34px #0008; }
.avatar-room-telescope-sky::before { content: ''; position: absolute; inset: 0; opacity: 0.42; background-image: radial-gradient(circle, #d7f1ff 0 1px, transparent 1.5px); background-size: 29px 37px; background-position: 8px 12px; }
.avatar-room-telescope-sky svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 4px #b3e4fa); }
.avatar-room-telescope-moon { position: absolute; width: 42%; aspect-ratio: 1; top: 29%; left: 29%; border-radius: 50%; background: radial-gradient(circle at 32% 26%, #fff9dc, #d8d7c2 68%, #9ea9ad); box-shadow: 0 0 30px #c8e6ff70; }
.avatar-room-telescope-moon.phase-waxing { clip-path: ellipse(38% 50% at 64% 50%); }
.avatar-room-telescope-moon.phase-waning { clip-path: ellipse(38% 50% at 36% 50%); }
.avatar-room-telescope-caption { font-size: 20px; }
.avatar-room-telescope-panel p { margin: 0; color: #a9c0cd; font-size: 12px; }
.avatar-room-telescope-targets { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 6px; }
.avatar-room-telescope-targets button.active { border-color: #81ddcd; color: #edfffc; background: #245351; }
.avatar-room-boardgame-prompt { position: absolute; bottom: 138px; left: 50%; transform: translateX(-50%); z-index: 5; background: #193746; border-color: #82c9c1; white-space: nowrap; }

/* Quelle: qwixx.css */
.qwixx-dialog { width: min(1120px, calc(100vw - 24px)); max-width: none; padding: 0; overflow: hidden; background: #111a29; border: 1px solid #3b5063; border-radius: 20px; color: #eff6fb; }
.qwixx-shell { display: flex; flex-direction: column; max-height: min(880px, calc(100dvh - 28px)); text-align: left; }
.qwixx-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; padding: 24px 28px; margin: 0; border: 0; background: linear-gradient(120deg, #213248, #111a29); }
.qwixx-header > div { min-width: 0; flex: 1; }
.qwixx-header h2 { font-size: clamp(20px, 3vw, 28px); margin: 8px 0 0; line-height: 1.25; }
.qwixx-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .17em; color: #93d9ce; }
.qwixx-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; overflow: auto; min-height: 0; }
.qwixx-main { padding: 28px; min-width: 0; }
.qwixx-sidebar { padding: 28px 20px; background: #0d1623; border-left: 1px solid #253648; display: flex; flex-direction: column; gap: 16px; }
.qwixx-player { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #253648; }
.qwixx-player div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.qwixx-player strong, .qwixx-player small { display: block; }
.qwixx-player small { font-size: 11px; color: #a3b3c5; margin-top: 4px; }
.qwixx-player-avatar { flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-weight: 800; }
.qwixx-player-active .qwixx-player-avatar { outline: 2px solid #a1e6d4; outline-offset: 3px; }
.qwixx-lobby-hero { padding: 32px; border: 1px solid #32465b; border-radius: 16px; background: radial-gradient(ellipse at top right, #294754, #192538 70%); }
.qwixx-lobby-hero h3 { font-size: clamp(28px, 5vw, 46px); margin: 20px 0; line-height: 1.1; }
.qwixx-lobby-hero p, .qwixx-lobby-actions p, .qwixx-welcome p, .qwixx-table-tip, .qwixx-rules p { color: #aebed0; font-size: 13px; line-height: 1.6; }
.qwixx-color-strip { display: flex; gap: 8px; margin-top: 28px; }
.qwixx-color-strip i { height: 8px; flex: 1; border-radius: 4px; background: var(--qwixx-color); }
.qwixx-color-red { --qwixx-color: #ea7d91; --qwixx-dark: #492c3c; }
.qwixx-color-yellow { --qwixx-color: #edc66c; --qwixx-dark: #483e29; }
.qwixx-color-green { --qwixx-color: #69c4a4; --qwixx-dark: #25443e; }
.qwixx-color-blue { --qwixx-color: #79b8ed; --qwixx-dark: #2a3f59; }
.qwixx-color-white { --qwixx-color: #e9eff8; }
.qwixx-lobby-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.qwixx-lobby-actions p { flex-basis: 100%; }
.qwixx-welcome { text-align: center; padding: 24px; }
.qwixx-cover { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 160px; margin: 0 auto 24px; }
.qwixx-cover span { flex-basis: 100%; font-size: 100px; font-weight: 900; line-height: 1; }
.qwixx-cover i { color: var(--qwixx-color); font-size: 26px; }
.qwixx-dice-tray { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px; background: #0d1623; border: 1px solid #314257; border-radius: 14px; margin-bottom: 24px; }
.qwixx-dice-label small, .qwixx-dice-label strong { display: block; }
.qwixx-dice-label small { font-size: 10px; letter-spacing: .12em; color: #a3b3c5; margin-bottom: 7px; }
.qwixx-dice-label strong { font-size: 12px; }
.qwixx-dice { display: flex; flex-wrap: wrap; gap: 8px; }
.qwixx-die { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 38px; height: 38px; padding: 7px; box-sizing: border-box; border-radius: 8px; background: var(--qwixx-color); box-shadow: inset 0 -3px 0 #0003, 0 3px 8px #0003; animation: qwixx-settle .45s ease-out; }
.qwixx-die i { border-radius: 50%; }
.qwixx-dot-on { background: #182435; }
.qwixx-die-removed { opacity: .18; }
.qwixx-sheet { background: #1b283b; border: 1px solid #34485e; border-radius: 16px; padding: 20px 16px; }
.qwixx-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.qwixx-sheet-heading h3 { margin: 0; font-size: 16px; }
.qwixx-sheet-heading span { color: #97e1cc; font-weight: 800; }
.qwixx-row { padding: 10px 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) 24px; align-items: center; gap: 8px; color: var(--qwixx-color); }
.qwixx-row-label { font-size: 11px; font-weight: 700; }
.qwixx-cells { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.qwixx-cell { color: var(--qwixx-color); border: 1px solid var(--qwixx-color); background: var(--qwixx-dark); border-radius: 6px; min-width: 0; padding: 7px 0; font-size: 12px; line-height: 1.2; }
.qwixx-cell:disabled { opacity: .48; }
.qwixx-cell-marked:disabled { background: var(--qwixx-color); color: #132332; opacity: 1; font-size: 18px; padding: 4px 0; font-weight: 900; }
.qwixx-cell-available { box-shadow: 0 0 9px color-mix(in srgb, var(--qwixx-color) 30%, transparent); border-width: 2px; padding: 6px 0; }
.qwixx-cell-selected { outline: 2px solid white; outline-offset: 2px; background: var(--qwixx-color); color: #182435; }
.qwixx-lock { display: grid; place-items: center; font-size: 16px; }
.qwixx-lock svg { width: 14px; height: 14px; }
.qwixx-row-points { font-size: 12px; text-align: right; }
.qwixx-row-closed { opacity: .65; }
.qwixx-sheet-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 18px; border-top: 1px solid #34485e; padding-top: 16px; color: #aebed0; font-size: 12px; }
.qwixx-sheet-footer i { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid #526379; margin-left: 5px; border-radius: 4px; font-style: normal; }
.qwixx-penalty-used { color: #ed8e9c; background: #492c3c; }
.qwixx-turn-actions { margin: 22px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.qwixx-quick-choices { display: none; }
.qwixx-quick-choices button { min-height: 44px; display: flex; justify-content: space-between; color: var(--qwixx-color); background: var(--qwixx-dark); border-color: var(--qwixx-color); }
.qwixx-quick-choices .qwixx-quick-selected { outline: 2px solid white; outline-offset: 2px; }
.qwixx-turn-actions p { flex-basis: 100%; margin: 0; font-size: 13px; color: #b4c3d3; }
.qwixx-results { margin: 24px 0; border-top: 1px solid #34485e; padding-top: 16px; }
.qwixx-results div { display: flex; justify-content: space-between; padding: 12px; border-bottom: 1px solid #34485e; }
.qwixx-notice { color: #edc66c; }
.qwixx-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; border-top: 1px solid #34485e; padding: 16px 24px; background: #0d1623; }
.qwixx-footer p { margin: 0 auto 0 0; font-size: 12px; color: #aebed0; }
.qwixx-leave-confirm { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; }
@keyframes qwixx-settle { from { opacity: .2; transform: rotate(-18deg) scale(.75); } to { opacity: 1; transform: none; } }
@media (max-width: 780px) { .qwixx-body { grid-template-columns: 1fr; } .qwixx-sidebar { border-left: 0; border-top: 1px solid #253648; padding: 20px; } .qwixx-player { padding: 6px 0; } .qwixx-header { padding: 18px; } .qwixx-main { padding: 16px; } .qwixx-dice-tray { flex-wrap: wrap; } .qwixx-row { grid-template-columns: 1fr 24px; gap: 4px; } .qwixx-row-label { grid-column: 1 / -1; } .qwixx-cells { gap: 3px; } .qwixx-sheet { padding: 14px 10px; } .qwixx-cell { font-size: 11px; } .qwixx-footer { padding: 12px 16px; } .qwixx-lobby-hero { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { .qwixx-die { animation: none; } }
@media (max-width: 780px) { .qwixx-quick-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; } }


/* SPX-Muenze als Inline-Emoji (ersetzt den Text "SPX" bei Betraegen). */
.spx-coin {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  vertical-align: -0.22em;
}
