*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-rgb: 255, 255, 255;
    --surface2: #f1f5f9;
    --surface3: #e2e8f0;
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --text4: #cbd5e1;
    --border: #e2e8f0;
    --border2: #cbd5e1;
    --hover: #f1f5f9;
    --active: #e2e8f0;
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-light-2: #bfdbfe;
    --primary-dark: #1d4ed8;
    --primary-rgb: 37, 99, 235;
    --accent: #0ea5e9;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --success: #22c55e;
    --success-light: #f0fdf4;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.12);
    --radius-xs: 6px;
    --radius: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --sidebar-w: 280px;
    --topbar-h: 56px;
    --btm-h: 64px;
    --font-base: 15px;
    --sat: env(safe-area-inset-top, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab-js: 0px;
    --btm-nav-total: 56px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-rgb: 30, 41, 59;
    --surface2: #1a2332;
    --surface3: #334155;
    --text: #f1f5f9;
    --text2: #94a3b8;
    --text3: #64748b;
    --text4: #475569;
    --border: #334155;
    --border2: #475569;
    --hover: #334155;
    --active: #475569;
    --primary: #3b82f6;
    --primary-light: #1e3a5f;
    --primary-dark: #60a5fa;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.6);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.7);
}

html {
    font-size: var(--font-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100dvh;
    height: 100vh;
    height: 100svh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow: hidden;
    height: 100dvh;
    height: 100vh;
    height: 100svh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

#app {
    display: flex;
    height: 100dvh;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    position: relative;
}

mark {
    background: #fef08a;
    color: var(--text);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 500;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text3);
}

.sidebar {
    width: var(--sidebar-w);
    height: 100dvh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 40;
    padding-top: var(--sat);
    padding-left: var(--sal);
}

.sidebar.hidden {
    display: none !important;
}

.sidebar-top {
    padding: 14px 14px 0;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    padding: 6px 4px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    transition: opacity 0.2s;
}

.sidebar-brand:hover {
    opacity: 0.8;
}

.sidebar-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
}

.header-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.header-main {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.header-sub {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text2);
    line-height: 1.3;
}

.sidebar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 10px;
    transition: border-color 0.25s var(--ease-out-cubic), box-shadow 0.25s var(--ease-out-cubic);
}

.sidebar-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.sidebar-search i {
    color: var(--text3);
    font-size: 0.82rem;
    flex-shrink: 0;
}

.sidebar-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.85rem;
    color: var(--text);
    font-family: inherit;
    min-width: 0;
}

.sidebar-search input::placeholder {
    color: var(--text3);
}

.sidebar-search-clear {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    display: none;
    font-size: 0.75rem;
    transition: color 0.15s;
    border-radius: var(--radius-xs);
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-search-clear.show {
    display: flex;
}

.sidebar-search-clear:hover {
    color: var(--text);
    background: var(--hover);
}

.sidebar-cat-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text2);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
    transition: all 0.25s var(--ease-out-cubic);
    width: 100%;
    min-height: 40px;
}

.sidebar-cat-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-cat-toggle i.toggle-icon {
    font-size: 0.6rem;
    margin-left: auto;
    transition: transform 0.35s var(--ease-out-cubic);
}

.sidebar-cat-toggle.open i.toggle-icon {
    transform: rotate(180deg);
}

.sidebar-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s var(--ease-out-cubic), opacity 0.3s var(--ease-out-cubic), padding 0.3s, margin 0.3s;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sidebar-cats.open {
    max-height: 300px;
    opacity: 1;
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.sidebar-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.67rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text2);
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
    transition: all 0.2s var(--ease-out-cubic);
    min-height: 40px;
    min-width: 40px;
}

.sidebar-cat-chip i {
    font-size: 0.58rem;
}

.sidebar-cat-chip .cat-count {
    font-size: 0.6rem;
    background: var(--bg);
    padding: 0 4px;
    border-radius: 6px;
    font-weight: 600;
    margin-left: 1px;
    transition: all 0.2s;
}

.sidebar-cat-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sidebar-cat-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.sidebar-cat-chip.active .cat-count {
    background: rgba(255,255,255, 0.25);
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 8px;
    -webkit-overflow-scrolling: touch;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 1px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    transition: all 0.2s var(--ease-out-cubic);
    line-height: 1.35;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sidebar-nav li a:hover {
    background: var(--hover);
    transform: translateX(2px);
}

.sidebar-nav li a:active {
    background: var(--active);
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.sidebar-nav li a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.sidebar-nav li a .nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sidebar-nav li a:hover .nav-dot {
    transform: scale(1.3);
}

.sidebar-nav li a .nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-bottom {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s;
    width: 100%;
    font-family: inherit;
    min-height: 40px;
}

.sidebar-btn:hover {
    background: var(--hover);
    color: var(--text);
}

.sidebar-font {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    font-size: 0.78rem;
    color: var(--text2);
}

.sidebar-font i {
    font-size: 0.72rem;
}

.sidebar-font button {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--text2);
    font-family: inherit;
    transition: all 0.2s;
    min-width: 36px;
    min-height: 36px;
}

.sidebar-font button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.sidebar-font span {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.72rem;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--bg);
    position: relative;
}

.topbar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    padding-left: calc(14px + var(--sal));
    padding-right: calc(14px + var(--sar));
    padding-top: var(--sat);
    height: calc(var(--topbar-h) + var(--sat));
    min-height: calc(var(--topbar-h) + var(--sat));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 30;
}

