:root {
    --cpd-font-size-root: calc(0.9rem * var(--mantine-scale, 1)) !important;
    
    /* Mantine color palette - imported for use in embedded styles */
    --mantine-scale: 1;
    --mantine-color-dark-0: #c9c9c9;
    --mantine-color-dark-1: #b8b8b8;
    --mantine-color-dark-2: #828282;
    --mantine-color-dark-3: #696969;
    --mantine-color-dark-4: #424242;
    --mantine-color-dark-5: #3b3b3b;
    --mantine-color-dark-6: #2e2e2e;
    --mantine-color-dark-7: #242424;
    --mantine-color-dark-8: #1f1f1f;
    --mantine-color-dark-9: #141414;
    --mantine-color-gray-0: #f8f9fa;
    --mantine-color-gray-1: #f1f3f5;
    --mantine-color-gray-2: #e9ecef;
    --mantine-color-gray-3: #dee2e6;
    --mantine-color-gray-4: #ced4da;
    --mantine-color-gray-5: #adb5bd;
    --mantine-color-gray-6: #868e96;
    --mantine-color-gray-7: #495057;
    --mantine-color-gray-8: #343a40;
    --mantine-color-gray-9: #212529;
    --mantine-color-red-0: #fff5f5;
    --mantine-color-red-1: #ffe3e3;
    --mantine-color-red-2: #ffc9c9;
    --mantine-color-red-3: #ffa8a8;
    --mantine-color-red-4: #ff8787;
    --mantine-color-red-5: #ff6b6b;
    --mantine-color-red-6: #fa5252;
    --mantine-color-red-7: #f03e3e;
    --mantine-color-red-8: #e03131;
    --mantine-color-red-9: #c92a2a;
    --mantine-color-pink-0: #fff0f6;
    --mantine-color-pink-1: #ffdeeb;
    --mantine-color-pink-2: #fcc2d7;
    --mantine-color-pink-3: #faa2c1;
    --mantine-color-pink-4: #f783ac;
    --mantine-color-pink-5: #f06595;
    --mantine-color-pink-6: #e64980;
    --mantine-color-pink-7: #d6336c;
    --mantine-color-pink-8: #c2255c;
    --mantine-color-pink-9: #a61e4d;
    --mantine-color-grape-0: #f8f0fc;
    --mantine-color-grape-1: #f3d9fa;
    --mantine-color-grape-2: #eebefa;
    --mantine-color-grape-3: #e599f7;
    --mantine-color-grape-4: #da77f2;
    --mantine-color-grape-5: #cc5de8;
    --mantine-color-grape-6: #be4bdb;
    --mantine-color-grape-7: #ae3ec9;
    --mantine-color-grape-8: #9c36b5;
    --mantine-color-grape-9: #862e9c;
    --mantine-color-violet-0: #f3f0ff;
    --mantine-color-violet-1: #e5dbff;
    --mantine-color-violet-2: #d0bfff;
    --mantine-color-violet-3: #b197fc;
    --mantine-color-violet-4: #9775fa;
    --mantine-color-violet-5: #845ef7;
    --mantine-color-violet-6: #7950f2;
    --mantine-color-violet-7: #7048e8;
    --mantine-color-violet-8: #6741d9;
    --mantine-color-violet-9: #5f3dc4;
    --mantine-color-indigo-0: #edf2ff;
    --mantine-color-indigo-1: #dbe4ff;
    --mantine-color-indigo-2: #bac8ff;
    --mantine-color-indigo-3: #91a7ff;
    --mantine-color-indigo-4: #748ffc;
    --mantine-color-indigo-5: #5c7cfa;
    --mantine-color-indigo-6: #4c6ef5;
    --mantine-color-indigo-7: #4263eb;
    --mantine-color-indigo-8: #3b5bdb;
    --mantine-color-indigo-9: #364fc7;
    --mantine-color-blue-0: #e7f5ff;
    --mantine-color-blue-1: #d0ebff;
    --mantine-color-blue-2: #a5d8ff;
    --mantine-color-blue-3: #74c0fc;
    --mantine-color-blue-4: #4dabf7;
    --mantine-color-blue-5: #339af0;
    --mantine-color-blue-6: #228be6;
    --mantine-color-blue-7: #1c7ed6;
    --mantine-color-blue-8: #1971c2;
    --mantine-color-blue-9: #1864ab;
    --mantine-color-cyan-0: #e3fafc;
    --mantine-color-cyan-1: #c5f6fa;
    --mantine-color-cyan-2: #99e9f2;
    --mantine-color-cyan-3: #66d9e8;
    --mantine-color-cyan-4: #3bc9db;
    --mantine-color-cyan-5: #22b8cf;
    --mantine-color-cyan-6: #15aabf;
    --mantine-color-cyan-7: #1098ad;
    --mantine-color-cyan-8: #0c8599;
    --mantine-color-cyan-9: #0b7285;
    --mantine-color-teal-0: #e6fcf5;
    --mantine-color-teal-1: #c3fae8;
    --mantine-color-teal-2: #96f2d7;
    --mantine-color-teal-3: #63e6be;
    --mantine-color-teal-4: #38d9a9;
    --mantine-color-teal-5: #20c997;
    --mantine-color-teal-6: #12b886;
    --mantine-color-teal-7: #0ca678;
    --mantine-color-teal-8: #099268;
    --mantine-color-teal-9: #087f5b;
    --mantine-color-green-0: #ebfbee;
    --mantine-color-green-1: #d3f9d8;
    --mantine-color-green-2: #b2f2bb;
    --mantine-color-green-3: #8ce99a;
    --mantine-color-green-4: #69db7c;
    --mantine-color-green-5: #51cf66;
    --mantine-color-green-6: #37b24d;
    --mantine-color-green-7: #2f9e44;
    --mantine-color-green-8: #2b8a3e;
    --mantine-color-green-9: #2f7e38;
    --mantine-color-lime-0: #f4fce3;
    --mantine-color-lime-1: #e9fac8;
    --mantine-color-lime-2: #d8f5a2;
    --mantine-color-lime-3: #c0eb75;
    --mantine-color-lime-4: #a9e34b;
    --mantine-color-lime-5: #94d82d;
    --mantine-color-lime-6: #82c91e;
    --mantine-color-lime-7: #74b816;
    --mantine-color-lime-8: #66a80f;
    --mantine-color-lime-9: #5c940d;
    --mantine-color-yellow-0: #fff9db;
    --mantine-color-yellow-1: #fff3bf;
    --mantine-color-yellow-2: #ffec99;
    --mantine-color-yellow-3: #ffe066;
    --mantine-color-yellow-4: #ffd43b;
    --mantine-color-yellow-5: #fcc419;
    --mantine-color-yellow-6: #fab005;
    --mantine-color-yellow-7: #f59f00;
    --mantine-color-yellow-8: #f08c00;
    --mantine-color-yellow-9: #e67700;
    --mantine-color-orange-0: #fff4e6;
    --mantine-color-orange-1: #ffe8cc;
    --mantine-color-orange-2: #ffd8a8;
    --mantine-color-orange-3: #ffc078;
    --mantine-color-orange-4: #ffa94d;
    --mantine-color-orange-5: #ff922b;
    --mantine-color-orange-6: #fd7e14;
    --mantine-color-orange-7: #f76707;
    --mantine-color-orange-8: #e8590c;
    --mantine-color-orange-9: #d9480f;
}

