/* public/style.css */

/* --- BASIS --- */
body {
    margin: 0;
    padding: 0;
    background-color: #18181b;
    color: #efeff1;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.hidden { display: none !important; }

/* --- Speichern-Erfolg (Toast oben mittig) --- */
#save-success-toast-host {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10050;
    pointer-events: none;
    display: flex;
    justify-content: center;
    padding: 0.75rem 0.75rem 0;
    width: 100%;
    max-width: min(100vw - 1rem, 28rem);
    box-sizing: border-box;
}

.save-success-toast {
    margin: 0;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    background: linear-gradient(180deg, #1a2e24 0%, #142820 100%);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #b8f5d4;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(16, 185, 129, 0.12),
        0 4px 24px rgba(16, 185, 129, 0.12);
    opacity: 0;
    transform: translate3d(0, -80px, 0);
    transition:
        opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.save-success-toast.save-success-toast--visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.save-success-toast.save-success-toast--out {
    opacity: 0;
    transform: translate3d(0, -80px, 0);
}

@media (prefers-reduced-motion: reduce) {
    .save-success-toast {
        transform: none;
        transition: opacity 0.2s ease;
    }
    .save-success-toast.save-success-toast--visible {
        transform: none;
    }
    .save-success-toast.save-success-toast--out {
        transform: none;
    }
}

/* --- APP-SHELL & SEITENLEISTE --- */
.app-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.app-sidebar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 248px;
    background: #141417;
    border-right: 1px solid #26262c;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.25);
    transition: width 0.22s ease;
}

.app-sidebar.is-collapsed {
    width: 68px;
}

.sidebar-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Feste Sidebar-Höhe: Hauptbereich scrollt, Leiste bleibt; Nav-Bereich scrollt bei Bedarf separat */
body.has-fixed-sidebar {
    height: 100vh;
    overflow: hidden;
}

body.has-fixed-sidebar .app-shell {
    height: 100%;
    min-height: 0;
}

body.has-fixed-sidebar .app-sidebar {
    flex-shrink: 0;
    align-self: stretch;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

body.has-fixed-sidebar .sidebar-scroll--guest {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

body.has-fixed-sidebar .sidebar-scroll--app {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.has-fixed-sidebar .sidebar-nav-section--scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

body.has-fixed-sidebar .sidebar-nav-section--scroll .sidebar-nav {
    padding-bottom: 8px;
}

body.has-fixed-sidebar .sidebar-nav-section--footer {
    flex-shrink: 0;
    border-top: 1px solid #26262c;
    background: #141417;
}

body.has-fixed-sidebar .sidebar-nav-section--footer .sidebar-nav {
    padding-top: 10px;
}

body.has-fixed-sidebar .app-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-hero-wrap {
    padding-bottom: 32px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sidebar-nav-group-label {
    margin: 0 12px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6b75;
}

.sidebar-nav-modules-extra .sidebar-nav-link {
    padding-left: 14px;
    font-size: 0.88rem;
}

.dashboard-page-inner {
    padding: 24px 22px 48px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-welcome-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0 28px;
}

.dashboard-welcome-card {
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.dashboard-welcome-brand {
    margin: 0 0 8px;
    font-size: 2rem;
    color: #efeff1;
    font-weight: 700;
}

.dashboard-modules-section-title {
    margin: 0 0 18px;
    font-size: 1.35rem;
    font-weight: 600;
    color: #efeff1;
    text-align: center;
}

.dashboard-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.dashboard-modules-loading {
    grid-column: 1 / -1;
    color: #adadb8;
    margin: 0;
}

.dashboard-module-card {
    position: relative;
    background: #1f1f23;
    border: 1px solid #303032;
    border-radius: 12px;
    padding: 16px 44px 44px 16px;
    min-height: 130px;
    box-sizing: border-box;
}

.dashboard-module-card--soon {
    opacity: 0.92;
    border-style: dashed;
}

.dashboard-module-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-module-card-title-block {
    flex: 1;
    min-width: 0;
}

.dashboard-module-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dashboard-module-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bf94ff;
}

.dashboard-module-icon-svg {
    display: block;
    width: 22px;
    height: 22px;
}

.dashboard-module-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #efeff1;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.dashboard-module-card-desc {
    margin: 12px 0 0;
    padding: 0;
    font-size: 0.88rem;
    font-weight: 400;
    color: #adadb8;
    line-height: 1.45;
}

.module-soon-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #bf94ff;
    background: rgba(145, 70, 255, 0.15);
    border-radius: 6px;
    vertical-align: middle;
}

.module-beta-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 6px;
    vertical-align: middle;
}

.module-toggle-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.module-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.module-toggle-ui {
    display: block;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #3a3a45;
    transition: background 0.2s ease;
    position: relative;
}

.module-toggle-ui::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #efeff1;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.module-toggle-input:checked + .module-toggle-ui {
    background: #9146FF;
}

.module-toggle-input:checked + .module-toggle-ui::after {
    transform: translateX(18px);
}

.module-toggle-input:focus-visible + .module-toggle-ui {
    outline: 2px solid #bf94ff;
    outline-offset: 2px;
}

.module-toggle-placeholder {
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.dashboard-module-settings {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #adadb8;
    border: 1px solid #3a3a45;
    background: #18181b;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dashboard-module-settings:hover {
    color: #bf94ff;
    border-color: #9146FF;
    background: #26262c;
}

.dashboard-module-settings-icon {
    display: block;
}

.dashboard-module-main {
    padding: 28px 24px 56px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-module-h1 {
    margin: 0 0 12px;
    font-size: 1.65rem;
    color: #efeff1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.module-page-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #bf94ff;
    background: rgba(145, 70, 255, 0.18);
    border-radius: 8px;
}

.dashboard-module-lead {
    margin: 0;
    color: #adadb8;
    font-size: 1.02rem;
    line-height: 1.55;
}

.impressum-main {
    padding: 28px 24px 56px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.impressum-main h1 {
    margin-top: 0;
    font-size: 1.85rem;
}

.impressum-card {
    text-align: left;
    margin-top: 16px;
}

.impressum-card p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.impressum-h2 {
    font-size: 1.1rem;
    color: #bf94ff;
    margin: 1.35rem 0 0.5rem;
}

.impressum-h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e4e4e7;
    margin: 1rem 0 0.4rem;
}

.impressum-card a {
    color: #c4b5fd;
    word-break: break-all;
}

.impressum-card a:hover {
    color: #ede9fe;
}

/* --- Rechtstexte (/terms, /privacy) --- */
.legal-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.legal-lang-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    align-self: flex-end;
    gap: 0.35rem;
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b6b76;
    letter-spacing: 0.02em;
}

.legal-lang-link {
    background: none;
    border: none;
    padding: 0.12rem 0.28rem;
    margin: 0;
    color: #8d8d98;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.legal-lang-link:hover {
    color: #c4b5fd;
    background: rgba(255, 255, 255, 0.04);
}

.legal-lang-link--active {
    color: #bf94ff;
    font-weight: 600;
}

.legal-lang-link:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}

.legal-lang-sep {
    opacity: 0.35;
    user-select: none;
    font-weight: 400;
}

.legal-load-error {
    margin: 0 0 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 0.9rem;
}

.legal-main .legal-doc-meta {
    margin: -0.25rem 0 1rem;
    font-size: 0.95rem;
    color: #adadb8;
    line-height: 1.5;
}

.legal-main .impressum-card .legal-doc-list {
    margin: 0 0 1rem;
    padding-left: 1.35rem;
    font-size: 1rem;
    line-height: 1.55;
    color: #e4e4e7;
}

.legal-main .impressum-card .legal-doc-list li {
    margin-bottom: 0.35rem;
}

.legal-main .impressum-card .legal-doc-list li:last-child {
    margin-bottom: 0;
}

.admin-legal-panel .admin-legal-textarea {
    width: 100%;
    min-height: 12rem;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.45;
}

.impressum-lead {
    font-size: 0.95rem;
    color: #adadb8;
    margin-bottom: 0 !important;
}

/* --- Changelog (changelog.md → /changelog) --- */
.changelog-main {
    max-width: 820px;
}

.changelog-lead {
    font-size: 0.95rem;
    color: #adadb8;
    margin: 0 0 20px;
    line-height: 1.5;
}

.changelog-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.changelog-version {
    border: 1px solid #26262c;
    border-radius: 12px;
    background: rgba(22, 22, 28, 0.55);
    overflow: hidden;
}

.changelog-version-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: #e4e4e7;
    user-select: none;
}

.changelog-version-summary::-webkit-details-marker {
    display: none;
}

.changelog-version-summary::marker {
    content: '';
}

.changelog-version-title {
    font-size: 1.05rem;
    color: #bf94ff;
}

.changelog-version-chevron {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #a1a1aa;
    border-bottom: 2px solid #a1a1aa;
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-top: -2px;
}

.changelog-version[open] .changelog-version-chevron {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.changelog-version-body {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(38, 38, 44, 0.9);
}

.changelog-version-body .changelog-h2 {
    font-size: 1.08rem;
    color: #bf94ff;
    margin: 1.1rem 0 0.45rem;
    font-weight: 600;
}

.changelog-version-body .changelog-h2:first-child {
    margin-top: 0.75rem;
}

.changelog-version-body .changelog-h3 {
    font-size: 0.98rem;
    font-weight: 600;
    color: #e4e4e7;
    margin: 0.85rem 0 0.35rem;
}

.changelog-version-body .changelog-p {
    margin: 0 0 0.65rem;
    font-size: 0.98rem;
    line-height: 1.58;
    color: #d4d4d8;
}

.changelog-version-body .changelog-ul {
    margin: 0.35rem 0 0.85rem;
    padding-left: 1.25rem;
    color: #d4d4d8;
}

.changelog-version-body .changelog-li {
    margin-bottom: 0.35rem;
    line-height: 1.55;
    font-size: 0.97rem;
}

.changelog-version-body .changelog-li strong {
    color: #f4f4f5;
}

.changelog-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.88em;
    padding: 0.12em 0.38em;
    border-radius: 6px;
    background: rgba(145, 70, 255, 0.15);
    color: #e9d5ff;
}

.changelog-version-body a {
    color: #c4b5fd;
    word-break: break-word;
}

.changelog-version-body a:hover {
    color: #ede9fe;
}

.changelog-hr {
    border: none;
    border-top: 1px solid #2e2e36;
    margin: 1rem 0;
}

.changelog-empty {
    color: #adadb8;
    font-size: 0.98rem;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 12px 12px;
    border-bottom: 1px solid #26262c;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #9146FF;
    text-decoration: none;
}

.sidebar-brand-emoji {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1;
}

.sidebar-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar.is-collapsed .sidebar-brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #3a3a42;
    border-radius: 8px;
    background: #1f1f23;
    color: #adadb8;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar-toggle:hover {
    color: #efeff1;
    border-color: #9146FF;
    background: #26262c;
}

.sidebar-toggle:focus-visible {
    outline: 2px solid #9146FF;
    outline-offset: 2px;
}

.sidebar-toggle-svg {
    display: block;
}

.app-sidebar.is-collapsed .sidebar-toggle-svg {
    transform: scaleX(-1);
}

.sidebar-nav {
    padding: 12px 10px 16px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #adadb8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav-link:hover {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-link[aria-current="page"] {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.09);
}

.sidebar-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #c8c8d0;
}

.sidebar-nav-link[aria-current="page"] .sidebar-link-icon {
    color: #bf94ff;
}

/* --- Sidebar: aufklappbare Gruppe (z. B. Zuschauer Tracking) --- */
.sidebar-nav-group--expandable {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav-group-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #adadb8;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav-group-btn:hover {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-group-btn:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}

.sidebar-nav-chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    color: #8d8d98;
    transition: transform 0.15s ease;
}

.sidebar-chevron-svg {
    display: block;
}

.sidebar-nav-group--collapsed .sidebar-nav-chevron {
    transform: rotate(-90deg);
}

.sidebar-nav-group--collapsed .sidebar-nav-sub {
    display: none;
}

.sidebar-nav-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0 6px 0;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid #303032;
}

.sidebar-nav-link--sub {
    padding: 8px 12px 8px 14px;
    font-size: 0.88rem;
}