.topbar-back {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    display: none;
    transition: transform 0.2s, background 0.2s;
    border-radius: var(--radius);
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-back.show {
    display: flex;
}

.topbar-back:hover {
    background: var(--hover);
    transform: translateX(-2px);
}

.topbar-back:active {
    background: var(--active);
    transform: scale(0.95);
}

.topbar-title {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-btn {
    background: none;
    border: none;
    color: var(--text2);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-btn:hover {
    background: var(--hover);
    color: var(--text);
}

.topbar-btn:active {
    background: var(--active);
    transform: scale(0.95);
}

.topbar-btn-sm {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--text2);
    font-family: inherit;
    transition: all 0.2s;
    min-width: 36px;
    min-height: 36px;
}

.topbar-btn-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.topbar-font-val {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text2);
    min-width: 18px;
    text-align: center;
}

.offline-bar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    padding-left: calc(18px + var(--sal));
    padding-right: calc(18px + var(--sar));
    background: var(--warning-light);
    color: #92400e;
    font-size: 0.82rem;
    flex-shrink: 0;
    position: relative;
    z-index: 110;
}

.offline-bar.show {
    display: flex;
}

.desk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    min-height: 44px;
    background: var(--surface);
}

.desk-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text2);
    flex-wrap: wrap;
}

.desk-crumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

.desk-crumbs a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.desk-crumbs .sep {
    color: var(--text3);
    font-size: 0.6rem;
}

.desk-toc-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.2s;
    min-height: 36px;
}

.desk-toc-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding-bottom: calc(80px + var(--sab-js));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.view-container {
    position: relative;
    width: 100%;
    min-height: 100%;
}

.pull-ind {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-40px);
    color: var(--text3);
    font-size: 1.2rem;
    transition: transform 0.2s;
    z-index: 5;
    display: none;
    pointer-events: none;
}

.pull-ind.show {
    display: block;
    transform: translateX(-50%) translateY(12px);
}

.pull-ind.spin i {
    animation: spin 0.6s linear infinite;
}

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

.sticky-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255,255,255, 0.88);
    transition: all 0.3s;
}

[data-theme="dark"] .sticky-bar {
    background: rgba(30, 41, 59, 0.88);
}

.sticky-bar.show {
    display: flex;
}

.sticky-bar .sticky-sop {
    margin-left: auto;
    color: var(--text3);
    font-size: 0.72rem;
}

.v {
    display: none;
    padding: 28px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.v.active {
    display: block;
}

.v.push-enter {
    animation: pushEnter 0.4s var(--ease-out-expo) forwards;
}

.v.push-exit {
    animation: pushExit 0.35s var(--ease-out-cubic) forwards;
}

.v.pop-enter {
    animation: popEnter 0.35s var(--ease-out-cubic) forwards;
}

.v.pop-exit {
    animation: popExit 0.4s var(--ease-out-expo) forwards;
}

@keyframes pushEnter {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pushExit {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30%);
    }
}

@keyframes popEnter {
    from {
        opacity: 0;
        transform: translateX(-30%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popExit {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.v-sop {
    padding: 28px 28px 100px;
    padding-left: calc(28px + var(--sal));
    padding-right: calc(28px + var(--sar));
    background: var(--bg);
}

.portal-hero {
    text-align: center;
    padding: 60px 28px 40px;
    animation: fadeInUp 0.6s var(--ease-out-cubic) both;
}

.portal-logo {
    width: 160px;
    height: auto;
    margin: 0 auto 24px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
    transition: transform 0.3s var(--ease-out-cubic);
}

.portal-logo:hover {
    transform: scale(1.02);
}

/* Portal-Logo-Header (für Portal/Home-Ansicht) */
.portal-logo-header {
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 24px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
    transition: transform 0.3s var(--ease-out-cubic);
}

.portal-logo-header:hover {
    transform: scale(1.02);
}

.portal-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.portal-subtitle {
    font-size: 1.1rem;
    color: var(--text2);
    font-weight: 400;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 28px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.portal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.portal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.portal-card:hover::before {
    opacity: 1;
}

.portal-card:active {
    transform: translateY(-2px) scale(0.98);
    transition-duration: 0.1s;
    background: var(--active);
}

.portal-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
    transition: transform 0.3s var(--ease-out-cubic);
}

.portal-card:hover .portal-card-icon {
    transform: scale(1.1);
}

.zna-color {
    background: var(--primary-light);
    color: var(--primary);
}

.onko-color {
    background: rgba(190, 24, 93, 0.1);
    color: #be185d;
}

[data-theme="dark"] .onko-color {
    background: rgba(190, 24, 93, 0.2);
    color: #f472b6;
}

.portal-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.portal-card p {
    font-size: 0.9rem;
    color: var(--text2);
    margin: 0;
    line-height: 1.5;
}

.portal-card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--surface2);
    color: var(--text3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.hero {
    text-align: center;
    padding: 48px 28px 36px;
    animation: fadeInUp 0.6s var(--ease-out-cubic) both;
}

.hero-logo {
    width: 200px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
    transition: transform 0.3s var(--ease-out-cubic);
}

.hero-logo:hover {
    transform: scale(1.02);
}

/* Hero-Logo-Header (für Modul-Ansichten ZNA und Onkologie) */
.hero-logo-header {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
    transition: transform 0.3s var(--ease-out-cubic);
}

.hero-logo-header:hover {
    transform: scale(1.02);
}

.hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text2);
    font-weight: 400;
    margin-bottom: 24px;
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 440px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.hero-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

.hero-search i {
    color: var(--text3);
    font-size: 0.92rem;
    flex-shrink: 0;
}

.hero-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--text);
    font-family: inherit;
}

.hero-search input::placeholder {
    color: var(--text3);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 0 0 20px;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    min-height: 100px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.cat-card:hover::before {
    opacity: 0.5;
}

.cat-card:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
    background: var(--active);
}

.cat-card-icon {
    font-size: 1.5rem;
    transition: transform 0.3s var(--ease-out-cubic);
    position: relative;
    z-index: 1;
}

.cat-card:hover .cat-card-icon {
    transform: scale(1.1);
}

.cat-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    position: relative;
    z-index: 1;
}