/* --- keep tight line spacing --- */
#matrixchat .markdown-body li,
#matrixchat .markdown-body li>p {
    line-height: 1.3 !important;
    margin: 0 !important;
}

#matrixchat .markdown-body li+li,
#matrixchat .markdown-body .task-list-item+.task-list-item {
    margin-top: 0 !important;
}

#matrixchat .markdown-body ul,
#matrixchat .markdown-body ol {
    margin-bottom: 0.5rem !important;
}

/* --- reduce indentation ONLY (preserve markers) --- */
#matrixchat .mx_EventTile_content .markdown-body ul,
#matrixchat .mx_EventTile_content .markdown-body ol {
    padding-inline-start: 1.05em !important;
    /* was ~2em */
    padding-left: 1.05em !important;
    /* legacy prop */
}

#matrixchat .mx_EventTile_content .markdown-body ul ul,
#matrixchat .mx_EventTile_content .markdown-body ol ol,
#matrixchat .mx_EventTile_content .markdown-body ul ol,
#matrixchat .mx_EventTile_content .markdown-body ol ul {
    padding-inline-start: 1.0em !important;
    padding-left: 1.0em !important;
}

/* (optional) align task-list checkboxes with the tighter indent) */
#matrixchat .mx_EventTile_content .markdown-body .task-list-item-checkbox {
    margin-left: -1.05em !important;
    margin-right: 0.3em !important;
}