.app-sidebar.is-collapsed .sidebar-nav-group--expandable .sidebar-nav-sub,
.app-sidebar.is-collapsed .sidebar-nav-group--expandable .sidebar-nav-chevron {
    display: none;
}

.sidebar-link-svg {
    width: 20px;
    height: 20px;
    display: block;
}

.sidebar-link-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
}

.sidebar-link-badge {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(145, 70, 255, 0.12);
    border: 1px solid rgba(145, 70, 255, 0.35);
    padding: 2px 6px;
    border-radius: 999px;
    flex-shrink: 0;
    line-height: 1.25;
}

.app-sidebar.is-collapsed .sidebar-link-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-link-row {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-nav-group-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-sidebar.is-collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 10px 8px;
}

.app-sidebar.is-collapsed .sidebar-header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #18181b;
    position: relative;
}

/* Login / Profil: schwebt oben rechts, keine Leiste und keine Trennlinie */
.app-topbar {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 400;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 22px;
    border: none;
    background: none;
    pointer-events: none;
}

/* Nur Desktop: Burger ausblenden (Mobil siehe max-width 768px) */
.app-topbar-nav-open {
    display: none;
}

.app-topbar > * {
    pointer-events: auto;
}

.app-topbar-kofi {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.app-topbar-kofi:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.app-topbar-kofi:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 3px;
}

.app-topbar-kofi-img {
    display: block;
    height: 58px;
    width: auto;
    max-width: min(340px, 88vw);
    vertical-align: middle;
}

/* Profilbild in der Topbar: gleiche Höhe wie Ko-fi-Badge (Dropdown-Avatare unverändert) */
.app-topbar .user-menu-avatar-img {
    width: 58px;
    height: 58px;
}
.app-topbar .user-menu-avatar-fallback {
    width: 58px;
    height: 58px;
    font-size: 1.2rem;
}

.admin-streamer-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-streamer-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-streamer-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2f2f35;
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-streamer-name {
    font-weight: 600;
}

#admin-loading {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #adadb8;
}

.commands-table .th-admin-home {
    min-width: 7rem;
}

.commands-table .th-admin-bot {
    min-width: 7rem;
}

.admin-streamers-toolbar {
    margin-bottom: 1rem;
}

.admin-streamers-toolbar .commands-search-wrap {
    max-width: 22rem;
}

.admin-home-featured-cb {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #9146ff;
    cursor: pointer;
}

.admin-home-featured-cb:disabled {
    opacity: 0.5;
    cursor: wait;
}

.admin-bot-active-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: #c8c8d0;
}

.admin-bot-active-cb {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: #9146ff;
    cursor: pointer;
}

.admin-bot-active-cb:disabled {
    opacity: 0.5;
    cursor: wait;
}

@media (max-width: 768px) {
    body.has-fixed-sidebar {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    body.has-fixed-sidebar.sidebar-drawer-open {
        overflow: hidden;
    }

    body.has-fixed-sidebar .app-shell {
        height: auto;
        min-height: 100vh;
    }

    body.has-fixed-sidebar .app-main {
        overflow: visible;
    }

    .sidebar-drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 460;
        background: rgba(0, 0, 0, 0.52);
        backdrop-filter: blur(2px);
        -webkit-tap-highlight-color: transparent;
    }

    body.sidebar-drawer-open .sidebar-drawer-backdrop {
        display: block;
    }

    .app-shell {
        flex-direction: column;
        position: relative;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 88vw) !important;
        z-index: 480;
        border-right: 1px solid #26262c;
        border-bottom: none;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        visibility: hidden;
        pointer-events: none;
    }

    body.sidebar-drawer-open .app-sidebar {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    body.has-fixed-sidebar .app-sidebar {
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow: hidden;
    }

    body.has-fixed-sidebar .sidebar-scroll--app {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    body.has-fixed-sidebar .sidebar-nav-section--scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .app-main {
        width: 100%;
        flex: 1;
        min-height: 0;
        padding-top: calc(64px + env(safe-area-inset-top, 0px));
    }

    .app-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 440;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        justify-content: flex-end;
        align-items: center;
        background: rgba(24, 24, 27, 0.94);
        border-bottom: 1px solid rgba(38, 38, 44, 0.9);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
        pointer-events: none;
    }

    .app-topbar > * {
        pointer-events: auto;
    }

    .app-topbar-nav-open {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin-right: auto;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid #3a3a42;
        border-radius: 10px;
        background: #1f1f23;
        color: #efeff1;
        cursor: pointer;
        transition:
            background 0.15s ease,
            border-color 0.15s ease;
    }

    .app-topbar-nav-open:hover {
        border-color: #9146ff;
        background: #26262c;
    }

    .app-topbar-nav-open:focus-visible {
        outline: 2px solid #9146ff;
        outline-offset: 2px;
    }

    .app-topbar-nav-open-svg {
        display: block;
        width: 22px;
        height: 22px;
    }

    .app-topbar-kofi-img {
        height: 40px;
        max-width: min(200px, 42vw);
    }

    .app-topbar .user-menu-avatar-img,
    .app-topbar .user-menu-avatar-fallback {
        width: 44px;
        height: 44px;
    }

    .dashboard-page-inner {
        padding: 16px 14px 40px;
    }

    .dashboard-modules-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-module-card {
        padding: 14px 40px 40px 14px;
    }

    .commands-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .commands-tabs::-webkit-scrollbar {
        display: none;
    }

    .commands-app-toolbar {
        gap: 0.5rem;
    }

    #btn-sound-overlay-url {
        margin-left: 0 !important;
        margin-right: 0 !important;
        align-self: stretch;
    }

    .app-sidebar.is-collapsed .sidebar-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .home-hero-wrap {
        padding-top: 12px;
    }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .app-sidebar {
        transition: none;
    }
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: bold;
    color: #9146FF;
    text-decoration: none;
}

/* --- USER-MENÜ (oben rechts) --- */
.user-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    line-height: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.user-menu-trigger:hover {
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.5);
    transform: scale(1.04);
}
.user-menu-trigger:focus-visible {
    outline: 2px solid #9146FF;
    outline-offset: 3px;
}

/* Fremdes Profil bearbeiten (Admin / Einladung): auffälliger Rahmen am Topbar-Avatar */
.user-menu-trigger--editing-foreign {
    box-shadow:
        0 0 0 2px #232529,
        0 0 0 4px #f59e0b,
        0 0 0 6px rgba(245, 158, 11, 0.35);
}
.user-menu-trigger--editing-foreign:hover {
    box-shadow:
        0 0 0 2px #232529,
        0 0 0 4px #fbbf24,
        0 0 0 8px rgba(251, 191, 36, 0.28);
    transform: scale(1.04);
}
.user-menu-trigger--editing-foreign:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 3px;
}

.user-menu-header-avatar.user-menu-header-avatar--editing-foreign,
span.user-menu-header-avatar.user-menu-avatar-fallback.user-menu-header-avatar--editing-foreign {
    box-shadow: 0 0 0 2px #f59e0b;
}

.user-menu-item.user-menu-item--button {
    color: #fbbf24;
}
.user-menu-item.user-menu-item--button:hover {
    background: rgba(245, 158, 11, 0.12);
}

.user-menu-avatar-img {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #9146FF;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    padding: 8px 0;
    background: #232529;
    border: 1px solid #3f3f46;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.user-menu-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px 8px;
}

.user-menu-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.user-menu-header-avatar.user-menu-avatar-fallback {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.user-menu-identity-text {
    min-width: 0;
    flex: 1;
}

.user-menu-display-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #efeff1;
    line-height: 1.3;
    cursor: default;
    user-select: none;
}

.user-menu-identity--switcher {
    align-items: flex-start;
}

.user-menu-channel-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.user-menu-channel-switcher-btn .user-menu-display-name {
    cursor: pointer;
}

.user-menu-chevron {
    flex-shrink: 0;
    color: #adadb8;
    opacity: 0.9;
}

.user-menu-channel-sub {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3f3f46;
}

.user-menu-channel-pick {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 2px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-size: 0.88rem;
    color: #efeff1;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}

.user-menu-channel-pick:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-menu-channel-pick.is-active {
    color: #bf94ff;
}

.user-menu-channel-check {
    color: #a78bfa;
    font-weight: 700;
}

/* --- Kontoeinstellungen (/dashboard/settings) --- */
.settings-page .commands-app-header {
    margin-bottom: 2.25rem;
}

.settings-page .commands-app-header h1 {
    margin-bottom: 0.65rem;
}

.settings-page .clips-settings-card {
    max-width: 42rem;
    margin: 0 auto 2.5rem;
    padding: 1.5rem 1.5rem 1.75rem;
    box-sizing: border-box;
}

.settings-page .settings-section-title {
    margin: 0 0 1rem;
}

.settings-page .settings-invite-lead,
.settings-page .settings-delegates-lead {
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.settings-page .settings-invite-actions {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.settings-page .settings-invite-result {
    margin-top: 1.75rem;
    padding-top: 0.35rem;
}

.settings-page .settings-invite-result .commands-field {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0;
}

.settings-page .settings-invite-result .commands-field > span {
    display: block;
    margin-bottom: 0.1rem;
}

.settings-page .settings-invite-url-row {
    gap: 12px;
    margin-top: 0.15rem;
}

.settings-page .settings-invite-url-input {
    padding: 12px 14px;
}

.settings-page .settings-invite-result .settings-invite-expires-hint {
    margin: 1rem 0 0;
    padding-top: 0.15rem;
}

.settings-page .settings-delegates-card .settings-section-title {
    margin-bottom: 0.85rem;
}

.settings-page .settings-delegates-lead {
    margin-bottom: 1.25rem;
}

.settings-page .settings-delegates-panel {
    margin-top: 0.25rem;
}

.settings-page .settings-delegates-panel .commands-empty {
    margin-top: 0;
}

.settings-page .settings-delegate-hint-card {
    max-width: 42rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
}

.settings-page .settings-delegate-hint-text {
    margin: 0;
    line-height: 1.55;
}

.kw-theme .settings-page .settings-delegates-table tbody td {
    vertical-align: middle;
}

.settings-section-title {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
    color: #efeff1;
}

.settings-invite-actions {
    margin-top: 0.75rem;
}

.settings-invite-url-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.settings-invite-url-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3f3f46;
    background: #18181b;
    color: #efeff1;
    font-size: 0.9rem;
}

.settings-invite-result {
    margin-top: 1rem;
}

.user-menu-divider {
    height: 1px;
    margin: 4px 0;
    background: #3f3f46;
}

.user-menu-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.9rem;
    color: #efeff1;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}
.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-menu-item.user-menu-logout {
    color: #f87171;
}
.user-menu-item.user-menu-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* Gast-Login oben rechts */
.app-topbar #user-menu .user-menu-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
}
.app-topbar #user-menu .user-menu-login-btn-icon {
    flex-shrink: 0;
}

/* --- BUTTONS --- */
.btn, .twitch-btn {
    display: inline-block;
    background-color: #9146FF;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    cursor: pointer;
}
.btn:hover, .twitch-btn:hover { background-color: #772ce8; transform: translateY(-2px); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-secondary {
    background: #3a3a3f;
    color: #efeff1;
    border: 1px solid #4a4a52;
}
.btn-secondary:hover { background: #4a4a52; transform: none; }
.btn-logout { background: #3a3a3d; margin-left: 15px; }
.btn-logout:hover { background: #e91e63; }

/* --- ZENTRIERTE KARTEN (Für Startseite & Login) --- */
.card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.card {
    background-color: #1f1f23;
    padding: 50px 70px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #303032;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

/* --- STARTSEITE (/) --- */
body.home-page {
    min-height: 100vh;
}

.home-hero-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 20px 8px;
}

.home-hero-card .home-hero-lead {
    margin-bottom: 28px;
}

.home-hero-twitch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.home-hero-twitch-btn-icon {
    flex-shrink: 0;
}

.home-welcome-title {
    color: #bf94ff;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.5rem;
    font-weight: 600;
}

.home-welcome-text {
    margin-bottom: 0 !important;
    color: #adadb8;
    font-size: 1.05rem;
}

/* --- STARTSEITE: Vertrauens-Streamer --- */
.home-trusted {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 20px 8px;
}

.home-trusted-title {
    text-align: center;
    font-size: 1.35rem;
    color: #efeff1;
    margin: 0 0 20px;
    font-weight: 600;
}

.home-trusted-viewport {
    overflow: hidden;
    width: 100%;
}

.home-trusted-viewport--marquee {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.home-trusted-strip--centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 28px 40px;
    padding: 8px 0 20px;
}

.home-trusted-strip--marquee {
    overflow: hidden;
}

/* Lauf wird per requestAnimationFrame gesetzt (nahtloser Loop ohne CSS-Keyframe-Sprung) */
.home-trusted-marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .home-trusted-marquee-track--raf {
        transform: none !important;
    }
}

.home-trusted-marquee-inner {
    display: flex;
    flex-shrink: 0;
    gap: 40px;
    padding: 8px 20px 20px;
}

.home-trusted-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #c8c8d0;
    transition: color 0.15s ease, transform 0.15s ease;
    min-width: 88px;
}

.home-trusted-card:hover {
    color: #efeff1;
    transform: translateY(-2px);
}

.home-trusted-card:focus-visible {
    outline: 2px solid #9146FF;
    outline-offset: 4px;
    border-radius: 12px;
}

.home-trusted-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3a3a45;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    background: #26262c;
}