.cat-card-count {
    font-size: 0.72rem;
    color: var(--text3);
    position: relative;
    z-index: 1;
}

.cat-card-all {
    background: var(--surface);
    border: 1px solid var(--border);
}

.cat-card-all .cat-card-icon {
    color: var(--primary);
}

.cat-card-all .cat-card-name {
    color: var(--text);
}

.cat-card-all .cat-card-count {
    color: var(--text3);
}

.cat-card-all::before {
    opacity: 0;
}

.cat-card-all:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.cat-card-all:hover::before {
    opacity: 0;
}

.cat-card-all:hover .cat-card-icon,
.cat-card-all:hover .cat-card-name,
.cat-card-all:hover .cat-card-count {
    color: var(--primary);
}

.cat-card-all:active {
    background: var(--active);
    transform: translateY(-1px) scale(0.98);
}

.home-info {
    text-align: center;
    padding: 16px 0 28px;
    color: var(--text3);
    font-size: 0.78rem;
}

.home-info .info-count {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text2);
}

.browse-bar-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.browse-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    transition: border-color 0.25s var(--ease-out-cubic), box-shadow 0.25s var(--ease-out-cubic);
}

.browse-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.browse-search i {
    color: var(--text3);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.browse-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.92rem;
    color: var(--text);
    font-family: inherit;
}

.browse-search input::placeholder {
    color: var(--text3);
}

.browse-search-clear {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    display: none;
    font-size: 0.75rem;
    transition: color 0.15s;
    border-radius: var(--radius-xs);
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browse-search-clear.show {
    display: flex;
}

.browse-search-clear:hover {
    color: var(--text);
    background: var(--hover);
}

.browse-cat-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text2);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    transition: all 0.25s var(--ease-out-cubic);
    align-self: flex-start;
    min-height: 40px;
}

.browse-cat-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.browse-cat-toggle i.toggle-icon {
    font-size: 0.65rem;
    transition: transform 0.35s var(--ease-out-cubic);
}

.browse-cat-toggle.open i.toggle-icon {
    transform: rotate(180deg);
}

.browse-active-cat {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 2px;
}

.browse-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s var(--ease-out-cubic), opacity 0.3s var(--ease-out-cubic), margin 0.3s, padding 0.3s;
    margin-top: 0;
    padding: 0;
}

.browse-cats.open {
    max-height: 250px;
    opacity: 1;
    margin-top: 4px;
    padding: 4px 0;
}

.browse-cat-chip {
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text2);
    font-family: inherit;
    transition: all 0.2s var(--ease-out-cubic);
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.browse-cat-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.browse-cat-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.25);
}

.browse-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.browse-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s var(--ease-out-cubic);
    min-height: 60px;
    box-shadow: var(--shadow-xs);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.browse-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.browse-item:active {
    transform: translateX(2px) scale(0.99);
    transition-duration: 0.1s;
    background: var(--active);
}

.bi-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px currentColor;
}

.browse-item:hover .bi-dot {
    transform: scale(1.2);
}

.bi-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.bi-cat {
    font-size: 0.72rem;
    color: var(--text3);
    white-space: nowrap;
    background: var(--surface2);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.bi-arrow {
    color: var(--text3);
    font-size: 0.72rem;
    transition: transform 0.2s, color 0.2s;
}

.browse-item:hover .bi-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

.search-bar {
    padding: 0 0 20px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    transition: border-color 0.25s var(--ease-out-cubic), box-shadow 0.25s var(--ease-out-cubic);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.search-input-wrap i {
    color: var(--text3);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.92rem;
    color: var(--text);
    font-family: inherit;
}

.search-input-wrap input::placeholder {
    color: var(--text3);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 4px;
    display: none;
    font-size: 0.75rem;
    border-radius: var(--radius-xs);
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear.show {
    display: flex;
}

.search-clear:hover {
    color: var(--text);
    background: var(--hover);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out-cubic);
    box-shadow: var(--shadow-xs);
    min-height: 72px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.search-result:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.search-result:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.1s;
    background: var(--active);
}

.search-result h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.search-result p {
    font-size: 0.82rem;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 8px;
}

.sr-cat {
    font-size: 0.72rem;
    color: var(--text3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.search-empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--text3);
}

.search-empty i {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
    opacity: 0.5;
}

.search-empty p {
    font-size: 0.92rem;
}

.sop-header {
    margin-bottom: 20px;
    animation: fadeInUp 0.5s var(--ease-out-cubic) both;
}

.sop-header-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sop-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sop-cat-badge i {
    font-size: 0.65rem;
    flex-shrink: 0;
}

.sop-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    color: var(--text);
}

.sop-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text3);
}

.sop-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sop-meta-item i {
    font-size: 0.72rem;
}

.segmented-control-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.segmented-control-wrapper::before,
.segmented-control-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.segmented-control-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--surface2), transparent);
}

.segmented-control-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--surface2), transparent);
}

.segmented-control-wrapper.has-overflow-left::before {
    opacity: 1;
}

.segmented-control-wrapper.has-overflow-right::after {
    opacity: 1;
}

