/* =========================================================================
   chatai : live chat avec une animatrice IA — même esprit que la démo XlDemo, en plus épuré.
   Ordinateur : vidéo à gauche, chat à droite ; mobile : vidéo plein écran, chat en surimpression
   ========================================================================= */

:root {
	--bg: #0f0f14;
	--panel: #15151c;
	--line: #262631;
	--text: #f2f2f5;
	--muted: #9a9aab;
	--accent: #ff5c8a;			/* rose : l'animatrice, le direct */
	--accent2: #8b5cf6;			/* violet : l'étiquette IA */
	--me: #2b2b38;
	--chatW: 380px;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	height: 100%;
	background: var(--bg);
	color: var(--text);
	font: 400 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; cursor: pointer; }

.live {
	display: flex;
	height: 100vh;
	height: 100dvh;
}


/* ---------------- la vidéo ---------------- */

.stage {
	position: relative;
	flex: 1;
	min-width: 0;
	background: #000;
	overflow: hidden;
	isolation: isolate;
}

.stage video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* clips enchaînés : deux lecteurs superposés ; le clip suivant apparaît en fondu par-dessus le précédent,
   qui reste visible dessous jusqu'à la fin du fondu (début et fin de chaque clip sont la même image) */
.stage .clip {
	position: absolute;
	inset: 0;
	z-index: 0;
	opacity: 0;
	transition: opacity 0.25s linear;
}
.stage .clip.on { opacity: 1; }
.stage .clip.top { z-index: 1; }
.topBar, .stageTools { z-index: 2; }

.topBar {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px 30px;
	background: linear-gradient(rgba(0,0,0,0.55), transparent);
}

.who {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.who img {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--accent);
}

.who b { display: flex; align-items: center; gap: 6px; font-size: 1.05em; }
.who small { display: block; color: rgba(255,255,255,0.75); font-size: 0.8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.aiTag {
	padding: 1px 6px;
	border-radius: 6px;
	background: var(--accent2);
	color: #fff;
	font-size: 0.62em;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.liveInfo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.liveBadge, .viewers {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 10px;
	border-radius: 13px;
	background: rgba(0,0,0,0.45);
	backdrop-filter: blur(6px);
	font-size: 0.75em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.liveBadge { background: #e5133e; letter-spacing: 0.04em; }
.liveBadge .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }

.stageTools {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: flex;
	gap: 8px;
}

.tool {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0,0,0,0.45);
	backdrop-filter: blur(6px);
}

.tool[hidden] { display: none; }
.tool svg { width: 20px; height: 20px; }
.jsSound .on, .jsSound.on .off { display: none; }
.jsSound.on .on { display: block; }


/* ---------------- le chat ---------------- */

.chat {
	display: flex;
	flex-direction: column;
	width: var(--chatW);
	flex-shrink: 0;
	background: var(--panel);
	border-left: 1px solid var(--line);
}

.chatHead {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid var(--line);
}

.aiNote { color: var(--muted); font-size: 0.78em; }

/* « Oublier ma visite » : lien discret (dans les outils de la vidéo sur mobile, où l’en-tête du chat est masqué) */
.forget { margin-left: auto; padding: 0; border: none; background: none; color: var(--muted); font: inherit; font-size: 0.75em; text-decoration: underline; cursor: pointer; }
.forget[hidden], .tool.forgetTool, .tool.acctTool { display: none; }

.msgs {
	flex: 1;
	overflow-y: auto;
	padding: 14px 14px 6px;
	scrollbar-width: thin;
}

.msg { margin-bottom: 8px; animation: msgIn 0.25s ease; }

.msg .author {
	display: block;
	margin: 0 0 2px 4px;
	color: var(--muted);
	font-size: 0.72em;
	font-weight: 600;
}

.msg .bubble {
	display: inline-block;
	max-width: 88%;
	padding: 8px 12px;
	border-radius: 16px;
	background: #20202a;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* l'animatrice */
.msg.model .author { color: var(--accent); }
.msg.model .bubble {
	background: linear-gradient(135deg, rgba(255,92,138,0.2), rgba(139,92,246,0.18));
	border: 1px solid rgba(255,92,138,0.35);
	border-top-left-radius: 6px;
}

/* moi : à droite */
.msg.me { text-align: right; }
.msg.me .author { margin: 0 4px 2px 0; }
.msg.me .bubble { background: var(--me); border-top-right-radius: 6px; text-align: left; }

/* informations */
.msg.note { text-align: center; }
.msg.note .bubble { background: none; padding: 2px 8px; color: var(--muted); font-size: 0.78em; }
.noteLink { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.04); color: var(--text); font: inherit; cursor: pointer; }
.noteLink:hover { border-color: var(--accent); }
.noteLink:disabled { opacity: 0.6; }

/* « Vu », et sa réaction (emoji) sur un message du visiteur */
.msg.me .seen { display: block; margin: 2px 6px 0 0; color: var(--muted); font-size: 0.68em; }
.msg .bubble { position: relative; }
.msg.me.reacted { margin-bottom: 16px; }
.msg .react {
	position: absolute;
	left: -8px;
	bottom: -14px;
	padding: 1px 5px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	font-size: 14px;
	line-height: 1.3;
	animation: pop 0.35s ease;
}

/* photo envoyée (selfie) */
.msg .bubble.photo { padding: 6px; background: #f4efe9; border: none; transform: rotate(-1.5deg); }
.msg .bubble.photo img { display: block; width: 170px; max-width: 100%; border-radius: 4px; filter: saturate(1.1) contrast(1.04) brightness(1.04); }

/* "écrit…" */
.msg.typing .bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: typing 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }

/* complicité (démo) : progression vers le palier suivant */
.bond {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 0;
	color: var(--muted);
	font-size: 0.72em;
	white-space: nowrap;
}
.bond[hidden] { display: none; }
.bondName { color: var(--accent); font-weight: 600; }
.bondBar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.bondBar i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.8s ease; }
.bond.max .bondBar i { box-shadow: 0 0 8px rgba(255,92,138,0.6); }
.bond.up { animation: bondUp 1.2s ease; }

/* réactions rapides et petits cadeaux */
.quick {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.quick::-webkit-scrollbar { display: none; }
.quick button {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: rgba(255,255,255,0.04);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.15s;
}
.quick button[hidden] { display: none; }
.quick button:hover { transform: scale(1.12); }
.quick button:active { transform: scale(0.92); }
.quick.wait button { opacity: 0.5; }
.quick .gift { border-color: rgba(255,92,138,0.45); }
.quickSep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); flex-shrink: 0; }