.home-trusted-avatar--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    background: #9146FF;
}

.home-trusted-name {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-trusted-empty {
    margin: 0;
    max-width: 560px;
    text-align: center;
    color: #adadb8;
    font-size: 0.98rem;
    line-height: 1.55;
    padding: 8px 16px 16px;
}

/* --- STARTSEITE: Ko-Fi Unterstützer --- */
.home-kofi {
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 20px 28px;
}

.home-kofi-title {
    text-align: center;
    font-size: 1.35rem;
    color: #efeff1;
    margin: 0 0 16px;
    font-weight: 600;
}

.home-kofi-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto 14px;
}

.kofi-entry {
    background: rgba(38, 38, 44, 0.65);
    border: 1px solid #3a3a45;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kofi-entry:hover {
    border-color: rgba(145, 71, 255, 0.35);
    box-shadow: 0 4px 16px rgba(145, 71, 255, 0.08);
}

.kofi-entry-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    justify-content: space-between;
}

.kofi-name {
    font-weight: 600;
    color: #e7e7ec;
    font-size: 0.95rem;
    flex: 1 1 auto;
    min-width: 0;
}

.kofi-amount {
    color: #bf94ff;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.kofi-date {
    color: #868696;
    font-size: 0.82rem;
    white-space: nowrap;
}

.kofi-message {
    margin-top: 8px;
    font-size: 0.88rem;
    font-style: italic;
    color: #9b9bab;
    line-height: 1.45;
    word-break: break-word;
}

.kofi-support-link {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    line-height: 0;
    margin: 0 auto;
    text-decoration: none;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.kofi-support-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.kofi-support-link:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 3px;
}

.kofi-support-link-img {
    display: block;
    height: auto;
    width: auto;
    max-height: 44px;
    max-width: min(280px, 92vw);
}

.home-features {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.home-features > h2 {
    margin: 0 0 10px 0;
    font-size: 1.65rem;
    color: #efeff1;
    text-align: center;
}

.home-features-intro {
    text-align: center;
    margin: 0 auto 32px;
    max-width: 640px;
    font-size: 1.05rem;
    color: #adadb8;
    line-height: 1.55;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: #1f1f23;
    border: 1px solid #303032;
    border-radius: 14px;
    padding: 22px 20px 24px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    border-color: #4a4a55;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.feature-card-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(145, 70, 255, 0.12), rgba(31, 31, 35, 0.9));
    border-radius: 14px;
    border: 1px solid #3a3a45;
}

.feature-card-icon-svg {
    color: #bf94ff;
    display: block;
    flex-shrink: 0;
}

.feature-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.12rem;
    color: #efeff1;
    font-weight: 600;
}

.feature-card p {
    margin: 0 !important;
    font-size: 0.95rem;
    color: #adadb8;
    line-height: 1.55;
    text-align: left;
}

.feature-card code {
    background: #26262c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #d3d3dc;
}

.feature-card a {
    color: #a970ff;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(169, 112, 255, 0.35);
}

.feature-card a:hover {
    color: #bf94ff;
    border-bottom-color: #bf94ff;
}

.feature-card--coming-soon {
    opacity: 0.7;
    border-style: dashed;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 6px;
}

.badge--soon {
    background: rgba(145, 70, 255, 0.25);
    color: #bf94ff;
    border: 1px solid rgba(145, 70, 255, 0.4);
}

.badge--beta {
    background: rgba(251, 191, 36, 0.22);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
}

.sidebar-link-badge--beta {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.4);
}

.home-beta-hint {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #adadb8;
}

.home-beta-hint strong {
    color: #efeff1;
}

.kw-beta-notice {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    background: rgba(251, 191, 36, 0.09);
    font-size: 0.95rem;
    line-height: 1.45;
    color: #e7e7ea;
}

.kw-beta-notice p {
    margin: 0;
    color: inherit;
    font-size: inherit;
}

.kw-beta-notice a {
    color: #fcd34d;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kw-beta-notice a:hover {
    color: #fde68a;
}

@media (max-width: 600px) {
    .home-hero-wrap .card {
        padding: 32px 22px;
    }
}

/* --- TYPOGRAFIE --- */
h1 { margin-top: 0; font-size: 2.5rem; margin-bottom: 10px; }
p { color: #adadb8; font-size: 1.2rem; margin-bottom: 40px; }
.hint { font-size: 0.9rem; margin-top: 30px; opacity: 0.7; }

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

/* OAuth-Callback: Login erfolgreich */
.login-success-page .login-success-main {
    max-width: 520px;
    margin: 0 auto;
    padding: 36px 20px 56px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.login-success-card {
    width: 100%;
    text-align: center;
    padding: 40px 32px 36px;
    border-radius: 14px;
    border: 1px solid #2e2a3a;
    background: linear-gradient(180deg, #1e1c26 0%, #18181d 100%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(145, 70, 255, 0.05);
    box-sizing: border-box;
}

.login-success-icon {
    margin: 0 auto 20px;
    line-height: 0;
}

.login-success-title {
    margin: 0 0 12px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #efeff1;
    letter-spacing: -0.02em;
}

.login-success-lead {
    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.55;
    color: #adadb8;
}

.login-success-channel {
    color: #c4b5fd;
    font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
    font-weight: 600;
}

.login-success-progress {
    margin-bottom: 24px;
}

.login-success-spinner {
    margin: 0 auto 16px;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(145, 70, 255, 0.2);
    border-radius: 50%;
    border-top-color: #9146ff;
    animation: spin 0.85s linear infinite;
}

.login-success-meta {
    margin: 0;
    font-size: 0.9rem;
    color: #9d96b0;
}

.login-success-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #bf94ff;
}

.login-success-actions .btn {
    min-width: 200px;
}


/* --- DEINE ROADMAP (KANBAN) STYLES --- */
.board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 12px 0 32px;
    align-items: start;
    box-sizing: border-box;
    width: 100%;
}
.column {
    background: linear-gradient(180deg, #1c1a24 0%, #18181d 100%);
    border-radius: 14px;
    min-width: 0;
    padding: 14px 12px 16px;
    border: 1px solid #2e2a3a;
    min-height: 280px;
    box-sizing: border-box;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(145, 70, 255, 0.04);
}
.roadmap-column-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c4b5fd;
    border-bottom: 1px solid #2e2a3a;
    padding: 0 0 12px;
}
.roadmap-column-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #9d96b0;
}
.roadmap-column-icon--planned { color: #a78bfa; }
.roadmap-column-icon--progress { color: #60a5fa; }
.roadmap-column-icon--test { color: #fbbf24; }
.roadmap-column-icon--done { color: #34d399; }
.roadmap-column-label { color: #efeff1; }

@media (max-width: 1100px) {
    .board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .board {
        grid-template-columns: minmax(0, 1fr);
    }
}
.card-list { min-height: 200px; }

/* Roadmap: mehr horizontaler Raum für vier Spalten (sonst ~275px je Spalte bei 1100px) */
.roadmap-page.commands-page .commands-main {
    max-width: min(1560px, 100%);
    box-sizing: border-box;
}
.roadmap-page .commands-app-toolbar {
    max-width: none;
}
.roadmap-page .board {
    gap: 22px;
}
.roadmap-page .column {
    min-width: 0;
    padding: 16px 14px 18px;
}

.roadmap-page .card-list {
    margin-top: 18px;
}

.roadmap-page .roadmap-planned-hint {
    margin: -8px 0 20px 0;
    max-width: 52rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #8a8399;
}

.roadmap-card {
    background: linear-gradient(180deg, #1e1c26 0%, #1a1a1f 100%);
    padding: 14px 14px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: default;
    border: 1px solid #2e2a3a;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    position: relative;
}
.roadmap-card-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px 10px;
    align-items: center;
    margin-bottom: 10px;
}
.roadmap-card-head--simple {
    display: block;
    margin-bottom: 10px;
}
.roadmap-card-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    margin: 0;
    cursor: grab;
    color: #6e6e78;
    border-radius: 6px;
    flex-shrink: 0;
    touch-action: none;
    line-height: 0;
    transition: color 0.15s, background 0.15s;
}
.roadmap-card-handle:hover {
    color: #c4b5fd;
    background: rgba(145, 70, 255, 0.08);
}
.roadmap-card-handle:active {
    cursor: grabbing;
}
.roadmap-card--dragging {
    opacity: 0.55;
}
.roadmap-card h3 { margin: 0; font-size: 1.1rem; color: #efeff1; min-width: 0; overflow-wrap: anywhere; }
.roadmap-card-actions {
    display: flex;
    flex-shrink: 0;
    gap: 2px;
    align-items: center;
}
.roadmap-card-actions .roadmap-btn-icon {
    padding: 6px 4px;
}

.show-more-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #a1a1aa;
    background: transparent;
    border: 1px solid #3f3f46;
    border-radius: 9999px;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.show-more-btn:hover {
    border-color: #9146ff;
    color: #c4b5fd;
    background: rgba(145, 70, 255, 0.08);
}

.roadmap-icon-svg {
    display: block;
    flex-shrink: 0;
}
.roadmap-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #a1a1aa;
    border-radius: 8px;
    cursor: pointer;
    padding: 6px;
    line-height: 0;
    transition: color 0.15s, background 0.15s;
}
.roadmap-btn-icon:hover {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.06);
}
.roadmap-btn-icon--delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}
.roadmap-btn-icon:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}

.roadmap-btn-text {
    background: #3a3a3f;
    border: 1px solid #4a4a52;
    color: #efeff1;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.roadmap-btn-text:hover { background: #4a4a52; border-color: #9146FF; color: #bf94ff; }

.roadmap-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.roadmap-status-select {
    background: #13121a;
    color: #efeff1;
    border: 1px solid #3a3646;
    margin-top: 10px;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 0.9rem;
    font-family: inherit;
}
.roadmap-status-select:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.18);
}