.segmented-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text3);
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.segmented-scroll-arrow:hover {
    opacity: 1 !important;
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.segmented-scroll-arrow:active {
    transform: translateY(-50%) scale(0.92);
    transition-duration: 0.1s;
}

.segmented-scroll-left {
    left: 0;
}

.segmented-scroll-right {
    right: 0;
}

.segmented-control {
    display: flex;
    background: var(--surface2);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    box-shadow: var(--shadow-xs);
    scroll-snap-type: x mandatory;
    -webkit-scroll-snap-type: x mandatory;
    touch-action: pan-x;
}

.segmented-control::-webkit-scrollbar {
    display: none;
}

.segmented-btn {
    flex: 0 0 auto;
    min-width: 60px;
    max-width: 150px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text2);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: all 0.2s var(--ease-out-cubic);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    scroll-snap-align: start;
    -webkit-scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.segmented-btn.tap-active {
    background: rgba(37, 99, 235, 0.1);
    transform: scale(0.97);
    transition: transform 0.1s ease, background 0.1s ease;
}

.segmented-btn i {
    font-size: 0.7rem;
    flex-shrink: 0;
}

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

.segmented-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

.segmented-btn:focus-visible {
    box-shadow: 0 0 0 2px var(--primary), 0 0 0 4px rgba(var(--primary-rgb), 0.3);
}

.segmented-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.5);
}

.segmented-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.segmented-btn.active i {
    color: var(--primary);
}

.segmented-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.sop-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s var(--ease-out-cubic), border-color 0.3s;
    box-shadow: var(--shadow-xs);
    animation: sectionIn 0.4s var(--ease-out-cubic) both;
}

.sop-section:hover {
    box-shadow: var(--shadow);
}

@keyframes sectionIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sop-section:nth-child(1) { animation-delay: 0.05s; }
.sop-section:nth-child(2) { animation-delay: 0.1s; }
.sop-section:nth-child(3) { animation-delay: 0.15s; }
.sop-section:nth-child(4) { animation-delay: 0.2s; }
.sop-section:nth-child(5) { animation-delay: 0.25s; }
.sop-section:nth-child(6) { animation-delay: 0.3s; }
.sop-section:nth-child(7) { animation-delay: 0.35s; }
.sop-section:nth-child(8) { animation-delay: 0.4s; }
.sop-section:nth-child(9) { animation-delay: 0.45s; }
.sop-section:nth-child(10) { animation-delay: 0.5s; }

.sop-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.sop-section-head:hover {
    background: var(--hover);
}

.sop-section-head:active {
    background: var(--active);
    transition-duration: 0.1s;
}

.sop-section-head .sec-icon {
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-out-cubic);
    color: var(--primary);
}

.sop-section-head:hover .sec-icon {
    transform: scale(1.1);
}

.sop-section-head .sec-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.sop-section-head .sec-toggle {
    font-size: 0.72rem;
    color: var(--text3);
    transition: transform 0.35s var(--ease-out-cubic), color 0.2s;
    width: 24px;
    text-align: center;
}

.sop-section-head:hover .sec-toggle {
    color: var(--text2);
}

.sop-section-head .sec-toggle.open {
    transform: rotate(180deg);
}

.sop-section-body {
    display: none;
    padding: 0 20px 20px;
}

.sop-section-body.open {
    display: block;
    animation: secBodyIn 0.3s var(--ease-out-cubic) both;
}

@keyframes secBodyIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sop-section-body h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin: 18px 0 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}

.sop-section-body h3:first-child {
    margin-top: 6px;
}

.sop-section-body h4 {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 14px 0 8px;
    color: var(--text);
}

.sop-section-body p {
    margin: 10px 0;
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text);
}

.sop-section-body ul, .sop-section-body ol {
    margin: 10px 0;
    padding-left: 22px;
    font-size: 0.88rem;
    line-height: 1.75;
}

.sop-section-body li {
    margin-bottom: 6px;
    color: var(--text);
    padding-left: 2px;
}

.sop-section-body li::marker {
    color: var(--primary);
}

.sop-section-body ul ul,
.sop-section-body ol ol,
.sop-section-body ul ol,
.sop-section-body ol ul {
    margin: 6px 0 6px 10px;
}

.sop-section-body strong {
    font-weight: 600;
    color: var(--text);
}

.sop-section-body em {
    font-style: italic;
    color: var(--text2);
}

.sop-section-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.sop-section-body a:hover {
    border-bottom-color: var(--primary);
}

.sop-section-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 14px 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    cursor: zoom-in;
}

.sop-section-body img:hover {
    transform: scale(1.01);
}

.sop-section-body .table-wrap {
    overflow-x: auto;
    margin: 14px 0;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.sop-section-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.sop-section-body thead {
    background: var(--surface2);
}

.sop-section-body th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text2);
}

.sop-section-body td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.sop-section-body tr:last-child td {
    border-bottom: none;
}

.sop-section-body tbody tr {
    transition: background 0.15s;
}

.sop-section-body tbody tr:hover {
    background: var(--hover);
}

