/* ==========================================================================
   CommTraining – Standalone CSS (no WordPress theme required)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
	--ct-color-primary:       #3d5741;
	--ct-color-primary-dark:  #2d4132;
	--ct-color-primary-light: #5a7a55;
	--ct-color-secondary:     #6b8f5e;
	--ct-color-secondary-dark:#4e6a43;
	--ct-color-accent:        #eef4e8;
	--ct-color-text:          #1A1A2E;
	--ct-color-text-muted:    #5a6475;
	--ct-color-border:        #dde5ef;
	--ct-color-bg:            #f0ede6;
	--ct-color-white:         #ffffff;

	/* Status colours */
	--ct-color-success:       #28a745;
	--ct-color-success-bg:    #d4edda;
	--ct-color-warning:       #e6a817;
	--ct-color-warning-bg:    #fff3cd;
	--ct-color-error:         #dc3545;
	--ct-color-error-bg:      #f8d7da;

	/* Score colours */
	--ct-score-5: #28a745;
	--ct-score-4: #6cb33f;
	--ct-score-3: #e6a817;
	--ct-score-2: #e07020;
	--ct-score-1: #dc3545;

	/* Layout */
	--ct-max-width:     820px;
	--ct-border-radius: 10px;
	--ct-shadow:        0 2px 16px rgba(44, 95, 138, 0.10);
	--ct-shadow-hover:  0 4px 24px rgba(44, 95, 138, 0.18);
	--ct-transition:    all 0.2s ease;

	/* Typography */
	--ct-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	--ct-font-size-base: 16px;
	--ct-line-height: 1.6;
}

/* --------------------------------------------------------------------------
   CSS Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: var(--ct-font-size-base);
	text-size-adjust: 100%;
}

body.ct-app {
	font-family: var(--ct-font-family);
	font-size: 1rem;
	line-height: var(--ct-line-height);
	color: var(--ct-color-text);
	background-color: var(--ct-color-bg);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

a { color: var(--ct-color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.ct-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.ct-main {
	flex: 1;
	padding: 32px 16px;
}

.ct-page {
	max-width: var(--ct-max-width);
	margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.ct-header {
	background: var(--ct-color-primary);
	color: var(--ct-color-white);
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	position: sticky;
	top: 0;
	z-index: 100;
}

.ct-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
}

.ct-brand {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ct-color-white);
	letter-spacing: 0.5px;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.ct-brand-name em {
	font-style: italic;
	font-weight: inherit;
}
.ct-brand-subtitle {
	font-size: 0.63rem;
	font-weight: 400;
	letter-spacing: 0.01em;
	opacity: 0.75;
	white-space: nowrap;
}

.ct-header-nav {
	display: flex;
	align-items: center;
	gap: 16px;
}

.ct-user-greeting {
	font-size: 0.875rem;
	opacity: 0.85;
}

.ct-header--minimal {
	background: var(--ct-color-primary);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.ct-footer {
	background: var(--ct-color-white);
	border-top: 1px solid var(--ct-color-border);
	text-align: center;
	padding: 16px;
	font-size: 0.8125rem;
	color: var(--ct-color-text-muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.ct-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 22px;
	border-radius: 6px;
	border: 2px solid transparent;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: var(--ct-transition);
	white-space: nowrap;
}

.ct-btn:hover { text-decoration: none; }

.ct-btn-primary {
	background: var(--ct-color-primary);
	color: var(--ct-color-white);
	border-color: var(--ct-color-primary);
}
.ct-btn-primary:hover:not(:disabled) {
	background: var(--ct-color-primary-dark);
	border-color: var(--ct-color-primary-dark);
}

.ct-btn-secondary {
	background: var(--ct-color-secondary);
	color: var(--ct-color-white);
	border-color: var(--ct-color-secondary);
}
.ct-btn-secondary:hover:not(:disabled) {
	background: var(--ct-color-secondary-dark);
	border-color: var(--ct-color-secondary-dark);
}

.ct-btn-ghost {
	background: transparent;
	color: var(--ct-color-white);
	border-color: rgba(255,255,255,0.5);
}
.ct-btn-ghost:hover:not(:disabled) {
	background: rgba(255,255,255,0.12);
	border-color: rgba(255,255,255,0.8);
}

.ct-btn-full { width: 100%; justify-content: center; }
.ct-btn-sm { padding: 6px 14px; font-size: 13px; }
.ct-btn-outline {
	background: transparent;
	color: var(--ct-color-primary);
	border-color: var(--ct-color-primary);
}
.ct-btn-outline:hover:not(:disabled) {
	background: var(--ct-color-primary);
	color: var(--ct-color-white);
}

.ct-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ct-btn-loading .ct-btn-label { opacity: 0.6; }

/* --------------------------------------------------------------------------
   Spinner
   -------------------------------------------------------------------------- */
.ct-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ct-spin 0.7s linear infinite;
	flex-shrink: 0;
}

/* Verhindert dass display:inline-block das HTML-hidden-Attribut überschreibt */
.ct-spinner[hidden] { display: none !important; }

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

/* --------------------------------------------------------------------------
   Ladeoverlay mit Sanduhr-Animation
   -------------------------------------------------------------------------- */
.ct-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(26, 26, 46, 0.52);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: ct-overlay-in 0.18s ease;
}

.ct-overlay[hidden] { display: none; }

@keyframes ct-overlay-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.ct-overlay__box {
	background: var(--ct-color-white);
	border-radius: 18px;
	padding: 40px 52px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	box-shadow: 0 16px 56px rgba(44, 95, 138, 0.22);
	min-width: 220px;
}

/* Sanduhr SVG */
.ct-hg-svg {
	width: 56px;
	height: 72px;
	overflow: visible;
}

/* Oberer Sand – läuft leer (schrumpft zur Mitte hin) */
.ct-hg-top {
	transform-origin: 32px 38px;   /* Hals der Sanduhr in SVG-Koordinaten */
	animation: ct-hg-top 2.6s ease-in infinite;
}

@keyframes ct-hg-top {
	0%   { transform: scaleY(1);    opacity: 1; }
	80%  { transform: scaleY(0.04); opacity: 1; }
	100% { transform: scaleY(0.04); opacity: 0; }
}

/* Unterer Sand – füllt sich (wächst vom Boden) */
.ct-hg-bot {
	transform-origin: 32px 42px;   /* direkt unterhalb des Halses */
	animation: ct-hg-bot 2.6s ease-out infinite;
}

@keyframes ct-hg-bot {
	0%   { transform: scaleY(0.04); opacity: 0; }
	20%  { transform: scaleY(0.04); opacity: 1; }
	100% { transform: scaleY(1);    opacity: 1; }
}

/* Sandfaden im Hals */
.ct-hg-drip {
	animation: ct-hg-drip 2.6s linear infinite;
}

@keyframes ct-hg-drip {
	0%   { opacity: 0; }
	15%  { opacity: 1; }
	85%  { opacity: 1; }
	100% { opacity: 0; }
}

/* Text mit animierten Punkten */
.ct-overlay__msg {
	font-size: 0.9375rem;
	color: var(--ct-color-text-muted);
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
}

.ct-overlay__msg::after {
	content: '...';
	display: inline-block;
	width: 0;
	overflow: hidden;
	white-space: nowrap;
	vertical-align: bottom;
	animation: ct-dots 1.6s steps(4, end) infinite;
}

@keyframes ct-dots {
	0%   { width: 0;      }
	33%  { width: 0.45em; }
	66%  { width: 0.9em;  }
	100% { width: 0;      }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.ct-form-group {
	margin-bottom: 20px;
}

.ct-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--ct-color-text);
}

.ct-optional {
	font-weight: 400;
	color: var(--ct-color-text-muted);
	font-size: 0.8125rem;
}

.ct-hint {
	font-size: 0.875rem;
	color: var(--ct-color-text-muted);
	margin-bottom: 16px;
}

.ct-input,
.ct-select,
.ct-textarea {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--ct-color-border);
	border-radius: 6px;
	font-size: 1rem;
	color: var(--ct-color-text);
	background: var(--ct-color-white);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	outline: none;
}