/* Roadmap: Detail- & Bearbeiten-Modal */
.roadmap-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.roadmap-modal-panel {
    background: linear-gradient(180deg, #1c1a24 0%, #161618 100%);
    border: 1px solid #2e2a3a;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: min(85vh, 640px);
    overflow: auto;
    padding: 24px 28px;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(145, 70, 255, 0.06),
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 80px rgba(145, 70, 255, 0.04);
    animation: roadmapModalIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes roadmapModalIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.roadmap-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #adadb8;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.roadmap-modal-close:hover { color: #efeff1; background: #18181b; }
.roadmap-modal-panel h2 { margin: 0 36px 16px 0; font-size: 1.35rem; color: #efeff1; }
.roadmap-modal-panel .roadmap-modal-body { margin: 0; font-size: 1rem; color: #adadb8; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.roadmap-modal-panel .roadmap-edit-field { width: 100%; box-sizing: border-box; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid #3a3646; background: #13121a; color: #efeff1; font-size: 1rem; }
.roadmap-modal-panel textarea.roadmap-edit-field { min-height: 120px; resize: vertical; font-family: inherit; }
.roadmap-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; justify-content: flex-end; }
.roadmap-modal-actions .btn-secondary { background: #3a3a3f; color: #efeff1; border: 1px solid #4a4a52; }
.roadmap-modal-actions .btn-secondary:hover { background: #4a4a52; }

/* --- Game Collection (Kanban) --- */
.games-collection-page.games-collection-page--dashboard.commands-page--app .commands-main {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    padding-left: clamp(12px, 2vw, 28px);
    padding-right: clamp(12px, 2vw, 28px);
}
.games-collection-page.games-collection-page--public.commands-page .commands-main {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    padding-left: clamp(12px, 2vw, 32px);
    padding-right: clamp(12px, 2vw, 32px);
}
.games-toolbar {
    flex-wrap: wrap;
    gap: 10px;
}
.games-toolbar:not(.games-toolbar--public-filter) .games-board-filter-wrap {
    margin-left: auto;
}
.games-board-filter-wrap {
    flex: 1 1 220px;
    min-width: min(100%, 200px);
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.games-board-filter-wrap--public {
    max-width: min(100%, 440px);
}
.games-board-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a1a1aa;
}
.games-board-filter-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #0e0e12;
    color: #efeff1;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.35;
}
.games-board-filter-input:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.2);
}
.games-pub-link-line {
    margin: -6px 0 8px 0;
    font-size: 0.9rem;
    color: #adadb8;
}
.games-pub-link {
    color: #bf94ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.games-pub-link:hover {
    color: #ddd6fe;
}
.games-legend {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 14px 0;
}
.games-legend.hidden {
    display: none !important;
}
.games-legend--collapsible {
    border-radius: 10px;
    border: 1px solid #2e2a3a;
    background: linear-gradient(165deg, #1c1a24 0%, #141418 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(145, 70, 255, 0.1);
}
.games-legend-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 14px 11px;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: #efeff1;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.games-legend--collapsible:not(.games-legend--collapsed) .games-legend-toggle {
    border-bottom-color: #2e2a3a;
    box-shadow: inset 0 -2px 0 0 rgba(145, 70, 255, 0.35);
}
.games-legend-toggle:hover {
    background: rgba(145, 70, 255, 0.08);
}
.games-legend-toggle:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: -2px;
}
.games-legend-toggle-label {
    flex: 1;
    min-width: 0;
}
.games-legend-toggle-chevron {
    flex-shrink: 0;
    color: #adadb8;
    transition: transform 0.2s ease;
}
.games-legend--collapsible:not(.games-legend--collapsed) .games-legend-toggle-chevron {
    transform: rotate(90deg);
}
.games-legend-body {
    padding: 10px 10px 12px;
    background: linear-gradient(180deg, rgba(20, 20, 24, 0.9) 0%, #121118 100%);
}
.games-legend-body[hidden] {
    display: none !important;
}
.games-legend-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.games-legend-item {
    --games-legend-accent: #9146ff;
    margin: 0;
    padding: 10px 14px 11px 16px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--games-legend-accent) 38%, #2e2a3a);
    background: linear-gradient(
        100deg,
        color-mix(in srgb, var(--games-legend-accent) 24%, #141418) 0%,
        #13121a 52%,
        #121118 100%
    );
    color: #f4f4f5;
    font-size: 0.88rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--games-legend-accent) 15%, transparent);
}
.games-legend-item-title {
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--games-legend-accent) 72%, #fff);
}
.games-legend-item-sep {
    color: #8b8698;
    font-weight: 500;
}
.games-legend-item-text {
    color: #e4e4e7;
}
.games-bulk-mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 14px;
}
.games-bulk-mode-btn {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #13121a;
    color: #adadb8;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.games-bulk-mode-btn:hover {
    color: #efeff1;
    border-color: #5b5768;
}
.games-bulk-mode-btn:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}
.games-bulk-mode-btn--active {
    color: #f5f3ff;
    border-color: color-mix(in srgb, #9146ff 55%, #3a3646);
    background: linear-gradient(165deg, color-mix(in srgb, #9146ff 18%, #1c1a24) 0%, #18181d 100%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #9146ff 22%, transparent);
}
.games-bulk-panel.hidden {
    display: none !important;
}
.games-bulk-paste-lead {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #adadb8;
}
.games-bulk-paste-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 200px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #0e0e12;
    color: #efeff1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.88rem;
    line-height: 1.45;
    resize: vertical;
}
.games-bulk-paste-textarea:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.2);
}
.games-bulk-actions .btn.hidden {
    display: none !important;
}
.games-collection-page .games-board-outer {
    overflow-x: visible;
    width: 100%;
    margin: 0;
    padding-bottom: 8px;
    box-sizing: border-box;
}
.games-board-outer--public {
    margin: 0;
}
.games-collection-page .board.games-board {
    --games-cols: 5;
    display: grid;
    grid-template-columns: repeat(var(--games-cols, 5), minmax(0, 1fr));
    gap: clamp(8px, 1.2vw, 14px);
    align-items: start;
    padding: 12px 0 32px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.games-collection-page .games-board .column.games-column {
    min-width: 0;
    width: auto;
    max-width: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--games-col-accent) 16%, #1c1a24) 0%,
        #18181d 48%,
        #141418 100%
    );
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 32%, #2e2a3a);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 color-mix(in srgb, var(--games-col-accent) 22%, transparent);
}
.games-column-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0 0 14px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--games-col-accent, #9146ff);
}
.games-column-head--public {
    border-bottom: 1px solid #2e2a3a;
    box-shadow: inset 0 -2px 0 0 var(--games-col-accent, #9146ff);
}
.games-column-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 0%;
    overflow: hidden;
}
.games-column-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--games-col-accent) 24%, #1a1a1f);
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 42%, #2e2a3a);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #efeff1;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;
}
.games-column-pill-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.games-column-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: var(--games-col-accent, #9146ff);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}
.games-column-count-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--games-col-accent, #bf94ff);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    line-height: 1;
}
.games-column-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    flex: 0 0 auto;
    flex-shrink: 0;
}
.games-column-actions .games-column-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    box-sizing: border-box;
}
.games-column-actions .games-column-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.games-card-list--public {
    margin-top: 4px;
}
.game-card {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--games-col-accent) 18%, #1e1c26) 0%,
        color-mix(in srgb, var(--games-col-accent) 8%, #1a1a1f) 100%
    );
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 38%, #2e2a3a);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    position: relative;
}
.game-card--public {
    cursor: default;
}
.game-card--dragging {
    opacity: 0.55;
}
.game-card-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
}
.game-card-open {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-align: left;
    background: transparent;
    border: none;
    padding: 6px 8px;
    margin: -4px -6px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
}
.game-card-open:hover {
    background: color-mix(in srgb, var(--games-col-accent) 14%, transparent);
}
.game-card-open:focus-visible {
    outline: 2px solid var(--games-col-accent, #9146ff);
    outline-offset: 2px;
}
.game-card-open--public {
    width: 100%;
    margin: 0;
    padding: 8px 10px;
}
.game-card-thumb {
    width: 40px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #13121a;
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 32%, #2e2a3a);
}
.game-card-thumb--empty {
    display: inline-block;
    width: 40px;
    height: 54px;
    border-radius: 6px;
    flex-shrink: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--games-col-accent) 22%, #25232e), #18181d);
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 28%, #2e2a3a);
}
.game-card-title-compact {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #efeff1;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-align: left;
    min-width: 0;
}
.game-card-title-text {
    font-weight: 600;
}
.game-card-year {
    font-weight: 600;
    color: color-mix(in srgb, var(--games-col-accent) 72%, #d4d4d8);
}
.game-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.game-card-tag {
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--games-col-accent) 20%, #25232e);
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 35%, #3f3a4a);
    color: #e4e4e7;
}
.game-card-cover {
    width: 56px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #13121a;
    border: 1px solid color-mix(in srgb, var(--games-col-accent) 30%, #2e2a3a);
}
.game-card-cover--large {
    width: 72px;
    height: 96px;
}
.game-card-cover--empty {
    background: linear-gradient(135deg, color-mix(in srgb, var(--games-col-accent) 25%, #25232e), #18181d);
}
.game-card-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.games-detail-modal-panel {
    max-width: 760px;
    width: 100%;
}
.games-detail-modal-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 28px;
    align-items: flex-start;
    margin-top: 8px;
}
.games-detail-modal-left {
    flex: 0 0 200px;
    max-width: 100%;
}
.games-detail-modal-right {
    flex: 1 1 280px;
    min-width: 0;
}
.games-detail-modal-h2 {
    margin: 0 36px 8px 0;
    font-size: 1.35rem;
    line-height: 1.25;
    color: #efeff1;
    overflow-wrap: anywhere;
}
.games-detail-cover-img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    border: 1px solid #2e2a3a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.games-detail-cover-empty {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    border: 1px dashed #3f3f46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #71717a;
    background: #13121a;
}
.games-detail-tags-block {
    margin-top: 14px;
}
.games-detail-tags-block.hidden {
    display: none !important;
}
.games-detail-tags-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8399;
    margin-bottom: 8px;
}
.games-detail-year {
    margin: 0 0 14px 0;
    font-size: 0.95rem;
    color: #c4b5fd;
    font-weight: 600;
}
.games-detail-year.hidden {
    display: none !important;
}
.games-detail-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #adadb8;
    line-height: 1.58;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-height: min(52vh, 420px);
    overflow: auto;
    padding-right: 4px;
}

.commands-modal--wide {
    max-width: 560px;
    width: 100%;
}
.commands-modal--games-add {
    max-width: min(1100px, 96vw);
    width: 100%;
    max-height: min(92vh, 920px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 22px 26px 24px;
    box-sizing: border-box;
}
/* Such-Panel füllt die Modalhöhe; nur die Ergebnisliste scrollt (nicht der gesamte Dialog). */
#games-bulk-panel-search.games-bulk-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.commands-modal--games-add .games-add-search-block,
.commands-modal--games-add .games-add-status-row {
    flex-shrink: 0;
}
.commands-modal--games-add h2 {
    margin-bottom: 8px;
}
.games-add-category-line {
    margin: 0 0 18px 0;
    font-size: 0.92rem;
    color: #adadb8;
}
.games-add-search-block {
    margin-bottom: 14px;
}
.games-add-search-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c4b5fd;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.games-add-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #3a3646;
    background: #0e0e12;
    color: #efeff1;
    font-family: inherit;
    font-size: 1.08rem;
    line-height: 1.35;
}
.games-add-search-input:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.2);
}
.games-add-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 10px;
}
.games-add-hint {
    flex: 1 1 200px;
    margin: 0;
    min-height: 1.25em;
}
.games-add-selection-slot {
    position: relative;
    flex-shrink: 0;
}
.games-add-selection-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 9999px;
    border: 1px solid #4c3f6b;
    background: color-mix(in srgb, #9146ff 14%, #1a1820);
    color: #ddd6fe;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.02em;
}
.games-add-selection-btn:hover {
    border-color: #7c5cbf;
    color: #f5f3ff;
}
.games-add-selection-btn:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}
.games-add-selection-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 5;
    min-width: min(320px, 85vw);
    max-width: min(400px, 92vw);
    max-height: min(280px, 40vh);
    overflow: auto;
    padding: 10px 10px 8px;
    border-radius: 12px;
    border: 1px solid #3a3646;
    background: #1a1824;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}