/* emojis envoyés qui s'envolent sur la vidéo */
.floaters { position: absolute; right: 70px; bottom: 70px; width: 120px; height: 60%; pointer-events: none; z-index: 3; }
.floaters span { position: absolute; bottom: 0; font-size: 30px; opacity: 0; animation: floatUp 2.6s ease-out forwards; }

.composer {
	display: flex;
	gap: 8px;
	padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--line);
}

.composer input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: #0f0f14;
	color: var(--text);
	font: inherit;
	outline: none;
}

.composer input:focus { border-color: var(--accent); }

.send {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	color: #fff;
}

.send svg { width: 20px; height: 20px; vertical-align: middle; }


/* ---------------- entrée dans le live ---------------- */

.gate {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(8,8,12,0.78);
	backdrop-filter: blur(10px);
}

.gate[hidden] { display: none; }

.gateCard {
	width: 100%;
	max-width: 400px;
	padding: 26px 22px 20px;
	border: 1px solid var(--line);
	border-radius: 20px;
	background: var(--panel);
	box-shadow: 0 30px 80px rgba(0,0,0,0.6);
	text-align: center;
}

.gateAva {
	width: 76px;
	height: 76px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--accent);
}

.gateCard h1 { margin: 10px 0 8px; font-size: 1.35em; }
.gateCard .lead { margin: 0 0 18px; color: #c9c9d4; font-size: 0.9em; }
.gateCard .lead b { color: #fff; }
.gateCard .beta { margin: -2px 0 12px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 207, 122, 0.1); border: 1px solid rgba(255, 207, 122, 0.3); color: #ffd98f; font-size: 0.78em; line-height: 1.4; }

.gateCard label { display: block; text-align: left; font-size: 0.85em; color: var(--muted); }

.gateCard input[type="text"],
.gateCard input[type="email"],
.gateCard input[type="password"] {
	width: 100%;
	height: 46px;
	margin: 6px 0 12px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #0f0f14;
	color: var(--text);
	font: inherit;
	outline: none;
}

.gateCard input:focus { border-color: var(--accent); }
.gateCard .opt { color: #8a8a99; font-size: 0.92em; }
.gateCard small a { color: var(--muted); }

.gateCard .adult { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--text); font-size: 0.9em; cursor: pointer; }
.gateCard .adult input { width: 18px; height: 18px; accent-color: var(--accent); }

.err { margin-bottom: 12px; color: #ff8a9c; font-size: 0.85em; }

.enter {
	width: 100%;
	height: 48px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--accent), var(--accent2));
	color: #fff;
	font-weight: 700;
	font-size: 1em;
}

.enter:disabled { opacity: 0.6; }

.gateCard small { display: block; margin-top: 12px; color: var(--muted); font-size: 0.74em; line-height: 1.4; }


/* ---------------- compte (après les messages libres) ---------------- */

.acct { z-index: 60; }
.acct .gateCard { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; }
.acctView[hidden] { display: none; }

.close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--muted);
	font-size: 1.5em;
	line-height: 1;
}