/* --- your hides --- */
#matrixchat [class*="mx_LeftPanel_outerWrapper"],
#matrixchat [class*="mx_ToastContainer"],
#matrixchat [class*="mx_cryptoEvent"],
#matrixchat [class*="mx_RoomHeader"],
#matrixchat [class*="mx_MessageComposer_poll"],
#matrixchat [class*="mx_MessageComposer_voice"],
#matrixchat [class*="mx_MessageComposer_stickers"],
#matrixchat [class*="mx_MessageComposer_location"],
#matrixchat [class*="mx_MessageComposer_buttonMenu"],
#matrixchat [class*="mx_ResizeHandle--horizontal"] {
    display: none !important;
}

/* ---- message composer subtle tweaks (embed) ---- */
:root {
    /* Harmonize composer accent with primary CTA green */
    --composer-accent: var(--mantine-color-green-6, #37b24d);
}

/* container + layout */
.mx_SendMessageComposer {
    padding: 4px 0;
}

.mx_SendMessageComposer .mx_BasicMessageComposer_input {
    min-height: 40px;
    padding: 14px 18px !important;
    border-radius: 14px;
    line-height: 1.35;
    font-size: max(16px, 1em); /* prevent mobile auto-zoom */
    background: transparent;
    color: inherit;
    border: 1px solid transparent;
    box-shadow: none;
    box-sizing: border-box;
    transition: border-color .12s ease, box-shadow .12s ease;
    caret-color: var(--composer-accent);
    outline: none;
}

/* hover/focus affordance */
.mx_SendMessageComposer .mx_BasicMessageComposer_input:hover {
    border-color: color-mix(in srgb, var(--composer-accent) 35%, transparent);
}

.mx_SendMessageComposer .mx_BasicMessageComposer_input:focus,
.mx_SendMessageComposer:has(.mx_BasicMessageComposer_input:focus) .mx_BasicMessageComposer_input {
    border-color: var(--composer-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--composer-accent) 20%, transparent);
}

/* send/action buttons attention ring (focus-visible only) */
.mx_SendMessageComposer .mx_MessageComposer_actions .mx_AccessibleButton {
    outline: none !important;
}

.mx_SendMessageComposer .mx_MessageComposer_actions .mx_AccessibleButton:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--composer-accent) 28%, transparent);
    border-radius: 9999px; /* circular buttons */
}

/* clearer placeholder for contenteditable */
.mx_BasicMessageComposer_input[contenteditable="true"][placeholder]:empty::before {
    content: attr(placeholder);
    opacity: .6;
    color: inherit;
    pointer-events: none;
}

/* make the toolbar/icons slightly calmer until focus */
.mx_MessageComposer_formatbar,
.mx_MessageComposer_actions { opacity: .9; transition: opacity .12s; }
.mx_SendMessageComposer:has(.mx_BasicMessageComposer_input:focus) .mx_MessageComposer_formatbar,
.mx_SendMessageComposer:has(.mx_BasicMessageComposer_input:focus) .mx_MessageComposer_actions { opacity: 1; }

.mx_MessageComposer_sendMessage {
    background-color: var(--mantine-color-green-7) !important;
}

/* ---- Action button styles (for #action| links in chat) ---- */
/* Base action link - applies to all action links by default */
a[href^="#action|"] {
    display: inline-block;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    margin: 2px 0;
    line-height: 1.4;
    transition: all 120ms ease;
}

/* Checkpoint button - dark grey with white text */
a[href^="#action|"].btn-checkpoint {
    background-color: var(--mantine-color-gray-6) !important;
    color: white !important;
}

a[href^="#action|"].btn-checkpoint:hover {
    background-color: var(--mantine-color-gray-8) !important;
    color: white !important;
}

/* Run/Execute button - green to match primary CTA */
.btn-run {
    background-color: var(--mantine-color-green-6);
    color: white;
}

.btn-run:hover {
    background-color: var(--mantine-color-green-7);
}