.games-add-selection-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.games-add-selection-empty {
    margin: 0;
    padding: 8px 6px;
    font-size: 0.88rem;
    color: #8b8698;
}
.games-add-selection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 8px 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}
.games-add-selection-item-name {
    font-size: 0.88rem;
    color: #efeff1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.games-add-selection-remove {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #adadb8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}
.games-add-selection-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}
.games-add-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid #2e2a3a;
    border-radius: 12px;
    background: #13121a;
    margin-bottom: 14px;
}
.games-add-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.games-add-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #2a2635;
    cursor: pointer;
    transition: background 0.12s ease;
}
.games-add-row:last-child {
    border-bottom: none;
}
.games-add-row:hover {
    background: rgba(145, 70, 255, 0.07);
}
.games-add-row-check-wrap {
    flex-shrink: 0;
    cursor: default;
    display: flex;
    align-items: center;
}
.games-add-cb {
    width: 18px;
    height: 18px;
    accent-color: #9146ff;
    cursor: pointer;
}
.games-add-row-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    background: #0e0e10;
}
.games-add-row-thumb--empty {
    width: 40px;
    height: 54px;
    border-radius: 6px;
    background: linear-gradient(145deg, #2a2635, #1a1820);
    border: 1px dashed #3a3646;
}
.games-add-row-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.games-add-row-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #efeff1;
    overflow-wrap: anywhere;
}
.games-add-row-hint {
    font-size: 0.75rem;
    color: #7a7389;
    letter-spacing: 0.02em;
}
.games-bulk-hint {
    font-size: 0.88rem;
    color: #adadb8;
    margin: 0 0 10px 0;
}
.games-bulk-hint.games-add-hint {
    margin: 0;
}
.games-bulk-actions {
    margin-top: 0;
    flex-shrink: 0;
}
.games-select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #13121a;
    color: #efeff1;
    font-size: 0.95rem;
    font-family: inherit;
}
.games-select:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.18);
}
.games-public-header .commands-app-lead {
    max-width: none;
}

.admin-controls { display: none; text-align: center; background-color: #1f1f23; padding: 20px; border-radius: 10px; border: 1px solid #303032; max-width: 600px; margin: 40px auto 20px auto; }
.admin-controls input { padding: 10px; border-radius: 5px; border: 1px solid #3a3a3f; background-color: #18181b; color: white; margin: 5px; width: 200px; }
.admin-controls button { margin-left: 10px; }

/* --- ÖFFENTLICHE COMMANDS-SEITE (/commands) --- */
.commands-page .commands-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}
.commands-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.85rem;
    color: #efeff1;
}
.commands-sub {
    margin: 0 0 20px 0;
    color: #adadb8;
    font-size: 1rem;
}
.commands-toolbar {
    margin-bottom: 28px;
}
.commands-search-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 420px;
}
.commands-search-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #adadb8;
}
.commands-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-size: 1rem;
}
.commands-search-input:focus {
    outline: none;
    border-color: #9146FF;
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.25);
}
.commands-search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.commands-error {
    background: #2a1a1f;
    border: 1px solid #5c2a3a;
    color: #ffb4c4;
    padding: 16px 18px;
    border-radius: 10px;
    max-width: 640px;
}
.commands-section {
    margin-bottom: 40px;
}
.commands-section h2 {
    margin: 0 0 10px 0;
    font-size: 1.35rem;
    color: #bf94ff;
    border-bottom: 2px solid #303032;
    padding-bottom: 10px;
}
.commands-section--nested {
    margin-bottom: 28px;
}
.commands-section--nested:last-child {
    margin-bottom: 0;
}
.commands-public-split .commands-section--nested:first-child .commands-subheading {
    margin-top: 0;
}
.commands-public-split {
    margin-top: 2px;
}
.commands-hint {
    color: #adadb8;
    font-size: 0.95rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}
.commands-hint code {
    background: #26262c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}
.commands-subheading {
    margin: 24px 0 12px 0;
    font-size: 1.05rem;
    color: #efeff1;
}
.commands-mod-note {
    font-size: 0.9rem;
    color: #adadb8;
    margin: 0 0 12px 0;
    line-height: 1.45;
}
.commands-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #303032;
    background: #1f1f23;
}
.commands-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.commands-table thead th {
    text-align: left;
    padding: 12px 14px;
    background: #18181b;
    color: #adadb8;
    font-weight: 600;
    border-bottom: 1px solid #303032;
    white-space: nowrap;
}
.commands-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #2a2a2e;
    vertical-align: top;
    color: #efeff1;
}
.commands-table tbody tr:last-child td {
    border-bottom: none;
}
.commands-table .cmd-name {
    color: #a970ff;
    font-size: 0.95rem;
}
.commands-table .cmd-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
}
.commands-table .cmd-alias-count {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 999px;
    color: #a89fc9;
    background: rgba(145, 70, 255, 0.12);
    border: 1px solid rgba(145, 70, 255, 0.22);
    cursor: help;
    flex-shrink: 0;
    font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
}
.commands-table .cmd-response {
    max-width: 360px;
    word-break: break-word;
    color: #d3d3dc;
    font-size: 0.9rem;
    line-height: 1.45;
}
.commands-table--mod thead th {
    background: #1a1520;
}
.perm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.perm-everyone { background: #2d3a4a; color: #a8c4e8; }
.perm-subscriber { background: #2d3a2d; color: #9fd89f; }
.perm-vip { background: #3a342d; color: #e8c48a; }
.perm-moderator { background: #3a2d2d; color: #f0a0a0; }
.perm-broadcaster { background: #3a2d4a; color: #d4b4ff; }
.cd-badge {
    font-size: 0.85rem;
    color: #adadb8;
    white-space: nowrap;
}
.cd-sep { opacity: 0.5; margin: 0 2px; }
.commands-empty {
    margin-top: 12px;
    color: #adadb8;
    font-size: 0.95rem;
}

.timers-intro {
    line-height: 1.55;
}
.timers-page .timer-id {
    font-size: 0.8rem;
    color: #c4b8dc;
    word-break: break-all;
}
.timer-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.timer-status.timer-on {
    background: #1a3d2a;
    color: #7dffb0;
}
.timer-status.timer-off {
    background: #3a3a3d;
    color: #adadb8;
}

@media (max-width: 768px) {
    .commands-table thead {
        display: none;
    }
    .commands-table tbody tr {
        display: block;
        padding: 14px 12px;
        border-bottom: 1px solid #2a2a2e;
    }
    .commands-table tbody tr:last-child {
        border-bottom: none;
    }
    .commands-table tbody td {
        display: block;
        padding: 6px 0;
        border: none;
    }
    .commands-table tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #6e6e78;
        margin-bottom: 4px;
    }
    .commands-table .cmd-response {
        max-width: none;
    }
    .commands-table tbody tr.commands-table-empty-row td::before {
        display: none !important;
    }
    .commands-table tbody tr.commands-table-empty-row {
        text-align: center;
    }
}

/* --- COMMANDS APP (eingeloggt /commands) --- */
.commands-login-card {
    max-width: 520px;
    margin: 48px auto;
    padding: 36px 32px;
    background: #1f1f23;
    border: 1px solid #303032;
    border-radius: 14px;
    text-align: center;
}
.commands-login-card h1 { font-size: 1.65rem; margin-bottom: 12px; }
.commands-login-card p { margin-bottom: 20px; color: #adadb8; font-size: 1rem; }
.commands-login-hint { font-size: 0.88rem !important; opacity: 0.85; margin-top: 24px !important; margin-bottom: 0 !important; }

.commands-app-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.85rem;
    color: #efeff1;
}
.commands-app-lead {
    margin: 0 0 24px 0;
    color: #adadb8;
    font-size: 1rem;
}

.commands-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #303032;
    margin-bottom: 20px;
    max-width: 1100px;
}
.commands-tab {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 18px 14px;
    cursor: pointer;
    position: relative;
    font-family: inherit;
}
.commands-tab:hover { color: #efeff1; }
.commands-tab.is-active {
    color: #efeff1;
}
.commands-tab.is-active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 3px;
    background: #1e90ff;
    border-radius: 2px 2px 0 0;
}
.commands-tab-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: #2e7d32;
    border-radius: 6px;
    vertical-align: middle;
}

.commands-app-toolbar {
    margin-bottom: 18px;
    max-width: 1100px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

/* Kanalpunkte: etwas mehr Luft zwischen „Neue Belohnung“ und Sound-URL */
#btn-sound-overlay-url {
    margin-left: auto;
    align-self: center;
    /* Für Extra-Abstand noch etwas rechts außen */
    margin-right: 2.5rem;
    display: flex;
}

/* Ghost pill button (toolbar: Counter-style outline, shared across dashboard) */
.kw-theme .counter-btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #a1a1aa;
    background: transparent;
    border: 1px solid #3f3f46;
    border-radius: 9999px;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.kw-theme .counter-btn-pill:hover {
    color: #e4e4e7;
    border-color: #52525b;
    background: rgba(255, 255, 255, 0.04);
}
.kw-theme .counter-btn-pill:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}
.kw-theme .counter-btn-pill--purple {
    color: #c4b5fd;
    border-color: #9146ff;
    background: transparent;
}
.kw-theme .counter-btn-pill--purple:hover {
    color: #ede9fe;
    border-color: #a78bfa;
    background: rgba(145, 70, 255, 0.12);
}
.kw-theme .counter-btn-pill--purple:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}
.kw-theme .counter-btn-pill svg {
    flex-shrink: 0;
}

.commands-panel { max-width: 1100px; }

/* Kanalpunkte — Sound: eine Zone mit echtem file-Input als vollflächigem Overlay (kein sichtbares „Durchsuchen“) */
.commands-modal-form .commands-field--cp-sound-file {
    position: relative;
}

.cp-sound-upload-widget {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 118px;
    margin-top: 4px;
    padding: 1.1rem 1rem 0.95rem;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(82, 76, 102, 0.65);
    background: rgba(10, 9, 14, 0.55);
    cursor: pointer;
    outline: none;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.cp-sound-upload-widget-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
    text-align: center;
    pointer-events: none;
}

/*
 * Datei-Input nur per Clip verstecken (nicht display:none, nicht als Overlay).
 * Sonst zeichnen WebKit/Gecko oft trotzdem die Zeile „Datei auswählen“ — siehe <label for>.
 */
.cp-sound-file-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.kw-theme .cp-sound-upload-widget:hover {
    border-color: rgba(110, 104, 130, 0.9);
    background: rgba(12, 11, 18, 0.72);
}
.kw-theme .cp-sound-upload-widget:focus {
    outline: none;
}
.kw-theme .cp-sound-upload-widget:focus-within,
.kw-theme .cp-sound-upload-widget:focus-visible {
    border-color: rgba(145, 70, 255, 0.55);
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.18);
}
.kw-theme .cp-sound-upload-widget--active {
    border-color: rgba(145, 70, 255, 0.45);
    background: rgba(145, 70, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(145, 70, 255, 0.12);
}

.kw-theme .cp-sound-upload-icon {
    flex-shrink: 0;
    color: rgba(245, 245, 250, 0.22);
    transition: color 0.18s ease;
}
.kw-theme .cp-sound-upload-widget:hover .cp-sound-upload-icon {
    color: rgba(245, 245, 250, 0.32);
}
.kw-theme .cp-sound-upload-widget--active .cp-sound-upload-icon {
    color: rgba(237, 233, 254, 0.4);
}

.kw-theme .cp-sound-upload-primary {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: rgba(245, 245, 250, 0.3);
}

.kw-theme .cp-sound-upload-reqs {
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.45;
    color: rgba(200, 196, 220, 0.38);
}

.kw-theme .cp-sound-upload-status {
    margin: 0.15rem 0 0;
    font-size: 0.68rem;
    line-height: 1.35;
    color: rgba(180, 176, 205, 0.42);
    word-break: break-word;
}

.kw-theme .cp-sound-upload-err-below {
    margin-top: 0.65rem;
}

.commands-default-section-row .commands-default-section-cell {
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    padding-top: 1.1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

.commands-table .cmd-syntax {
    font-size: 0.85rem;
    word-break: break-word;
    max-width: 28rem;
}

.commands-table--manage .th-toggle { width: 72px; }
.commands-table--manage .th-actions { width: 200px; text-align: right; }
.commands-table--manage .cmd-actions {
    text-align: right;
    white-space: nowrap;
}
.cmd-actions .roadmap-btn-text { margin-left: 6px; }

.cmd-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
}
.cmd-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cmd-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #3a3a3f;
    border-radius: 999px;
    transition: background 0.2s;
}
.cmd-switch-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #adadb8;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cmd-switch input:checked + .cmd-switch-slider {
    background: #9146FF;
}
.cmd-switch input:checked + .cmd-switch-slider::before {
    transform: translateX(20px);
    background: #fff;
}
.cmd-switch input:focus-visible + .cmd-switch-slider {
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.45);
}

.resp-type-badge {
    font-size: 0.8rem;
    color: #c4b8dc;
    background: #26262c;
    padding: 4px 8px;
    border-radius: 6px;
}