.sop-section-body .callout {
    margin: 14px 0;
    padding: 14px 18px;
    border-radius: var(--radius);
    border-left: 4px solid;
    font-size: 0.86rem;
    line-height: 1.65;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sop-section-body .callout:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.sop-section-body .callout p {
    margin: 5px 0;
    font-size: 0.86rem;
}

.sop-section-body .callout ul,
.sop-section-body .callout ol {
    margin: 8px 0;
    padding-left: 20px;
}

.sop-section-body .callout-cave {
    background: var(--danger-light);
    border-color: var(--danger);
    color: #991b1b;
}[data-theme="dark"] .sop-section-body .callout-cave {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.sop-section-body .callout-wichtig {
    background: var(--warning-light);
    border-color: var(--warning);
    color: #92400e;
}

[data-theme="dark"] .sop-section-body .callout-wichtig {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
}

.sop-section-body .callout-hinweis {
    background: var(--success-light);
    border-color: var(--success);
    color: #166534;
}

[data-theme="dark"] .sop-section-body .callout-hinweis {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
}

.sop-section-body .callout-info {
    background: var(--primary-light);
    border-color: var(--primary);
    color: #1e40af;
}

[data-theme="dark"] .sop-section-body .callout-info {
    background: rgba(var(--primary-rgb), 0.1);
    color: #93c5fd;
}

.sop-sources {
    font-size: 0.78rem;
    color: var(--text3);
    line-height: 1.75;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.sop-sources a {
    color: var(--primary);
    text-decoration: none;
}

.sop-sources a:hover {
    text-decoration: underline;
}

.fab {
    position: fixed;
    right: 18px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 1020;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--ease-out-cubic), opacity 0.2s, box-shadow 0.3s;
    bottom: calc(76px + var(--sab-js));
}

@media (max-width: 1023px) {
    .fab.show {
        display: flex;
        animation: fabIn 0.3s var(--ease-out-cubic);
    }
}

.fab:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

.fab:active {
    transform: scale(0.92);
}

.fab.show {
    display: flex;
    animation: fabIn 0.3s var(--ease-out-cubic);
}

@keyframes fabIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.btm-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 1030;
    height: 56px;
    padding-top: 8px;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: var(--sab-js);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: rgba(var(--surface-rgb, 255, 255, 255), 0.95);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btm-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    padding: 0 8px;
}

[data-theme="dark"] .btm-nav {
    background: rgba(var(--surface-rgb, 30, 41, 59), 0.95);
}

@media (max-width: 1023px) {
    .btm-nav {
        display: block;
    }
}

.btm-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
    max-width: 120px;
    font-family: inherit;
    transition: color 0.2s ease;
    padding: 8px 4px;
    position: relative;
    min-height: 48px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}

.btm-btn i {
    font-size: 1.3rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.btm-btn-label {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
}

.btm-btn.active {
    color: var(--primary);
}

.btm-btn.active i {
    transform: scale(1.1);
}

.btm-btn:hover {
    color: var(--text);
    background: var(--hover);
}

.btm-btn:active {
    transform: scale(0.95);
    transition-duration: 0.1s;
}

.btm-btn::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out-cubic);
}

.btm-btn.active::after {
    transform: translateX(-50%) scaleX(1);
}

.spotlight-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: calc(60px + var(--sat));
}

.spotlight-overlay.show {
    display: flex;
}

.spotlight-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

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

.spotlight-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s var(--ease-out-expo), opacity 0.3s ease;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.spotlight-overlay.show .spotlight-container {
    transform: translateY(0);
    opacity: 1;
}

.spotlight-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.spotlight-icon {
    font-size: 1.1rem;
    color: var(--text3);
    flex-shrink: 0;
}

.spotlight-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 1.1rem;
    color: var(--text);
    font-family: inherit;
}

.spotlight-search input::placeholder {
    color: var(--text3);
}

.spotlight-clear {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 6px;
    font-size: 0.9rem;
    border-radius: 50%;
    transition: all 0.2s;
    min-width: 32px;
    min-height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
}

.spotlight-clear.show {
    display: flex;
}

.spotlight-clear:hover {
    color: var(--text);
    background: var(--hover);
}

.spotlight-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    max-height: calc(80vh - 140px);
    -webkit-overflow-scrolling: touch;
}

.spotlight-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
    min-height: 52px;
}

.spotlight-result:hover {
    background: var(--hover);
}

.spotlight-result:active {
    background: var(--active);
}

.spotlight-result-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.spotlight-result-info {
    flex: 1;
    min-width: 0;
}

.spotlight-result-name {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.spotlight-result-cat {
    font-size: 0.72rem;
    color: var(--text3);
}

.spotlight-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface2);
}

.spotlight-hint {
    font-size: 0.78rem;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.spotlight-cancel {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: background 0.2s;
    min-height: 40px;
}

.spotlight-cancel:hover {
    background: var(--primary-light);
}

.spotlight-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text3);
}

.spotlight-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.5;
}

.picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    pointer-events: none;
}

.picker-overlay.show {
    display: block;
    pointer-events: auto;
}

.picker-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.picker-overlay.show .picker-bg {
    opacity: 1;
}

.picker-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out-expo);
    box-shadow: var(--shadow-xl);
    touch-action: pan-y;
    overscroll-behavior: contain;
    will-change: transform;
}

.picker-overlay.show .picker-sheet {
    transform: translateY(0);
}

.picker-handle {
    width: 40px;
    height: 4px;
    background: var(--border2);
    border-radius: 2px;
    margin: 10px auto 6px;
    flex-shrink: 0;
    cursor: grab;
    transition: background-color 0.2s, transform 0.2s;
}

.picker-handle:active {
    cursor: grabbing;
    background: var(--text3);
}

.picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 18px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.picker-head h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.picker-head button {
    background: none;
    border: none;
    color: var(--text3);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 6px;
    transition: color 0.15s, background 0.15s;
    border-radius: var(--radius);
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-head button:hover {
    color: var(--text);
    background: var(--hover);
}

.picker-list {
    list-style: none;
    overflow-y: auto;
    padding: 10px 0;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}

.picker-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    font-size: 0.92rem;
    min-height: 52px;
}

.picker-list li:hover {
    background: var(--hover);
}

.picker-list li:active {
    background: var(--active);
    transform: scale(0.99);
}

.picker-list li.active {
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
}

.picker-list li i {
    width: 24px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text3);
}

.picker-list li.active i {
    color: var(--primary);
}

.picker-foot {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--surface);
}

.picker-foot button {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
}

.picker-foot button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.skeleton-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 150;
    display: none;
    padding: 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.skeleton-overlay.show {
    display: block;
}

