@import url('./slf-nav-v1.css');

@layer layout {
  .l-main {
    position: relative;
    z-index: 60;
    overflow: visible;
  }

  @media (max-width: 959px) {
    .l-sidebar {
      z-index: 1200;
    }

    .l-sidebar-overlay {
      z-index: 1100;
    }

    .l-main {
      z-index: 1;
      overflow: hidden;
    }
  }
}

@layer components {
  .c-report__fill {
    transition: filter 280ms ease;
    will-change: width;
  }

  .c-report__fill.is-animating {
    filter: saturate(1.18) brightness(1.08);
    animation: reportFillPulse 420ms ease-out;
  }

  @keyframes reportFillPulse {
    0% {
      box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    35% {
      box-shadow: 0 0 12px rgba(255, 255, 255, 0.36);
    }
    100% {
      box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .c-report__fill {
      transition: none;
      animation: none !important;
    }
  }

  .c-user-card__avatar-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0 auto;
    display: block;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 160ms ease;
  }

  .c-user-card__avatar-btn:hover,
  .c-user-card__avatar-btn:focus-visible {
    transform: scale(1.06);
  }

  .c-nav--bubble {
    border: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
    display: grid;
    gap: 0.15rem;
    margin-top: 1.15rem;
    margin-bottom: 0.6rem;
  }

  .c-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: var(--slf-space-4);
    min-height: 0;
    flex: 1 1 auto;
    width: 100%;
  }

  @media (min-width: 960px) {
    .l-sidebar {
      overflow: visible;
    }

    .c-sidebar-stack {
      transform: translateX(calc(var(--slf-shell-gap) / 2));
    }
  }

  .c-nav__trigger {
    appearance: none;
    border: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    color: rgba(206, 221, 246, 0.78);
    font-size: 1.24rem;
    font-weight: var(--slf-fw-semibold);
    border-radius: 0.45rem;
    padding: 0.26rem 0.7rem 0.26rem 0.95rem;
    cursor: pointer;
  }

  .c-nav__trigger-icon {
    width: 1.22rem;
    height: 1.22rem;
    flex: 0 0 1.22rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(199, 216, 252, 0.86);
  }

  .c-nav__trigger-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2.7;
  }

  .c-nav__trigger-icon--start {
    color: #ffd84d;
  }

  .c-nav__trigger-icon--start svg {
    fill: currentColor;
    stroke: currentColor;
  }

  .c-nav__trigger-icon--logbook {
    color: #ffd84d;
  }

  .c-nav__trigger-icon--course {
    color: #ffd84d;
  }

  .c-nav__trigger-icon--course svg path {
    fill: rgba(255, 216, 77, 0.16);
  }

  .c-nav__trigger-label {
    line-height: 1.1;
  }

  .c-nav__trigger:hover,
  .c-nav__trigger.is-active {
    color: #eaf4ff;
    background: rgba(111, 139, 255, 0.13);
  }

  .c-nav__trigger:hover .c-nav__trigger-icon,
  .c-nav__trigger.is-active .c-nav__trigger-icon {
    color: #eaf4ff;
  }

  .c-content-card--bubble {
    position: relative;
    overflow: visible;
  }

  .c-bubble-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 90;
  }

  .c-bubble-panel {
    position: absolute;
    left: -7.9rem;
    top: 4.4rem;
    width: min(17.5rem, calc(100% - 2.6rem));
    background: #fff;
    border: 1px solid rgba(73, 70, 200, 0.16);
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(20, 16, 82, 0.18);
    padding: 0.85rem;
    pointer-events: auto;
    z-index: 100;
  }

  .c-bubble-panel__close {
    position: absolute;
    top: 0.38rem;
    right: 0.38rem;
    border: 0;
    background: rgba(111, 139, 255, 0.1);
    color: #2a277f !important;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    font-size: 1.05rem;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .c-bubble-panel__close:hover,
  .c-bubble-panel__close:focus-visible {
    color: #2a277f !important;
    background: rgba(111, 139, 255, 0.16);
  }

  .c-bubble-panel__close i,
  .c-bubble-panel__close svg {
    width: 0.82rem;
    height: 0.82rem;
    stroke-width: 2.2;
    display: block;
    margin: 0;
  }

  .c-bubble-panel::before {
    content: "";
    position: absolute;
    left: -8px;
    top: var(--bubble-arrow-top, 1.1rem);
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid rgba(73, 70, 200, 0.16);
    border-bottom: 1px solid rgba(73, 70, 200, 0.16);
    transform: rotate(45deg);
  }

  .c-bubble-panel h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    color: var(--slf-text-1);
  }

  .c-bubble-meta {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    color: var(--slf-text-2);
  }

  .c-bubble-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.25rem;
  }

  .c-bubble-list button,
  .c-bubble-list a {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 8px;
    padding: 0.42rem 0.5rem;
    background: #f7f7ff;
    color: #2b2a43;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: block;
  }

  .c-bubble-list button:hover,
  .c-bubble-list a:hover {
    background: #eef0ff;
  }

  .c-bubble-list button.is-current,
  .c-bubble-list a.is-current {
    background: rgba(111, 139, 255, 0.16);
    color: #2a277f;
    font-weight: 600;
  }

  .c-bubble-list button:disabled {
    opacity: 0.55;
    cursor: default;
  }

  /* Einheitliches Bubble-Farbschema */
  .c-bubble-panel h3 {
    color: #2a277f;
  }

  .c-bubble-meta {
    color: rgba(79, 74, 161, 0.66);
    font-weight: 400;
  }

  .c-bubble-list button,
  .c-bubble-list a {
    color: #2a277f;
  }

  .c-bubble-list button.is-current,
  .c-bubble-list a.is-current {
    color: #2a277f;
  }

  .c-bubble-list--units {
    max-height: 13.5rem;
    overflow-y: auto;
    padding-right: 0.3rem;
    margin-right: -0.3rem;
  }

  .c-bubble-list--units::-webkit-scrollbar {
    width: 3px;
  }

  .c-bubble-list--units::-webkit-scrollbar-thumb {
    background: rgba(96, 94, 132, 0.26);
    border-radius: 999px;
  }

  .c-bubble-panel--notifications {
    width: min(23rem, calc(100% - 2.2rem));
  }

  .c-notify-panel {
    display: grid;
    gap: 0.54rem;
  }

  .c-notify-panel__toolbar {
    display: flex;
    justify-content: center;
  }

  .c-notify-panel__segment {
    display: inline-grid;
    grid-auto-flow: column;
    align-items: stretch;
    gap: 0.28rem;
    border: 1px solid rgba(73, 70, 200, 0.2);
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.74);
    padding: 0.24rem;
  }

  .c-notify-panel__segment-btn {
    border: 0;
    background: transparent;
    color: #2a277f;
    font-size: 0.82rem;
    font-weight: 520;
    padding: 0.32rem 0.62rem;
    border-radius: 0.58rem;
    cursor: pointer;
    white-space: nowrap;
  }

  .c-notify-panel__segment-btn.is-active {
    background: rgba(73, 70, 200, 0.12);
    font-weight: 620;
  }

  .c-notify-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.46rem;
    max-height: 16.4rem;
    overflow-y: auto;
    padding-right: 0.28rem;
  }

  .c-notify-panel__list::-webkit-scrollbar {
    width: 0.34rem;
  }

  .c-notify-panel__list::-webkit-scrollbar-thumb {
    background: rgba(96, 94, 132, 0.28);
    border-radius: 999px;
  }

  .c-notify-panel__item {
    border: 1px solid rgba(74, 65, 155, 0.12);
    border-radius: 0.74rem;
    padding: 0.5rem 0.56rem;
    background: rgba(255, 255, 255, 0.9);
    display: grid;
    gap: 0.26rem;
  }

  .c-notify-panel__item.is-unread {
    border-color: rgba(73, 70, 200, 0.28);
    box-shadow: 0 0 0 1px rgba(73, 70, 200, 0.06) inset;
  }

  .c-notify-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
  }

  .c-notify-panel__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-size: 0.73rem;
    font-weight: 620;
    color: #2a277f;
    background: rgba(78, 74, 161, 0.12);
  }

  .c-notify-panel__badge--insight {
    background: rgba(70, 131, 255, 0.14);
    color: #2b4f9e;
  }

  .c-notify-panel__badge--reminder {
    background: rgba(138, 94, 222, 0.14);
    color: #5a3f9b;
  }

  .c-notify-panel__badge--motivation {
    background: rgba(46, 142, 82, 0.15);
    color: #24683f;
  }

  .c-notify-panel__badge--system {
    background: rgba(235, 95, 73, 0.14);
    color: #a0382c;
  }

  .c-notify-panel__date {
    color: rgba(79, 74, 161, 0.72);
    font-size: 0.76rem;
    font-weight: 500;
    white-space: nowrap;
  }

  .c-notify-panel__text {
    margin: 0;
    color: #2a277f;
    font-size: 0.82rem;
    line-height: 1.34;
  }

  .c-notify-panel__empty {
    margin: 0.06rem 0 0;
    color: rgba(79, 74, 161, 0.82);
    font-size: 0.82rem;
  }

  .c-bubble-avatars {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .c-bubble-avatars--custom-grid {
    margin-top: 0.42rem;
  }

  .c-bubble-avatars button {
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .c-bubble-avatar-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
  }

  .c-bubble-avatar-item > [data-avatar-choice] {
    width: 100%;
    height: 100%;
  }

  .c-bubble-avatar-delete {
    position: absolute;
    right: -2px;
    top: -2px;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    aspect-ratio: auto !important;
    border-radius: 999px !important;
    border: 1px solid rgba(73, 70, 200, 0.38) !important;
    background: #fff !important;
    color: rgba(83, 75, 164, 0.92) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
    padding: 0 !important;
    z-index: 2;
  }

  .c-bubble-meta--section {
    margin-top: 0.66rem;
    margin-bottom: 0.36rem;
  }

  .c-bubble-meta--status {
    margin-top: 0.4rem;
    margin-bottom: 0;
    min-height: 1.1rem;
  }

  .c-bubble-meta--status[data-status-type="error"] {
    color: rgba(176, 56, 56, 0.9) !important;
  }

  .c-bubble-meta--status[data-status-type="success"] {
    color: rgba(35, 123, 71, 0.92) !important;
  }

  .c-bubble-avatar-add {
    border: 1px dashed rgba(73, 70, 200, 0.38) !important;
    background: rgba(248, 248, 255, 0.86) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .c-bubble-avatar-add.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  .c-bubble-avatar-add__plus {
    color: rgba(79, 74, 161, 0.82);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1;
  }

  .c-log-history {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    min-width: 0;
    padding-top: 0;
  }

  .c-log-history__head h3 {
    margin: 0 0 0.52rem;
    color: var(--slf-text-1);
    font-size: 1.12rem;
  }

  .c-log-history__head p {
    margin: 0;
    color: var(--slf-text-2);
    max-width: 64ch;
    line-height: 1.42;
  }

  .c-log-history__head .c-log-history__crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    font-size: 0.88rem;
    color: rgba(79, 74, 161, 0.8);
    margin: 0.18rem 0 0;
    font-weight: 500;
  }

  .c-log-history__head .c-log-history__crumb svg {
    width: 0.84rem;
    height: 0.84rem;
    stroke-width: 2.1;
  }

  .c-log-history__head .c-log-history__intro {
    margin-top: 0;
    margin-bottom: 0.52rem;
    max-width: 64ch;
  }

  .c-log-history__toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
  }

  .c-log-history__segment {
    position: relative;
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(73, 70, 200, 0.2);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.3rem;
    min-width: min(100%, 30.5rem);
    width: min(100%, 30.5rem);
    overflow: hidden;
  }

  .c-log-history__segment-pill {
    position: absolute;
    top: 0.3rem;
    left: 0;
    width: 4rem;
    height: calc(100% - 0.6rem);
    border-radius: 0.72rem;
    background: rgba(73, 70, 200, 0.12);
    transition: transform 180ms ease, width 180ms ease;
    will-change: transform, width;
    pointer-events: none;
  }

  .c-log-history__segment-btn {
    position: relative;
    z-index: 1;
    border: 0;
    background: transparent;
    color: rgba(79, 74, 161, 0.82);
    font-size: 0.86rem;
    font-weight: 500;
    padding: 0.42rem 0.7rem;
    border-radius: 0.72rem;
    cursor: pointer;
    white-space: nowrap;
  }

  .c-log-history__segment-btn.is-active {
    color: #2a277f;
    font-weight: 600;
  }

  .c-log-history__segment-btn:hover,
  .c-log-history__segment-btn:focus-visible {
    color: #2a277f;
  }

  .c-log-history__frame {
    border: 1px solid rgba(66, 57, 146, 0.14);
    border-radius: 1rem;
    background: rgba(248, 248, 255, 0.86);
    box-shadow: 0 14px 34px rgba(29, 22, 89, 0.08);
    padding: 0.95rem 0 0.95rem 0.95rem;
    flex: 1 1 auto;
    min-height: 18rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 0;
    /* Prevent tiny corner bleed-through artifacts on rounded edges. */
    clip-path: inset(0 round 1rem);
    isolation: isolate;
  }

  .c-log-history__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.52rem;
    align-content: start;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    box-sizing: border-box;
    min-width: 0;
  }

  .c-log-history__list::-webkit-scrollbar {
    width: 0.95rem;
  }

  .c-log-history__list::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.3rem 0;
  }

  .c-log-history__list::-webkit-scrollbar-thumb {
    background: rgba(96, 94, 132, 0.18);
    background-clip: padding-box;
    border: 6px solid transparent;
    border-radius: 999px;
  }

  .c-log-history__row {
    border: 1px solid rgba(74, 65, 155, 0.12);
    border-radius: 0.88rem;
    padding: 0.62rem 0.7rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    min-height: 3.75rem;
    min-width: 0;
  }

  .c-log-history__row.is-editing-placeholder {
    outline: 2px solid rgba(111, 139, 255, 0.35);
    outline-offset: 1px;
  }

  .c-log-history__row-main {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
  }

  .c-log-history__row-subline {
    color: var(--slf-text-2);
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 26rem;
  }

  .c-log-history__row-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.34rem 0.6rem;
    align-items: center;
    min-height: 1.3rem;
    justify-content: stretch;
  }

  .c-log-history__row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
    min-width: 0;
    grid-column: 2;
    justify-content: center;
    justify-self: center;
  }

  .c-log-history__row-date {
    color: rgba(79, 74, 161, 0.66);
    font-size: 0.79rem;
    font-weight: 400;
    white-space: nowrap;
    grid-column: 1;
    justify-self: start;
  }

  .c-log-history__row.is-filter-hidden {
    display: none !important;
  }

  .c-log-history__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.52rem;
    background: rgba(78, 74, 161, 0.12);
    color: var(--slf-text-1);
    font-weight: 600;
    font-size: 0.76rem;
  }

  .c-log-history__badge--ruhe {
    background: rgba(70, 131, 255, 0.14);
    color: #2b4f9e;
  }

  .c-log-history__badge--bewegung {
    background: rgba(235, 95, 73, 0.14);
    color: #a0382c;
  }

  .c-log-history__badge--ernaehrung {
    background: rgba(46, 142, 82, 0.15);
    color: #24683f;
  }

  .c-log-history__badge--koerperdaten {
    background: rgba(138, 94, 222, 0.14);
    color: #5a3f9b;
  }

  .c-notify-history__badge--insight {
    background: rgba(70, 131, 255, 0.14);
    color: #2b4f9e;
  }

  .c-notify-history__badge--reminder {
    background: rgba(138, 94, 222, 0.14);
    color: #5a3f9b;
  }

  .c-notify-history__badge--motivation {
    background: rgba(46, 142, 82, 0.15);
    color: #24683f;
  }

  .c-notify-history__badge--system {
    background: rgba(235, 95, 73, 0.14);
    color: #a0382c;
  }

  .c-log-history__row-title {
    color: var(--slf-text-1);
    font-size: 0.95rem;
    line-height: 1.34;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .c-log-history__row-title strong {
    font-weight: 700;
    color: var(--slf-text-1);
  }

  .c-log-history__row-secondary {
    color: rgba(79, 74, 161, 0.66);
    font-weight: 500;
  }

  .c-log-history__edit {
    border: 1px solid rgba(75, 67, 157, 0.22);
    background: #fff;
    color: var(--slf-text-1);
    border-radius: 0.64rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    cursor: pointer;
  }

  .c-log-history__edit:hover,
  .c-log-history__edit:focus-visible {
    background: rgba(111, 139, 255, 0.1);
  }

  .c-log-history__empty {
    position: absolute;
    left: 0.95rem;
    right: 0.95rem;
    bottom: 0.95rem;
    margin: 0;
    color: var(--slf-text-2);
    font-size: 0.9rem;
    pointer-events: none;
  }

  .c-log-history__actions {
    display: flex;
    justify-content: center;
  }

  .c-log-history__actions[hidden] {
    display: none;
  }

  .c-log-analysis {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    min-width: 0;
  }

  .c-log-analysis__head h3 {
    margin: 0 0 0.52rem;
    color: var(--slf-text-1);
    font-size: 1.12rem;
  }

  .c-log-analysis__subhead {
    margin: 0 0 0.44rem;
    color: rgba(79, 74, 161, 0.86);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
  }

  .c-log-analysis__head p {
    margin: 0 0 0.52rem;
    color: var(--slf-text-2);
    max-width: 64ch;
    line-height: 1.5;
  }

  .c-log-analysis__head .c-log-analysis__intro {
    margin-top: 0;
    margin-bottom: 0.52rem;
  }

  .c-log-analysis__frame {
    border: 1px solid rgba(73, 70, 200, 0.16);
    border-radius: 16px;
    background: rgba(248, 248, 255, 0.86);
    box-shadow: none;
    padding: 0;
    flex: 1 1 auto;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 0;
    height: 100%;
  }

  .c-log-analysis__frame--settings {
    align-items: stretch;
    justify-content: stretch;
    padding: 0.9rem;
    overflow: auto;
  }

  .c-log-analysis__placeholder {
    margin: 0;
    color: rgba(79, 74, 161, 0.78);
    font-size: 0.94rem;
  }

  .c-settings-layout {
    width: 100%;
    min-height: 0;
    display: grid;
    gap: 0.72rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  .c-settings-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.9rem;
    padding: 0.72rem 0.74rem;
    display: grid;
    gap: 0.62rem;
    align-content: start;
    min-width: 0;
  }

  .c-settings-card__head h5 {
    margin: 0 0 0.24rem;
    color: #2a277f;
    font-size: 0.9rem;
  }

  .c-settings-card__head p {
    margin: 0;
    color: rgba(79, 74, 161, 0.78);
    font-size: 0.79rem;
    line-height: 1.4;
  }

  .c-settings-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
  }

  .c-settings-field {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
  }

  .c-settings-field > span {
    font-size: 0.74rem;
    color: rgba(79, 74, 161, 0.8);
  }

  .c-settings-field input,
  .c-settings-field select {
    border: 1px solid rgba(73, 70, 200, 0.18);
    border-radius: 0.58rem;
    background: rgba(250, 250, 255, 0.96);
    color: #2a277f;
    height: 2rem;
    padding: 0 0.56rem;
    font-size: 0.83rem;
    font: inherit;
    min-width: 0;
  }

  .c-settings-field input:focus,
  .c-settings-field select:focus {
    outline: 2px solid rgba(73, 70, 200, 0.2);
    outline-offset: 1px;
  }

  .c-settings-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
  }

  .c-settings-choice-row button {
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #2a277f;
    border-radius: 999px;
    padding: 0.34rem 0.58rem;
    font-size: 0.79rem;
    cursor: pointer;
  }

  .c-settings-choice-row button.is-active {
    border-color: rgba(73, 70, 200, 0.34);
    background: rgba(73, 70, 200, 0.12);
    font-weight: 600;
  }

  .c-settings-toggle-list {
    display: grid;
    gap: 0.5rem;
  }

  .c-settings-toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.56rem;
  }

  .c-settings-toggle-row strong {
    color: #2a277f;
    font-size: 0.82rem;
    font-weight: 600;
  }

  .c-settings-toggle-row p {
    margin: 0.12rem 0 0;
    color: rgba(79, 74, 161, 0.76);
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .c-settings-toggle {
    width: 2.2rem;
    height: 1.26rem;
    border-radius: 999px;
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.08rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
  }

  .c-settings-toggle span {
    width: 0.92rem;
    height: 0.92rem;
    border-radius: 999px;
    background: #2a277f;
    transform: translateX(0);
    transition: transform 160ms ease;
  }

  .c-settings-toggle.is-on {
    background: rgba(73, 70, 200, 0.14);
    border-color: rgba(73, 70, 200, 0.34);
  }

  .c-settings-toggle.is-on span {
    transform: translateX(0.94rem);
    background: #4946c8;
  }

  .c-settings-action-list {
    display: grid;
    gap: 0.42rem;
  }

  .c-settings-action-list button {
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(255, 255, 255, 0.92);
    color: #2a277f;
    border-radius: 0.62rem;
    padding: 0.42rem 0.58rem;
    text-align: left;
    font-size: 0.81rem;
    cursor: pointer;
  }

  .c-settings-action-list button:hover,
  .c-settings-action-list button:focus-visible {
    background: rgba(73, 70, 200, 0.08);
  }

  @media (max-width: 959px) {
    .c-settings-layout {
      grid-template-columns: 1fr;
    }

    .c-settings-field-grid {
      grid-template-columns: 1fr;
    }
  }

  .c-settings-nav {
    margin-top: 0.08rem;
  }

  .c-settings-frame {
    align-items: stretch;
    justify-content: stretch;
    padding: 0.95rem;
  }

  .c-settings-page {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #2a277f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 220px;
  }

  .c-settings-page[hidden] {
    display: none !important;
  }

  .c-settings-page--profile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
  }

  .c-settings-page--notifications {
    display: block;
    height: 100%;
  }

  .c-settings-page--account {
    display: block;
    height: 100%;
  }

  .c-settings-notify {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.9rem, 2.2vw, 1.8rem);
    align-items: start;
  }

  .c-settings-notify__group {
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.8rem;
    background: rgba(247, 248, 255, 0.7);
    padding: 0.78rem 0.82rem;
    display: grid;
    gap: 0.72rem;
  }

  .c-settings-notify__title {
    margin: 0;
    color: #2a277f !important;
    font-size: 1.04rem;
    font-weight: 700;
  }

  .c-settings-notify__intro {
    margin: 0;
    color: #2a277f !important;
    font-size: 0.84rem;
    line-height: 1.38;
  }

  .c-settings-notify__rows {
    display: grid;
    gap: 0.5rem;
  }

  .c-settings-notify__row {
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.66rem;
    background: rgba(255, 255, 255, 0.9);
    min-height: 2.15rem;
    padding: 0.3rem 0.48rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
  }

  .c-settings-notify__label {
    color: #2a277f !important;
    font-size: 0.9rem;
    font-weight: 560;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .c-settings-notify__toggle {
    width: 2.2rem;
    height: 1.26rem;
    border-radius: 999px;
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.08rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
  }

  .c-settings-notify__toggle span {
    width: 0.92rem;
    height: 0.92rem;
    border-radius: 999px;
    background: #2a277f;
    transform: translateX(0);
    transition: transform 160ms ease;
  }

  .c-settings-notify__toggle.is-on {
    background: rgba(73, 70, 200, 0.14);
    border-color: rgba(73, 70, 200, 0.34);
  }

  .c-settings-notify__toggle.is-on span {
    transform: translateX(0.94rem);
    background: #4946c8;
  }

  .c-settings-notify__chips {
    display: grid;
    gap: 0.38rem;
  }

  .c-settings-notify__chips strong {
    color: #2a277f !important;
    font-size: 0.84rem;
    font-weight: 650;
  }

  .c-settings-notify__chips > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
  }

  .c-settings-notify__chip {
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(255, 255, 255, 0.92);
    color: #2a277f !important;
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    font-size: 0.78rem;
    cursor: pointer;
  }

  .c-settings-notify__chip.is-active {
    border-color: rgba(73, 70, 200, 0.34);
    background: rgba(73, 70, 200, 0.12);
    font-weight: 600;
  }

  .c-settings-notify__list {
    margin: 0;
    padding-left: 1.02rem;
    display: grid;
    gap: 0.44rem;
    color: #2a277f !important;
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .c-settings-notify__list strong {
    color: #2a277f !important;
    font-weight: 650;
  }

  .c-settings-notify__note {
    margin: 0.08rem 0 0;
    color: #2a277f !important;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  @media (max-width: 1080px) {
    .c-settings-notify {
      grid-template-columns: 1fr;
    }
  }

  .c-settings-account {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
    padding: 0;
    box-sizing: border-box;
    align-items: start;
  }

  .c-settings-account__group {
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.8rem;
    background: rgba(247, 248, 255, 0.7);
    padding: 0.78rem 0.82rem;
    display: grid;
    gap: 0.7rem;
  }

  .c-settings-account__title {
    margin: 0;
    color: #2a277f;
    font-size: 1.04rem;
    font-weight: 700;
  }

  .c-settings-account__intro {
    margin: 0;
    color: rgba(79, 74, 161, 0.86);
    font-size: 0.84rem;
    line-height: 1.38;
  }

  .c-settings-account__rows {
    display: grid;
    gap: 0.5rem;
  }

  .c-settings-account__row {
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.66rem;
    background: rgba(255, 255, 255, 0.9);
    min-height: 2.15rem;
    padding: 0.35rem 0.52rem;
    display: grid;
    gap: 0.1rem;
    align-content: center;
  }

  .c-settings-account__row strong {
    color: #2a277f;
    font-size: 0.86rem;
    font-weight: 620;
    line-height: 1.2;
  }

  .c-settings-account__row span {
    color: rgba(79, 74, 161, 0.82);
    font-size: 0.8rem;
    line-height: 1.24;
  }

  .c-settings-account__action {
    justify-self: start;
    margin-top: 0.15rem;
    border: 1px solid rgba(73, 70, 200, 0.24);
    background: rgba(73, 70, 200, 0.12);
    color: #2a277f;
    border-radius: 999px;
    padding: 0.26rem 0.62rem;
    font-size: 0.77rem;
    font-weight: 600;
    cursor: pointer;
  }

  .c-settings-account__action--ghost {
    background: rgba(255, 255, 255, 0.9);
  }

  .c-settings-account__state {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.04rem 0.42rem;
    margin-right: 0.26rem;
    background: rgba(138, 94, 222, 0.14);
    color: #5a3f9b !important;
    font-size: 0.72rem;
    font-weight: 620;
    line-height: 1.2;
  }

  .c-settings-account__state--active {
    background: rgba(46, 142, 82, 0.15);
    color: #24683f !important;
  }

  /* Konto-Tab: Lesbarkeit erzwingen, auch wenn spaete globale Tint-Overrides greifen. */
  .c-settings-page--account,
  .c-settings-page--account .c-settings-account__title,
  .c-settings-page--account .c-settings-account__intro,
  .c-settings-page--account .c-settings-account__row strong,
  .c-settings-page--account .c-settings-account__row span,
  .c-settings-page--account .c-settings-account__action {
    color: #2a277f !important;
    -webkit-text-fill-color: #2a277f !important;
  }

  @media (max-width: 1080px) {
    .c-settings-account {
      grid-template-columns: 1fr;
    }
  }

  .c-settings-profile {
    width: 100%;
    min-height: 0;
    display: grid;
    align-content: start;
    justify-items: stretch;
    gap: 0.35rem;
    padding-top: 0;
  }

  .c-settings-profile__avatar {
    margin: 0;
    box-shadow:
      0 0 0 2px rgba(255, 255, 255, 0.96),
      0 0 0 4px rgba(73, 70, 200, 0.28);
  }

  .c-settings-profile__name {
    margin: 0;
    color: #2a277f;
    font-size: 0.96rem;
    font-weight: 600;
  }

  .c-settings-profile__columns {
    width: 100%;
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(0.9rem, 2.2vw, 2rem);
    row-gap: 0.7rem;
    align-items: start;
    justify-items: center;
    justify-self: stretch;
    margin-inline: 0;
    padding-inline: 0;
    box-sizing: border-box;
  }

  .c-settings-profile__group {
    width: min(100%, 24.5rem);
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.8rem;
    background: rgba(247, 248, 255, 0.7);
    padding: 0.6rem;
    display: grid;
    gap: 0.48rem;
    justify-self: center;
  }

  @media (max-width: 1240px) {
    .c-settings-profile__columns {
      column-gap: 1rem;
    }

    .c-settings-profile__group {
      width: min(100%, 22.5rem);
    }
  }

  .c-settings-profile__group-title {
    margin: 0.28rem 0 0.44rem;
    color: #2a277f !important;
    font-size: 1.12rem;
    font-weight: 720;
    padding: 0;
  }

  .c-settings-profile__meta {
    margin: 0;
    width: 100%;
    display: grid;
    gap: 0.5rem;
    grid-auto-rows: minmax(2.28rem, 2.28rem);
  }

  .c-settings-profile__row {
    display: grid;
    grid-template-columns: minmax(7.2rem, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 0.44rem;
    padding: 0.24rem 0.48rem;
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.66rem;
    background: rgba(255, 255, 255, 0.9);
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
  }

  .c-settings-profile__row dt {
    margin: 0;
    color: #2a277f !important;
    font-size: 0.96rem;
    font-weight: 520;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .c-settings-profile__required {
    font-size: 0.84em;
    font-weight: 700;
    vertical-align: super;
    margin-left: 0.14rem;
    color: #2a277f !important;
    line-height: 1;
  }

  .c-settings-profile__row dd {
    margin: 0;
    color: #2a277f;
    font-size: 0.84rem;
    font-weight: 600;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    overflow: visible;
  }

  .c-settings-profile__input {
    width: 13.5rem;
    max-width: 100%;
    border: 1px solid rgba(73, 70, 200, 0.18);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.98);
    color: rgba(79, 74, 161, 0.78) !important;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.2;
    padding: 0.2rem 0.42rem;
    height: 1.52rem;
    min-height: 1.52rem;
    box-sizing: border-box;
    margin: 0;
    display: block;
    outline: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
  }

  .c-settings-profile__input[type="date"] {
    padding-right: 0.4rem;
  }

  .c-settings-profile__input::placeholder {
    color: rgba(79, 74, 161, 0.58) !important;
  }

  .c-settings-profile__input:focus-visible {
    border-color: rgba(73, 70, 200, 0.42);
    box-shadow: 0 0 0 2px rgba(73, 70, 200, 0.1);
  }

  .c-settings-profile__input.is-invalid {
    border-color: rgba(197, 54, 92, 0.8) !important;
    box-shadow: 0 0 0 2px rgba(197, 54, 92, 0.12);
  }

  .c-settings-profile__readonly {
    width: 13.5rem;
    max-width: 100%;
    border: 1px solid rgba(73, 70, 200, 0.18);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.98);
    color: rgba(79, 74, 161, 0.78) !important;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.2;
    padding: 0.2rem 0.42rem;
    height: 1.52rem;
    min-height: 1.52rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .c-settings-profile__row--readonly .c-settings-profile__readonly {
    user-select: none;
  }

  .c-settings-profile__edit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    height: 100%;
  }

  .c-settings-profile__commit {
    position: absolute;
    left: calc(100% + 1.44rem);
    top: 50%;
    transform: translateY(-50%) scale(0.88);
    width: 1.86rem;
    height: 1.86rem;
    border: 0;
    border-radius: 999px;
    background: rgba(79, 74, 161, 0.14);
    color: var(--slf-text-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease, background-color 120ms ease;
    cursor: pointer;
  }

  .c-settings-profile__commit svg {
    width: 1.06rem;
    height: 1.06rem;
    stroke-width: 2.35;
    color: var(--slf-text-1);
    stroke: currentColor;
  }

  .c-settings-profile__edit.is-editing .c-settings-profile__commit {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
  }

  .c-settings-profile__commit:hover,
  .c-settings-profile__commit:focus-visible {
    background: rgba(79, 74, 161, 0.24);
    outline: none;
  }

  .c-settings-profile__field-status,
  .c-settings-profile__select-status {
    position: absolute;
    right: 0.38rem;
    top: 50%;
    transform: translateY(-50%) scale(0.94);
    width: 1.04rem;
    height: 1.04rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 140ms ease, transform 140ms ease;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    z-index: 4;
  }

  .c-settings-profile__field-status.is-visible,
  .c-settings-profile__select-status.is-visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  .c-settings-profile__field-status[data-state="pending"],
  .c-settings-profile__select-status[data-state="pending"] {
    width: 0.82rem;
    height: 0.82rem;
    border: 2px solid rgba(79, 74, 161, 0.42);
    border-top-color: transparent;
    background: transparent;
    color: transparent;
    animation: slfFieldSpin 620ms linear infinite;
  }

  .c-settings-profile__field-status[data-state="success"],
  .c-settings-profile__select-status[data-state="success"] {
    color: var(--slf-text-1) !important;
    background: #97dcb5;
    text-shadow: 0 0 0 var(--slf-text-1);
    animation: slfFieldPop 220ms ease;
  }

  .c-settings-profile__field-status[data-state="error"],
  .c-settings-profile__select-status[data-state="error"] {
    color: var(--slf-text-1) !important;
    background: #e2a6b8;
    text-shadow: 0 0 0 var(--slf-text-1);
    animation: slfFieldShake 300ms ease;
  }

  @keyframes slfFieldSpin {
    from {
      transform: translateY(-50%) rotate(0deg);
    }
    to {
      transform: translateY(-50%) rotate(360deg);
    }
  }

  @keyframes slfFieldPop {
    0% {
      transform: translateY(-50%) scale(1);
    }
    50% {
      transform: translateY(-50%) scale(1.16);
    }
    100% {
      transform: translateY(-50%) scale(1);
    }
  }

  @keyframes slfFieldShake {
    0% {
      transform: translateY(-50%) translateX(0);
    }
    30% {
      transform: translateY(-50%) translateX(-2px);
    }
    60% {
      transform: translateY(-50%) translateX(2px);
    }
    100% {
      transform: translateY(-50%) translateX(0);
    }
  }

  .c-settings-profile__select {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 13.5rem;
    max-width: 100%;
    height: 100%;
  }

  .c-settings-profile__group--health .c-settings-profile__input,
  .c-settings-profile__group--health .c-settings-profile__select,
  .c-settings-profile__group--health .c-settings-profile__readonly {
    width: 10.2rem;
  }

  .c-settings-profile__group--health .c-settings-profile__row {
    grid-template-columns: minmax(9.4rem, 1fr) minmax(0, auto);
  }

  .c-settings-profile__group--health .c-settings-profile__row dt {
    overflow: visible;
    text-overflow: clip;
  }

  .c-settings-profile__group--health .c-settings-profile__input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
  }

  .c-settings-profile__group--health .c-settings-profile__input[type="number"]::-webkit-outer-spin-button,
  .c-settings-profile__group--health .c-settings-profile__input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  .c-settings-profile__select-trigger {
    width: 100%;
    border: 1px solid rgba(73, 70, 200, 0.18);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.98);
    color: rgba(79, 74, 161, 0.78) !important;
    font-size: 0.76rem;
    font-weight: 400;
    line-height: 1.2;
    padding: 0.2rem 0.42rem;
    height: 1.52rem;
    min-height: 1.52rem;
    box-sizing: border-box;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    cursor: pointer;
    text-align: left;
  }

  .c-settings-profile__select-trigger [data-settings-select-value] {
    color: rgba(79, 74, 161, 0.78) !important;
    font-weight: 400;
  }

  .c-settings-profile__select-trigger:focus-visible {
    border-color: rgba(73, 70, 200, 0.42);
    box-shadow: 0 0 0 2px rgba(73, 70, 200, 0.1);
    outline: none;
  }

  .c-settings-profile__select-trigger svg {
    width: 0.8rem;
    height: 0.8rem;
    stroke-width: 2.3;
    color: rgba(79, 74, 161, 0.72);
    flex: 0 0 auto;
  }

  .c-settings-profile__select-menu {
    list-style: none;
    margin: 0;
    padding: 0.18rem;
    position: absolute;
    top: calc(100% + 0.24rem);
    left: 0;
    right: 0;
    border: 1px solid rgba(73, 70, 200, 0.16);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 10px 26px rgba(18, 21, 44, 0.14);
    z-index: 8;
  }

  @media (max-width: 900px) {
    .c-settings-profile__columns {
      grid-template-columns: 1fr;
    }
  }

  .c-settings-profile__select-menu li {
    margin: 0;
    padding: 0;
  }

  .c-settings-profile__select-menu button {
    width: 100%;
    border: 0;
    background: transparent;
    color: rgba(79, 74, 161, 0.78) !important;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    border-radius: 0.35rem;
    padding: 0.36rem 0.42rem;
    cursor: pointer;
  }

  .c-settings-profile__select-menu button:hover,
  .c-settings-profile__select-menu button:focus-visible {
    background: rgba(73, 70, 200, 0.1);
    color: rgba(79, 74, 161, 0.78) !important;
    outline: none;
  }

  .c-log-history__more-row {
    list-style: none;
    margin: 0.06rem 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
  }

  .c-log-history__load-more {
    border: 0;
    background: transparent;
    color: #2a277f;
    border-radius: 0.4rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .c-log-history__load-more svg {
    width: 1.26rem;
    height: 1.26rem;
    stroke-width: 2.2;
    display: block;
  }

  .c-log-history__load-more:hover,
  .c-log-history__load-more:focus-visible {
    background: rgba(73, 70, 200, 0.1);
  }

  .c-bubble-avatars button.is-selected {
    border-color: rgba(111, 139, 255, 0.7);
  }

  .c-bubble-avatars img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
    display: block;
  }

  .c-quicklog {
    display: grid;
    gap: 0.95rem;
  }

  .c-quicklog__head h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    color: var(--slf-text-1) !important;
  }

  .c-quicklog__head p,
  .c-quicklog__hint {
    margin: 0;
    color: var(--slf-text-2) !important;
  }

  .c-quicklog__modes {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .c-quicklog__mode {
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(73, 70, 200, 0.06);
    color: #2a277f !important;
    border-radius: 999px;
    padding: 0.38rem 0.78rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
  }

  .c-quicklog__mode.is-active {
    background: rgba(73, 70, 200, 0.16);
    border-color: rgba(73, 70, 200, 0.32);
    color: #22204d !important;
  }

  .c-quicklog__panel {
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 12px;
    padding: 0.85rem;
    background: rgba(248, 248, 255, 0.84);
    display: grid;
    gap: 0.75rem;
  }

  .c-quicklog__voice-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
  }

  .c-btn--record {
    background: linear-gradient(120deg, #4946c8 0%, #2a277f 100%);
    color: #fff !important;
  }

  .c-quicklog__voice-state {
    font-size: 0.84rem;
    color: rgba(79, 74, 161, 0.78) !important;
    font-weight: 600;
  }

  .c-quicklog__textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid rgba(73, 70, 200, 0.2);
    border-radius: 10px;
    background: #fff;
    padding: 0.68rem 0.72rem;
    resize: vertical;
    color: #2a277f !important;
  }

  .c-quicklog__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.62rem;
  }

  .c-quicklog__field {
    display: grid;
    gap: 0.26rem;
  }

  .c-quicklog__field span {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(79, 74, 161, 0.84) !important;
  }

  .c-quicklog__field input,
  .c-quicklog__field select,
  .c-quicklog__field textarea {
    width: 100%;
    border: 1px solid rgba(73, 70, 200, 0.2);
    border-radius: 9px;
    background: #fff;
    padding: 0.5rem 0.58rem;
    color: #2a277f !important;
  }

  .c-quicklog__field textarea {
    min-height: 84px;
    resize: vertical;
  }

  .c-quicklog__field--full {
    grid-column: 1 / -1;
  }

  .c-quicklog__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  @media (max-width: 959px) {
    .c-quicklog__grid {
      grid-template-columns: 1fr;
    }
  }

  .c-content-card__scroll {
    overflow: hidden !important;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 0;
  }

  .c-page-headline__crumb {
    display: grid;
    gap: 0.18rem;
    margin: 0;
    line-height: 1.1;
    color: #2a277f !important;
    letter-spacing: 0.01em;
  }

  .c-page-headline__root {
    font-size: 1.95rem;
    font-weight: 700;
    color: #2a277f !important;
  }

  .c-page-headline__sub {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 1.32rem;
    font-weight: 500;
    color: rgba(79, 74, 161, 0.72) !important;
  }

  .c-page-headline__sub svg {
    width: 1.08rem;
    height: 1.08rem;
    stroke-width: 2.65;
  }

  .c-page-headline__sub > span {
    color: rgba(79, 74, 161, 0.72) !important;
  }

  .c-quicklog-lite {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    flex: 1 1 auto;
    min-height: 0;
  }

  .c-quicklog-lite__head h3 {
    margin: 0 0 0.52rem;
    font-size: 1.12rem;
    color: #2a277f !important;
  }

  .c-quicklog-lite__head p {
    margin: 0 0 0.52rem;
    color: rgba(79, 74, 161, 0.78) !important;
    max-width: 64ch;
  }

  .c-quicklog-lite__examples {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: 0.12rem;
  }

  .c-quicklog-lite__example {
    position: relative;
    padding: 0.1rem 0.38rem 0.1rem 1.08rem;
  }

  .c-quicklog-lite__example p {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.42;
    font-style: italic;
    color: #2a277f !important;
  }

  .c-quote-mark {
    font-style: normal;
    font-size: 2.05rem;
    line-height: 0.55;
    color: rgba(79, 74, 161, 0.56) !important;
    font-weight: 700;
    vertical-align: -0.28rem;
  }

  .c-quote-mark--open {
    margin-right: 0.14rem;
  }

  .c-quote-mark--close {
    margin-left: 0.08rem;
  }

  .c-voice-capture {
    margin-top: 0.65rem;
    padding: 0.12rem 0.08rem 0.08rem;
    display: grid;
    gap: 0;
    justify-items: center;
    text-align: center;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    align-self: stretch;
  }

  .c-voice-capture__frame {
    width: 100%;
    height: 100%;
    min-height: 240px;
    border: 1px solid rgba(73, 70, 200, 0.16);
    border-radius: 16px;
    background: rgba(248, 248, 255, 0.86);
    position: relative;
    overflow: hidden;
  }

  .c-voice-capture__visual {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, 86%);
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(73, 70, 200, 0.04) 0%, rgba(73, 70, 200, 0.08) 100%);
    border: 1px solid rgba(73, 70, 200, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.3rem 0.45rem;
    opacity: 0;
    transition: opacity 200ms ease;
  }

  .c-voice-capture__visual span {
    width: 4px;
    height: 12px;
    border-radius: 999px;
    background: rgba(73, 70, 200, 0.56);
    transform-origin: center;
  }

  .c-voice-capture__frame[data-voice-shell-state="recording"] .c-voice-capture__visual,
  .c-voice-capture__frame[data-voice-shell-state="processing"] .c-voice-capture__visual {
    opacity: 0;
  }

  .c-voice-capture__visual[data-voice-state="recording"] span {
    animation: voiceWave 0.9s ease-in-out infinite;
  }

  .c-voice-capture__visual[data-voice-state="recording"] span:nth-child(2) { animation-delay: 0.08s; }
  .c-voice-capture__visual[data-voice-state="recording"] span:nth-child(3) { animation-delay: 0.16s; }
  .c-voice-capture__visual[data-voice-state="recording"] span:nth-child(4) { animation-delay: 0.24s; }
  .c-voice-capture__visual[data-voice-state="recording"] span:nth-child(5) { animation-delay: 0.32s; }
  .c-voice-capture__visual[data-voice-state="recording"] span:nth-child(6) { animation-delay: 0.4s; }

  .c-voice-capture__visual[data-voice-state="processing"] span {
    opacity: 0.45;
    animation: pulseSoft 1.1s ease-in-out infinite;
  }

  .c-voice-capture__visual[data-voice-state="done"] span {
    height: 12px;
    background: rgba(8, 188, 184, 0.66);
  }

  .c-voice-capture__controls {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    z-index: 2;
  }

  .c-voice-capture__mode-btn {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid rgba(73, 70, 200, 0.24);
    background: rgba(255, 255, 255, 0.74);
    color: #2a277f !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(42, 39, 127, 0.14);
    transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
    line-height: 0;
  }

  .c-voice-capture__mode-btn:hover,
  .c-voice-capture__mode-btn:focus-visible {
    transform: none;
    background: rgba(255, 255, 255, 0.74);
  }

  .c-voice-capture__mode-btn--mic {
    width: 72px;
    height: 72px;
    border: 0;
    background: linear-gradient(162deg, #7f74e8 0%, #564ad1 36%, #3a3aa8 68%, #2a277f 100%);
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(42, 39, 127, 0.3);
    position: relative;
    overflow: hidden;
  }

  .c-voice-capture__mode-btn--text {
    background: rgba(255, 255, 255, 0.74);
    color: #2a277f !important;
    opacity: 1;
  }

  .c-voice-capture__mode-btn--list {
    background: rgba(255, 255, 255, 0.74);
    color: #2a277f !important;
    opacity: 1;
  }

  .c-voice-capture__mode-btn--list i,
  .c-voice-capture__mode-btn--list svg {
    color: #2a277f !important;
    opacity: 1;
    width: 1.44rem;
    height: 1.44rem;
  }

  .c-voice-capture__mode-btn--text i,
  .c-voice-capture__mode-btn--text svg {
    color: #2a277f !important;
    opacity: 1;
  }

  .c-voice-capture__mode-btn--mic:hover,
  .c-voice-capture__mode-btn--mic:focus-visible {
    background: linear-gradient(162deg, #7f74e8 0%, #564ad1 36%, #3a3aa8 68%, #2a277f 100%) !important;
  }

  .c-voice-capture__mode-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .c-voice-capture__mode-icon--check {
    display: none;
  }

  .c-voice-capture__mode-icon--mic {
    display: inline-flex;
  }

  .c-voice-capture__mode-icon--check {
    display: none;
  }

  .c-voice-capture__mode-icon--text {
    display: inline-flex;
  }

  .c-voice-capture__mode-icon--textcheck {
    display: none;
  }

  .c-voice-capture__mode-icon--list {
    display: inline-flex;
  }

  .c-voice-capture__mode-icon--listcheck {
    display: none;
  }

  .c-voice-capture__frame[data-mic-mode="check"] .c-voice-capture__mode-icon--mic {
    display: none;
  }

  .c-voice-capture__frame[data-mic-mode="check"] .c-voice-capture__mode-icon--check {
    display: inline-flex;
  }

  .c-voice-capture__frame[data-text-mode="check"] .c-voice-capture__mode-icon--text {
    display: none;
  }

  .c-voice-capture__frame[data-text-mode="check"] .c-voice-capture__mode-icon--textcheck {
    display: inline-flex;
  }

  .c-voice-capture__frame[data-list-mode="check"] .c-voice-capture__mode-icon--list {
    display: none;
  }

  .c-voice-capture__frame[data-list-mode="check"] .c-voice-capture__mode-icon--listcheck {
    display: inline-flex;
  }

  .c-voice-capture__frame[data-list-mode="check"] .c-voice-capture__mode-btn--list {
    background: rgba(255, 255, 255, 0.74);
    color: #2a277f !important;
    box-shadow: 0 6px 14px rgba(42, 39, 127, 0.14);
    opacity: 1;
  }

  .c-voice-capture__frame[data-text-mode="check"] .c-voice-capture__mode-btn--text {
    background: rgba(255, 255, 255, 0.74);
    color: #2a277f !important;
    box-shadow: 0 6px 14px rgba(42, 39, 127, 0.14);
    opacity: 1;
  }

  .c-voice-capture__frame[data-mic-mode="check"][data-mic-confirm-ready="true"] .c-voice-capture__mode-btn--mic {
    background: linear-gradient(162deg, #7f74e8 0%, #564ad1 36%, #3a3aa8 68%, #2a277f 100%);
    box-shadow: 0 12px 24px rgba(42, 39, 127, 0.3);
    cursor: pointer;
    opacity: 1;
  }

  .c-voice-capture__frame[data-mic-mode="check"][data-mic-confirm-ready="false"] .c-voice-capture__mode-btn--mic {
    background: linear-gradient(162deg, #7f74e8 0%, #564ad1 36%, #3a3aa8 68%, #2a277f 100%);
    box-shadow: 0 12px 24px rgba(42, 39, 127, 0.3);
    cursor: pointer;
    opacity: 1;
  }

  .c-voice-capture__mode-btn i,
  .c-voice-capture__mode-btn svg {
    width: 1.22rem;
    height: 1.22rem;
    display: block;
    stroke-width: 2.7 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: center center;
    transform: scale(1);
    transition: transform 140ms ease;
    will-change: transform;
  }

  .c-voice-capture__mode-btn--mic i,
  .c-voice-capture__mode-btn--mic svg {
    width: 1.56rem;
    height: 1.56rem;
    stroke-width: 2.35 !important;
  }

  .c-voice-capture__frame[data-mic-mode="check"] .c-voice-capture__mode-icon--check i,
  .c-voice-capture__frame[data-mic-mode="check"] .c-voice-capture__mode-icon--check svg {
    width: 1.68rem;
    height: 1.68rem;
  }

  .c-voice-capture__controls .c-voice-capture__mode-btn:not(:hover):not(:focus-visible) i,
  .c-voice-capture__controls .c-voice-capture__mode-btn:not(:hover):not(:focus-visible) svg {
    transform: scale(1) !important;
  }

  .c-voice-capture__controls .c-voice-capture__mode-btn--list i,
  .c-voice-capture__controls .c-voice-capture__mode-btn--list svg {
    width: 1.36rem !important;
    height: 1.36rem !important;
  }

  .c-voice-capture__mode-btn:hover i,
  .c-voice-capture__mode-btn:hover svg,
  .c-voice-capture__mode-btn:focus-visible i,
  .c-voice-capture__mode-btn:focus-visible svg {
    transform: scale(1.12);
  }

  @keyframes voiceWave {
    0%, 100% { height: 9px; opacity: 0.58; }
    50% { height: 30px; opacity: 1; }
  }

  @keyframes pulseSoft {
    0%, 100% { transform: scaleY(0.85); opacity: 0.42; }
    50% { transform: scaleY(1.15); opacity: 0.75; }
  }

  @media (max-width: 959px) {
    .c-content-card__scroll {
      overflow: auto !important;
      display: block;
    }

    .c-quicklog-lite__examples {
      grid-template-columns: 1fr;
    }

    .c-voice-capture__frame {
      min-height: 190px;
      height: 34vh;
    }

    .c-voice-capture__controls {
      gap: 0.65rem;
    }

    .c-voice-capture__mode-btn--mic {
      width: 64px;
      height: 64px;
    }

    .c-voice-capture__mode-btn--mic {
      transform: none;
    }
  }

  .c-sidebar-footer {
    flex-wrap: wrap;
    row-gap: 0.32rem;
    padding-top: 0.12rem;
  }

  .c-user-card__quick-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.05rem;
    margin-bottom: 1.9rem;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link {
    color: rgba(225, 222, 255, 0.82);
    transition: transform 140ms ease, color 140ms ease, filter 140ms ease;
    position: relative;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link:hover,
  .c-user-card__quick-actions .c-sidebar-footer__icon-link:focus-visible {
    color: #ffffff;
    background: transparent;
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px rgba(220, 232, 255, 0.35));
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon {
    transition: transform 140ms ease;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link:hover .c-sidebar-footer__icon,
  .c-user-card__quick-actions .c-sidebar-footer__icon-link:focus-visible .c-sidebar-footer__icon {
    transform: scale(1.04);
  }

  .c-sidebar-footer__icon {
    width: 1.22rem;
    height: 1.22rem;
    flex: 0 0 1.22rem;
    stroke-width: 2.7;
    opacity: 0.94;
  }

  .c-user-card__notif-marker {
    position: absolute;
    top: -0.04rem;
    right: 0.11rem;
    width: 0.92rem;
    height: 0.92rem;
    display: grid;
    place-items: center;
    color: #ffd84d !important;
    line-height: 0;
    pointer-events: none;
    transform-origin: 50% 50%;
    animation: notifStarPulse 2.2s ease-in-out 3;
    animation-fill-mode: both;
  }

  .c-user-card__notif-marker i,
  .c-user-card__notif-marker svg {
    width: 100%;
    height: 100%;
    display: block;
    color: #ffd84d !important;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 2.2;
    filter: drop-shadow(0 0 0 rgba(255, 216, 77, 0));
    animation: notifStarGlow 2.2s ease-in-out 3;
    animation-fill-mode: both;
  }

  .c-user-card__notif-marker::after {
    content: "";
    position: absolute;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 244, 186, 0.95);
    top: 0.08rem;
    right: 0.1rem;
    opacity: 0;
    transform: scale(0.7);
    animation: notifStarGlint 2.2s ease-in-out 3;
    animation-fill-mode: both;
  }

  @keyframes notifStarPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    18% { transform: scale(1.06) rotate(-4deg); }
    28% { transform: scale(0.98) rotate(3deg); }
    40% { transform: scale(1.04) rotate(0deg); }
    60% { transform: scale(1) rotate(0deg); }
  }

  @keyframes notifStarGlow {
    0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 216, 77, 0)); }
    20% { filter: drop-shadow(0 0 5px rgba(255, 216, 77, 0.42)); }
    36% { filter: drop-shadow(0 0 8px rgba(255, 216, 77, 0.58)); }
    52% { filter: drop-shadow(0 0 3px rgba(255, 216, 77, 0.24)); }
  }

  @keyframes notifStarGlint {
    0%, 14%, 100% { opacity: 0; transform: scale(0.7); }
    20% { opacity: 0.9; transform: scale(1); }
    30% { opacity: 0; transform: scale(0.5); }
    44% { opacity: 0.75; transform: scale(0.95); }
    54% { opacity: 0; transform: scale(0.55); }
  }

  @media (prefers-reduced-motion: reduce) {
    .c-user-card__notif-marker,
    .c-user-card__notif-marker i,
    .c-user-card__notif-marker svg,
    .c-user-card__notif-marker::after {
      animation: none !important;
    }
  }

  .c-sidebar-footer__legal {
    width: 100%;
    margin-top: 0.1rem;
    padding-top: 0.12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    line-height: 1;
    letter-spacing: 0.01em;
    color: rgba(215, 225, 248, 0.62);
  }

  .c-sidebar-footer--legal-only {
    justify-content: center;
    padding-top: 0;
    row-gap: 0;
  }

  .c-sidebar-footer__legal a {
    color: inherit;
    opacity: 0.88;
    text-decoration: none;
  }

  .c-sidebar-footer__legal-sep {
    font-size: 0.9rem;
    line-height: 1;
    transform: translateY(-0.02rem);
    color: rgba(215, 225, 248, 0.72);
  }

  .c-sidebar-footer__legal a:hover,
  .c-sidebar-footer__legal a:focus-visible {
    opacity: 1;
    color: rgba(236, 244, 255, 0.92);
    text-decoration: underline;
    text-decoration-thickness: 1px;
  }

  .c-user-card {
    padding-top: 1.65rem;
    padding-bottom: 1.55rem;
    min-width: 0;
    overflow: hidden;
  }

  .c-user-card__name {
    display: block;
    width: calc(100% - 0.2rem);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    min-height: 2.2rem;
    line-height: 1.1;
    min-width: 0;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .c-user-card__name--compact {
    font-size: 1.62rem !important;
  }

  .c-user-card__name--compact2 {
    font-size: 1.36rem !important;
  }

  @media (max-width: 959px) {
    .c-bubble-panel {
      left: 0.65rem;
      right: 0.65rem;
      width: auto;
      top: auto !important;
      bottom: 5.3rem;
    }

    .c-bubble-panel::before {
      display: none;
    }
  }
}

@layer utilities {
  :root {
    --slf-unified-tint: rgba(238, 234, 255, 0.94);
  }

  body,
  h1, h2, h3, h4, h5, h6,
  p,
  span,
  a,
  button,
  label,
  li,
  small {
    color: var(--slf-unified-tint) !important;
  }

  input,
  textarea,
  select {
    color: var(--slf-unified-tint) !important;
  }

  .c-text-flow__input {
    color: #2a277f !important;
    -webkit-text-fill-color: #2a277f !important;
  }

  .c-nav__trigger,
  .c-nav__trigger .c-nav__trigger-label,
  .c-nav__trigger-icon,
  .c-sidebar-footer__icon-link,
  .c-sidebar-footer__icon {
    color: var(--slf-unified-tint) !important;
  }

  .c-nav__trigger {
    transform-origin: left center;
    transition:
      transform 140ms ease,
      color 140ms ease,
      text-shadow 140ms ease,
      letter-spacing 140ms ease;
  }

  .c-nav__trigger-icon {
    transition: transform 140ms ease, color 140ms ease;
  }

  .c-nav__trigger:hover,
  .c-nav__trigger.is-active,
  .c-nav__trigger:hover .c-nav__trigger-label,
  .c-nav__trigger.is-active .c-nav__trigger-label {
    color: #ffffff !important;
  }

  .c-nav__trigger:hover,
  .c-nav__trigger.is-active {
    background: transparent !important;
    transform: translateX(0.22rem) scale(1.035);
    letter-spacing: 0.01em;
    text-shadow: 0 0 12px rgba(206, 220, 255, 0.24);
  }

  .c-nav__trigger:hover .c-nav__trigger-icon,
  .c-nav__trigger.is-active .c-nav__trigger-icon {
    transform: scale(1.08);
    color: #ffe991 !important;
  }

  .c-sidebar-footer__legal a:hover,
  .c-sidebar-footer__legal a:focus-visible {
    color: #ffffff !important;
    opacity: 1;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link:hover,
  .c-user-card__quick-actions .c-sidebar-footer__icon-link:focus-visible,
  .c-user-card__quick-actions .c-sidebar-footer__icon-link:hover .c-sidebar-footer__icon,
  .c-user-card__quick-actions .c-sidebar-footer__icon-link:focus-visible .c-sidebar-footer__icon {
    color: #ffffff !important;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link::after {
    top: calc(100% + 0.22rem);
    bottom: auto;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(124, 132, 170, 0.58);
    border: 1px solid rgba(206, 214, 246, 0.26);
    color: rgba(245, 247, 255, 0.95);
    backdrop-filter: blur(7px);
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link:hover::after,
  .c-user-card__quick-actions .c-sidebar-footer__icon-link:focus-visible::after {
    transform: translateX(-50%) translateY(0);
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link::after {
    display: none !important;
  }

  /* Einheitliches Bubble-Farbschema auf alle Panels anwenden */
  .c-bubble-panel h3 {
    color: #2a277f !important;
  }

  .c-bubble-meta {
    color: rgba(79, 74, 161, 0.66) !important;
    font-weight: 400;
  }

  .c-bubble-list button {
    color: #2a277f !important;
  }

  .c-bubble-list a {
    color: #2a277f !important;
  }

  .c-bubble-list button.is-current {
    color: #2a277f !important;
  }

  .c-bubble-list a.is-current {
    color: #2a277f !important;
  }

  /* Verlaufseite: auf Weiss immer mit lesbaren, dunklen Tinten rendern. */
  .c-log-history__head h3,
  .c-log-analysis__head h3,
  .c-log-analysis__subhead,
  .c-log-history__row-title,
  .c-log-history__row-title strong,
  .c-log-history__badge,
  .c-log-history__segment-btn,
  .c-log-history__edit,
  .c-log-history__load-more {
    color: #2a277f !important;
  }

  .c-log-history__row-date,
  .c-log-history__row-secondary {
    color: rgba(79, 74, 161, 0.66) !important;
    font-weight: 400 !important;
  }

  .c-log-history__head p,
  .c-log-analysis__head p,
  .c-log-analysis__placeholder,
  .c-log-history__row-meta,
  .c-log-history__empty {
    color: rgba(79, 74, 161, 0.78) !important;
  }

}

@layer components {
  .c-voice-capture__frame {
    overflow: visible;
  }

  .c-voice-bubble-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
    overflow: visible;
  }

  .c-voice-bubble {
    position: absolute;
    left: 50%;
    bottom: calc(50% + 3.4rem);
    transform: translateX(-50%);
    width: min(640px, calc(100% - 2.6rem));
    background: #fff;
    border: 1px solid rgba(73, 70, 200, 0.16);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(20, 16, 82, 0.18);
    padding: 0.82rem;
    pointer-events: auto;
    transition: none;
  }

  :root {
    --slf-voice-bubble-small-h: 140px;
    --slf-voice-bubble-large-h: 360px;
    --slf-voice-review-max-h: min(var(--slf-voice-bubble-large-h), calc(100vh - 220px));
  }

  .c-voice-bubble--mic {
    width: min(440px, calc(100% - 6rem));
    height: var(--slf-voice-bubble-small-h);
    min-height: var(--slf-voice-bubble-small-h);
    max-height: var(--slf-voice-bubble-small-h);
    overflow: visible;
  }

  .c-voice-bubble--mic.is-expanded {
    width: min(720px, calc(100% - 2.2rem));
    height: auto;
    min-height: 0;
    max-height: var(--slf-voice-review-max-h);
    overflow: visible;
  }

  .c-voice-bubble--text.is-expanded {
    width: min(720px, calc(100% - 2.2rem));
    height: auto;
    min-height: 0;
    max-height: var(--slf-voice-review-max-h);
    overflow: visible;
  }

  .c-voice-bubble--list {
    width: min(720px, calc(100% - 2.2rem));
    height: var(--slf-voice-review-max-h);
    min-height: var(--slf-voice-review-max-h);
    max-height: var(--slf-voice-review-max-h);
    overflow: visible;
  }

  .c-voice-bubble--list.is-compact {
    width: min(440px, calc(100% - 6rem));
    height: var(--slf-voice-bubble-small-h);
    min-height: var(--slf-voice-bubble-small-h);
    max-height: var(--slf-voice-bubble-small-h);
    overflow: visible;
  }

  .c-voice-bubble--text {
    width: min(440px, calc(100% - 6rem));
    height: var(--slf-voice-bubble-small-h);
    min-height: var(--slf-voice-bubble-small-h);
    max-height: var(--slf-voice-bubble-small-h);
    overflow: visible;
  }

  .c-voice-bubble--text.is-input {
    width: min(440px, calc(100% - 6rem));
    height: var(--slf-voice-bubble-small-h);
    min-height: var(--slf-voice-bubble-small-h);
    max-height: var(--slf-voice-bubble-small-h);
  }

  .c-voice-bubble--text.is-compact {
    width: min(440px, calc(100% - 6rem));
    height: var(--slf-voice-bubble-small-h);
    min-height: var(--slf-voice-bubble-small-h);
    max-height: var(--slf-voice-bubble-small-h);
  }

  .c-voice-bubble::after {
    content: "";
    position: absolute;
    left: var(--voice-arrow-left, calc(50% - 9px));
    bottom: -13px;
    width: 18px;
    height: 11px;
    background: #fff;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    opacity: 1;
    z-index: 2;
  }

  .c-voice-bubble__close {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    border: 0;
    background: rgba(111, 139, 255, 0.1);
    color: #2a277f !important;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    font-size: 1.05rem;
    display: grid;
    place-items: center;
    padding: 0;
    z-index: 12;
  }

  .c-voice-bubble__close:hover,
  .c-voice-bubble__close:focus-visible {
    background: rgba(111, 139, 255, 0.16);
    color: #2a277f !important;
  }

  .c-voice-bubble__close i,
  .c-voice-bubble__close svg {
    width: 0.82rem;
    height: 0.82rem;
    stroke-width: 2.2;
    display: block;
    margin: 0;
  }

  .c-voice-bubble h4 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    color: #2a277f !important;
  }

  .c-voice-bubble p {
    margin: 0;
    color: rgba(79, 74, 161, 0.78) !important;
  }

  .c-mic-flow {
    text-align: left;
    display: grid;
    gap: 0.65rem;
    height: 100%;
    min-height: 100%;
  }

  .c-text-flow {
    text-align: left;
    display: grid;
    gap: 0.65rem;
    height: 100%;
    min-height: 100%;
  }

  .c-list-flow {
    text-align: left;
    display: grid;
    gap: 0.65rem;
    height: 100%;
    min-height: 100%;
  }

  .c-mic-flow__view {
    display: grid;
    gap: 0.45rem;
    align-items: center;
  }

  .c-text-flow__view {
    display: grid;
    gap: 0.45rem;
    align-items: center;
  }

  .c-list-flow__view {
    display: grid;
    gap: 0.45rem;
    align-items: start;
    align-content: start;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto auto;
  }

  .c-list-flow__view.c-mic-flow__view--review {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto auto;
  }

  .c-list-flow__head p {
    margin: 0;
    font-size: 0.86rem;
    color: rgba(79, 74, 161, 0.84) !important;
  }

  .c-structured-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
    align-content: start;
    min-height: 0;
    overflow: auto;
    max-height: min(258px, calc(100vh - 360px));
    height: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(90, 102, 176, 0.44) transparent;
  }

  .c-structured-list::-webkit-scrollbar {
    width: 3px;
  }

  .c-structured-list::-webkit-scrollbar-track {
    background: transparent;
  }

  .c-structured-list::-webkit-scrollbar-thumb {
    background: rgba(90, 102, 176, 0.42);
    border-radius: 999px;
  }

  .c-structured-row {
    align-items: start;
    max-height: none;
    padding: 0.42rem 0.5rem;
  }

  .c-structured-row.is-adding {
    animation: structuredRowIn 220ms ease;
  }


  .c-structured-row__main {
    display: grid;
    grid-template-columns: minmax(7.8rem, 0.9fr) minmax(0, 1.6fr);
    gap: 0.34rem;
    align-items: end;
  }

  .c-structured-row__main > .c-inline-control--type {
    border-right: 1px solid rgba(73, 70, 200, 0.22);
    padding-right: 0.68rem;
  }

  .c-structured-row__content {
    display: grid;
    gap: 0.35rem;
  }


  .c-structured-row__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
    padding-left: 0.22rem;
  }

  .c-structured-row__fields > .c-inline-control + .c-inline-control {
    border-left: 1px solid rgba(73, 70, 200, 0.22);
    padding-left: 0.52rem;
  }

  .c-structured-row__fields--bewegung {
    grid-template-columns: minmax(0, 1.35fr) minmax(4.6rem, 0.65fr);
  }

  .c-structured-row__fields--ruhe {
    grid-template-columns: minmax(0, 1.35fr) minmax(4.6rem, 0.65fr);
  }

  .c-structured-row__fields--ernaehrung {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }


  .c-inline-control {
    width: 100%;
    min-height: 1.58rem;
    border: 0;
    border-bottom: 1px dotted rgba(73, 70, 200, 0.62);
    border-radius: 0;
    background-color: transparent;
    color: #2a277f;
    -webkit-text-fill-color: #2a277f;
    opacity: 1;
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.2;
    padding: 0.08rem 1rem 0.08rem 0.04rem;
    font-family: inherit;
    transition: background-color 120ms ease, box-shadow 120ms ease, border-bottom-color 120ms ease, border-bottom-style 120ms ease;
  }

  .c-inline-control:hover {
    background: rgba(73, 70, 200, 0.05);
    border-bottom-color: rgba(73, 70, 200, 0.72);
  }

  .c-inline-control--input {
    padding-right: 0.08rem;
    cursor: text;
  }

  .c-inline-control--valuehint {
    background-image: linear-gradient(45deg, transparent 50%, rgba(73, 70, 200, 0.62) 50%), linear-gradient(135deg, rgba(73, 70, 200, 0.62) 50%, transparent 50%);
    background-position: calc(100% - 10px) calc(50% - 2px), calc(100% - 6px) calc(50% - 2px);
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
    padding-right: 1rem;
  }

  .c-inline-control--select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(73, 70, 200, 0.75) 50%), linear-gradient(135deg, rgba(73, 70, 200, 0.75) 50%, transparent 50%);
    background-position: calc(100% - 10px) calc(50% - 2px), calc(100% - 6px) calc(50% - 2px);
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
    cursor: pointer;
    color: #2a277f;
    -webkit-text-fill-color: #2a277f;
    font-weight: 400;
  }

  .c-inline-control--type {
    font-weight: 400;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .c-inline-control:focus {
    outline: none;
    background: rgba(73, 70, 200, 0.08);
    border-bottom-style: solid;
    border-bottom-color: rgba(73, 70, 200, 0.78);
    box-shadow: inset 0 -1px 0 rgba(73, 70, 200, 0.22);
  }

  .c-inline-control.is-valid {
    border-bottom-color: transparent;
    box-shadow: none;
    background-color: transparent;
  }

  .c-inline-control.is-valid:hover,
  .c-inline-control.is-valid:focus {
    border-bottom-color: transparent;
    background-color: transparent;
    box-shadow: none;
  }

  .c-inline-control[disabled] {
    opacity: 1;
    cursor: default;
    border-bottom-color: rgba(73, 70, 200, 0.62);
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  .c-inline-control[disabled]:hover,
  .c-inline-control[disabled]:focus {
    background-color: transparent;
    box-shadow: none;
    border-bottom-color: rgba(73, 70, 200, 0.62);
  }

  .c-structured-row input::placeholder {
    color: rgba(79, 74, 161, 0.5);
  }

  .c-inline-control option {
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 400;
    color: #2a277f;
  }

  .c-list-flow__add {
    justify-self: center;
    border: 1px solid rgba(73, 70, 200, 0.24);
    background: rgba(73, 70, 200, 0.08);
    color: #2a277f;
    border-radius: 999px;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .c-list-flow__add:hover {
    background: rgba(73, 70, 200, 0.14);
  }

  @keyframes structuredRowIn {
    0% {
      opacity: 0.35;
      transform: translateY(-4px) scale(0.985);
    }
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .c-text-flow__view--input {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto 1fr;
    align-items: stretch;
  }

  .c-mic-flow__view--recording,
  .c-mic-flow__view--processing {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto;
    align-items: start;
    justify-items: stretch;
    position: relative;
  }

  .c-mic-flow__title {
    position: relative;
  }

  .c-mic-flow__subhint {
    position: absolute;
    top: calc(100% + 0.14rem);
    left: 0;
    right: 0;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.25;
    color: rgba(79, 74, 161, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease;
    pointer-events: none;
  }

  .c-mic-flow__subhint.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .c-mic-flow__view h4 {
    margin: 0;
    font-size: 0.94rem;
    color: #2a277f !important;
  }

  .c-text-flow__view h4 {
    margin: 0;
    font-size: 0.94rem;
    color: #2a277f !important;
  }

  .c-text-flow__input {
    width: 100%;
    min-height: 0;
    height: 100%;
    resize: none;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(73, 70, 200, 0.2);
    background: rgba(250, 250, 255, 0.95);
    color: #2a277f;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.55rem 0.6rem;
  }

  .c-text-flow__input::placeholder {
    color: rgba(79, 74, 161, 0.72) !important;
    -webkit-text-fill-color: rgba(79, 74, 161, 0.72) !important;
    opacity: 1;
  }

  .c-text-flow__input::-webkit-input-placeholder {
    color: rgba(79, 74, 161, 0.72) !important;
    -webkit-text-fill-color: rgba(79, 74, 161, 0.72) !important;
  }

  .c-text-flow__input:focus {
    outline: 2px solid rgba(73, 70, 200, 0.2);
    outline-offset: 1px;
  }

  .c-text-flow__input {
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 94, 132, 0.26) transparent;
  }

  .c-text-flow__input::-webkit-scrollbar {
    width: 3px;
  }

  .c-text-flow__input::-webkit-scrollbar-track {
    background: transparent;
  }

  .c-text-flow__input::-webkit-scrollbar-thumb {
    background: rgba(96, 94, 132, 0.26);
    border-radius: 999px;
  }

  .c-mic-processing-options {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 74px;
    margin: 0;
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
  }

  .c-mic-flow__view--recording .c-mic-indicator--wave {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .c-mic-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
    align-content: start;
  }

  .c-mic-results__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(73, 70, 200, 0.16);
    border-radius: 10px;
    padding: 0.45rem 0.5rem;
    background: rgba(248, 248, 255, 0.9);
    max-height: 86px;
    transform-origin: 50% 50%;
    transition:
      opacity 260ms ease,
      transform 260ms ease,
      max-height 300ms ease,
      margin 300ms ease,
      padding 300ms ease,
      border-color 260ms ease;
  }

  .c-mic-results__row.is-removing {
    opacity: 0;
    transform: scale(0.98) translateY(-2px);
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
    pointer-events: none;
    overflow: hidden;
  }

  .c-mic-results__text {
    display: grid;
    gap: 0.1rem;
  }

  .c-mic-results__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
    align-items: center;
  }

  .c-mic-results__text strong {
    font-size: 0.9rem;
    color: #2a277f;
  }

  .c-mic-results__text span {
    font-size: 0.86rem;
    color: #2a277f !important;
    -webkit-text-fill-color: #2a277f !important;
  }

  .c-mic-results__actions {
    display: inline-flex;
    gap: 0.3rem;
  }

  .c-mic-results__actions button {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid rgba(73, 70, 200, 0.24);
    background: rgba(255, 255, 255, 0.92);
    color: #2a277f;
    cursor: pointer;
    line-height: 1;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .c-mic-results__actions button[data-mic-row-action="reject"]:hover {
    border-color: rgba(248, 48, 126, 0.65);
    color: #b81f66;
  }

  .c-mic-results__actions button[data-structured-action="remove"] {
    width: 1.7rem;
    min-width: 1.7rem;
  }

  .c-mic-results__actions button[data-structured-action="remove"]:hover {
    border-color: rgba(248, 48, 126, 0.65);
    color: #b81f66;
  }

  .c-mic-flow__view--saved,
  .c-mic-flow__view--error {
    min-height: 90px;
    align-content: center;
    justify-items: center;
    text-align: center;
  }

  .c-mic-review-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
  }

  .c-mic-review-head p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
    color: rgba(79, 74, 161, 0.84) !important;
  }

  .c-mic-flow__view--review,
  .c-text-flow__view--review {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    align-content: start;
  }


  .c-mic-indicator {
    margin-top: 0.2rem;
  }

  .c-mic-indicator--wave {
    min-height: 74px;
    padding: 0.2rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
  }

  .c-mic-indicator--wave span {
    width: 4px;
    height: 11px;
    border-radius: 999px;
    background: rgba(73, 70, 200, 0.62);
    transform-origin: center;
    animation: voiceWave 0.9s ease-in-out infinite;
  }

  .c-mic-indicator--wave span:nth-child(2) { animation-delay: 0.08s; }
  .c-mic-indicator--wave span:nth-child(3) { animation-delay: 0.16s; }
  .c-mic-indicator--wave span:nth-child(4) { animation-delay: 0.24s; }
  .c-mic-indicator--wave span:nth-child(5) { animation-delay: 0.32s; }
  .c-mic-indicator--wave span:nth-child(6) { animation-delay: 0.4s; }

  .c-mic-indicator--spinner {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    border: 2px solid rgba(73, 70, 200, 0.22);
    border-top-color: rgba(73, 70, 200, 0.8);
    justify-self: center;
    animation: micSpin 0.8s linear infinite;
    margin: 0.8rem auto;
  }

  .c-mic-indicator--spinner-pulse {
    border: 0;
    background: radial-gradient(circle at center, rgba(73, 70, 200, 0.78) 0 38%, rgba(73, 70, 200, 0.18) 45% 100%);
    animation: micPulse 1s ease-in-out infinite;
  }

  .c-mic-indicator--dots {
    width: auto;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    margin: 0;
  }

  .c-mic-indicator--dots span {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: rgba(73, 70, 200, 0.78);
    animation: micDot 0.9s ease-in-out infinite;
  }

  .c-mic-indicator--dots span:nth-child(2) {
    animation-delay: 0.12s;
  }

  .c-mic-indicator--dots span:nth-child(3) {
    animation-delay: 0.24s;
  }

  .c-mic-results {
    max-height: min(244px, calc(100vh - 382px));
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(90, 102, 176, 0.44) transparent;
  }

  .c-mic-results::-webkit-scrollbar {
    width: 3px;
  }

  .c-mic-results::-webkit-scrollbar-track {
    background: transparent;
  }

  .c-mic-results::-webkit-scrollbar-thumb {
    background: rgba(90, 102, 176, 0.42);
    border-radius: 999px;
  }

  @keyframes micSpin {
    to { transform: rotate(360deg); }
  }

  @keyframes micPulse {
    0%, 100% { transform: scale(0.84); opacity: 0.55; }
    50% { transform: scale(1.08); opacity: 1; }
  }

  @keyframes micDot {
    0%, 100% { transform: translateY(0); opacity: 0.45; }
    50% { transform: translateY(-0.28rem); opacity: 1; }
  }
}