.close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.linkBtn {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 4px;
	border: none;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 0.86em;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.linkBtn:hover { color: var(--text); }
.linkBtn[hidden] { display: none; }

.google { display: flex; justify-content: center; min-height: 0; }
.google:not(:empty) { min-height: 44px; margin-bottom: 4px; }

.or { display: flex; align-items: center; gap: 10px; margin: 12px 0; color: var(--muted); font-size: 0.8em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or[hidden] { display: none; }

.ok { margin-bottom: 12px; color: #8fe0b0; font-size: 0.85em; }
.ok[hidden], .err[hidden] { display: none; }

/* la carte d'inscription dans le chat */
.signupCard .bubble { display: flex; flex-direction: column; gap: 4px; max-width: 290px; }
.signupCard .enter { height: 42px; margin-top: 10px; font-size: 0.92em; }
.signupCard .linkBtn { margin-top: 2px; }
.signupCard.pulse .bubble { animation: pop 0.45s ease; }

.acctLinks { display: inline-flex; gap: 10px; margin-left: auto; }
.acctLinks [hidden] { display: none; }


/* ---------------- essai de la voix (dev, admin) ---------------- */

.voiceDemo { position: absolute; left: 12px; bottom: 12px; z-index: 6; display: flex; flex-direction: column; gap: 4px; max-width: 260px; max-height: calc(100% - 24px); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15,15,20,0.82); font-size: 0.78em; }
.voiceDemo button { flex: none; }
.voiceDemo b { color: var(--muted); font-weight: 600; }
.voiceDemo button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #22222c; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.voiceDemo button:hover { border-color: var(--accent); }
.voiceDemo button:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 820px) { .voiceDemo { top: 64px; bottom: auto; max-height: calc(100% - 140px); } }


/* ---------------- Mon compte : infos, notifications, l'appli, préférences, confidentialité ---------------- */

.mePage { z-index: 60; align-items: flex-start; overflow-y: auto; }
.meCard { position: relative; max-width: 520px; margin: auto 0; padding: 22px 20px 18px; text-align: left; }
.meHead { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
.meAva { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.meHead h1 { margin: 0 0 2px; font-size: 1.3em; }
.meHead p { margin: 0; color: var(--muted); font-size: 0.84em; line-height: 1.4; }
.meCard > .err { margin: 12px 0 0; }

.meSec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.meSec h2 { margin: 0 0 10px; font-size: 0.78em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.meForm { margin-bottom: 10px; }
.meSub { margin: 2px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.02); }
.meForm[hidden], .meSub[hidden] { display: none; }
.meInline { display: flex; gap: 8px; align-items: center; }
.meCard .meInline input { flex: 1; min-width: 0; margin: 6px 0; }
.meCard input[type="text"], .meCard input[type="email"], .meCard input[type="password"] { height: 42px; }

.meRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 40px; margin-bottom: 6px; }
.meLabel { flex: none; width: 110px; color: var(--muted); font-size: 0.85em; }
.meVal { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 0.92em; }
.meRow select, .meQuiet select {
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #0f0f14;
	color: var(--text);
	font: inherit;
	font-size: 0.9em;
}
.meRow select { flex: 1; max-width: 220px; }

.meBtn {
	flex: none;
	height: 40px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 11px;
	background: #22222c;
	color: var(--text);
	font: inherit;
	font-size: 0.88em;
	font-weight: 600;
}
.meBtn:hover { border-color: #3a3a48; background: #282833; }
.meBtn:disabled { opacity: 0.6; }
.meBtn[hidden] { display: none; }
.meLink { padding: 4px 0; border: none; background: none; color: var(--accent); font: inherit; font-size: 0.86em; text-decoration: underline; text-underline-offset: 3px; }
.meLink[hidden] { display: none; }
.meLink.danger { color: #ff8a9c; }

.meNote { margin: 0 0 10px; color: var(--muted); font-size: 0.84em; line-height: 1.45; }
.meNote[hidden] { display: none; }
.meNote a { color: var(--text); }

.meSwitch, .meCheck { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; color: var(--text); font-size: 0.9em; line-height: 1.35; cursor: pointer; }
.meSwitch input, .meCheck input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.meSwitch input:disabled + span { color: var(--muted); }
.meTypes { margin: 4px 0 0 4px; padding-left: 14px; border-left: 2px solid var(--line); }
.meTypes[hidden] { display: none; }
.meQuiet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; color: var(--muted); font-size: 0.86em; }
.meActs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

@media (max-width: 480px) {
	.mePage { padding: 0; }
	.meCard { min-height: 100%; max-width: none; border: none; border-radius: 0; }
	.meLabel { width: 100%; }
	.meRow select { max-width: none; }
}


/* ---------------- mobile : vidéo plein écran, chat en surimpression ---------------- */

@media (max-width: 820px) {
	.tool.forgetTool:not([hidden]), .tool.acctTool { display: flex; }
	.live { display: block; position: relative; }
	.stage { position: absolute; inset: 0; }

	.chat {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		height: 52%;
		background: linear-gradient(transparent, rgba(0,0,0,0.65) 22%, rgba(0,0,0,0.85));
		border-left: none;
	}

	.chatHead { display: none; }
	.msgs { padding-top: 40px; -webkit-mask-image: linear-gradient(transparent, #000 40px); mask-image: linear-gradient(transparent, #000 40px); }
	.msg .bubble { background: rgba(20,20,28,0.7); }
	.composer { border-top: none; }
	.composer input { background: rgba(15,15,20,0.85); }
	.stageTools { bottom: auto; top: 70px; flex-direction: column; }
	.quick button { background: rgba(15,15,20,0.7); }
	.bond { text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
	.bondBar { background: rgba(255,255,255,0.18); }
	.floaters { right: 16px; bottom: 54%; height: 30%; }
	.who small { max-width: 46vw; }
}


@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bondUp { 0%, 100% { transform: none; } 30% { transform: scale(1.04); filter: brightness(1.6); } }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } 70% { transform: scale(1.2); opacity: 1; } to { transform: scale(1); } }
@keyframes floatUp {
	0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
	12% { opacity: 1; transform: translate(-6px, -30px) scale(1); }
	50% { transform: translate(10px, -150px) scale(1.05); }
	100% { opacity: 0; transform: translate(-8px, -300px) scale(0.9); }
}
@keyframes typing { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* mode debug (régie connectée, /?debug=1) : gêne de Léa et humeur du visiteur */
.dbg { position: absolute; top: 76px; left: 12px; z-index: 6; width: min(360px, calc(100% - 24px)); max-height: calc(100% - 150px); overflow: auto; background: rgba(10, 10, 16, 0.86); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; color: #dcdce6; font: 12px/1.45 Inter, system-ui, sans-serif; backdrop-filter: blur(6px); }
.dbg .dbgHead { display: flex; justify-content: space-between; padding: 7px 10px; font-weight: 600; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.dbg.min .dbgBody { display: none; }
.dbg.min .dbgHead { border-bottom: 0; }
.dbg .dbgBody { padding: 8px 10px 10px; }
.dbg .dbgRow { margin: 4px 0; }
.dbg b { color: #fff; }
.dbg .dbgGauge { position: relative; height: 10px; margin: 6px 0 8px; border-radius: 5px; background: linear-gradient(90deg, #2f6b46 0 15%, #6b6a2f 15% 40%, #7a4a26 40% 70%, #7a2b2b 70% 90%, #5a1d3a 90%); overflow: hidden; }
.dbg .dbgGauge i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, 0.55); border-right: 2px solid #fff; transition: width 0.6s; }
.dbg .dbgGauge s { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(0, 0, 0, 0.6); }
.dbg details { margin: 6px 0; }
.dbg summary { cursor: pointer; color: #ff9cc0; }
.dbg details p { margin: 4px 0 0; white-space: pre-wrap; color: #b9b9c6; }
.dbg .dbgCtl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dbg select, .dbg button { font: inherit; color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; padding: 3px 8px; cursor: pointer; }
.dbg select option { background: #1a1a22; }
/* panneau d'analyse (régie) : le visiteur, Léa en retour, le dernier message, l'évolution, la consigne envoyée à l'IA */
.dbg { width: min(400px, calc(100% - 24px)); }
.dbg[hidden] { display: none; }
.dbg .dbgHead small { font-weight: 400; color: #8a8a99; margin-left: 4px; }
.dbg .dbgActs { display: flex; gap: 10px; align-items: center; }
.dbg .dbgActs a { color: #8a8a99; font-weight: 400; text-decoration: none; }
.dbg .dbgActs a:hover { color: #fff; }
.dbg .dbgSec { margin: 0 0 10px; padding: 0 0 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.dbg .dbgSec:last-of-type { border-bottom: 0; }
.dbg h4 { margin: 2px 0 4px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #8a8a99; font-weight: 600; }
.dbg .dbgBig { font-size: 14px; font-weight: 600; color: #fff; margin: 2px 0; }
.dbg .dbgBig small { font-size: 12px; font-weight: 400; color: #b9b9c6; }
.dbg .dbgNote { color: #9a9aab; font-size: 11px; margin: 2px 0 4px; }
.dbg .dbgBar { display: grid; grid-template-columns: 78px 1fr 40px; align-items: center; gap: 6px; margin: 3px 0; }
.dbg .dbgBar span { color: #b9b9c6; }
.dbg .dbgBar i { position: relative; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dbg .dbgBar i b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #6d8dff, #ff7aa8); transition: width 0.6s; }
.dbg .dbgBar.lea i b { background: linear-gradient(90deg, #ffb36d, #ff7aa8); }
.dbg .dbgBar em { font-style: normal; text-align: right; color: #dcdce6; font-variant-numeric: tabular-nums; }
.dbg .dbgQuote { color: #fff; font-style: italic; margin: 2px 0 4px; word-break: break-word; }
.dbg .dbgChips { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 4px; }
.dbg .dbgChip { padding: 1px 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #dcdce6; font-size: 11px; }
.dbg .dbgChip.lvl0 { background: rgba(47, 107, 70, 0.5); }
.dbg .dbgChip.lvl1 { background: rgba(122, 106, 47, 0.6); }
.dbg .dbgChip.lvl2 { background: rgba(122, 74, 38, 0.7); }
.dbg .dbgChip.lvl3 { background: rgba(122, 43, 43, 0.8); }
.dbg .dbgChip.ind { background: rgba(109, 141, 255, 0.18); color: #c9d3ff; }
.dbg .dbgTl { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0; font-size: 15px; }
.dbg .dbgTl span { cursor: default; padding: 0 1px; border-bottom: 2px solid transparent; }
.dbg .dbgTl span.bad { border-bottom-color: #e0565b; }
.dbg .dbgSpark { display: block; width: 100%; height: 46px; margin: 4px 0 2px; background: rgba(255, 255, 255, 0.03); border-radius: 6px; }
.dbg .dbgSpark polyline { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.dbg .s0 { stroke: #ffb36d; color: #ffb36d; }
.dbg .s1 { stroke: #ff7aa8; color: #ff7aa8; }
.dbg .s2 { stroke: #6dd3a0; color: #6dd3a0; }
.dbg .s3 { stroke: #8fa6ff; color: #8fa6ff; }
.dbg .dbgLegend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; }
.dbg .dbgLegend span::before { content: "— "; }
.dbgTool { font-size: 17px; line-height: 1; }