.skeleton-sop {
    max-width: 800px;
    margin: 0 auto;
}

.skeleton-header {
    margin-bottom: 24px;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface2) 25%,
        var(--surface3) 50%,
        var(--surface2) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeletonShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-badge {
    width: 100px;
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-title {
    width: 80%;
    height: 32px;
    margin-bottom: 8px;
}

.skeleton-meta {
    width: 40%;
    height: 16px;
}

.skeleton-segmented {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.skeleton-segmented::-webkit-scrollbar {
    display: none;
}

.skeleton-segment {
    flex: 1;
    min-width: 70px;
    height: 40px;
    border-radius: var(--radius);
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-card {
    height: 100px;
    border-radius: var(--radius-md);
}

.skeleton-card:nth-child(2) {
    height: 180px;
}

.skeleton-card:nth-child(3) {
    height: 120px;
}

/* ========================================
   ONKOLOGIE-MODUL: Unterkategorien-Styles
   ======================================== */

/* Sidebar-Unterkategorien */
.sidebar-subcat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text2);
    font-size: 0.82rem;
    transition: all 0.2s var(--ease-out-cubic);
    line-height: 1.35;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.sidebar-subcat:hover {
    background: var(--hover);
    color: var(--text);
    transform: translateX(2px);
}

.sidebar-subcat:active {
    background: var(--active);
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.sidebar-subcat.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.sidebar-subcat .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sidebar-subcat:hover .nav-dot {
    transform: scale(1.2);
}

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

.sidebar-subcat .cat-count {
    font-size: 0.68rem;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--text3);
    margin-left: auto;
}

.sidebar-subcat.active .cat-count {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary);
}

[data-theme="dark"] .sidebar-subcat .cat-count {
    background: var(--surface3);
}

[data-theme="dark"] .sidebar-subcat.active .cat-count {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* Home-Ansicht: Parent-Kategorie */
.cat-card-parent {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-height: 120px;
    grid-column: span 2;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cat-card-parent::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(190, 24, 93, 0.08) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.cat-card-parent:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #be185d;
}

.cat-card-parent:hover::before {
    opacity: 1;
}

.cat-card-parent:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
    background: var(--active);
}

.cat-card-parent .cat-card-icon {
    font-size: 1.8rem;
    color: #be185d;
    transition: transform 0.3s var(--ease-out-cubic);
    position: relative;
    z-index: 1;
}

.cat-card-parent:hover .cat-card-icon {
    transform: scale(1.15);
}

.cat-card-parent .cat-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    position: relative;
    z-index: 1;
}

.cat-card-parent .cat-card-count {
    font-size: 0.75rem;
    color: var(--text3);
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .cat-card-parent {
    border-color: rgba(190, 24, 93, 0.3);
}

[data-theme="dark"] .cat-card-parent:hover {
    border-color: #f472b6;
}

[data-theme="dark"] .cat-card-parent::before {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.1) 0%, transparent 100%);
}

[data-theme="dark"] .cat-card-parent .cat-card-icon {
    color: #f472b6;
}

/* Home-Ansicht: Unterkategorie-Karten */
.cat-card-subcat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    min-height: 90px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.cat-card-subcat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--subcat-color, var(--primary));
    opacity: 0.8;
    transition: opacity 0.3s, height 0.3s;
}

.cat-card-subcat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--subcat-color, var(--primary));
}

.cat-card-subcat:hover::before {
    opacity: 1;
    height: 4px;
}

.cat-card-subcat:active {
    transform: translateY(-1px) scale(0.98);
    transition-duration: 0.1s;
    background: var(--active);
}

.cat-card-subcat .cat-card-icon {
    font-size: 1.3rem;
    transition: transform 0.3s var(--ease-out-cubic), color 0.3s;
    position: relative;
    z-index: 1;
    color: var(--subcat-color, var(--primary));
}

.cat-card-subcat:hover .cat-card-icon {
    transform: scale(1.1);
}

.cat-card-subcat .cat-card-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.cat-card-subcat .cat-card-count {
    font-size: 0.7rem;
    color: var(--text3);
    position: relative;
    z-index: 1;
    background: var(--surface2);
    padding: 2px 8px;
    border-radius: 10px;
}

[data-theme="dark"] .cat-card-subcat .cat-card-count {
    background: var(--surface3);
}

/* Unterkategorie-Grid für Onkologie */
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 0 0 20px;
    animation: fadeInUp 0.5s var(--ease-out-cubic) both;
}

.subcat-grid-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.subcat-grid-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.subcat-grid-header .subcat-count {
    font-size: 0.8rem;
    color: var(--text3);
    background: var(--surface2);
    padding: 4px 10px;
    border-radius: 12px;
}

.subcat-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text2);
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    transition: all 0.2s var(--ease-out-cubic);
    min-height: 40px;
}

.subcat-back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.subcat-back-btn:active {
    transform: scale(0.98);
}

/* Browse-Filter: Unterkategorien */
.browse-subcat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 8px 24px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text2);
    font-family: inherit;
    transition: all 0.2s var(--ease-out-cubic);
    min-height: 36px;
    position: relative;
    margin-left: 8px;
}

.browse-subcat::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--subcat-color, var(--text3));
    transition: transform 0.2s;
}