.ct-input:focus,
.ct-select:focus,
.ct-textarea:focus {
	border-color: var(--ct-color-primary);
	box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.15);
}

.ct-textarea {
	resize: vertical;
	min-height: 80px;
}

.ct-form-error {
	background: var(--ct-color-error-bg);
	color: var(--ct-color-error);
	border: 1px solid var(--ct-color-error);
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 0.875rem;
	margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.ct-card {
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	padding: 28px;
	box-shadow: var(--ct-shadow);
	margin-bottom: 24px;
}

.ct-card-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--ct-color-primary);
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--ct-color-accent);
}

/* --------------------------------------------------------------------------
   Alerts / Notices
   -------------------------------------------------------------------------- */
.ct-alert {
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 0.875rem;
	margin-top: 12px;
}

.ct-alert-error {
	background: var(--ct-color-error-bg);
	color: var(--ct-color-error);
	border: 1px solid #f5c6cb;
}

.ct-alert-success {
	background: var(--ct-color-success-bg);
	color: var(--ct-color-success);
	border: 1px solid #c3e6cb;
}

.ct-notice {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 0.9375rem;
}

.ct-notice-warning {
	background: var(--ct-color-warning-bg);
	border: 1px solid #ffeaa7;
	color: #856404;
}

/* --------------------------------------------------------------------------
   Toast notifications
   -------------------------------------------------------------------------- */
.ct-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(80px);
	background: var(--ct-color-text);
	color: #fff;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 0.9375rem;
	box-shadow: 0 4px 16px rgba(0,0,0,0.2);
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 9999;
	pointer-events: none;
}

.ct-toast.ct-toast--visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Back link / Page header
   -------------------------------------------------------------------------- */
.ct-back-link {
	display: inline-block;
	font-size: 0.875rem;
	color: var(--ct-color-text-muted);
	margin-bottom: 8px;
}
.ct-back-link:hover { color: var(--ct-color-primary); }

.ct-page-header {
	margin-bottom: 28px;
}
.ct-page-header-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
}

.ct-page-title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--ct-color-text);
	margin-bottom: 6px;
}

.ct-page-subtitle {
	color: var(--ct-color-text-muted);
}

/* --------------------------------------------------------------------------
   Action rows
   -------------------------------------------------------------------------- */
.ct-action-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.ct-action-row--spaced {
	margin-top: 24px;
	justify-content: space-between;
}

/* Difficulty selector */
.ct-difficulty-selector {
	display: inline-flex; align-items: center;
	border: 1px solid #d8cfc4; border-radius: 8px;
	overflow: hidden; margin-left: 4px;
}
.ct-diff-btn {
	background: #f5f0eb; border: none; outline: none;
	padding: 5px 12px; font-size: 0.78rem; font-weight: 500;
	color: #5a4f44; cursor: pointer; line-height: 1.4;
	transition: background 0.15s, color 0.15s;
}
.ct-diff-btn + .ct-diff-btn { border-left: 1px solid #d8cfc4; }
.ct-diff-btn--active {
	background: var(--ct-primary, #7c5c2e); color: #fff; font-weight: 700;
}
.ct-diff-btn:hover:not(.ct-diff-btn--active) { background: #ede5d8; }
.ct-easy-hint {
	display: block; width: 100%; font-size: 0.78rem;
	color: #8a7564; margin-top: 4px; font-style: italic;
}

/* --------------------------------------------------------------------------
   LOGIN PAGE — Landing page design
   -------------------------------------------------------------------------- */

/* Alte Klassen bleiben für Passwort-Vergessen / Reset-Seiten erhalten */
.ct-page-login {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding-top: 32px;
}
.ct-login-card {
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	padding: 44px 40px;
	box-shadow: var(--ct-shadow);
	width: 100%;
	max-width: 420px;
}
.ct-login-header { text-align: center; margin-bottom: 32px; }
.ct-login-title  { font-size: 1.75rem; font-weight: 400; color: var(--ct-color-primary); letter-spacing: -0.5px; }
.ct-login-title strong { font-weight: 800; }
.ct-login-subtitle { font-size: 0.9375rem; color: var(--ct-color-text-muted); margin-top: 6px; }

/* ── Neue Landing-Page (Login-View) ──────────────────────────────────────── */
.ct-lp {
	max-width: 900px;
	margin: 0 auto;
	padding: 28px 20px 48px;
}

/* Hero */
.ct-lp-hero {
	text-align: center;
	margin-bottom: 24px;
}
.ct-lp-headline {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--ct-color-primary);
	line-height: 1.3;
	margin-bottom: 6px;
}
.ct-lp-sub {
	font-size: 0.9rem;
	color: var(--ct-color-text-muted);
}
.ct-lp-hero-login-link {
	display: none; /* nur auf Mobile sichtbar */
}

/* Feature-Kacheln */
.ct-lp-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-bottom: 22px;
}
.ct-lp-card {
	background: var(--ct-color-white);
	border: 1px solid #c4d4b0;
	border-radius: 8px;
	padding: 14px 14px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.ct-lp-card-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
}
.ct-lp-card-icon svg { width: 100%; height: 100%; }
.ct-lp-card-body { flex: 1; min-width: 0; }
.ct-lp-card-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--ct-color-primary);
	margin: 0 0 4px;
}
.ct-lp-card-body p {
	font-size: 0.78rem;
	color: var(--ct-color-text-muted);
	margin: 0;
	line-height: 1.4;
}

/* Unterer Bereich */
.ct-lp-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr 1.1fr;
	gap: 20px;
	align-items: start;
	border-top: 1px solid #c4d4b0;
	padding-top: 18px;
}
.ct-lp-col { display: flex; flex-direction: column; gap: 0; }

/* Feature-Zeilen mit Häkchen */
.ct-lp-feature {
	font-size: 0.82rem;
	color: var(--ct-color-primary);
	font-weight: 600;
	padding: 2px 0 6px 20px;
	position: relative;
	line-height: 1.35;
}
.ct-lp-feature::before {
	content: '✓';
	position: absolute;
	left: 0;
	top: 2px;
	font-weight: 700;
	color: var(--ct-color-primary);
}