/* Info/secondary button - indigo for secondary actions */
.btn-info {
    background-color: var(--mantine-color-indigo-0);
    color: var(--mantine-color-indigo-7);
}

.btn-info:hover {
    background-color: var(--mantine-color-indigo-1);
}

/* Warning button - orange/yellow for caution */
.btn-warning {
    background-color: var(--mantine-color-yellow-1);
    color: var(--mantine-color-yellow-9);
}

.btn-warning:hover {
    background-color: var(--mantine-color-yellow-2);
}

/* Danger/delete button - red for destructive actions */
.btn-danger {
    background-color: var(--mantine-color-red-0);
    color: var(--mantine-color-red-7);
}

.btn-danger:hover {
    background-color: var(--mantine-color-red-1);
}

/* Show button - hyperlink style for viewport navigation/show actions */
.btn-show {
    background-color: transparent !important;
    color: var(--mantine-color-blue-6) !important;
    text-decoration: none !important;
    padding: 0 !important;
    border: none !important;
    font-weight: 500 !important;
}

.btn-show:hover {
    background-color: transparent !important;
    color: var(--mantine-color-blue-7) !important;
    text-decoration: underline !important;
}

/* SchildiChat bubble layout overrides */
.sc_BubbleLayout .sc_EventTile_bubble {
    background-color: #f1f1f1 !important;
}

.sc_BubbleLayout .sc_EventTile_bubble_self:not(.sc_EventTile_bubble_sticker) {
    background-color: #EDF7EB !important;
}

/*<div class="mx_MatrixChat_splash"><div class="mx_Spinner"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor" width="32" height="32" class="mx_Spinner_icon" aria-label="Loading..." role="progressbar"><circle transform="translate(8 0)" cx="0" cy="16" r="0"><animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0" keyTimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline"></animate></circle><circle transform="translate(16 0)" cx="0" cy="16" r="0"><animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0.3" keyTimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline"></animate></circle><circle transform="translate(24 0)" cx="0" cy="16" r="0"><animate attributeName="r" values="0; 4; 0; 0" dur="1.2s" repeatCount="indefinite" begin="0.6" keyTimes="0;0.2;0.7;1" keySplines="0.2 0.2 0.4 0.8;0.2 0.6 0.4 0.8;0.2 0.6 0.4 0.8" calcMode="spline"></animate></circle></svg></div><div class="mx_MatrixChat_splashButtons"><div role="button" tabindex="0" class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline">Logout</div></div></div>*/

/*<div class="mx_MatrixChat_splash"><div class="mx_Spinner"><div class="mx_Spinner_icon" aria-label="Loading…" role="progressbar" style="width: 32px; height: 32px;"></div></div><div class="mx_LoginSplashView_splashButtons"><div tabindex="0" role="button" class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline">Logout</div></div></div>*/

.mx_RoomPreviewBar_Loading {
    display: none !important;
}

/* Hide all spinners by default */
.mx_Spinner {
    display: none !important;
}

.mx_MatrixChat_splashButtons,
.mx_LoginSplashView_splashButtons {
    display: none !important;
}

/* Style the splash container */
.mx_MatrixChat_splash {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Create Mantine-style oval spinner ONLY in splash screen */
.mx_MatrixChat_splash .mx_Spinner {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

/* Hide the original Matrix spinner content inside splash */
.mx_MatrixChat_splash .mx_Spinner > * {
    display: none !important;
}

.mx_MatrixChat_splash .mx_Spinner::after {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    border: 4px solid transparent;
    border-top-color: var(--mantine-color-gray-6, #868e96);
    border-right-color: var(--mantine-color-gray-6, #868e96);
    border-radius: 50%;
    animation: mantine-spinner-rotate 0.65s linear infinite;
}

@keyframes mantine-spinner-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* schildi chat theme modifiers */
.mx_EventTile_content .markdown-body {
    color: #000 !important;
    font-size: 14px !important;
}
.markdown-body {
    color: #000 !important;
    font-size: 14px !important;
}
.sc_BubbleLayout .mx_EventTile {
    font-size: 14px !important;
}

/* Hide empty room preview bar (prevents flash during room load) */
.mx_RoomPreviewBar_message,
.mx_RoomPreviewBar_actions {
    display: none !important;
}