.commands-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.commands-page-btn {
    background: #26262c;
    border: 1px solid #3a3a3f;
    color: #efeff1;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}
.commands-page-btn:hover:not(:disabled) {
    border-color: #9146FF;
    color: #bf94ff;
}
.commands-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.commands-page-info {
    font-size: 0.9rem;
    color: #adadb8;
}

.commands-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.commands-modal {
    background: #26262c;
    border: 1px solid #3a3a3f;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: min(90vh, 720px);
    overflow: auto;
    padding: 24px 28px 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.commands-modal--narrow { max-width: 440px; }
.commands-modal--admin-banner {
    max-width: min(640px, 100%);
    max-height: min(92vh, 900px);
}
.commands-modal h2 {
    margin: 0 36px 16px 0;
    font-size: 1.35rem;
    color: #efeff1;
}
.commands-modal-form .commands-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    text-align: left;
}
.commands-modal-form .commands-field span {
    font-size: 0.85rem;
    color: #adadb8;
}
.commands-modal-form input[type="text"],
.commands-modal-form input[type="number"],
.commands-modal-form input[type="url"],
.commands-modal-form input[type="password"],
.commands-modal-form select,
.commands-modal-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-family: inherit;
    font-size: 1rem;
}
.commands-modal-form textarea { resize: vertical; min-height: 100px; }
.commands-fieldset {
    border: 1px solid #3a3a3f;
    border-radius: 8px;
    padding: 12px 14px 14px;
    margin-bottom: 16px;
    text-align: left;
}
.commands-fieldset legend {
    padding: 0 6px;
    font-size: 0.85rem;
    color: #bf94ff;
}
.commands-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #d3d3dc;
    cursor: pointer;
}
.commands-radio input { margin-top: 3px; }
.commands-modal-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.commands-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.commands-vars-list {
    margin: 0;
    padding-left: 18px;
    color: #adadb8;
    line-height: 1.65;
    font-size: 0.95rem;
}
.commands-vars-list code {
    background: #18181b;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #d3d3dc;
}

.commands-modal--timer {
    max-width: 560px;
}
.commands-field-hint {
    margin: -8px 0 12px;
    font-size: 0.82rem;
    color: #86868d;
    line-height: 1.45;
}
.commands-field-hint--tight {
    margin: -4px 0 14px;
}
.commands-field-label-inline {
    display: block;
    font-size: 0.85rem;
    color: #adadb8;
    margin-bottom: 8px;
}
.commands-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #d3d3dc;
    cursor: pointer;
}
.commands-checkbox-row input {
    margin-top: 3px;
    flex-shrink: 0;
}
.timer-interval-block {
    margin-bottom: 18px;
}
.commands-range-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}
.commands-range-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #9147ff;
}
.commands-range-num {
    width: 5rem;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-family: inherit;
    font-size: 1rem;
}

/* Modal form sets width:100% on all number inputs — override for slider companions */
.commands-modal-form .commands-range-row .commands-range-num,
.kw-theme .commands-modal-form .commands-range-row .commands-range-num {
    width: 5rem;
    max-width: 6.5rem;
    flex: 0 0 auto;
}

.commands-modal-form .commands-range-row input[type="range"],
.kw-theme .commands-modal-form .commands-range-row input[type="range"] {
    flex: 1 1 0;
    min-width: 120px;
    width: auto;
    max-width: none;
}
.timer-messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.timer-message-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.commands-modal--timer .timer-message-input {
    min-height: 72px;
}
.timer-message-input {
    flex: 1;
    min-width: 0;
    min-height: 72px;
    resize: vertical;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #0e0e10;
    color: #efeff1;
    font-family: inherit;
    font-size: 1rem;
}
.timer-message-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.timer-msg-add-btn,
.timer-msg-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #3a3a3f;
    background: #18181b;
    color: #adadb8;
    cursor: pointer;
    line-height: 1;
}
.timer-msg-add-btn:hover,
.timer-msg-remove-btn:hover {
    border-color: #9147ff;
    color: #efeff1;
}
.timer-msg-remove-btn {
    font-size: 1.25rem;
}
.timer-io-cell {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #adadb8;
}

/* ══════════════════════════════════════════════════════════════════════
   COUNTER DESIGN SYSTEM  —  unified dark-gradient theme
   Scoped to .kw-theme so Home, Roadmap, Impressum, Variablen stay intact
   ══════════════════════════════════════════════════════════════════════ */

@keyframes kw-panel-enter {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Buttons: ghost purple pill ── */
.kw-theme .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid #9146ff;
    color: #c4b5fd;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    box-shadow: none;
    line-height: 1.2;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    text-decoration: none;
}
.kw-theme .btn:hover {
    color: #ede9fe;
    border-color: #a78bfa;
    background: rgba(145,70,255,0.12);
}
.kw-theme .btn:focus-visible {
    outline: 2px solid #9146ff;
    outline-offset: 2px;
}

.kw-theme .twitch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #9146ff 0%, #7c3aed 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    box-shadow: 0 2px 12px rgba(145,70,255,0.25);
    transition: filter 0.15s, box-shadow 0.15s, transform 0.1s;
    text-decoration: none;
}
.kw-theme .twitch-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 4px 20px rgba(145,70,255,0.35);
    transform: translateY(-1px);
}

.kw-theme .btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
}

.kw-theme .app-topbar #user-menu .user-menu-login-btn {
    min-height: 58px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 8px;
    box-shadow: 0 2px 14px rgba(145, 70, 255, 0.32);
}

.kw-theme .btn-secondary {
    background: transparent;
    border: 1px solid #3a3646;
    color: #8e8a9a;
    font-weight: 500;
    box-shadow: none;
}
.kw-theme .btn-secondary:hover {
    color: #d4d2dc;
    border-color: #52505e;
    background: rgba(255,255,255,0.03);
}

/* ── Icon buttons (table actions — wrench, trash, etc.) ── */
.kw-theme .counter-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    margin: 0;
    color: #a1a1aa;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.kw-theme .counter-btn-icon:hover {
    color: #efeff1;
    background: #27272a;
}
.kw-theme .counter-btn-icon:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}
.kw-theme .counter-btn-icon--danger:hover {
    color: #f87171;
    background: rgba(248,113,113,0.12);
}
.kw-theme .counter-icon-svg {
    display: block;
    flex-shrink: 0;
}
.kw-theme .counter-actions-icons {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
}
.kw-theme .cmd-actions {
    text-align: right;
    white-space: nowrap;
}
.kw-theme .cmd-actions .counter-actions-icons {
    justify-content: flex-end;
}

.kw-theme .btn-logout {
    background: transparent;
    border: 1px solid #3a3646;
    color: #f87171;
    margin-left: 15px;
    box-shadow: none;
}
.kw-theme .btn-logout:hover {
    background: rgba(248,113,113,0.12);
    border-color: #f87171;
    filter: none;
    transform: none;
}