.c-offline-banner {
  position: fixed;
  z-index: 1000;
  left: max(1rem, env(safe-area-inset-left));
  right: max(1rem, env(safe-area-inset-right));
  top: max(0.75rem, env(safe-area-inset-top));
  padding: 0.78rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--slf-ink, #24205c);
  box-shadow: 0 18px 48px rgba(36, 32, 92, 0.18);
  border: 1px solid rgba(79, 74, 161, 0.22);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(14px);
}

body.is-offline .c-content-card,
body.is-offline .l-sidebar {
  filter: saturate(0.82);
}

body.is-offline [data-mic-start],
body.is-offline [data-text-submit],
body.is-offline [data-structured-submit] {
  opacity: 0.62;
}


  .c-settings-push-test {
    border: 1px solid rgba(73, 70, 200, 0.14);
    border-radius: 0.72rem;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.62rem 0.68rem;
    display: grid;
    gap: 0.42rem;
    color: #2a277f;
  }

  .c-settings-push-test strong,
  .c-settings-push-test p,
  .c-settings-push-test dt,
  .c-settings-push-test dd {
    color: #2a277f !important;
    -webkit-text-fill-color: #2a277f !important;
  }

  .c-settings-push-test > strong {
    font-size: 0.88rem;
    font-weight: 700;
  }

  .c-settings-push-test p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .c-settings-push-test__facts {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(6.5rem, auto) 1fr;
    gap: 0.2rem 0.5rem;
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .c-settings-push-test__facts dt {
    font-weight: 650;
  }

  .c-settings-push-test__facts dd {
    margin: 0;
    opacity: 0.82;
  }

  .c-settings-push-test__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.36rem;
  }

  .c-settings-push-test__actions .c-settings-account__action {
    margin-top: 0;
  }