.browse-subcat:hover {
    border-color: var(--subcat-color, var(--primary));
    color: var(--subcat-color, var(--primary));
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.browse-subcat:hover::before {
    transform: translateY(-50%) scale(1.3);
}

.browse-subcat.active {
    background: var(--subcat-color, var(--primary));
    color: #fff;
    border-color: var(--subcat-color, var(--primary));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.browse-subcat.active::before {
    background: rgba(255, 255, 255, 0.5);
}

.browse-subcat .cat-count {
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.browse-subcat.active .cat-count {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .browse-subcat .cat-count {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .browse-subcat.active .cat-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Kategorie-Gruppe mit Unterkategorien */
.cat-group {
    margin-bottom: 16px;
}

.cat-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--surface2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s var(--ease-out-cubic);
    min-height: 44px;
}

.cat-group-header:hover {
    background: var(--hover);
}

.cat-group-header .toggle-icon {
    font-size: 0.7rem;
    color: var(--text3);
    transition: transform 0.35s var(--ease-out-cubic);
    margin-left: auto;
}

.cat-group-header.open .toggle-icon {
    transform: rotate(180deg);
}

.cat-group-children {
    display: none;
    padding-left: 12px;
    margin-top: 4px;
}

.cat-group-children.open {
    display: block;
    animation: slideDown 0.3s var(--ease-out-cubic) both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Onkologie-spezifische Farben für Unterkategorien */
.subcat-onko-gi { --subcat-color: #ea580c; }
.subcat-onko-uro { --subcat-color: #0891b2; }
.subcat-onko-hcc { --subcat-color: #dc2626; }
.subcat-onko-biliaer { --subcat-color: #ca8a04; }
.subcat-onko-pankreas { --subcat-color: #7c3aed; }
.subcat-onko-niere { --subcat-color: #059669; }
.subcat-onko-sonstige { --subcat-color: #64748b; }

/* Dunkelmodus-Anpassungen für Onkologie-Farben */
[data-theme="dark"] .subcat-onko-gi { --subcat-color: #fb923c; }
[data-theme="dark"] .subcat-onko-uro { --subcat-color: #22d3ee; }
[data-theme="dark"] .subcat-onko-hcc { --subcat-color: #f87171; }
[data-theme="dark"] .subcat-onko-biliaer { --subcat-color: #facc15; }
[data-theme="dark"] .subcat-onko-pankreas { --subcat-color: #a78bfa; }
[data-theme="dark"] .subcat-onko-niere { --subcat-color: #34d399; }
[data-theme="dark"] .subcat-onko-sonstige { --subcat-color: #94a3b8; }

@media (max-width: 1023px) {
    .sidebar {
        display: none;
    }
    
    .topbar {
        display: flex;
    }
    
    .desk-bar {
        display: none;
    }
    
    .btm-nav {
        display: block;
    }
    
    .v {
        padding: 18px;
        padding-left: calc(18px + var(--sal));
        padding-right: calc(18px + var(--sar));
        padding-bottom: calc(90px + var(--sab-js));
    }
    
    .v-sop {
        padding: 18px;
        padding-left: calc(18px + var(--sal));
        padding-right: calc(18px + var(--sar));
        padding-bottom: calc(100px + var(--sab-js));
    }
    
    .portal-hero {
        padding: 40px 18px 24px;
    }
    
    .portal-logo {
        width: 130px;
        margin-bottom: 16px;
    }
    
    .portal-logo-header {
        max-width: 260px;
        margin-bottom: 16px;
    }
    
    .portal-title {
        font-size: 1.5rem;
    }
    
    .portal-grid {
        padding: 0 18px 30px;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .portal-card {
        padding: 24px 20px;
    }
    
    .hero {
        padding: 32px 18px 28px;
    }
    
    .hero-logo {
        width: 180px;
    }
    
    .hero-logo-header {
        max-width: 220px;
    }
    
    .hero-title {
        font-size: 1.35rem;
    }
    
    .hero-org {
        margin-bottom: 20px;
    }
    
    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .cat-card {
        padding: 16px 10px;
        gap: 8px;
    }
    
    .cat-card-icon {
        font-size: 1.3rem;
    }
    
    .cat-card-name {
        font-size: 0.78rem;
    }
    
    /* Onkologie-Modul Responsive Tablet */
    .cat-card-parent {
        grid-column: span 2;
        min-height: 100px;
        padding: 16px 14px;
    }
    
    .cat-card-parent .cat-card-icon {
        font-size: 1.6rem;
    }
    
    .cat-card-parent .cat-card-name {
        font-size: 0.88rem;
    }
    
    .subcat-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .cat-card-subcat {
        min-height: 80px;
        padding: 12px 10px;
    }
    
    .cat-card-subcat .cat-card-icon {
        font-size: 1.2rem;
    }
    
    .cat-card-subcat .cat-card-name {
        font-size: 0.75rem;
    }
    
    .browse-subcat {
        padding: 8px 12px 8px 22px;
        font-size: 0.76rem;
        min-height: 36px;
    }
    
    .browse-bar-top {
        gap: 8px;
        margin-bottom: 14px;
    }
    
    .browse-search {
        padding: 11px 14px;
    }
    
    .browse-cat-toggle {
        padding: 8px 12px;
    }
    
    .browse-cats.open {
        gap: 6px;
    }
    
    .browse-cat-chip {
        padding: 10px 14px;
        font-size: 0.8rem;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
    
    .browse-item {
        padding: 14px 16px;
        gap: 12px;
        min-height: 58px;
    }
    
    .bi-name {
        font-size: 0.9rem;
    }
    
    .sop-title {
        font-size: 1.25rem;
    }
    
    .sop-section-head {
        padding: 14px 16px;
        gap: 10px;
        min-height: 52px;
    }
    
    .sop-section-body {
        padding: 0 16px;
    }
    
    .sop-section-body.open {
        padding: 0 16px 18px;
    }
    
    .sop-section-body h3 {
        font-size: 0.9rem;
    }
    
    .sticky-bar {
        padding: 10px 18px;
        padding-left: calc(18px + var(--sal));
        padding-right: calc(18px + var(--sar));
    }
    
    .search-bar {
        padding: 0 0 16px;
    }
    
    .search-input-wrap {
        padding: 11px 14px;
    }
    
    .header-main {
        font-size: 0.88rem;
    }
    
    .header-sub {
        font-size: 0.68rem;
    }
    
    .spotlight-container {
        max-width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .spotlight-results {
        max-height: calc(100vh - 200px);
    }
    
    .skeleton-overlay {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-logo {
        width: 150px;
        margin-bottom: 16px;
    }
    
    .hero-logo-header {
        max-width: 180px;
        margin-bottom: 16px;
    }
    
    .hero-title {
        font-size: 1.2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-search {
        padding: 11px 14px;
    }
    
    .v {
        padding: 14px;
        padding-left: calc(14px + var(--sal));
        padding-right: calc(14px + var(--sar));
        padding-bottom: calc(80px + var(--sab-js));
    }
    
    .v-sop {
        padding: 14px;
        padding-left: calc(14px + var(--sal));
        padding-right: calc(14px + var(--sar));
        padding-bottom: calc(90px + var(--sab-js));
    }
    
    .browse-item {
        padding: 13px 14px;
        min-height: 54px;
    }
    
    .sop-section-head {
        padding: 13px 14px;
        min-height: 48px;
    }
    
    .sop-section-body {
        padding: 0 14px;
    }
    
    .sop-section-body.open {
        padding: 0 14px 16px;
    }
    
    .segmented-btn {
        min-width: 50px;
        max-width: 100px;
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    /* Onkologie-Modul Responsive Mobile */
    .cat-card-parent {
        grid-column: span 2;
        min-height: 90px;
        padding: 14px 12px;
    }
    
    .cat-card-parent .cat-card-icon {
        font-size: 1.4rem;
    }
    
    .cat-card-parent .cat-card-name {
        font-size: 0.82rem;
    }
    
    .subcat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .cat-card-subcat {
        min-height: 75px;
        padding: 10px 8px;
    }
    
    .cat-card-subcat .cat-card-icon {
        font-size: 1.1rem;
    }
    
    .cat-card-subcat .cat-card-name {
        font-size: 0.72rem;
    }
    
    .cat-card-subcat .cat-card-count {
        font-size: 0.65rem;
    }
    
    .browse-subcat {
        padding: 6px 10px 6px 20px;
        font-size: 0.72rem;
        min-height: 34px;
    }
    
    .browse-subcat::before {
        left: 8px;
        width: 5px;
        height: 5px;
    }
    
    .subcat-grid-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .subcat-grid-header h3 {
        font-size: 0.9rem;
    }
    
    .subcat-back-btn {
        padding: 6px 12px;
        font-size: 0.78rem;
        min-height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .v.push-enter,
    .v.push-exit,
    .v.pop-enter,
    .v.pop-exit {
        animation: none;
    }
    
    .v {
        transition: none;
    }
    
    .skeleton {
        animation: none;
        background: var(--surface2);
    }
}

@media print {
    .sidebar,
    .topbar,
    .btm-nav,
    .fab,
    .picker-overlay,
    .sticky-bar,
    .desk-bar,
    .offline-bar,
    .spotlight-overlay,
    .skeleton-overlay {
        display: none !important;
    }
    
    .v-sop {
        display: block !important;
        padding: 0 !important;
        position: static !important;
    }
    
    .sop-section {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .sop-section-body {
        display: block !important;
        padding: 0 20px 20px !important;
    }
    
    .sop-section-head .sec-toggle {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }
    
    .sop-section-body .callout {
        break-inside: avoid;
    }
}

.tap-active {
    opacity: 0.7;
    transform: scale(0.98);
    transition: opacity 0.15s, transform 0.15s;
}

.interactive {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.interactive:active {
    opacity: 0.85;
    transform: scale(0.97);
    transition: opacity 0.1s, transform 0.1s;
}

.swipe-back-indicator {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    transition: opacity 0.2s;
}

.swipe-back-indicator.active {
    opacity: 1;
}

.scroll-area {
    touch-action: pan-y;
    -webkit-touch-scrolling: touch;
}

@media (max-width: 1023px) {
    .sop-section-head,
    .btm-btn,
    .cat-card,
    .browse-item,
    .search-result {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(var(--primary-rgb), 0.1);
    }
}

.gpu-layer {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

@supports (padding: max(0px)) {
    .topbar {
        padding-top: max(0px, var(--sat));
        height: max(var(--topbar-h), calc(var(--topbar-h) + var(--sat)));
        min-height: max(var(--topbar-h), calc(var(--topbar-h) + var(--sat)));
    }
}

@media (max-width: 1023px) and (orientation: landscape) {
    .topbar {
        height: calc(var(--topbar-h) + var(--sat));
        min-height: var(--topbar-h);
    }
    
    .fab {
        bottom: calc(76px + var(--sab-js));
    }
    
    .picker-sheet {
        max-height: 60vh;
    }
    
    .portal-hero {
        padding: 30px 18px 20px;
    }
    
    .hero {
        padding: 24px 18px 20px;
    }
    
    .hero-logo {
        width: 120px;
        margin-bottom: 12px;
    }
    
    .hero-title {
        font-size: 1.1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .v {
        padding-top: 14px;
        padding-bottom: calc(70px + var(--sab-js));
    }
    
    .v-sop {
        padding-top: 14px;
        padding-bottom: calc(80px + var(--sab-js));
    }
    
    .sticky-bar {
        padding: 8px 18px;
    }
    
    .scroll-area {
        padding-bottom: calc(70px + var(--sab-js));
    }
}