/* ── Error alert ── */
.kw-theme .commands-error {
    background: linear-gradient(135deg, rgba(248,113,113,0.08) 0%, rgba(248,113,113,0.04) 100%);
    border: 1px solid rgba(248,113,113,0.25);
    color: #ffb4c4;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* ── Table wrapper ── */
.kw-theme .commands-table-wrap {
    overflow-x: auto;
    border: 1px solid #2e2a3a;
    border-radius: 14px;
    background: linear-gradient(180deg, #1a1a1f 0%, #18181d 100%);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 1px rgba(145,70,255,0.04);
}

/* ── Table ── */
.kw-theme .commands-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-spacing: 0;
}

.kw-theme .commands-table thead th {
    text-align: left;
    background: linear-gradient(180deg, #1e1b26 0%, #1a1920 100%);
    color: #9d96b0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 12px;
    border-bottom: 1px solid #2e2a3a;
    white-space: nowrap;
}

.kw-theme .commands-table--mod thead th {
    background: linear-gradient(180deg, #1e1b26 0%, #1a1920 100%);
}

.kw-theme .commands-table tbody td {
    vertical-align: middle;
    padding: 8px 12px;
    border-bottom: none !important;
    background: transparent;
    color: #efeff1;
    transition: background 0.12s ease;
}

.kw-theme .commands-table tbody tr:nth-child(odd) { background-color: #1a1a1f; }
.kw-theme .commands-table tbody tr:nth-child(even) { background-color: #212126; }
.kw-theme .commands-table tbody tr:hover { background-color: #28282f; }
.kw-theme .commands-table tbody tr:not(:last-child) {
    background-image: linear-gradient(rgba(255,255,255,0.09), rgba(255,255,255,0.09));
    background-size: 100% 1px;
    background-position: left bottom;
    background-repeat: no-repeat;
}

.kw-theme .commands-table .cmd-name {
    color: #c4b5fd;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
    background: rgba(145, 70, 255, 0.08);
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid rgba(145, 70, 255, 0.15);
}
.kw-theme .commands-table .cmd-alias-count {
    color: #b4a9d6;
    background: rgba(145, 70, 255, 0.1);
    border-color: rgba(145, 70, 255, 0.2);
}

.kw-theme .commands-table .cmd-response {
    max-width: 360px;
    word-break: break-word;
    color: #adadb8;
    font-size: 0.82rem;
    line-height: 1.45;
}

/* ── Dashboard tables (Commands, Timer, Kanalpunkte, Zitate, …): width + Zeilenhöhe wie Counter ── */
.kw-theme .commands-table.commands-table--manage,
.kw-theme .commands-table.commands-table--counter,
.kw-theme .commands-table.commands-table--timers,
.kw-theme .commands-table.commands-table--mod {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-spacing: 0;
}

/* Empty table state: full width like populated tables */
.kw-theme .commands-table tbody tr.commands-table-empty-row td.commands-empty-cell {
    text-align: center;
    color: #9d96b0;
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 1.35rem 16px;
    vertical-align: middle;
}
.kw-theme .commands-table tbody tr.commands-table-empty-row {
    background-color: #1a1a1f !important;
}
.kw-theme .commands-table tbody tr.commands-table-empty-row:hover {
    background-color: #1a1a1f !important;
}
.kw-theme .commands-table tbody tr.commands-table-empty-row td.commands-empty-cell {
    border-bottom: none !important;
    background-image: none !important;
}
.kw-theme .commands-empty-cell code {
    background: rgba(145, 70, 255, 0.08);
    border: 1px solid rgba(145, 70, 255, 0.12);
    color: #c4b5fd;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ── Action buttons in tables ── */
.kw-theme .roadmap-btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #a1a1aa;
    background: transparent;
    border: 1px solid #3f3f46;
    border-radius: 9999px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.kw-theme .roadmap-btn-text:hover {
    color: #e4e4e7;
    border-color: #52525b;
    background: rgba(255,255,255,0.04);
}

/* ── Modals ── */
.kw-theme .commands-modal {
    position: relative;
    background: linear-gradient(180deg, #1c1a24 0%, #161618 100%);
    border: 1px solid #2e2a3a;
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(145,70,255,0.06),
        0 24px 64px rgba(0,0,0,0.55),
        0 0 80px rgba(145,70,255,0.04);
    max-width: 520px;
    width: 100%;
    max-height: min(90vh, 720px);
    overflow: auto;
    padding: 1.5rem 1.75rem 1.5rem;
    animation: kw-panel-enter 0.2s ease-out;
}
.kw-theme .commands-modal.commands-modal--games-add {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(92vh, 920px);
}

.kw-theme .commands-modal--timer { max-width: 560px; }

.kw-theme .commands-modal h2 {
    margin: 0 36px 16px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #efeff1;
}

.kw-theme .roadmap-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: transparent;
    border: none;
    color: #6e6e78;
    font-size: 1.4rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    padding: 0;
    line-height: 1;
}
.kw-theme .roadmap-modal-close:hover {
    color: #efeff1;
    background: rgba(255,255,255,0.06);
}

/* ── Modal form elements ── */
.kw-theme .commands-modal-form .commands-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 16px;
    text-align: left;
}

.kw-theme .commands-modal-form .commands-field > span,
.kw-theme .commands-field-label-inline {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9d96b0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kw-theme .commands-modal-form input[type="text"],
.kw-theme .commands-modal-form input[type="number"],
.kw-theme .commands-modal-form input[type="url"],
.kw-theme .commands-modal-form input[type="password"],
.kw-theme .commands-modal-form input[type="search"],
.kw-theme .commands-modal-form select,
.kw-theme .commands-modal-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #13121a;
    color: #efeff1;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* After the rule above: number inputs must not stay width:100% beside a range slider */
.kw-theme .commands-modal-form .commands-range-row .commands-range-num {
    width: 5rem;
    max-width: 6.5rem;
    flex: 0 0 auto;
}

.kw-theme .commands-modal-form .commands-range-row input[type="range"] {
    flex: 1 1 0;
    min-width: 120px;
    width: auto;
    max-width: none;
}

.kw-theme .commands-modal-form input[type="text"]:focus,
.kw-theme .commands-modal-form input[type="number"]:focus,
.kw-theme .commands-modal-form input[type="url"]:focus,
.kw-theme .commands-modal-form input[type="password"]:focus,
.kw-theme .commands-modal-form input[type="search"]:focus,
.kw-theme .commands-modal-form select:focus,
.kw-theme .commands-modal-form textarea:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145,70,255,0.18);
}

.kw-theme .commands-modal-form input::placeholder,
.kw-theme .commands-modal-form textarea::placeholder {
    color: #4a4654;
}

.kw-theme .commands-modal-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Fieldset ── */
.kw-theme .commands-fieldset {
    border: 1px solid #2e2a3a;
    border-radius: 10px;
    padding: 14px 16px 16px;
    margin-bottom: 16px;
    text-align: left;
    background: rgba(0,0,0,0.12);
}

.kw-theme .commands-fieldset legend {
    padding: 0 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Pagination ── */
.kw-theme .commands-page-btn {
    background: rgba(145,70,255,0.06);
    border: 1px solid #2e2a3a;
    color: #c4b5fd;
    padding: 0.4rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
}
.kw-theme .commands-page-btn:hover:not(:disabled) {
    border-color: #9146ff;
    background: rgba(145,70,255,0.12);
    color: #ede9fe;
}
.kw-theme .commands-page-btn:disabled {
    opacity: 0.35;
}

.kw-theme .commands-page-info {
    font-size: 0.82rem;
    color: #9d96b0;
}

/* ── Tabs ── */
.kw-theme .commands-tabs {
    border-bottom: 1px solid #2e2a3a;
}

.kw-theme .commands-tab {
    color: #9d96b0;
    font-size: 0.9rem;
}
.kw-theme .commands-tab:hover { color: #efeff1; }
.kw-theme .commands-tab.is-active::after {
    background: linear-gradient(90deg, #9146ff, #7c3aed);
}

.kw-theme .commands-tab-badge {
    background: linear-gradient(135deg, #9146ff, #7c3aed);
    color: #fff;
}

/* ── Dashboard module cards ── */
.kw-theme .dashboard-module-card {
    background: linear-gradient(180deg, #1c1a24 0%, #18181d 100%);
    border: 1px solid #2e2a3a;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15), 0 0 0 1px rgba(145,70,255,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.kw-theme .dashboard-module-card:hover {
    border-color: #3a3646;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 1px rgba(145,70,255,0.08);
}

.kw-theme .dashboard-module-card--soon {
    opacity: 0.85;
    border-style: dashed;
}

.kw-theme .dashboard-module-settings {
    border: none;
    background: transparent;
    color: #a1a1aa;
    width: 28px;
    height: 28px;
}
.kw-theme .dashboard-module-settings:hover {
    color: #efeff1;
    border-color: transparent;
    background: #27272a;
}

.kw-theme .dashboard-module-icon {
    color: #c4b5fd;
}

.kw-theme .dashboard-module-card-desc {
    color: #a1a1aa;
}

/* ── Dashboard welcome card ── */
.kw-theme .dashboard-welcome-card.card {
    background: linear-gradient(180deg, #1c1a24 0%, #161618 100%);
    border: 1px solid #2e2a3a;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 1px rgba(145,70,255,0.04);
}

/* ── Login card ── */
.kw-theme .commands-login-card {
    background: linear-gradient(180deg, #1c1a24 0%, #161618 100%);
    border: 1px solid #2e2a3a;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 0 1px rgba(145,70,255,0.04);
}

/* ── Empty state text ── */
.kw-theme .commands-empty {
    color: #9d96b0;
    font-size: 0.9rem;
}

/* ── App lead code tags ── */
.kw-theme .commands-app-lead code {
    background: rgba(145,70,255,0.08);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.88em;
    color: #c4b5fd;
    border: 1px solid rgba(145,70,255,0.12);
}

/* ── Field hints ── */
.kw-theme .commands-field-hint {
    color: #5c5868;
    font-size: 0.78rem;
    line-height: 1.4;
}
.kw-theme .commands-field-hint code {
    background: rgba(255,255,255,0.05);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* ── Status badges ── */
.kw-theme .perm-badge {
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    letter-spacing: 0.02em;
}

.kw-theme .timer-status {
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
}

.kw-theme .resp-type-badge {
    font-size: 0.72rem;
    color: #c4b5fd;
    background: rgba(145,70,255,0.08);
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid rgba(145,70,255,0.12);
}

/* ── Range inputs ── */
.kw-theme .commands-range-row input[type="range"] {
    accent-color: #9146ff;
}

.kw-theme .commands-range-num {
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #13121a;
    color: #efeff1;
}

/* ── Checkbox rows ── */
.kw-theme .commands-checkbox-row {
    color: #c8c8d0;
    font-size: 0.9rem;
}

/* ── Cmd switch slider base ── */
.kw-theme .cmd-switch-slider {
    background: #2e2a3a;
}

/* ── Section headings inside pages ── */
.kw-theme .commands-section h2 {
    color: #c4b5fd;
    border-bottom-color: #2e2a3a;
}

/* ── Search input ── */
.kw-theme .commands-search-input {
    border: 1px solid #3a3646;
    background: #13121a;
    border-radius: 10px;
}
.kw-theme .commands-search-input:focus {
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145,70,255,0.18);
}

.kw-theme .commands-search-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9d96b0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Modal actions row ── */
.kw-theme .commands-modal-actions-row {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 0.5rem;
}

/* ── Timer msg buttons ── */
.kw-theme .timer-msg-add-btn,
.kw-theme .timer-msg-remove-btn {
    border: 1px solid #3a3646;
    background: #13121a;
    color: #9d96b0;
    border-radius: 10px;
}
.kw-theme .timer-msg-add-btn:hover,
.kw-theme .timer-msg-remove-btn:hover {
    border-color: #9146ff;
    color: #c4b5fd;
    background: rgba(145,70,255,0.06);
}

/* ── Timer message textarea ── */
.kw-theme .timer-message-input {
    border: 1px solid #3a3646;
    background: #13121a;
    color: #efeff1;
    border-radius: 10px;
    font-size: 0.95rem;
}
.kw-theme .timer-message-input:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145,70,255,0.18);
}

/* ── Timer IO cell ── */
.kw-theme .timer-io-cell {
    font-size: 0.82rem;
    color: #9d96b0;
}

/* ── Timer ID ── */
.kw-theme .timer-id {
    font-size: 0.72rem;
    color: #c4b5fd;
}

/* ── Vars list ── */
.kw-theme .commands-vars-list {
    color: #9d96b0;
    font-size: 0.9rem;
}
.kw-theme .commands-vars-list code {
    background: rgba(145,70,255,0.08);
    border: 1px solid rgba(145,70,255,0.12);
    color: #c4b5fd;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ── Radio/checkbox labels ── */
.kw-theme .commands-radio {
    color: #c8c8d0;
    font-size: 0.9rem;
}

/* ── Mobile responsive table (keep structure, update colors) ── */
@media (max-width: 768px) {
    .kw-theme .commands-table tbody tr {
        border-bottom: 1px solid #2e2a3a;
        background: #1a1a1f !important;
    }
    .kw-theme .commands-table tbody tr.commands-table-empty-row td::before {
        display: none !important;
    }
    .kw-theme .commands-table tbody td::before {
        color: #9d96b0;
        font-weight: 600;
        letter-spacing: 0.05em;
    }
}

/* ── Dashboard module toggle (unchecked state) ── */
.kw-theme .module-toggle-ui {
    background: #2e2a3a;
}

/* ── Dashboard section title ── */
.kw-theme .dashboard-modules-section-title {
    color: #efeff1;
    font-weight: 700;
}

/* ── Dashboard welcome brand ── */
.kw-theme .dashboard-welcome-brand {
    color: #efeff1;
}

/* ── Commands app lead ── */
.kw-theme .commands-app-lead {
    color: #9d96b0;
    font-size: 0.95rem;
}

/* ── Commands app header h1 ── */
.kw-theme .commands-app-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
}

/* ── Standalone form fields (forms using commands-modal-form outside modal) ── */
.kw-theme form.commands-modal-form:not(.commands-modal .commands-modal-form) {
    max-width: 42rem;
}

.kw-theme form.commands-modal-form .commands-field > span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9d96b0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Commands hint code inside sections ── */
.kw-theme .commands-hint code {
    background: rgba(145,70,255,0.08);
    border: 1px solid rgba(145,70,255,0.12);
    color: #c4b5fd;
    padding: 1px 5px;
    border-radius: 4px;
}

/* ── Commands hint text ── */
.kw-theme .commands-hint {
    color: #9d96b0;
    font-size: 0.9rem;
}

/* ── Commands mod note ── */
.kw-theme .commands-mod-note {
    color: #9d96b0;
    font-size: 0.85rem;
}

/* ── Commands subheading ── */
.kw-theme .commands-subheading {
    color: #c4b5fd;
    font-size: 1rem;
}

/* ── Panel consistency: same max-width ── */
.kw-theme .commands-panel {
    max-width: 1100px;
}

/* ── Zuschauer-Tracking Leaderboard (sortierbare Spalten, breitere Tabelle) ── */
.kw-theme.vt-leaderboard-page .commands-main {
    max-width: min(1320px, 100%);
}

.kw-theme.vt-leaderboard-page .vt-lb-table {
    table-layout: fixed;
}

.kw-theme.vt-leaderboard-page .vt-lb-table thead th:not(.vt-lb-sort-th) {
    padding: 14px 14px 12px;
}

.kw-theme.vt-leaderboard-page .vt-lb-table thead th.vt-lb-sort-th {
    text-transform: none;
    padding: 0;
    vertical-align: middle;
}

.kw-theme.vt-leaderboard-page .vt-lb-table tbody td {
    padding: 14px 14px;
}

.kw-theme.vt-leaderboard-page .vt-sort-btn {
    text-transform: none;
    letter-spacing: 0.03em;
    font-size: 0.78rem;
    font-weight: 600;
}

.kw-theme.vt-leaderboard-page .vt-lb-col-rank {
    width: 3rem;
}

/* Chatalerts — gleiche Hauptspalte wie Spam-Filter */
.chatalerts-page .commands-main {
    max-width: min(920px, 100%);
    width: 100%;
    box-sizing: border-box;
}
.chatalerts-page.has-fixed-sidebar .app-main {
    scrollbar-gutter: stable;
}

/* Spam-Filter page — nur max-width-Override; Rest lebt als <style> in spam-filters.html */
.spam-filters-page .commands-main {
    max-width: min(920px, 100%);
    width: 100%;
    box-sizing: border-box;
}
.spam-filters-page.has-fixed-sidebar .app-main {
    scrollbar-gutter: stable;
}

/* ── Globale Seiten-Hinweise (Admin-gesteuert, site-banners.js) ── */
.site-banner-host {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 1rem 0.15rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-banner-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    max-width: min(52rem, 100%);
    box-sizing: border-box;
}

.site-banner {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1.1rem;
    font-size: 0.92rem;
    line-height: 1.45;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left-width: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.site-banner-title {
    margin: 0 0 0.35rem 0;
    font-size: 0.98rem;
    font-weight: 600;
}

.site-banner-body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.site-banner--warning {
    background: #fef3c7;
    color: #78350f;
    border-left-color: #d97706;
}

.site-banner--error {
    background: #fee2e2;
    color: #7f1d1d;
    border-left-color: #dc2626;
}

.site-banner--info {
    background: #dbeafe;
    color: #1e3a5f;
    border-left-color: #2563eb;
}

.kw-theme .site-banner {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.kw-theme .site-banner--warning {
    background: rgba(217, 119, 6, 0.22);
    color: #fcd34d;
}

.kw-theme .site-banner--error {
    background: rgba(220, 38, 38, 0.22);
    color: #fecaca;
}

.kw-theme .site-banner--info {
    background: rgba(37, 99, 235, 0.25);
    color: #bfdbfe;
}

/* Admin: Tabs + Hinweis-Editor */
.admin-dash-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.admin-dash-tab {
    font: inherit;
    cursor: pointer;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid #2e2a3a;
    background: #1a1a1f;
    color: #c8c3d4;
}

.admin-dash-tab:hover {
    background: #24242c;
}

.admin-dash-tab[aria-selected='true'] {
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.35), rgba(99, 102, 241, 0.2));
    border-color: rgba(145, 70, 255, 0.45);
    color: #f4f4f5;
}

.admin-banner-pages-select-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-banner-pages-filter {
    width: 100%;
    max-width: 28rem;
    margin-bottom: 0.5rem;
}

.admin-banner-pages-box {
    max-height: 16rem;
    overflow: auto;
    padding: 0.5rem 0.75rem;
    border: 1px solid #2e2a3a;
    border-radius: 10px;
    background: #141418;
}

.admin-banner-page-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: #d4d0de;
}

.admin-banner-page-row input {
    margin-top: 0.2rem;
}

.admin-banner-kind-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.admin-banner-kind-badge--warning {
    background: rgba(217, 119, 6, 0.25);
    color: #fcd34d;
}

.admin-banner-kind-badge--error {
    background: rgba(220, 38, 38, 0.28);
    color: #fecaca;
}

.admin-banner-kind-badge--info {
    background: rgba(37, 99, 235, 0.3);
    color: #93c5fd;
}

/* --- Bot-Variablen Autocomplete (${…}) --- */
.bot-var-ac {
    position: fixed;
    z-index: 10040;
    min-width: min(100vw - 1.5rem, 17rem);
    max-height: 14rem;
    overflow: auto;
    padding: 0.35rem 0;
    margin: 0;
    border-radius: 10px;
    border: 1px solid rgba(145, 70, 255, 0.35);
    background: rgba(22, 22, 28, 0.98);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
}

.bot-var-ac__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    margin: 0;
    padding: 0.4rem 0.65rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #e4e1ec;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bot-var-ac__item:hover,
.bot-var-ac__item.is-active {
    background: rgba(145, 70, 255, 0.22);
}

.bot-var-ac__code {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    font-size: 0.8rem;
    color: #d4bfff;
    background: rgba(145, 70, 255, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.bot-var-ac__hint {
    font-size: 0.75rem;
    color: #9a939e;
    line-height: 1.25;
}

.bot-var-ac__more {
    padding: 0.35rem 0.65rem 0.15rem;
    font-size: 0.72rem;
    color: #7c7582;
}

/* --- KI-Textgenerator (Commands, Timer, Alerts, …) --- */
.ai-builder-field-wrap {
    position: relative;
}
.ai-builder-field-has-icon {
    padding-right: 2.5rem;
}
.ai-builder-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d9c7ff;
    background: rgba(145, 70, 255, 0.16);
    border: 1px solid rgba(145, 70, 255, 0.45);
    border-radius: 999px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity 0.14s ease, transform 0.14s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ai-builder-field-wrap:hover .ai-builder-btn,
.ai-builder-field-wrap:focus-within .ai-builder-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.ai-builder-btn:hover {
    color: #fff;
    background: rgba(145, 70, 255, 0.32);
    border-color: rgba(145, 70, 255, 0.75);
}
.ai-builder-btn svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}
.ai-builder-modal {
    max-width: 32rem;
}

/* --- Streamplan (Kalenderwoche, Accordion wie Chatalerts / Spam-Filters) --- */
.stream-plan-page .sp-toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem 1.5rem;
}
.stream-plan-page .sp-week-block {
    flex: 1 1 20rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.stream-plan-page .sp-week-nav {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    max-width: 52rem;
}
.stream-plan-page .sp-nav-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1f1f23;
    color: #c8c6d0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.stream-plan-page .sp-nav-btn:hover {
    background: rgba(145, 70, 255, 0.18);
    border-color: rgba(145, 70, 255, 0.45);
    color: #efeff1;
}
.stream-plan-page .sp-cal {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.4rem;
    min-width: 0;
}
.stream-plan-page .sp-cal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #1a1a1e;
    min-width: 0;
}
.stream-plan-page .sp-cal-cell--today {
    border-color: rgba(145, 70, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(145, 70, 255, 0.25);
    background: rgba(145, 70, 255, 0.08);
}
.stream-plan-page .sp-cal-dow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8c8694;
}
.stream-plan-page .sp-cal-num {
    font-size: 1.05rem;
    font-weight: 700;
    color: #efeff1;
    line-height: 1.1;
}
.stream-plan-page .sp-week-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}
.stream-plan-page .sp-kw-line {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #bf94ff;
    letter-spacing: 0.02em;
}
.stream-plan-page .sp-week-picker-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.stream-plan-page .sp-week-label-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: #b8b4c0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stream-plan-page .sp-week-input {
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0e0e10;
    color: #efeff1;
    font: inherit;
    min-width: 11rem;
    color-scheme: dark;
}
.stream-plan-page .sp-week-range {
    margin: 0;
    font-size: 0.88rem;
    color: #9b96a3;
}
.stream-plan-page .sp-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

/* Accordion-Zeilen (analog .ca-acc / .sf-row) */
.stream-plan-page .sp-days-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1.35rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.stream-plan-page .sp-acc {
    margin: 0;
    width: 100%;
    min-width: 0;
    min-height: 0;
}
.stream-plan-page .sp-acc-bar {
    display: grid;
    grid-template-columns: auto minmax(120px, 200px) minmax(0, 1fr) 28px;
    gap: 0 12px;
    align-items: center;
    padding: 10px 14px;
    background: #1f1f23;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    min-height: 44px;
    min-width: 0;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.stream-plan-page .sp-acc-bar:hover {
    background: #25252b;
}
.stream-plan-page .sp-acc-bar:focus-visible {
    outline: 2px solid rgba(145, 70, 255, 0.65);
    outline-offset: 2px;
}
.stream-plan-page .sp-acc:has(.sp-panel-shell.is-open) > .sp-acc-bar {
    border-radius: 8px 8px 0 0;
}
.stream-plan-page .sp-acc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 28px;
    padding: 0 0.2rem;
    border-radius: 8px;
    background: rgba(145, 70, 255, 0.15);
    border: 1px solid rgba(145, 70, 255, 0.28);
    color: #c4b5fd;
    font-size: 0.75rem;
    font-weight: 800;
}
.stream-plan-page .sp-acc-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #efeff1;
    white-space: nowrap;
}
.stream-plan-page .sp-acc-desc {
    font-size: 0.8rem;
    color: #7a7a85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.stream-plan-page .sp-chevron-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #7a7a85;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
.stream-plan-page .sp-chevron-btn:hover {
    color: #efeff1;
    background: rgba(255, 255, 255, 0.06);
}
.stream-plan-page .sp-chevron-btn svg {
    transition: transform 0.2s ease;
}
.stream-plan-page .sp-chevron-btn--open svg {
    transform: rotate(180deg);
}
.stream-plan-page .sp-panel-shell {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
    box-sizing: border-box;
}
.stream-plan-page .sp-panel-shell > .sp-panel {
    min-width: 0;
    box-sizing: border-box;
}
.stream-plan-page .sp-panel {
    margin: 0;
    padding: 16px 18px 18px;
    background: #1a1a1e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 8px 8px;
}
@media (prefers-reduced-motion: reduce) {
    .stream-plan-page .sp-panel-shell {
        transition: none;
    }
}

/* Eingabefelder (dunkel, wie Chatalerts-Textareas) */
.stream-plan-page .sp-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
}
.stream-plan-page .sp-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9d96b0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stream-plan-page .sp-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid #3a3646;
    background: #13121a;
    color: #efeff1;
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stream-plan-page .sp-input:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.18);
}
.stream-plan-page .sp-input::placeholder {
    color: #4a4654;
}
.stream-plan-page .sp-input[type='time'] {
    color-scheme: dark;
    max-width: 100%;
}

.stream-plan-page .sp-slots {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.stream-plan-page .sp-slot {
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: #14141a;
    border: 1px solid rgba(145, 70, 255, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.stream-plan-page .sp-slot-head {
    display: flex;
    gap: 0.65rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.stream-plan-page .sp-field-grow {
    flex: 1 1 12rem;
}
.stream-plan-page .sp-slot-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-top: 0.75rem;
}
.stream-plan-page .sp-slot-times .sp-field {
    min-width: 6.5rem;
}
.stream-plan-page .sp-check-open .sp-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
}
.stream-plan-page .sp-checkbox-hint {
    font-size: 0.78rem;
    color: #8c8694;
}
.stream-plan-page .sp-cat-block {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.stream-plan-page .sp-cat-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b8b4c0;
    margin-bottom: 0.35rem;
}
.stream-plan-page .sp-schedule-cat-row {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.stream-plan-page .sp-schedule-cat-row .sp-in-schedule-cat {
    max-width: 100%;
}
.stream-plan-page .sp-schedule-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #8c8694;
}
.stream-plan-page .sp-set-tz-select {
    width: 100%;
    max-width: 100%;
}
.stream-plan-page .sp-settings-modal h2 {
    margin-top: 0;
}
.stream-plan-page .sp-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    min-height: 1.5rem;
}
.stream-plan-page .sp-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(145, 70, 255, 0.2);
    border: 1px solid rgba(145, 70, 255, 0.45);
    color: #e8deff;
}
.stream-plan-page .sp-cat-remove {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0 0.1rem;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.75;
}
.stream-plan-page .sp-cat-remove:hover {
    opacity: 1;
}
.stream-plan-page .sp-cat-search-wrap {
    position: relative;
}
.stream-plan-page .sp-cat-search.sp-input {
    padding: 0.45rem 0.6rem;
    font-size: 0.88rem;
}
.stream-plan-page .sp-cat-results {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    margin-top: 4px;
    max-height: 14rem;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1a1a1f;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.stream-plan-page .sp-cat-result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: #efeff1;
    font: inherit;
    cursor: pointer;
}
.stream-plan-page .sp-cat-result:hover {
    background: rgba(145, 70, 255, 0.18);
}
.stream-plan-page .sp-cat-result-msg {
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
    color: #9b96a3;
}
.stream-plan-page .sp-btn-add {
    align-self: flex-start;
    margin-top: 0.35rem;
}

@media (max-width: 720px) {
    .stream-plan-page .sp-acc-bar {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        grid-template-rows: auto auto;
        gap: 8px 10px;
    }
    .stream-plan-page .sp-acc-icon {
        grid-column: 1;
        grid-row: 1;
    }
    .stream-plan-page .sp-acc-title {
        grid-column: 2;
        grid-row: 1;
    }
    .stream-plan-page .sp-chevron-btn {
        grid-column: 3;
        grid-row: 1;
    }
    .stream-plan-page .sp-acc-desc {
        grid-column: 1 / -1;
        grid-row: 2;
        white-space: normal;
    }
    .stream-plan-page .sp-cal {
        gap: 0.3rem;
    }
    .stream-plan-page .sp-cal-dow {
        font-size: 0.62rem;
    }
    .stream-plan-page .sp-cal-num {
        font-size: 0.92rem;
    }
}

/* --- Öffentliches Streamer-Profil --- */
.streamer-public-profile-page .streamer-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.streamer-public-profile-page .streamer-public-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #efeff1;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.streamer-public-profile-page .streamer-public-card:hover {
    border-color: rgba(145, 70, 255, 0.45);
    background: rgba(145, 70, 255, 0.08);
}
.streamer-public-profile-page .streamer-public-card-title {
    font-weight: 600;
    font-size: 1rem;
}
.streamer-public-profile-page .streamer-public-card-path {
    font-size: 0.78rem;
    color: #9b96a3;
    word-break: break-all;
}