/* Mobile app shell prototype: top status card + single content pane.
   Desktop layout remains untouched because all rules are scoped below 960px. */
@media (max-width: 959px) {
  html,
  body {
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  body.page-dashboard {
    padding: max(0.55rem, env(safe-area-inset-top)) 0.72rem max(0.72rem, env(safe-area-inset-bottom));
  }

  .l-app {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(9.2rem, 28dvh) minmax(0, 1fr);
    gap: 0.72rem;
    width: 100%;
    height: calc(100dvh - max(0.55rem, env(safe-area-inset-top)) - max(0.72rem, env(safe-area-inset-bottom)));
    min-height: 0;
    overflow: hidden;
  }

  .l-sidebar {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    padding: 0 !important;
    display: block;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: 2;
  }

  .l-sidebar-overlay,
  .c-sidebar__mobile-actions,
  .c-nav--bubble,
  .c-sidebar-footer--legal-only,
  .c-main-header,
  .c-bottom-nav {
    display: none !important;
  }

  .c-sidebar-stack {
    height: 100%;
    min-height: 0;
    display: block;
    transform: none !important;
  }

  .c-user-card {
    height: 100%;
    min-height: 0;
    padding: 0.74rem 0.82rem !important;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 0.72rem;
    row-gap: 0.42rem;
    align-items: center;
    border-radius: 1.05rem;
    overflow: hidden !important;
  }

  .c-user-card__avatar-btn {
    grid-column: 1;
    grid-row: 1;
    width: 3.15rem;
    height: 3.15rem;
    margin: 0;
  }

  .c-user-card__avatar {
    width: 3.15rem !important;
    height: 3.15rem !important;
  }

  .c-user-card__name {
    grid-column: 2;
    grid-row: 1;
    margin: 0 !important;
    width: 100%;
    min-height: 0;
    font-size: clamp(1.28rem, 5.8vw, 1.7rem) !important;
    line-height: 1.02;
    text-align: left;
  }

  .c-user-card__name--compact,
  .c-user-card__name--compact2 {
    font-size: clamp(1.08rem, 5vw, 1.42rem) !important;
  }

  .c-user-card__quick-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    gap: 0.18rem;
    margin: 0 !important;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link {
    width: 1.78rem;
    height: 1.78rem;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon {
    width: 1.03rem;
    height: 1.03rem;
  }

  .c-report {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: stretch;
    min-height: 0;
    display: grid;
    gap: 0.34rem;
    margin: 0 !important;
  }

  .c-report__row {
    min-height: 0;
  }

  .c-report__head {
    font-size: 0.78rem;
    margin-bottom: 0.12rem;
  }

  .c-report__track {
    height: 0.42rem;
  }

  .l-main {
    position: relative;
    z-index: 1;
    height: auto !important;
    min-height: 0;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .c-content-card {
    height: 100% !important;
    min-height: 0;
    padding: 0.82rem !important;
    border-radius: 1.05rem !important;
  }

  .c-content-card__scroll {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden !important;
    padding: 0 !important;
  }

  .c-quicklog-lite {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .c-quicklog-lite__head,
  .c-quicklog-lite__examples {
    display: none !important;
  }

  .c-voice-capture {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  .c-voice-capture__frame {
    min-height: 0 !important;
    height: 100% !important;
    border-radius: 0.82rem;
  }

  .c-voice-capture__visual {
    top: 45%;
  }

  .c-voice-capture__controls {
    bottom: 1.05rem;
  }

  .c-voice-capture__mode-btn--mic {
    width: clamp(5.2rem, 22vw, 6.4rem);
    height: clamp(5.2rem, 22vw, 6.4rem);
  }

  .c-voice-bubble {
    max-height: calc(100% - 1rem);
    overflow: auto;
  }

  .c-voice-bubble--mic,
  .c-voice-bubble--text.is-compact,
  .c-voice-bubble--list.is-compact {
    width: min(25rem, calc(100% - 1.8rem));
    overflow: visible !important;
  }

  .c-voice-bubble--mic .c-mic-flow,
  .c-voice-bubble--text.is-compact .c-text-flow,
  .c-voice-bubble--list.is-compact .c-list-flow {
    overflow: hidden !important;
  }
}

@layer components {
  .page-login {
    min-height: 100dvh;
    margin: 0;
    color: var(--slf-ink, #29246f);
    background:
      radial-gradient(circle at 14% 10%, rgba(128, 119, 220, 0.32), transparent 34rem),
      linear-gradient(145deg, #f7f6ff 0%, #ebeefe 45%, #f9fbff 100%);
  }

  .c-login-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(1.4rem, 5vw, 3rem);
  }

  .c-login-card {
    width: min(100%, 28rem);
    padding: clamp(1.65rem, 5vw, 2.4rem);
    border-radius: 1.8rem;
    border: 1px solid rgba(96, 91, 189, 0.2);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 1.4rem 4rem rgba(43, 38, 117, 0.16);
  }

  .c-login-card__eyebrow {
    margin: 0 0 0.55rem;
    color: var(--slf-muted-ink, #6961b1);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
  }

  .c-login-card h1 {
    margin: 0 0 0.75rem;
    color: var(--slf-ink, #29246f);
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 0.95;
  }

  .c-login-card p {
    margin: 0 0 1.25rem;
    color: var(--slf-muted-ink, #6961b1);
    line-height: 1.45;
  }

  .c-login-card__error {
    padding: 0.72rem 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 226, 156, 0.58);
    color: var(--slf-ink, #29246f) !important;
    font-weight: 700;
  }

  .c-login-form {
    display: grid;
    gap: 0.85rem;
  }

  .c-login-form label {
    display: grid;
    gap: 0.35rem;
    color: var(--slf-ink, #29246f);
    font-weight: 800;
  }

  .c-login-form input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(105, 97, 177, 0.22);
    border-radius: 1rem;
    padding: 0.82rem 0.95rem;
    color: var(--slf-ink, #29246f);
    background: rgba(255, 255, 255, 0.94);
    font: inherit;
  }

  .c-login-form input:focus {
    outline: none;
    border-color: rgba(96, 91, 189, 0.46);
    box-shadow: 0 0 0 0.22rem rgba(96, 91, 189, 0.12);
  }

  .c-login-form button {
    margin-top: 0.35rem;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, #6b5ed6 0%, #314fbd 100%);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 0.9rem 1.8rem rgba(49, 79, 189, 0.22);
  }
}

/* iOS/PWA shell refinement: fixed app frame, visible safe-area color, bottom primary nav. */
@media (max-width: 959px) {
  :root {
    --slf-mobile-nav-h: 3.2rem;
    --slf-mobile-x: 0.72rem;
    --slf-mobile-gap: 0.68rem;
  }

  html,
  body.page-dashboard {
    background:
      linear-gradient(160deg, rgba(248, 48, 126, 0.42) 0%, rgba(248, 48, 126, 0) 46%),
      linear-gradient(68deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 30%),
      linear-gradient(180deg, var(--slf-bg-2) 0%, var(--slf-bg-3) 43%, var(--slf-bg-1) 100%) !important;
    background-attachment: fixed !important;
  }

  body.page-dashboard {
    box-sizing: border-box;
    padding:
      max(0.58rem, env(safe-area-inset-top))
      var(--slf-mobile-x)
      calc(var(--slf-mobile-nav-h) + max(0.58rem, env(safe-area-inset-bottom))) !important;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  .l-app {
    grid-template-rows: minmax(9.15rem, 28dvh) minmax(0, 1fr) !important;
    gap: var(--slf-mobile-gap) !important;
    height: calc(
      100dvh
      - max(0.58rem, env(safe-area-inset-top))
      - max(0.58rem, env(safe-area-inset-bottom))
      - var(--slf-mobile-nav-h)
      - var(--slf-mobile-gap)
    ) !important;
  }

  .l-main {
    min-height: 0 !important;
  }

  .c-content-card {
    min-height: 0 !important;
    height: 100% !important;
  }

  .c-bottom-nav {
    position: fixed;
    z-index: 1300;
    left: max(var(--slf-mobile-x), env(safe-area-inset-left));
    right: max(var(--slf-mobile-x), env(safe-area-inset-right));
    bottom: max(0.05rem, calc(env(safe-area-inset-bottom) - 1.58rem));
    height: calc(var(--slf-mobile-nav-h) - 0.45rem);
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.48rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .c-bottom-nav__item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 1.1rem;
    padding: 0.58rem 0.32rem;
    display: grid;
    place-items: center;
    color: var(--slf-ink, #29246f);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 0.72rem 1.6rem rgba(43, 38, 117, 0.12);
    font: inherit;
    font-size: clamp(0.74rem, 3.15vw, 0.9rem);
    font-weight: 850;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .c-bottom-nav__item.is-active,
  .c-bottom-nav__item:focus-visible {
    color: #fff;
    background: linear-gradient(145deg, #6558d4 0%, #314fbd 100%);
    border-color: rgba(255, 255, 255, 0.42);
    outline: none;
  }

}

/* Mobile bottom nav: same language as desktop sidebar, rotated into the bottom edge. */
@media (max-width: 959px) {
  .l-app,
  .l-main,
  .c-content-card--bubble,
  .c-content-card__scroll,
  .c-bubble-stage {
    overflow: visible !important;
  }

  .l-main {
    z-index: 1450 !important;
  }

  .c-bubble-stage {
    z-index: 1500 !important;
  }

  .c-bottom-nav {
    height: calc(var(--slf-mobile-nav-h) - 0.25rem);
    align-items: center;
    gap: 0.18rem;
  }

  .c-bottom-nav__item {
    border: 0 !important;
    border-radius: 0.45rem !important;
    padding: 0.18rem 0.12rem 0.12rem !important;
    display: grid !important;
    grid-template-rows: auto auto;
    place-items: center;
    gap: 0.2rem;
    color: rgba(206, 221, 246, 0.78) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: clamp(0.94rem, 3.75vw, 1.08rem) !important;
    font-weight: var(--slf-fw-semibold, 760) !important;
    letter-spacing: 0;
  }

  .c-bottom-nav__item.is-active,
  .c-bottom-nav__item:focus-visible,
  .c-bottom-nav__item:hover {
    color: #eaf4ff !important;
    font-weight: var(--slf-fw-semibold, 760) !important;
    background: transparent !important;
    outline: none;
  }

  .c-bottom-nav__icon {
    width: 1.42rem;
    height: 1.42rem;
    display: inline-flex;
    place-items: center;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: rgba(199, 216, 252, 0.86);
    box-shadow: none;
  }

  .c-bottom-nav__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2.7;
  }

  .c-bottom-nav__item.is-active .c-bottom-nav__icon,
  .c-bottom-nav__item:hover .c-bottom-nav__icon,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon {
    color: #ffd84d !important;
  }

  .c-bottom-nav__item.is-active .c-bottom-nav__icon svg,
  .c-bottom-nav__item:hover .c-bottom-nav__icon svg,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon svg,
  .c-bottom-nav__item.is-active .c-bottom-nav__icon svg path,
  .c-bottom-nav__item:hover .c-bottom-nav__icon svg path,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon svg path,
  .c-bottom-nav__item.is-active .c-bottom-nav__icon svg line,
  .c-bottom-nav__item:hover .c-bottom-nav__icon svg line,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon svg line,
  .c-bottom-nav__item.is-active .c-bottom-nav__icon svg polyline,
  .c-bottom-nav__item:hover .c-bottom-nav__icon svg polyline,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon svg polyline,
  .c-bottom-nav__item.is-active .c-bottom-nav__icon svg circle,
  .c-bottom-nav__item:hover .c-bottom-nav__icon svg circle,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon svg circle {
    color: #ffd84d !important;
    stroke: #ffd84d !important;
  }

  .c-bottom-nav__item.is-active .c-bottom-nav__label {
    transform: none;
    transform-origin: center;
  }

  .c-bottom-nav__item.is-active .c-bottom-nav__icon--start svg,
  .c-bottom-nav__item:hover .c-bottom-nav__icon--start svg,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon--start svg {
    fill: #ffd84d !important;
    stroke: #ffd84d !important;
  }

  .c-bottom-nav__item.is-active .c-bottom-nav__icon--course svg path,
  .c-bottom-nav__item:hover .c-bottom-nav__icon--course svg path,
  .c-bottom-nav__item:focus-visible .c-bottom-nav__icon--course svg path {
    fill: rgba(255, 216, 77, 0.16) !important;
  }

  .c-bottom-nav__label {
    display: block;
    line-height: 1.08;
  }

  .c-bubble-panel {
    left: 50% !important;
    right: auto !important;
    width: min(19rem, calc(100vw - 3.4rem)) !important;
    top: auto !important;
    bottom: calc(max(0.58rem, env(safe-area-inset-bottom)) - 1.35rem) !important;
    border-radius: 1.08rem !important;
    box-shadow: 0 1rem 2.3rem rgba(20, 16, 82, 0.24) !important;
    transform: translateX(-50%);
    z-index: 1510 !important;
  }

  .c-bubble-panel::before {
    display: block !important;
    left: var(--mobile-bubble-arrow-left, 50%) !important;
    top: auto !important;
    bottom: -10px !important;
    width: 0;
    height: 0;
    background: transparent;
    border-left: 10px solid transparent !important;
    border-right: 10px solid transparent !important;
    border-top: 10px solid #fff !important;
    border-bottom: 0 !important;
    filter: drop-shadow(0 1px 0 rgba(73, 70, 200, 0.16));
    transform: translateX(-50%) !important;
  }

  .c-bubble-panel::after {
    content: "";
    position: absolute;
    left: var(--mobile-bubble-arrow-left, 50%);
    top: auto;
    bottom: -14px;
    width: 0;
    height: 0;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    transform: translateX(-50%);
  }

  .c-bubble-panel[data-mobile-bubble-target="start"] {
    --mobile-bubble-arrow-left: 9%;
  }

  .c-bubble-panel[data-mobile-bubble-target="logbuch"] {
    --mobile-bubble-arrow-left: 50%;
  }

  .c-bubble-panel[data-mobile-bubble-target="kurs"] {
    --mobile-bubble-arrow-left: 91%;
  }

  .c-bubble-panel[data-mobile-bubble-target="profile"] {
    --mobile-bubble-arrow-left: 50%;
    position: fixed !important;
    left: 50% !important;
    top: calc(max(0.58rem, env(safe-area-inset-top)) + 2.7rem) !important;
    bottom: auto !important;
    width: min(18.5rem, calc(100vw - 3.4rem)) !important;
    transform: translateX(-50%) !important;
    z-index: 1620 !important;
  }

  .c-bubble-panel[data-mobile-bubble-target="profile"]::before {
    top: -10px !important;
    bottom: auto !important;
    border-left: 10px solid transparent !important;
    border-right: 10px solid transparent !important;
    border-top: 0 !important;
    border-bottom: 10px solid #fff !important;
    filter: drop-shadow(0 -1px 0 rgba(73, 70, 200, 0.16));
  }
}

/* Mobile top card experiment: closer to the desktop user card hierarchy. */
@media (max-width: 959px) {
  .l-app {
    grid-template-rows: max-content minmax(0, 1fr) !important;
  }

  .c-user-card {
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    padding: 1.08rem !important;
    padding-top: 1.18rem !important;
    padding-bottom: 1.08rem !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    justify-items: center;
    align-content: start;
    row-gap: 0.18rem;
    text-align: center;
  }

  .c-user-card__avatar-btn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 4.18rem;
    height: 4.18rem;
    margin: 0 auto !important;
  }

  .c-user-card__avatar {
    width: 4.18rem !important;
    height: 4.18rem !important;
  }

  .c-user-card__name,
  .c-user-card__name--compact,
  .c-user-card__name--compact2 {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100%;
    margin: 0.02rem 0 0 !important;
    text-align: center;
    font-size: clamp(1.42rem, 5.6vw, 1.9rem) !important;
    font-weight: 760 !important;
    line-height: 1.06;
  }

  .c-user-card__quick-actions {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: center;
    align-self: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0.01rem 0 0.02rem !important;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon-link {
    width: 2.05rem;
    height: 2.05rem;
    color: rgba(225, 222, 255, 0.82) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .c-user-card__quick-actions .c-sidebar-footer__icon {
    width: 1.22rem;
    height: 1.22rem;
  }

  .c-report {
    grid-column: 1 !important;
    grid-row: 4 !important;
    width: 100%;
    align-self: stretch;
    display: grid;
    align-content: start;
    gap: 0.36rem;
    margin: 0.06rem 0 0 !important;
  }

  .c-report__row {
    min-height: 1.66rem;
  }

  .c-report__head {
    font-size: 0.86rem;
    font-weight: 650;
    margin-bottom: 0.12rem;
  }

  .c-report__track {
    height: 0.44rem;
  }
}

/* iOS standalone safety net: color the full viewport behind safe areas. */
@media (max-width: 959px) {
  html,
  body.page-dashboard {
    min-height: 100vh !important;
    min-height: 100svh !important;
    min-height: 100dvh !important;
    background-color: var(--slf-bg-1, #32258f) !important;
  }

  body.page-dashboard {
    position: relative;
    isolation: isolate;
  }

  .c-bottom-nav {
    position: fixed;
    z-index: 1300;
  }
}