/* CTA-Button */
.ct-lp-cta-btn {
	display: block;
	background: #b8860b;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 0.85rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	margin-top: 6px;
	transition: background .15s;
	line-height: 1.3;
}
.ct-lp-cta-btn:hover { background: #9a7009; color: #fff; }

/* Login-Formular inline */
.ct-lp-login-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 6px;
}
.ct-lp-input {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid var(--ct-color-border);
	border-radius: 5px;
	font-size: 0.82rem;
	font-family: inherit;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .15s;
}
.ct-lp-input:focus {
	outline: none;
	border-color: var(--ct-color-primary);
	box-shadow: 0 0 0 2px rgba(61,87,65,.1);
}
.ct-lp-pw-row {
	display: flex;
	gap: 6px;
	align-items: stretch;
}
.ct-lp-pw-wrap {
	flex: 1;
	position: relative;
}
.ct-lp-pw-wrap .ct-lp-input { padding-right: 38px; }
.ct-lp-pw-wrap .ct-pw-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
}
.ct-lp-login-btn {
	flex-shrink: 0;
	background: var(--ct-color-primary);
	color: #fff;
	border: none;
	border-radius: 5px;
	padding: 0 14px;
	font-size: 0.82rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ct-lp-login-btn:hover { background: var(--ct-color-primary-dark); }
.ct-lp-login-links {
	font-size: 0.72rem;
	color: var(--ct-color-text-muted);
	margin-top: 6px;
	line-height: 1.5;
}
.ct-lp-login-links a { color: var(--ct-color-primary); }

/* ── Responsive: Tablet (max 760px) ─────────────────────────────────────── */
@media (max-width: 760px) {
	.ct-lp-hero-login-link {
		display: inline-block;
		margin-top: 10px;
		font-size: 0.85rem;
		font-weight: 600;
		color: var(--ct-color-primary);
		border: 1px solid var(--ct-color-primary);
		border-radius: 20px;
		padding: 5px 16px;
		text-decoration: none;
	}
	.ct-lp-cards {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.ct-lp-bottom {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.ct-lp-col-cta,
	.ct-lp-col-login {
		border-top: 1px solid #c4d4b0;
		padding-top: 14px;
		margin-top: 14px;
	}
	.ct-lp-headline {
		font-size: 1.2rem;
	}
	.ct-lp-cta-btn {
		font-size: 0.9rem;
		padding: 12px 16px;
	}
	.ct-lp-pw-row {
		flex-direction: column;
	}
	.ct-lp-login-btn {
		width: 100%;
		justify-content: center;
		padding: 10px 16px;
	}
}

/* --------------------------------------------------------------------------
   DASHBOARD
   -------------------------------------------------------------------------- */
.ct-dashboard-hero {
	text-align: center;
	margin-bottom: 36px;
}

.ct-dashboard-hero h1 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--ct-color-text);
	margin-bottom: 8px;
}

.ct-dashboard-hero p {
	color: var(--ct-color-text-muted);
}

.ct-exercise-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

.ct-exercise-card {
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	box-shadow: var(--ct-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: var(--ct-transition);
}

.ct-exercise-card:hover:not(.ct-exercise-card--coming-soon) {
	box-shadow: var(--ct-shadow-hover);
	transform: translateY(-2px);
}

.ct-exercise-card--coming-soon {
	opacity: 0.65;
}

.ct-exercise-card-icon {
	background: var(--ct-color-accent);
	font-size: 2rem;
	text-align: center;
	padding: 24px;
	color: var(--ct-color-primary);
}

.ct-exercise-card-body {
	padding: 24px;
	flex: 1;
}

.ct-exercise-card-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--ct-color-text);
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ct-exercise-card-desc {
	font-size: 0.9375rem;
	color: var(--ct-color-text-muted);
	margin-bottom: 16px;
	line-height: 1.6;
}

.ct-exercise-meta {
	font-size: 0.8125rem;
	color: var(--ct-color-text-muted);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ct-exercise-meta li::before {
	content: '✓ ';
	color: var(--ct-color-secondary);
	font-weight: 700;
}

.ct-exercise-card-footer {
	padding: 16px 24px;
	border-top: 1px solid var(--ct-color-border);
	background: var(--ct-color-accent);
}

/* --------------------------------------------------------------------------
   EXERCISE PAGE
   -------------------------------------------------------------------------- */
.ct-scenario-text {
	background: var(--ct-color-accent);
	border-left: 4px solid var(--ct-color-primary);
	padding: 20px;
	border-radius: 0 6px 6px 0;
	font-size: 0.9375rem;
	line-height: 1.8;
	white-space: pre-wrap;
}

.ct-question-input {
	transition: border-color 0.15s ease;
}

/* --------------------------------------------------------------------------
   FEEDBACK DISPLAY
   -------------------------------------------------------------------------- */
.ct-feedback-item {
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 16px;
}

.ct-feedback-item-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.ct-feedback-question-text {
	font-style: italic;
	color: var(--ct-color-text-muted);
	font-size: 0.9375rem;
	flex: 1;
}

.ct-feedback-badge {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 20px;
	font-size: 0.8125rem;
	font-weight: 700;
	white-space: nowrap;
}

.ct-badge-gut         { background: var(--ct-color-success-bg); color: #155724; }
.ct-badge-verbesserbar { background: var(--ct-color-warning-bg); color: #856404; }
.ct-badge-ueberarbeiten { background: var(--ct-color-error-bg); color: #721c24; }

.ct-scores {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.ct-score-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	flex: 1;
	min-width: 90px;
}

.ct-score-label {
	font-size: 0.75rem;
	color: var(--ct-color-text-muted);
	text-align: center;
}

.ct-score-bar-wrap {
	width: 100%;
	height: 6px;
	background: var(--ct-color-border);
	border-radius: 3px;
	overflow: hidden;
}

.ct-score-bar {
	height: 100%;
	border-radius: 3px;
	transition: width 0.6s ease;
}

.ct-score-value {
	font-size: 0.9375rem;
	font-weight: 700;
}

/* Score colour by data attribute */
.ct-score-bar[data-score="5"] { width: 100%; background: var(--ct-score-5); }
.ct-score-bar[data-score="4"] { width:  80%; background: var(--ct-score-4); }
.ct-score-bar[data-score="3"] { width:  60%; background: var(--ct-score-3); }
.ct-score-bar[data-score="2"] { width:  40%; background: var(--ct-score-2); }
.ct-score-bar[data-score="1"] { width:  20%; background: var(--ct-score-1); }

.ct-score-value[data-score="5"] { color: var(--ct-score-5); }
.ct-score-value[data-score="4"] { color: var(--ct-score-4); }
.ct-score-value[data-score="3"] { color: var(--ct-score-3); }
.ct-score-value[data-score="2"] { color: var(--ct-score-2); }
.ct-score-value[data-score="1"] { color: var(--ct-score-1); }

.ct-feedback-advice {
	background: var(--ct-color-accent);
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 0.875rem;
	color: var(--ct-color-text);
	line-height: 1.6;
}

.ct-feedback-advice-label {
	font-weight: 700;
	color: var(--ct-color-primary);
	margin-bottom: 4px;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Ausgangsgeschichte-Toggle im Feedback (Step 3) */
.ct-scenario-toggle {
	border: 1px solid var(--ct-color-border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 20px;
}

.ct-scenario-toggle > summary {
	padding: 10px 16px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--ct-color-primary);
	background: var(--ct-color-accent);
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	user-select: none;
}

.ct-scenario-toggle > summary::-webkit-details-marker { display: none; }

.ct-scenario-toggle > summary::before {
	content: '▸';
	font-size: 0.75rem;
}

.ct-scenario-toggle[open] > summary::before {
	content: '▾';
}

.ct-scenario-toggle-body {
	padding: 14px 16px;
	background: #fff;
	border-top: 1px solid var(--ct-color-border);
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--ct-color-text);
	white-space: pre-wrap;
}

/* Überschrift im Revise-Modus (Schritt 2) */
.ct-revise-heading {
	font-size: 1rem;
	font-weight: 700;
	color: var(--ct-color-primary, #2d4132);
	margin: 0 0 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ct-color-border);
}

.ct-general-feedback-box {
	background: var(--ct-color-accent);
	border: 1px solid var(--ct-color-border);
	border-radius: 8px;
	padding: 20px;
	margin-top: 8px;
}

.ct-general-feedback-box h3 {
	font-size: 1rem;
	font-weight: 700;
	color: var(--ct-color-primary);
	margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   Single-response feedback (Reframen / Paraphrasieren)
   -------------------------------------------------------------------------- */
.ct-feedback-example {
	background: var(--ct-color-accent);
	border-left: 3px solid var(--ct-color-secondary);
	border-radius: 0 6px 6px 0;
	padding: 12px 16px;
	font-size: 0.875rem;
	margin-top: 12px;
	line-height: 1.6;
}

.ct-feedback-example-label {
	font-weight: 700;
	color: var(--ct-color-secondary);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   Kommunikationsquadrat – level label dot
   -------------------------------------------------------------------------- */
.ct-level-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 6px;
	vertical-align: middle;
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Kommunikationsquadrat – 4-panel feedback grid
   -------------------------------------------------------------------------- */
.ct-quadrant-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

.ct-quadrant-panel {
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ct-color-border);
	box-shadow: var(--ct-shadow);
}

.ct-quadrant-panel-header {
	padding: 10px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 0.9375rem;
	color: #fff;
}

.ct-quadrant-panel-body {
	padding: 14px 16px;
	background: var(--ct-color-white);
}

.ct-quadrant-panel-feedback {
	font-size: 0.875rem;
	margin-bottom: 10px;
	color: var(--ct-color-text);
	line-height: 1.6;
}

.ct-quadrant-panel-example {
	font-size: 0.8125rem;
	color: var(--ct-color-text-muted);
	background: var(--ct-color-accent);
	border-radius: 4px;
	padding: 8px 12px;
	line-height: 1.5;
}

.ct-quadrant-panel-example-label {
	font-weight: 700;
	font-size: 0.75rem;
	color: var(--ct-color-primary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

@media (max-width: 600px) {
	.ct-quadrant-panels {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   Admin API test result colours
   -------------------------------------------------------------------------- */
.ct-test-result { margin-left: 8px; font-size: 0.875rem; }
.ct-test-success { color: var(--ct-color-success); font-weight: 600; }
.ct-test-error   { color: var(--ct-color-error);   font-weight: 600; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.ct-login-card {
		padding: 28px 20px;
	}

	.ct-card {
		padding: 20px;
	}

	.ct-exercise-grid {
		grid-template-columns: 1fr;
	}

	.ct-scores {
		gap: 8px;
	}

	.ct-action-row--spaced {
		flex-direction: column;
	}
}

/* ==========================================================================
   CommTraining 2.0 — New Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Dashboard preferences bar (provider selector + score toggle)
   -------------------------------------------------------------------------- */
.ct-dashboard-prefs {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 28px;
	align-items: center;
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	padding: 14px 20px;
	margin-bottom: 24px;
	box-shadow: var(--ct-shadow);
}

.ct-pref-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ct-pref-group .ct-label {
	margin-bottom: 0;
	white-space: nowrap;
}

.ct-pref-group .ct-select {
	width: auto;
	min-width: 160px;
}

.ct-score-toggle-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	font-size: 0.9375rem;
	cursor: pointer;
	color: var(--ct-color-text);
	margin-bottom: 0;
}

.ct-score-toggle-input {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--ct-color-primary);
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Dashboard tabs — 2×2 grid so all 4 areas are always visible
   -------------------------------------------------------------------------- */
.ct-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 32px;
}

.ct-tab {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 14px 18px;
	border: 2px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	background: var(--ct-color-white);
	cursor: pointer;
	transition: var(--ct-transition);
	white-space: normal;
	color: var(--ct-color-text-muted);
	text-align: left;
	width: 100%;
}

.ct-tab:hover {
	border-color: var(--ct-color-primary);
	background: var(--ct-color-accent);
	color: var(--ct-color-primary);
}

.ct-tab--active {
	border-color: var(--ct-color-primary);
	border-left-width: 4px;
	background: var(--ct-color-accent);
	color: var(--ct-color-primary);
}

.ct-tab-label {
	font-weight: 700;
	font-size: 0.9375rem;
}

.ct-tab-sub {
	font-size: 0.75rem;
	opacity: 0.7;
	margin-top: 3px;
	line-height: 1.4;
}

.ct-tab-panel {
	scroll-margin-top: 76px; /* Header (60px) + Abstand */
}

.ct-tab-panel--hidden {
	display: none;
}

/* --------------------------------------------------------------------------
   Area intro
   -------------------------------------------------------------------------- */
.ct-area-intro {
	margin-bottom: 24px;
}

.ct-area-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ct-color-primary);
	margin-bottom: 8px;
}

.ct-area-desc {
	color: var(--ct-color-text-muted);
	font-size: 0.9375rem;
	max-width: 640px;
}

/* --------------------------------------------------------------------------
   Exercise page area tag + subtitle
   -------------------------------------------------------------------------- */
.ct-page-area-tag {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ct-color-secondary);
	background: rgba(74, 155, 127, 0.12);
	border-radius: 4px;
	padding: 2px 8px;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Badge (NEU)
   -------------------------------------------------------------------------- */
.ct-badge {
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 10px;
	vertical-align: middle;
	margin-left: 6px;
	text-transform: uppercase;
}

.ct-badge-new {
	background: var(--ct-color-secondary);
	color: #fff;
}

/* --------------------------------------------------------------------------
   Simulation launcher (topic grid)
   -------------------------------------------------------------------------- */
.ct-simulation-launcher {
	max-width: 640px;
}

.ct-topic-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 24px;
}

.ct-topic-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 16px 18px;
	border: 2px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	background: var(--ct-color-white);
	cursor: pointer;
	transition: var(--ct-transition);
	text-align: left;
}

.ct-topic-card:hover {
	border-color: var(--ct-color-primary-light);
	box-shadow: var(--ct-shadow-hover);
}

.ct-topic-card--selected {
	border-color: var(--ct-color-primary);
	background: var(--ct-color-accent);
	box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.15);
}

.ct-topic-icon {
	font-size: 1.5rem;
	margin-bottom: 4px;
}

.ct-topic-label {
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--ct-color-text);
}

.ct-topic-desc {
	font-size: 0.8125rem;
	color: var(--ct-color-text-muted);
}

.ct-simulation-provider {
	max-width: 280px;
}

/* --------------------------------------------------------------------------
   Simulation view
   -------------------------------------------------------------------------- */
.ct-page-simulation {
	max-width: 860px;
}

.ct-sim-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.ct-sim-header-left {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ct-sim-header-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.ct-btn-metatalk {
	background: var(--ct-color-warning-bg);
	color: #7a5000;
	border-color: var(--ct-color-warning);
}

.ct-btn-metatalk:hover:not(:disabled) {
	background: #ffe49b;
}

.ct-characters-panel {
	margin-bottom: 20px;
}

.ct-characters-pre {
	font-family: var(--ct-font-family);
	font-size: 0.875rem;
	white-space: pre-wrap;
	color: var(--ct-color-text-muted);
	line-height: 1.7;
}

.ct-btn-toggle-chars {
	color: var(--ct-color-text-muted);
	border-color: var(--ct-color-border);
	font-size: 0.8125rem;
	padding: 6px 14px;
	margin-top: 12px;
}

/* Chat window */
.ct-sim-chat {
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	box-shadow: var(--ct-shadow);
	overflow: hidden;
}

.ct-chat-log {
	min-height: 320px;
	max-height: 480px;
	overflow-y: auto;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ct-chat-message {
	display: flex;
}

.ct-chat-message--ai { justify-content: flex-start; }
.ct-chat-message--user { justify-content: flex-end; }

.ct-chat-bubble {
	max-width: 78%;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.ct-chat-bubble--ai {
	background: var(--ct-color-accent);
	color: var(--ct-color-text);
	border-radius: 4px 12px 12px 12px;
}

.ct-chat-bubble--user {
	background: var(--ct-color-primary);
	color: #fff;
	border-radius: 12px 4px 12px 12px;
}

/* Metatalk panel */
.ct-metatalk-panel {
	border-top: 2px solid var(--ct-color-warning);
	background: var(--ct-color-warning-bg);
	padding: 24px;
}

.ct-metatalk-inner {
	font-size: 0.9375rem;
	line-height: 1.7;
	margin-bottom: 16px;
	color: var(--ct-color-text);
}

/* Simulation input area */
.ct-sim-input-area {
	border-top: 1px solid var(--ct-color-border);
	padding: 16px 24px;
	background: var(--ct-color-bg);
}

.ct-sim-input-row {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.ct-sim-textarea {
	flex: 1;
	min-height: 60px;
	resize: none;
}

.ct-sim-send-btn {
	flex-shrink: 0;
	align-self: flex-end;
}

.ct-sim-hint {
	margin-top: 8px;
	font-size: 0.8125rem;
}

/* Simulation summary */
.ct-sim-summary {
	padding: 16px 24px 24px;
}

/* --------------------------------------------------------------------------
   Tags (feelings / needs)
   -------------------------------------------------------------------------- */
.ct-feedback-tags {
	margin-top: 16px;
	font-size: 0.875rem;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.ct-tag {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 0.8125rem;
	font-weight: 600;
	background: var(--ct-color-warning-bg);
	color: #7a5000;
	border: 1px solid var(--ct-color-warning);
}

.ct-tag--need {
	background: rgba(74, 155, 127, 0.15);
	color: var(--ct-color-secondary-dark);
	border-color: var(--ct-color-secondary);
}

/* --------------------------------------------------------------------------
   Gesamtpunktzahl (score_total 0–100)
   -------------------------------------------------------------------------- */
.ct-total-score {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 24px;
	border-radius: var(--ct-border-radius);
	margin-bottom: 20px;
	border: 2px solid transparent;
}

.ct-total-score-badge {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.ct-total-score--great {
	background: var(--ct-color-success-bg);
	border-color: var(--ct-color-success);
	color: #155724;
}
.ct-total-score--good {
	background: #e8f4fd;
	border-color: var(--ct-color-primary);
	color: var(--ct-color-primary-dark);
}
.ct-total-score--ok {
	background: var(--ct-color-warning-bg);
	border-color: var(--ct-color-warning);
	color: #7a5000;
}
.ct-total-score--poor {
	background: var(--ct-color-error-bg);
	border-color: var(--ct-color-error);
	color: #721c24;
}

.ct-cost-badge {
	font-size: 0.72rem;
	color: #999;
	text-align: left;
	margin-top: 16px;
	padding-top: 8px;
	border-top: 1px solid #e8e8e8;
}

.ct-cost-badge--statement {
	font-size: 0.72rem;
	color: #bbb;
	margin-top: 6px;
	border-top: none;
	padding-top: 0;
}

/* TTS (Text-to-Speech) button */
.ct-tts-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid #ddd;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	font-size: 14px;
	cursor: pointer;
	color: #888;
	margin-left: 8px;
	vertical-align: middle;
	transition: background 0.15s, color 0.15s;
	flex-shrink: 0;
}
.ct-tts-btn:hover {
	background: #f0f0f0;
	color: #333;
	border-color: #aaa;
}
.ct-tts-btn:disabled {
	opacity: 0.5;
	cursor: default;
}
/* Sortierbare Admin-Tabellen */
th.ct-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.ct-sortable:hover { background: #e0e0e1; }
.ct-sort-icon { margin-left: 4px; font-size: 10px; opacity: 0.4; display: inline; }
th.ct-sort-asc .ct-sort-icon,
th.ct-sort-desc .ct-sort-icon { opacity: 1; }

/* TTS button after green feedback boxes */
.ct-feedback-advice + .ct-tts-btn,
.ct-feedback-example + .ct-tts-btn {
	margin: 4px 0 8px 0;
	display: inline-flex;
}

/* Score bars: 100-scale (width set inline via style) */
.ct-score-bar--100 {
	height: 100%;
	border-radius: 4px;
	transition: width 0.6s ease;
}

.ct-score-value small {
	font-size: 0.65em;
	opacity: 0.7;
	margin-left: 1px;
}

/* --------------------------------------------------------------------------
   Progress page
   -------------------------------------------------------------------------- */
.ct-page-progress {
	max-width: 960px;
}

.ct-progress-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 60px 20px;
	color: var(--ct-color-text-muted);
}
.ct-progress-loading[hidden] { display: none !important; }

.ct-spinner--dark {
	border-color: rgba(44, 95, 138, 0.25);
	border-top-color: var(--ct-color-primary);
	width: 32px;
	height: 32px;
	border-width: 3px;
}

.ct-progress-empty {
	text-align: center;
	padding: 60px 20px;
}

.ct-empty-icon {
	font-size: 3rem;
	margin-bottom: 16px;
}

/* Filter buttons */
.ct-progress-filter {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.ct-filter-btn {
	padding: 8px 18px;
	border: 2px solid var(--ct-color-border);
	border-radius: 20px;
	background: var(--ct-color-white);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ct-color-text-muted);
	cursor: pointer;
	transition: var(--ct-transition);
}

.ct-filter-btn:hover {
	border-color: var(--ct-color-primary-light);
	color: var(--ct-color-primary);
}

.ct-filter-btn--active {
	background: var(--ct-color-primary);
	border-color: var(--ct-color-primary);
	color: #fff;
}

/* Stat cards grid */
.ct-progress-stats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin-bottom: 28px;
}

.ct-stat-card {
	background: var(--ct-color-white);
	border: 1px solid var(--ct-color-border);
	border-radius: var(--ct-border-radius);
	padding: 12px 14px;
	box-shadow: var(--ct-shadow);
}

.ct-stat-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}

.ct-stat-area-tag {
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--ct-color-secondary);
}

.ct-stat-card-main {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}

.ct-stat-title {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--ct-color-text);
	line-height: 1.3;
}

.ct-stat-score {
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.ct-stat-score span {
	font-size: 0.75rem;
	font-weight: 500;
	opacity: 0.6;
}

.ct-stat-score--great { color: var(--ct-color-success); }
.ct-stat-score--good  { color: var(--ct-color-primary); }
.ct-stat-score--ok    { color: var(--ct-color-warning); }
.ct-stat-score--poor  { color: var(--ct-color-error);   }

.ct-stat-meta {
	font-size: 0.75rem;
	color: var(--ct-color-text-muted);
}

.ct-stat-trend {
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}
.ct-stat-trend--up   { color: var(--ct-color-success); }
.ct-stat-trend--down { color: var(--ct-color-error);   }

/* Selectable stat card (button) */
button.ct-stat-card {
	text-align: left;
	font: inherit;
	cursor: pointer;
	transition: var(--ct-transition);
}
.ct-stat-card--active {
	border-color: var(--ct-color-primary);
	box-shadow: 0 0 0 2px var(--ct-color-primary-light, var(--ct-color-primary));
}

.ct-chart-selected-label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--ct-color-text-muted);
}

/* Chart cards */
.ct-chart-card {
	margin-bottom: 28px;
}

.ct-chart-header {
	margin-bottom: 4px;
}

.ct-chart-wrap {
	position: relative;
	height: 320px;
}

.ct-chart-wrap--bar {
	height: 280px;
}

/* --------------------------------------------------------------------------
   Responsive additions
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.ct-topic-grid {
		grid-template-columns: 1fr;
	}

	.ct-tabs {
		grid-template-columns: 1fr;
	}

	.ct-tab {
		padding: 11px 14px;
	}

	.ct-dashboard-prefs {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.ct-sim-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.ct-chat-bubble {
		max-width: 92%;
	}

	.ct-sim-input-row {
		flex-direction: column;
	}

	.ct-sim-send-btn {
		width: 100%;
		justify-content: center;
	}
}

/* =========================================================
   v3.1.0 — Wallet, Account, Registration, Password Reset
   ========================================================= */

/* Login card wider variant for registration */
.ct-login-card--wide {
	max-width: 480px;
}

/* Links below login/register form */
.ct-login-links {
	margin-top: 1rem;
	text-align: center;
	font-size: 0.875rem;
	color: var(--ct-text-muted, #666);
}

.ct-login-links a {
	color: var(--ct-accent, #2563eb);
	text-decoration: none;
}

.ct-login-links a:hover {
	text-decoration: underline;
}

/* Success message (forgot password) */
.ct-form-success {
	background: #d1fae5;
	border: 1px solid #10b981;
	border-radius: 8px;
	padding: 1rem;
	color: #065f46;
	margin-bottom: 1rem;
}

/* Header wallet nav badge */
.ct-wallet-nav {
	font-size: 0.875rem;
}

.ct-wallet-nav-balance {
	font-variant-numeric: tabular-nums;
}

/* Account page */
.ct-page-account .ct-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 2rem 1rem;
}

.ct-page-account .ct-page-title {
	font-size: 1.75rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
}

.ct-wallet-box {
	background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
	color: #fff;
	border-radius: 12px;
	padding: 2rem;
	margin-bottom: 2rem;
	display: inline-block;
	min-width: 260px;
}

.ct-wallet-label {
	font-size: 0.875rem;
	opacity: 0.85;
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.ct-wallet-balance {
	font-size: 2rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ct-wallet-notice {
	font-size: 0.8rem;
	opacity: 0.9;
	margin-top: 0.75rem;
	background: rgba(255,255,255,0.15);
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
}

.ct-section-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--ct-heading, #111827);
}

/* Transaction table */
.ct-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.ct-tx-positive,
.ct-tx-negative,
.ct-tx-neutral,
.ct-th-right { white-space: nowrap; }

.ct-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.ct-table th {
	background: #f9fafb;
	padding: 0.75rem 1rem;
	text-align: left;
	font-weight: 600;
	border-bottom: 1px solid #e5e7eb;
	white-space: nowrap;
}

.ct-table td {
	padding: 0.625rem 1rem;
	border-bottom: 1px solid #f3f4f6;
	vertical-align: middle;
}

.ct-table tbody tr:last-child td {
	border-bottom: none;
}

.ct-table tbody tr:hover {
	background: #f9fafb;
}

.ct-tx-positive {
	color: #059669;
	font-weight: 600;
}

.ct-tx-negative {
	color: #dc2626;
	font-weight: 600;
}

.ct-empty-state {
	color: #9ca3af;
	font-style: italic;
	margin-top: 0.5rem;
}

/* ==========================================================================
   Mediations Akademie online — Redesign v3.3.9
   ========================================================================== */

/* Brand: Mediations (bold) + Campus (normal) */
.ct-brand strong { font-weight: 800; }
.ct-brand { font-weight: 400; font-size: 1.3rem; letter-spacing: -0.3px; }

/* Header layout */
.ct-header { border-bottom: 3px solid #c9a84c; }
.ct-header-inner { height: 70px; max-width: 1200px; }
.ct-header-center {
    display: flex; align-items: center; gap: 12px;
    position: absolute; left: 50%; transform: translateX(-50%);
}
.ct-header-inner { position: relative; }
.ct-header-right {
    display: flex; align-items: center; gap: 16px; margin-left: auto;
}
.ct-header-meta {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.ct-header-wallet {
    font-size: 0.875rem; font-weight: 700; color: #fff; white-space: nowrap;
}
.ct-header-langs {
    display: flex; gap: 4px; align-items: center;
}
.ct-header-langs a {
    color: rgba(255,255,255,0.75); font-size: 0.8125rem; font-weight: 600;
    text-decoration: none; padding: 0 2px;
}
.ct-header-langs a:hover, .ct-header-langs a.active { color: #fff; }
.ct-header-langs .sep { color: rgba(255,255,255,0.4); font-size: 0.75rem; }

/* Sitename in header center */
.ct-header-sitename {
    font-size: 1.1rem; font-weight: 400; color: rgba(255,255,255,0.9);
    letter-spacing: -0.2px;
}
.ct-header-sitename strong { font-weight: 800; }

/* Avatar circle (legacy, unused) */
.ct-avatar-circle {
    width: 42px; height: 42px; border-radius: 50%;
    border: 2px solid #c9a84c;
    background: transparent;
    color: #c9a84c;
    font-weight: 700; font-size: 0.9375rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ct-header-username {
    color: rgba(255,255,255,0.9); font-size: 0.9375rem; white-space: nowrap;
}
.ct-btn-outline-white {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 8px; padding: 8px 20px;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: all 0.15s;
    font-family: inherit;
}
.ct-btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.ct-header-progress-btn {
    border-color: rgba(255,255,255,0.5); font-size: 0.79rem; padding: 5px 11px;
}
.ct-header-home-btn {
    background: #fff;
    border-color: #fff;
    color: var(--ct-color-primary);
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.ct-header-home-btn:hover:not(:disabled) {
    background: #edf5ec;
    border-color: #fff;
    color: var(--ct-color-primary-dark);
}

/* Dashboard Hero */
.ct-db-hero {
    text-align: center; padding: 24px 16px 16px;
}
.ct-db-hero h1 {
    font-size: 2rem; font-weight: 800; color: #1a1a1a;
    margin-bottom: 6px; letter-spacing: -0.5px;
}
.ct-db-hero p { color: #6b6152; font-size: 1rem; }

/* Persönliche Einstellungen */
.ct-db-settings {
    background: #fff; border-radius: 14px;
    border: 1px solid #e8e2d8;
    padding: 12px 20px;
    margin: 0 auto 20px;
    max-width: 900px;
    display: flex; flex-direction: row; align-items: center;
    flex-wrap: wrap; gap: 6px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.ct-db-settings-title {
    font-weight: 700; font-size: 0.95rem; color: #1a1a1a;
    margin: 0; white-space: nowrap;
    padding-right: 4px;
    border-right: 1px solid #ddd;
}
.ct-score-toggle-label { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 0.9rem; }
.ct-db-settings-ai { display: flex; align-items: center; gap: 8px; }
.ct-db-settings-ai .ct-label { margin: 0; white-space: nowrap; font-size: 0.9rem; }
.ct-db-settings-ai .ct-select { width: auto; }

/* Module Grid — 6 Karten in 2 Reihen á 3 */
.ct-module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 32px;
}
.ct-module-card {
    background: #fff;
    border: 2px solid #e8e2d8;
    border-radius: 16px;
    padding: 24px 20px;
    display: flex; align-items: flex-start; gap: 16px;
    cursor: pointer;
    text-align: left;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    font-family: inherit;
}
.ct-module-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.ct-module-card--active {
    border-color: #5e7a48;
    box-shadow: 0 4px 20px rgba(94,122,72,0.18);
}
.ct-module-icon {
    width: 52px; height: 52px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.ct-module-icon svg { width: 52px; height: 52px; }
.ct-module-info h3 {
    font-size: 1.0625rem; font-weight: 700;
    color: #1a1a1a; margin-bottom: 6px;
}
.ct-module-info p {
    font-size: 0.875rem; color: #6b7a6a; line-height: 1.5;
    margin: 0;
}

/* MISTRAL Chat — gleiche Breite wie das Grid darüber */
.ct-module-card--wide {
    max-width: 900px;
    margin: 0 auto 32px;
    background: linear-gradient(135deg, #fff5ee 0%, #fff 60%);
    border-color: #FF7000;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    text-decoration: none;
    box-sizing: border-box;
}
.ct-module-card--wide:hover {
    border-color: #e06000;
    background: linear-gradient(135deg, #ffefe3 0%, #fff8f3 60%);
}
.ct-module-card--wide .ct-module-icon {
    flex-shrink: 0;
}
.ct-module-card--wide .ct-module-info {
    flex: 1;
}
.ct-module-card--wide .ct-module-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.ct-mchat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.ct-mchat-badge--dsgvo  { background: #eef4e8; color: #3d5741; }
.ct-mchat-badge--models { background: #fff5ee; color: #a03000; }
.ct-module-card--wide .ct-mchat-cta {
    flex-shrink: 0;
    background: #FF7000;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.ct-module-card--wide .ct-mchat-cta:hover { background: #e06000; }

@media (max-width: 600px) {
    .ct-module-card--wide { flex-direction: column; align-items: flex-start; }
    .ct-module-card--wide .ct-mchat-body { flex-direction: column; align-items: flex-start; gap: 12px; }
    .ct-module-card--wide .ct-mchat-cta { width: 100%; text-align: center; }
}

/* Bereich panel */
.ct-bereich-panel {
    max-width: 900px; margin: 0 auto 24px;
    display: none;
}
.ct-bereich-panel--active { display: block; }

/* Page dashboard max-width override */
.ct-page-dashboard { max-width: 100%; padding: 0; }
.ct-page-dashboard .ct-exercise-grid { max-width: 900px; margin: 0 auto; }

/* ── Header: Konto-Button ─────────────────────────────────────────────────── */
.ct-header-account-btn {
    margin-left: 6px;
    border-color: rgba(255,255,255,0.5); font-size: 0.875rem; padding: 6px 14px;
}

/* ── Konto-Seite ──────────────────────────────────────────────────────────── */
.ct-page-account { max-width: 820px; margin: 0 auto; padding-bottom: 48px; }

.ct-account-balance-section { margin-bottom: 28px; }
.ct-balance-card {
    background: linear-gradient(135deg, #3d5741 0%, #5a7d5f 100%);
    color: #fff;
    border-radius: 18px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(61,87,65,.25);
}
.ct-balance-label  { font-size: 13px; opacity: .8; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.ct-balance-amount { font-size: 2.8rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.ct-balance-low    { margin-top: 10px; font-size: 13px; background: rgba(255,200,0,.2); border-radius: 6px; padding: 4px 12px; display: inline-block; }

@keyframes ct-balance-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}
.ct-balance-zero { animation: ct-balance-blink 1.1s ease-in-out infinite; }

/* Aufladepakete */
.ct-topup-section  { margin-bottom: 28px; }
.ct-package-grid   { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ct-package-btn {
    padding: 12px 24px; font-size: 15px; font-weight: 600;
    border: 2px solid #3d5741; border-radius: 10px;
    background: #fff; color: #3d5741; cursor: pointer;
    transition: background .15s, color .15s, transform .1s;
}
.ct-package-btn:hover { background: #eef4e8; }
.ct-package-btn--active {
    background: #3d5741; color: #fff;
    transform: scale(1.04);
}
.ct-selected-amount { font-size: 14px; color: #555; margin-bottom: 10px; }
.ct-selected-amount strong { color: #3d5741; }

/* PayPal manuelle Zahlung */
.ct-paypal-manual {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 14px;
    background: #f7fbf8;
    border: 1px solid #d4e8d5;
    border-radius: 10px;
    padding: 14px 18px;
}
.ct-paypal-logo { height: 28px; flex-shrink: 0; margin-top: 2px; }
.ct-paypal-manual p { margin: 0; font-size: 14px; line-height: 1.6; color: #333; }
.ct-paypal-manual strong { color: #003087; }

/* History table */
.ct-history-section  { margin-bottom: 28px; }
.ct-history-table    { font-size: 14px; }
.ct-history-table th { font-size: 12px; }
.ct-history-date     { color: #555; font-size: 13px; }
.ct-th-right         { text-align: right; }
.ct-tx-positive      { color: #2e7d32; font-weight: 600; }
.ct-tx-negative      { color: #c62828; }
.ct-tx-neutral       { color: #bbb; }
.ct-history-actions  { text-align: right; white-space: nowrap; }
.ct-receipt-btn      { font-size: 11px; padding: 4px 10px; }

/* PDF-Aktionsspalte immer sichtbar */

/* PDF Download-Button */
.ct-pdf-btn {
    display: inline-flex; align-items: center; gap: 5px;
    text-decoration: none; color: #c62828;
    font-size: 12px; font-weight: 600;
    padding: 3px 8px; border-radius: 5px;
    border: 1px solid #ffcdd2;
    background: #fff5f5;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.ct-pdf-btn:hover { background: #ffebee; border-color: #ef9a9a; text-decoration: none; }
.ct-pdf-btn svg   { width: 18px; height: 18px; flex-shrink: 0; }

/* Betragsspalten so schmal wie möglich */
.ct-history-table th.ct-th-right,
.ct-history-table td.ct-th-right { width: 1%; white-space: nowrap; }

/* Beta badge next to logo */
.ct-beta-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 4px;
    flex-shrink: 0;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Wallet-Anzeige als Link */
a.ct-header-wallet {
    text-decoration: none;
    display: flex; align-items: center; gap: 5px;
}
a.ct-header-wallet:hover {
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.5);
}
.ct-wallet-icon {
    width: 15px; height: 15px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* Donation heart link in header */
.ct-brand-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ct-brand-heart {
    font-size: 1rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color .2s, transform .2s;
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
    margin: 0 4px;
}
.ct-brand-heart:hover {
    color: #ff6b81;
    transform: scale(1.3);
    text-decoration: none;
}

/* Donation card (account page) */
.ct-donate-section {
    margin-bottom: 28px;
    scroll-margin-top: 90px; /* Header (70px) + Luft, damit die Box vollständig sichtbar ist */
}
.ct-donate-card {
    background: linear-gradient(135deg, #fffbf5 0%, #fff8ee 100%);
    border: 1px solid #f0dfc0;
    border-radius: var(--ct-border-radius);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.ct-donate-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}
.ct-donate-body { flex: 1; }
.ct-donate-body p {
    margin: 0 0 14px;
    font-size: 14px;
    color: #5a5040;
    line-height: 1.6;
}
.ct-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #fff;
    border: 1.5px solid #c8a86e;
    border-radius: 8px;
    color: #8b6914;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .1s;
}
.ct-donate-btn:hover {
    background: #fdf3df;
    border-color: #a07820;
    color: #7a5c10;
    text-decoration: none;
    transform: translateY(-1px);
}
/* Dashboard donation footer */
.ct-donate-footer {
    text-align: center;
    padding: 18px 0 6px;
    font-size: 12px;
    color: #aaa;
}
.ct-donate-footer a {
    color: #bbb;
    text-decoration: none;
    transition: color .15s;
}
.ct-donate-footer a:hover { color: #888; }
@media (max-width: 600px) {
    .ct-donate-card { flex-direction: column; text-align: center; }
}

/* Responsive — Modul-Grid (überschrieben durch den finalen Mobile-Block am Ende) */

/* ── MediationsÜbungen ─────────────────────────────────────────────────────── */
.ct-medub-section { margin-bottom: 24px; }
.ct-medub-section-title { font-size: .85rem; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.ct-medub-toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.ct-medub-toggle-btn {
    padding: 8px 16px; border: 2px solid #d0d7c8; border-radius: 8px;
    background: #fff; color: #444; font-size: .9rem; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.ct-medub-toggle-btn:hover { border-color: #5e7a48; }
.ct-medub-toggle-btn.is-selected { border-color: #5e7a48; background: #5e7a48; color: #fff; }
.ct-medub-setup-card { max-width: 700px; margin: 0 auto; }

/* Party name prefix in chat */
.ct-party-name {
    display: inline-block;
    font-weight: 700;
    color: #3d5c2e;
    margin-bottom: 2px;
}

/* --------------------------------------------------------------------------
   Mediationsübungen (Bereich E)
   -------------------------------------------------------------------------- */
.ct-medub-config { display: flex; flex-wrap: wrap; gap: 20px; margin: 18px 0; }
.ct-medub-config-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-medub-config-group label { font-size: .82rem; font-weight: 600; color: #666; white-space: nowrap; }
.ct-medub-pill {
	padding: 6px 16px; border: 2px solid #c8d4c0; border-radius: 20px;
	background: #fff; color: #555; font-size: .84rem; cursor: pointer;
	transition: border-color .15s, background .15s, color .15s; line-height: 1.4;
	-webkit-user-select: none; user-select: none;
}
.ct-medub-pill:hover { border-color: #5e7a48; color: #3d5c2e; }
.ct-medub-pill.is-selected { border-color: #5e7a48; background: #5e7a48; color: #fff !important; font-weight: 600; }
.ct-medub-setup-box { max-width: 620px; margin: 0 auto; }
.ct-party-name { font-weight: 700; color: #3d5c2e; }
.ct-medub-mediator-bar {
	display: flex; align-items: center; gap: 10px;
	background: #f0f6ea; border-left: 3px solid #5e7a48;
	padding: 8px 14px; border-radius: 0 6px 6px 0; margin-bottom: 10px;
}
.ct-medub-mediator-bar-label { font-weight: 700; font-size: 1rem; color: #3d5c2e; letter-spacing: .02em; }
.ct-medub-input-full {
	width: 100%; box-sizing: border-box;
	border: 1.5px solid #c8d4c0; border-radius: 8px;
	padding: 12px 14px; font-size: .95rem; font-family: inherit;
	resize: vertical; min-height: 90px; line-height: 1.5;
	transition: border-color .15s;
}
.ct-medub-input-full:focus { outline: none; border-color: #5e7a48; box-shadow: 0 0 0 2px rgba(94,122,72,.12); }
.ct-medub-send-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.ct-medub-loading-status { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #666; font-size: .84rem; }
#ct-medub .ct-chat-bubble--ai { max-width: 95%; }
.ct-medub-thinking-hint {
	display: none; align-items: center; gap: 10px;
	padding: 10px 14px; margin-top: 8px;
	background: #f7faf3; border-left: 3px solid #5e7a48;
	border-radius: 0 6px 6px 0; font-size: .84rem; color: #555; font-style: italic;
}
.ct-medub-thinking-hint.is-visible { display: flex; }

/* ==========================================================================
   Hamburger-Navigation & vollständiges Mobile-Responsive (v4.17.0)
   ========================================================================== */

/* ── Hamburger-Button ───────────────────────────────────────────────────── */
.ct-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 12px;
    transition: background 0.15s, border-color 0.15s;
}
.ct-hamburger:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); }
.ct-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.ct-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ct-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ct-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile-Navigation-Drawer ───────────────────────────────────────────── */
.ct-mobile-nav {
    position: fixed;
    left: 0; right: 0;
    z-index: 98;
    background: #2d4132;
    border-bottom: 3px solid #c9a84c;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
    display: none; /* komplett weg auf Desktop */
}
.ct-mobile-nav--open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.ct-mobile-nav-inner {
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ct-mobile-nav-balance {
    font-size: 0.9rem; font-weight: 700;
    color: rgba(255,255,255,0.9);
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-bottom: 6px;
}
.ct-mobile-nav-links {
    display: flex; flex-direction: column; gap: 2px;
}
.ct-mobile-nav-links a {
    display: block;
    padding: 12px 14px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 1rem; font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s;
}
.ct-mobile-nav-links a:hover,
.ct-mobile-nav-links a:focus {
    background: rgba(255,255,255,0.12);
    color: #fff;
    text-decoration: none;
}
.ct-mobile-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 8px 0;
}
.ct-mobile-nav-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 12px; padding-top: 4px;
}
.ct-mobile-nav-langs {
    display: flex; gap: 4px; align-items: center;
}
.ct-mobile-nav-langs a {
    color: rgba(255,255,255,0.75);
    font-size: 0.875rem; font-weight: 600;
    text-decoration: none; padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s;
}
.ct-mobile-nav-langs a:hover,
.ct-mobile-nav-langs a.active { color: #fff; }
.ct-mobile-nav-langs .sep { color: rgba(255,255,255,0.35); font-size: 0.75rem; }
.ct-mobile-nav-logout {
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
    border-radius: 8px; padding: 9px 18px;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: background 0.15s;
}
.ct-mobile-nav-logout:hover { background: rgba(255,255,255,0.22); }

/* ── 960 px: Hamburger einblenden, Desktop-Nav ausblenden ───────────────── */
@media (max-width: 960px) {
    .ct-hamburger        { display: flex; }
    .ct-mobile-nav       { display: block; top: 63px; max-height: calc(100vh - 63px); }
    .ct-header-center    { display: none !important; }
    .ct-header-right     { display: none !important; }
    .ct-header-minimal-nav { display: none !important; }
    .ct-header-inner     { height: 60px; }
    .ct-header-account-btn { display: none !important; }
    /* Untertitel passt nicht in den kompakten Mobile-Header */
    .ct-brand-subtitle   { display: none; }
    /* Verhindert Flex-Overflow wenn Brand-Text sehr lang */
    .ct-brand            { min-width: 0; overflow: hidden; }
    .ct-brand-name       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── 768 px: Grid & Modul-Kacheln ───────────────────────────────────────── */
@media (max-width: 768px) {
    .ct-module-grid   { grid-template-columns: 1fr 1fr; gap: 14px; }
    .ct-db-hero h1    { font-size: 1.5rem; }
    .ct-module-card--wide { flex-wrap: wrap; }
    .ct-module-card--wide .ct-mchat-cta { width: 100%; text-align: center; }
    .ct-progress-stats { grid-template-columns: 1fr 1fr; }
}

/* ── 600 px: Einzelspalte + Abstände ────────────────────────────────────── */
@media (max-width: 600px) {
    /* Grundlayout */
    .ct-main          { padding: 14px 12px; }

    /* Kopfbereich Dashboard */
    .ct-db-hero       { padding: 14px 14px 10px; }
    .ct-db-hero h1    { font-size: 1.35rem; }
    .ct-db-settings   { padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .ct-db-settings-title { border-right: none; padding-right: 0; border-bottom: 1px solid #ddd; padding-bottom: 6px; width: 100%; }

    /* KI-Modell Dropdown: verhindert volle Breite + stellt Pfeil sicher */
    .ct-db-settings-ai { width: 100%; }
    .ct-db-settings-ai .ct-select { width: auto; max-width: calc(100% - 100px); min-width: 0; flex: 1; }

    /* Kontohistorie: kompaktes Layout */
    .ct-history-table th,
    .ct-history-table td { padding: 0.4rem 0.5rem; font-size: 12px; }
    .ct-history-date    { font-size: 11px; white-space: nowrap; }
    /* PDF-Button: nur Icon auf Mobile (Text ausblenden), mindestens 36px Tippfläche */
    .ct-history-actions { text-align: center; padding: 0 4px; }
    .ct-pdf-btn span    { display: none; }
    .ct-pdf-btn         { padding: 6px; min-width: 32px; min-height: 32px; justify-content: center; }
    .ct-pdf-btn svg     { width: 18px; height: 18px; }
    /* Rechnungstabelle: Icon noch kompakter */
    .ct-invoices-table .ct-pdf-btn     { padding: 4px; min-width: 28px; min-height: 28px; }
    .ct-invoices-table .ct-pdf-btn svg { width: 16px; height: 16px; }

    /* Modul-Kacheln */
    .ct-module-grid   { grid-template-columns: 1fr; gap: 12px; }
    .ct-module-card   { padding: 16px 14px; gap: 12px; }
    .ct-module-icon   { width: 40px; height: 40px; }
    .ct-module-icon svg { width: 40px; height: 40px; }

    /* Übungs-Kacheln */
    .ct-exercise-grid { grid-template-columns: 1fr; }
    .ct-exercise-card-body { padding: 16px; }
    .ct-exercise-card-footer { padding: 12px 16px; }

    /* Konto-Seite */
    .ct-balance-card  { padding: 20px 20px; }
    .ct-balance-amount { font-size: 2.1rem; }
    .ct-package-grid  { gap: 8px; }
    .ct-package-btn   { padding: 10px 16px; font-size: 14px; }
    .ct-page-account  { padding-bottom: 20px; }

    /* Simulation */
    .ct-topic-grid    { grid-template-columns: 1fr; }
    .ct-sim-header    { flex-direction: column; align-items: flex-start; }
    .ct-chat-bubble   { max-width: 92%; }
    .ct-sim-input-row { flex-direction: column; }
    .ct-sim-send-btn  { width: 100%; justify-content: center; }

    /* Fortschritt */
    .ct-progress-stats { grid-template-columns: 1fr; }
    .ct-chart-wrap     { height: 240px; }
    .ct-chart-wrap--bar { height: 200px; }
    .ct-filter-btn     { padding: 7px 14px; font-size: 0.8125rem; }

    /* Kommunikationsquadrat */
    .ct-quadrant-panels { grid-template-columns: 1fr; }

    /* Allgemein */
    .ct-page-title    { font-size: 1.3rem; }
    .ct-login-card    { padding: 24px 18px; }
    .ct-card          { padding: 18px 16px; }
    .ct-action-row--spaced { flex-direction: column; }
    .ct-scores        { gap: 8px; }
    .ct-tabs          { grid-template-columns: 1fr; }
    .ct-topic-grid    { grid-template-columns: 1fr; }

    /* Fußzeile */
    .ct-footer {
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 14px 16px;
        text-align: center;
    }
    .ct-footer > span {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    /* Konto-löschen-Modal */
    #ct-delete-modal > div {
        padding: 24px 20px;
        margin: 0 12px;
    }

    /* PayPal */
    .ct-paypal-manual { flex-direction: column; gap: 10px; }
    .ct-paypal-logo   { height: 22px; }

    /* Spenden-Karte */
    .ct-donate-card   { flex-direction: column; text-align: center; gap: 14px; }
}
