input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.logo-transition { transition: opacity 0.3s ease-in-out; }

.error-page { min-height: 100vh; margin: 0; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 30%, #14273c 0, #0b1220 55%); color: var(--io-ink); font-family: Outfit, Inter, system-ui, sans-serif; }
.error-header { padding: 1.5rem clamp(1.25rem, 5vw, 4rem); }
.error-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--io-ink); font-size: 1rem; font-weight: 800; text-decoration: none; }
.error-brand img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.error-main { display: grid; flex: 1; place-items: center; padding: 1rem 1.25rem 3rem; }
.error-card { width: min(100%, 550px); text-align: center; }
.error-illustration { position: relative; display: grid; place-items: center; width: min(72vw, 260px); aspect-ratio: 1; margin: 0 auto 1.4rem; }
.error-orbit { position: absolute; border: 1px solid rgba(56, 189, 248, .2); border-radius: 50%; }
.error-orbit-outer { inset: 3%; }
.error-orbit-inner { inset: 18%; background: radial-gradient(circle, rgba(56, 189, 248, .14), transparent 70%); }
.error-dot { position: absolute; z-index: 1; width: .55rem; height: .55rem; border-radius: 50%; background: #d9a441; box-shadow: 0 0 16px #d9a441; }
.error-dot-one { top: 16%; right: 15%; }
.error-dot-two { bottom: 20%; left: 18%; width: .35rem; height: .35rem; background: #a5b4fc; }
.error-code { color: #e8f7ff; font-size: clamp(4.5rem, 17vw, 7rem); font-weight: 900; line-height: 1; letter-spacing: -.08em; text-shadow: 0 0 35px rgba(56, 189, 248, .35); }
.error-eyebrow { margin: 0 0 .65rem; color: var(--io-accent); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
.error-card h1 { margin: 0; color: var(--io-ink); font-size: clamp(1.7rem, 6vw, 2.35rem); font-weight: 800; line-height: 1.2; }
.error-description { max-width: 430px; margin: 1rem auto 1.8rem; color: var(--io-muted); font-size: 1rem; line-height: 1.7; }
.error-home { display: inline-flex; align-items: center; gap: .6rem; padding: .8rem 1.15rem; border: 1px solid #7dd3fc; border-radius: 10px; background: var(--io-accent); color: #071321; font-size: .9rem; font-weight: 800; text-decoration: none; }
.error-home:hover { background: #7dd3fc; }
.error-home:focus-visible, .error-brand:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.error-hint, .error-footer { color: var(--io-muted); font-size: .75rem; }
.error-hint { margin: 1.3rem 0 0; }
.error-footer { padding: 1.25rem; text-align: center; }

body.io-unified > #global-header,
body.io-unified #app > #global-header {
	position: sticky !important;
	top: 0 !important;
	z-index: 60 !important;
	background: var(--io-deep) !important;
}
body.io-unified .io-global-header {
	position: relative !important;
	top: auto !important;
	z-index: 60 !important;
}

.kralaide-presentation { color: var(--io-ink); }
#main-view-container > .kralaide-presentation {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}
#main-view-container:has(> .kralaide-presentation) {
	width: calc(100% + 1rem) !important;
	margin-left: -0.5rem !important;
	margin-right: -0.5rem !important;
}
.kralaide-presentation-hero,
.kralaide-presentation-card,
.kralaide-presentation > div:last-child {
	border-color: var(--io-line) !important;
	background: var(--io-surface) !important;
}
.kralaide-presentation-card { display: block; text-decoration: none; }
html.io-light body.io-unified .kralaide-presentation-hero,
html.io-light body.io-unified .kralaide-presentation-card,
html.io-light body.io-unified .kralaide-presentation > div:last-child {
	background: #ffffff !important;
	border-color: #d8e0ea !important;
}
html.io-light body.io-unified .kralaide-presentation h1,
html.io-light body.io-unified .kralaide-presentation h2 { color: #172033 !important; }
html.io-light body.io-unified .kralaide-presentation p { color: #475569 !important; }
.kralaide-flow-caption { font-size: 0.68rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: #67e8f9; margin-bottom: 0.75rem; }
.kralaide-flow-list { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.kralaide-flow-step { position: relative; min-width: 0; }
@media (min-width: 640px) { .kralaide-flow-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
	.kralaide-flow-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem; }
	.kralaide-flow-step:not(:last-child)::after {
		content: "→"; position: absolute; top: 50%; right: -1.2rem; transform: translateY(-50%);
		color: #67e8f9; font-size: 1.1rem; font-weight: 900; line-height: 1;
	}
}
.kralaide-flow-card {
	display: flex; flex-direction: column; gap: 0.35rem; height: 100%;
	padding: 1rem 1.1rem; border-radius: 14px;
	border: 1px solid rgba(34, 211, 238, 0.28);
	background: rgba(8, 145, 178, 0.14);
	text-decoration: none;
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.kralaide-flow-card:hover { transform: translateY(-2px); border-color: rgba(103, 232, 249, 0.7); background: rgba(8, 145, 178, 0.24); }
.kralaide-flow-card--final { background: #0e7490; border-color: rgba(165, 243, 252, 0.5); }
.kralaide-flow-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.kralaide-flow-num {
	display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 999px;
	background: #22d3ee; color: #0f172a; font-size: 0.75rem; font-weight: 900;
}
.kralaide-flow-icon { width: 1.25rem; height: 1.25rem; color: #67e8f9; object-fit: contain; }
.kralaide-flow-title { color: #ffffff; font-size: 0.98rem; font-weight: 900; line-height: 1.25; }
.kralaide-flow-hint { color: #cbd5e1; font-size: 0.78rem; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .kralaide-flow-card { transition: none; } }
html.io-light body.io-unified .kralaide-flow-caption { color: #0e7490; }
html.io-light body.io-unified .kralaide-flow-card { background: #ecfeff; border-color: #67e8f9; }
html.io-light body.io-unified .kralaide-flow-card:hover { background: #cffafe; }
html.io-light body.io-unified .kralaide-flow-card--final { background: #0891b2; border-color: #0e7490; }
html.io-light body.io-unified .kralaide-flow-title { color: #172033; }
html.io-light body.io-unified .kralaide-flow-hint { color: #475569; }
html.io-light body.io-unified .kralaide-flow-card--final .kralaide-flow-title,
html.io-light body.io-unified .kralaide-flow-card--final .kralaide-flow-hint { color: #ffffff; }
html.io-light body.io-unified .kralaide-flow-card--final .kralaide-flow-icon { color: #ffffff; }

/* Présentation : habillage aux couleurs du site (or / surfaces --io-*), sans changer le contenu. */
.kralaide-presentation .text-cyan-300,
.kralaide-presentation code { color: #e0b35a !important; }
.kralaide-presentation .text-slate-300 { color: #d9cfb8 !important; }
.kralaide-presentation .text-slate-400 { color: #a99d85 !important; }
.kralaide-presentation .text-white { color: var(--io-ink) !important; }
.kralaide-presentation .bg-slate-900\/95 { background: var(--io-surface) !important; }
.kralaide-presentation .bg-slate-800 { background: rgba(255, 240, 210, 0.05) !important; }
.kralaide-presentation .border-slate-700\/60,
.kralaide-presentation .border-slate-700 { border-color: var(--io-line) !important; }
.kralaide-presentation .border-cyan-400\/25 { border-color: rgba(224, 179, 90, 0.35) !important; }
.kralaide-presentation .bg-cyan-400\/10 { background: rgba(224, 179, 90, 0.1) !important; }
.kralaide-presentation .shadow-lg,
.kralaide-presentation .shadow-xl { box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.7) !important; }
.kralaide-presentation-hero {
	background:
		radial-gradient(circle at top right, rgba(224, 179, 90, 0.2), transparent 55%),
		var(--io-surface) !important;
}
.kralaide-presentation-card {
	position: relative; overflow: hidden;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.kralaide-presentation-card::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
	background: linear-gradient(90deg, #e0b35a, rgba(224, 179, 90, 0));
}
.kralaide-presentation-card:hover {
	transform: translateY(-2px); border-color: rgba(224, 179, 90, 0.5) !important;
}
.kralaide-presentation-card h2 { color: var(--io-ink) !important; }
.kralaide-presentation-card li a:hover { color: #f4d27e !important; }
.kralaide-presentation .kralaide-flow-num { background: #e0b35a !important; color: #0f172a !important; }
.kralaide-presentation .kralaide-flow-card {
	background: rgba(224, 179, 90, 0.08) !important;
	border-color: rgba(224, 179, 90, 0.3) !important;
}
.kralaide-presentation .kralaide-flow-card:hover {
	background: rgba(224, 179, 90, 0.18) !important;
	border-color: rgba(244, 210, 126, 0.7) !important;
}
.kralaide-presentation .kralaide-flow-card--final {
	background: linear-gradient(135deg, #c9913a, #8a5a1a) !important;
	border-color: rgba(244, 210, 126, 0.6) !important;
}
.kralaide-presentation .kralaide-flow-icon { color: #e0b35a !important; }
.kralaide-presentation .kralaide-flow-card--final .kralaide-flow-icon,
.kralaide-presentation .kralaide-flow-card--final .kralaide-flow-title,
.kralaide-presentation .kralaide-flow-card--final .kralaide-flow-hint { color: #ffffff !important; }
.kralaide-presentation .kralaide-flow-card--final .kralaide-flow-num { background: #ffffff !important; color: #8a5a1a !important; }
html.io-light body.io-unified .kralaide-presentation .text-cyan-300,
html.io-light body.io-unified .kralaide-presentation code,
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-caption { color: #9a6b1c !important; }
html.io-light body.io-unified .kralaide-presentation .text-slate-300 { color: #3f4a5c !important; }
html.io-light body.io-unified .kralaide-presentation .text-slate-400 { color: #64707f !important; }
html.io-light body.io-unified .kralaide-presentation .text-white { color: #172033 !important; }
html.io-light body.io-unified .kralaide-presentation .bg-slate-800 { background: #f8f4ea !important; }
html.io-light body.io-unified .kralaide-presentation .bg-cyan-400\/10 { background: #fbf3df !important; }
html.io-light body.io-unified .kralaide-presentation .border-cyan-400\/25 { border-color: #e6c77f !important; }
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-card {
	background: #fbf5e6 !important; border-color: #e6c77f !important;
}
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-card:hover { background: #f6ebcd !important; }
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-title { color: #172033 !important; }
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-hint { color: #475569 !important; }
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-card--final {
	background: linear-gradient(135deg, #c9913a, #8a5a1a) !important;
}
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-card--final .kralaide-flow-title,
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-card--final .kralaide-flow-hint,
html.io-light body.io-unified .kralaide-presentation .kralaide-flow-card--final .kralaide-flow-icon { color: #ffffff !important; }
@media (prefers-reduced-motion: reduce) { .kralaide-presentation-card { transition: none; } }

#kralamour-direct-view {
	border-color: var(--io-line) !important;
	background: var(--io-deep) !important;
	box-shadow: none !important;
	overflow: visible !important;
}
#main-view-container > #kralamour-direct-view {
	width: calc(100% + 1rem) !important;
	margin-left: -0.5rem !important;
	margin-right: -0.5rem !important;
}
#kralamour-content > main > .kralamour-block {
	margin-left: 20px;
	margin-right: 20px;
	border-radius: 0.75rem;
}
#kralamour-content > main > .kralamour-block .collapsible-content:not(#sequenceurContent):not(.collapsed) {
	padding: 1rem !important;
}
#kralamour-content > main > #section-moisson #moissonContent {
	margin-top: 0;
	border-top: 1px solid var(--io-line);
	background: var(--io-surface-soft);
}
#kralamour-content > main > #section-moisson #moissonContent ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
#kralamour-content > main > #section-moisson #moissonContent li {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-height: 2.35rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--io-line);
	border-radius: 0.65rem;
	background: var(--io-surface);
	font-size: 0.82rem;
	line-height: 1.35;
}
#kralamour-content > main > #section-moisson #moissonContent li + li {
	margin-top: 0.5rem;
}
#kralamour-content > main > #section-moisson #moissonContent li i {
	flex: 0 0 auto;
	color: var(--io-accent) !important;
	font-size: 0.85rem;
}
html.io-light body.io-unified #kralamour-content > main > #section-moisson #moissonContent {
	background: #f8fafc;
	border-color: #d8e0ea;
}
html.io-light body.io-unified #kralamour-content > main > #section-moisson #moissonContent li {
	background: #ffffff;
	border-color: #d8e0ea;
	color: #334155;
}
@media (max-width: 767px) {
	#kralamour-content > main > .kralamour-block {
		margin-left: 8px;
		margin-right: 8px;
	}
}
#kralamour-direct-view .kralamour-block {
	margin-top: 0.75rem;
}
html.io-light body.io-unified #kralamour-direct-view {
	background: #ffffff !important;
	border-color: #d8e0ea !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .bg-kralaide-bg,
html:not(.io-light) body.io-unified #kralamour-direct-view .bg-kralaide-surface {
	background: var(--io-surface) !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .border-kralaide-border {
	border-color: var(--io-line) !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .text-white,
html:not(.io-light) body.io-unified #kralamour-direct-view .text-gray-200,
html:not(.io-light) body.io-unified #kralamour-direct-view .text-gray-300 {
	color: var(--io-ink) !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .text-gray-400 {
	color: var(--io-muted) !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .text-kralaide-primary,
html:not(.io-light) body.io-unified #kralamour-direct-view .text-kralaide-primary i {
	color: var(--io-accent) !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .bg-kralaide-primary {
	background-color: var(--io-accent) !important;
}
html:not(.io-light) body.io-unified #kralamour-direct-view .border-kralaide-primary {
	border-color: var(--io-accent) !important;
}
/* Kral'Aide : thème sombre ocre */
html:not(.io-light) body.io-unified {
	--io-deep: #130e07;
	--io-line: rgba(201, 151, 58, 0.2);
	--io-ink: #f3ead7;
	--io-muted: #b8a87f;
	background: #130e07 !important;
	color: #f3ead7 !important;
}
body.io-unified .io-global-header,
body.io-unified .io-global-footer {
	background-color: rgba(19, 14, 7, 0.95) !important;
	border-color: rgba(201, 151, 58, 0.25) !important;
}
html:not(.io-light) body.io-unified [class*="dark:bg-darkbg"],
html:not(.io-light) body.io-unified [class*="dark:bg-darkcard"],
html:not(.io-light) body.io-unified [class*="dark:bg-gray-800"],
html:not(.io-light) body.io-unified [class*="dark:bg-gray-700"] {
	background-color: var(--io-surface) !important;
	color: var(--io-ink) !important;
}
html:not(.io-light) body.io-unified [class*="dark:border-darkborder"],
html:not(.io-light) body.io-unified [class*="dark:border-gray-600"] {
	border-color: var(--io-line) !important;
}
html:not(.io-light) body.io-unified [class*="dark:text-gray-100"],
html:not(.io-light) body.io-unified [class*="dark:text-gray-200"] {
	color: var(--io-ink) !important;
}
html:not(.io-light) body.io-unified [class*="dark:text-gray-300"],
html:not(.io-light) body.io-unified [class*="dark:text-gray-400"] {
	color: var(--io-muted) !important;
}

/* Rendu net des sprites pixel-art (monstres) : evite le flou qui les fait paraitre petits */
.box-card-sprite, .needs-card-sprite, .trade-monster-head img, .trade-row-label img, .ts-monster-info img,
.creature-card img, .trade-sheet-table img {
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}
/* Petites icones PNG : rendu net sans lissage excessif */
img[src*="/assets/icon/"] { image-rendering: -webkit-optimize-contrast; }

/* GRILLE RESPONSIVE : autant de cartes que possible a une taille lisible, sans limite fixe de colonnes */
.force-grid-6 { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; }
/* Nombre de cartes par ligne choisi par l'utilisateur ; sur mobile, plafonne a 3 pour garder les noms lisibles. */
.force-grid-6.needs-grid-fixed { grid-template-columns: repeat(var(--needs-cols), minmax(0, 1fr)); }
@media (max-width: 639px) { .force-grid-6.needs-grid-fixed { grid-template-columns: repeat(min(var(--needs-cols), 3), minmax(0, 1fr)); } }
.step-card-grid { display: grid; gap: 0.5rem; }
.needs-card-sprite { width: clamp(4.5rem, 42vw, 7rem); height: clamp(4.5rem, 42vw, 7rem); margin-top: 1.5rem; }
.character-table-wrap { max-height: 70vh; overflow: auto; }
.character-table-top-scroll { overflow-x: auto; overflow-y: hidden; height: 14px; margin: 0 0 0.35rem; }
.character-table-top-scroll > div { height: 1px; }
.character-progress-table { border-collapse: separate; border-spacing: 0; }
.character-progress-table thead th { position: sticky; top: 0; z-index: 20; }
.character-progress-table .character-monster-cell { position: sticky; left: 0; }
.character-progress-table .character-monster-header { z-index: 30; }
.needs-toolbar-layout { flex-direction: column; }
.collection-stat-detail, .collection-stat-mob { display: none; }
@media (min-width: 640px) { .collection-stat-detail { display: inline-flex; } }
@media (min-width: 1024px) { .collection-stat-mob { display: inline-flex; } }
@media (min-width: 768px) { .needs-toolbar-layout { flex-direction: row; align-items: center; justify-content: space-between; } }

.force-grid-9 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; }
@media (min-width: 640px) { .force-grid-9 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .force-grid-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); } }

/* Les cartes adaptent leur contenu a leur propre largeur, pas seulement au viewport. */
.creature-box-card { container-type: inline-size; }
.creature-box-card .box-card-sprite { width: clamp(3.5rem, 52cqw, 9rem); height: clamp(3.5rem, 52cqw, 9rem); }
.creature-box-card .box-card-id { font-size: clamp(0.625rem, 6cqw, 0.875rem); }
.creature-box-card .box-card-local-id { font-size: clamp(0.5rem, 4.5cqw, 0.675rem); }
.creature-box-card .box-card-gen-badge { color: #fde047; }
.creature-box-card .box-card-shiny-icon { width: clamp(1.15rem, 12cqw, 1.8rem); height: clamp(1.15rem, 12cqw, 1.8rem); }
.creature-box-card .box-card-name { font-size: clamp(0.6rem, 6cqw, 0.875rem); }
.creature-box-card .box-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.15; overflow: hidden; word-break: break-word; }

@container (min-width: 10rem) {
	.creature-box-card .box-card-sprite { width: min(58cqw, 10rem); height: min(58cqw, 10rem); }
}

.header-main-nav { pointer-events: none; }
.header-main-nav button { pointer-events: auto; }

.dashboard-panel {
	position: relative;
	isolation: isolate;
	display: grid;
	gap: 1rem;
	overflow: hidden;
	border: 1px solid rgba(21, 128, 61, 0.12);
	border-radius: 1rem;
	background: #ffffff;
	box-shadow: 0 20px 55px rgba(21, 128, 61, 0.12);
	padding: clamp(1rem, 2vw, 1.5rem);
}
.dark .dashboard-panel {
	background: var(--io-surface);
	border-color: rgba(255, 255, 255, 0.08);
}
.dashboard-heading { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0; pointer-events: none; }
.dashboard-eyebrow { display: inline-flex; margin-bottom: 0.25rem; color: #15803d; font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.dashboard-heading h2 { font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 950; color: #17231b; line-height: 1.05; }
.dark .dashboard-heading h2 { color: #f8fafc; }
.dashboard-heading p { color: #647064; font-size: 0.85rem; font-weight: 700; }
.dark .dashboard-heading p { color: #a7b4aa; }
.dashboard-champion { display: flex; align-items: center; gap: 0.75rem; max-width: 24rem; border: 1px solid rgba(21, 128, 61, 0.16); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.74); padding: 0.75rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.dark .dashboard-champion { background: rgba(18, 18, 18, 0.45); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-champion img, .dashboard-server-name img { width: 2.1rem; height: 2.1rem; border-radius: 999px; object-fit: cover; background: #fff; border: 1px solid rgba(0, 0, 0, 0.08); }
.dashboard-champion div div { color: #15803d; font-size: 0.65rem; font-weight: 900; text-transform: uppercase; }
.dashboard-champion strong { display: block; color: #111827; font-size: 1rem; font-weight: 950; }
.dark .dashboard-champion strong { color: #fff; }
.dashboard-champion span { color: #6b7280; font-size: 0.72rem; font-weight: 800; }
.dashboard-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.dashboard-stat { display: flex; align-items: flex-start; gap: 0.75rem; border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.82); padding: 0.9rem; box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06); }
.dark .dashboard-stat { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-stat-icon { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: 0.75rem; background: var(--stat-bg); color: var(--stat); flex: 0 0 auto; }
.dashboard-stat-value { color: var(--stat); font-size: 1.45rem; line-height: 1; font-weight: 950; }
.dashboard-stat-label { color: #1f2937; font-size: 0.76rem; font-weight: 950; }
.dark .dashboard-stat-label { color: #f3f4f6; }
.dashboard-stat-caption { color: #6b7280; font-size: 0.66rem; font-weight: 800; line-height: 1.15; margin-top: 0.2rem; }
.dashboard-blue { --stat: #9a6b12; --stat-bg: #fbefd2; }
.dashboard-green { --stat: #15803d; --stat-bg: #dcfce7; }
.dashboard-amber { --stat: #b45309; --stat-bg: #fef3c7; }
.dashboard-rose { --stat: #be123c; --stat-bg: #ffe4e6; }
.dashboard-cyan { --stat: #0e7490; --stat-bg: #cffafe; }
.dashboard-insights { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(13rem, 0.7fr); gap: 0.75rem; margin-bottom: 1rem; }
.dashboard-chart-card { border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.72); padding: 0.9rem; }
.dark .dashboard-chart-card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-section-title { display: flex; align-items: center; gap: 0.4rem; color: #243328; font-size: 0.78rem; font-weight: 950; margin-bottom: 0.75rem; text-transform: uppercase; }
.dark .dashboard-section-title { color: #e5e7eb; }
.dashboard-flow { display: flex; align-items: flex-end; gap: 0.35rem; min-height: 9rem; }
.dashboard-flow-bar { display: flex; flex: 1; min-width: 0; height: 8rem; flex-direction: column; justify-content: flex-end; gap: 0.35rem; }
.dashboard-flow-bar span { display: block; min-height: 0.5rem; border-radius: 0.45rem 0.45rem 0.2rem 0.2rem; background: #0e7490; box-shadow: 0 8px 16px rgba(14, 116, 144, 0.18); }
.dashboard-flow-bar small { color: #7a837c; font-size: 0.58rem; font-weight: 900; text-align: center; }
.dashboard-radial-card { display: grid; align-content: start; }
.dashboard-radial { width: min(11rem, 100%); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; text-align: center; border-radius: 999px; background: conic-gradient(#15803d calc(var(--value) * 1%), #fee2e2 0); position: relative; }
.dashboard-radial::before { content: ''; position: absolute; inset: 0.85rem; border-radius: inherit; background: #fff; }
.dark .dashboard-radial::before { background: #1e1e1e; }
.dashboard-radial strong, .dashboard-radial span { position: relative; z-index: 1; display: block; }
.dashboard-radial strong { color: #15803d; font-size: 1.8rem; line-height: 1; font-weight: 950; }
.dashboard-radial span { max-width: 7rem; color: #667066; font-size: 0.68rem; font-weight: 850; line-height: 1.15; }
.dashboard-server-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.7rem; }
.dashboard-server-row { display: grid; gap: 0.8rem; border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 1rem; background: rgba(255, 255, 255, 0.78); padding: 0.85rem; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045); }
.dark .dashboard-server-row { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-server-name { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.dashboard-server-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #111827; font-size: 0.85rem; font-weight: 950; }
.dark .dashboard-server-name strong { color: #f8fafc; }
.dashboard-server-name small { display: block; color: #64748b; font-size: 0.65rem; font-weight: 850; line-height: 1.1; }
.dashboard-server-game { width: 2rem; height: 2rem; margin-left: auto; object-fit: contain; border-radius: 0.5rem; background: transparent; padding: 0.2rem; }
.dark .dashboard-server-game { background: transparent; }
.dashboard-server-value { color: #6b7280; font-size: 0.68rem; font-weight: 850; margin-top: 0.15rem; }
.dashboard-server-bar { height: 0.45rem; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.dashboard-server-bar i { display: block; height: 100%; border-radius: inherit; background: #0e7490; }
.dark .dashboard-server-bar { background: #263449; }
.dashboard-server-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.dashboard-server-metrics span { border-radius: 0.75rem; background: rgba(21, 128, 61, 0.075); color: #64748b; font-size: 0.62rem; font-weight: 900; line-height: 1.1; padding: 0.55rem; }
.dashboard-server-metrics b { display: block; color: #15803d; font-size: 0.95rem; line-height: 1; font-weight: 950; margin-bottom: 0.15rem; }
.dashboard-metric-unavailable { opacity: 0.65; }
.dashboard-loading, .dashboard-empty { border: 1px dashed rgba(107, 114, 128, 0.3); border-radius: 0.9rem; color: #6b7280; font-size: 0.82rem; font-weight: 850; padding: 1rem; text-align: center; }
.profile-server-picker { position: relative; }
.profile-server-picker summary, .profile-server-option { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 1px solid var(--io-line); border-radius: .5rem; background: var(--io-surface-soft); color: var(--io-ink); font-size: .75rem; text-align: left; cursor: pointer; }
.profile-server-picker summary { list-style: none; }
.profile-server-picker summary::-webkit-details-marker { display: none; }
.profile-server-picker img { width: 1.5rem; height: 1.5rem; object-fit: contain; flex-shrink: 0; }
.profile-server-picker strong, .profile-server-picker small { display: block; }
.profile-server-picker small { color: var(--io-muted); font-size: .625rem; }
.profile-server-caret { margin-left: .25rem; }
.profile-server-menu { position: absolute; right: 0; z-index: 20; width: max(100%, 12rem); max-height: 18rem; overflow-y: auto; margin-top: .25rem; padding: .25rem; border: 1px solid var(--io-line); border-radius: .5rem; background: var(--io-deep); box-shadow: 0 12px 24px rgba(0, 0, 0, .25); }
.profile-server-option { width: 100%; border-color: transparent; background: transparent; }
.profile-server-option:hover, .profile-server-option.is-active { background: var(--io-accent-soft); }
.profile-server-empty { color: var(--io-muted); font-size: .75rem; }
.trade-sheet-page { min-height: 100vh; padding: .75rem; background: var(--io-deep); }
.trade-sheet-header, .trade-sheet-panel { width: 100%; }
.trade-sheet-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.trade-back { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 0.8rem; border-radius: 8px; background: #15803d; color: #fff; font-size: 0.75rem; font-weight: 800; }
.trade-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; color: #4b5563; font-size: 0.75rem; font-weight: 800; }
.trade-context span, .trade-context strong { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.5rem; border-radius: 8px; background: #fff; border: 1px solid #d1d5db; }
.trade-context img { width: 1.25rem; height: 1.25rem; object-fit: contain; border-radius: 9999px; }
.trade-sheet-panel { background: #fff; border: 1px solid #d1d5db; border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / .06); overflow: hidden; }
.trade-sheet-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid #e5e7eb; }
.trade-sheet-title h1 { color: #166534; font-size: 1.1rem; font-weight: 900; }
.trade-sheet-title p { margin-top: .2rem; color: #6b7280; font-size: .75rem; font-weight: 700; }
.trade-sheet-title > span { padding: .35rem .5rem; border-radius: 9999px; background: #ecfdf5; color: #15803d; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.trade-sheet-scroll { overflow: auto; max-height: calc(100vh - 180px); }
.trade-sheet-table { border-collapse: separate; border-spacing: 0; min-width: max-content; width: 100%; font-size: .72rem; }
.trade-sheet-table th, .trade-sheet-table td { min-width: 116px; padding: .55rem; text-align: center; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.trade-sheet-table thead th { position: sticky; top: 0; z-index: 2; background: #f0fdf4; color: #166534; }
.trade-sheet-table tbody th, .trade-row-label { position: sticky; left: 0; z-index: 3; min-width: 145px; background: #f9fafb; color: #374151; text-align: left; font-weight: 900; }
.trade-sheet-table thead .trade-row-label { z-index: 4; background: #dcfce7; }
.trade-monster-head { display: grid; justify-items: center; gap: .3rem; max-width: 105px; margin: auto; }
.trade-monster-head img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
.trade-monster-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 105px; }
.trade-sheet-table small { display: block; margin-top: .15rem; color: #9ca3af; font-size: .6rem; }
.trade-stock-row td { color: #15803d; font-size: .9rem; font-weight: 900; }
.trade-sheet-table input { width: 70px; padding: .35rem; border: 1px solid #d1d5db; border-radius: 6px; text-align: center; font-weight: 800; outline-color: #15803d; }
.trade-total-row { background: #ecfdf5; color: #166534; font-weight: 900; }
.trade-sheet-empty { padding: 2rem; text-align: center; color: #6b7280; font-size: .85rem; font-weight: 700; }
/* Tableur partage : code couleur des saisies, partage, filtres, etapes, troc, facture */
.ts-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem 1rem; border-bottom: 1px solid #e5e7eb; background: #fff; font-size: .68rem; font-weight: 800; color: #4b5563; }
.ts-legend-chip { padding: .12rem .6rem; border-radius: 9999px; border: 2px solid transparent; }
.ts-legend-me { border-color: #15803d; color: #15803d; background: #f0fdf4; }
.ts-legend-other { border-color: #ea580c; color: #ea580c; background: #fff7ed; }
.ts-by-me { border-color: #15803d !important; background: #f0fdf4 !important; }
.ts-by-other { border-color: #ea580c !important; background: #fff7ed !important; }
input[type="checkbox"].ts-by-me { accent-color: #15803d; }
input[type="checkbox"].ts-by-other { accent-color: #ea580c; }
.ts-share { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-bottom: 1px solid #e5e7eb; background: #fff; }
.ts-share input { flex: 1; min-width: 0; padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: 8px; background: #f9fafb; color: #4b5563; font-size: .68rem; font-weight: 700; }
.ts-share button { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .7rem; border-radius: 8px; background: #15803d; color: #fff; font-size: .68rem; font-weight: 900; white-space: nowrap; cursor: pointer; }
.ts-share button.ts-copied { background: #0369a1; }
.ts-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.ts-filter-bar select { padding: .35rem .5rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; font-size: .7rem; font-weight: 800; }
.ts-filter-bar label { display: inline-flex; align-items: center; gap: .3rem; color: #374151; font-size: .7rem; font-weight: 800; cursor: pointer; }
.ts-filter-btn { padding: .35rem .6rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #b45309; font-size: .68rem; font-weight: 900; cursor: pointer; }
.ts-filter-btn:hover { border-color: #b45309; }
.ts-step-row td { background: #f0fdf4; color: #166534; text-align: left; font-weight: 900; }
.ts-step-row small { display: inline; margin-left: .5rem; color: #65a30d; font-size: .6rem; }
.ts-stock { color: #15803d; font-size: .9rem; font-weight: 900; }
.ts-need { font-weight: 900; }
.ts-need-open { color: #E3000F; }
.ts-need-ok { color: #9ca3af; }
.ts-dir-btn { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; cursor: pointer; }
.ts-dir-btn:hover { border-color: #15803d; }
.ts-dir-static { display: inline-flex; align-items: center; gap: .25rem; color: #374151; }
.ts-troc-badge { display: inline-block; padding: .15rem .6rem; border-radius: 9999px; background: #ede9fe; color: #6d28d9; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.ts-free-hint { display: block; margin-top: .15rem; color: #d97706; font-size: .58rem; font-weight: 800; }
.ts-troc-pending { outline: 2px dashed #d97706; outline-offset: 1px; }
.ts-exclude-btn { display: inline-flex; padding: .3rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #6b7280; cursor: pointer; }
.ts-exclude-btn:hover { border-color: #E3000F; color: #E3000F; }
.ts-disabled th, .ts-disabled td { opacity: .45; }
.ts-disabled th img { filter: grayscale(1); }
.trade-total-cell { color: #166534; font-weight: 900; }
.ts-user-chip { display: inline-flex; align-items: center; gap: .3rem; }
.ts-user-chip em { padding: .05rem .4rem; border-radius: 9999px; background: #15803d; color: #fff; font-size: .55rem; font-style: normal; text-transform: uppercase; }
.ts-invoice { padding: 1rem; border-top: 2px solid #d1d5db; background: #f9fafb; }
.ts-invoice-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(120px, .8fr); gap: .75rem; }
.ts-invoice-card.ts-card-troc { padding: .75rem .9rem; }
@media (max-width: 768px) { .ts-invoice-grid { grid-template-columns: 1fr; } }
.ts-invoice-card { padding: .75rem 1rem; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ts-invoice-card .label { color: #6b7280; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.ts-invoice-card .amount { margin-top: .25rem; color: #166534; font-size: 1.05rem; font-weight: 900; }
/* Carte duo : 2 lignes (vous devez / on vous doit) */
.ts-invoice-card.ts-duo { display: flex; flex-direction: column; gap: .6rem; }
.ts-duo-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ts-duo-line .amount { margin-top: 0; font-size: .95rem; }
.ts-fair-ok { color: #15803d; font-size: .68rem; font-weight: 900; }
.ts-fair-ko { color: #b45309; font-size: .68rem; font-weight: 900; }
/* Carte troc : fond colore selon l'equite */
.ts-invoice-card.ts-troc-ok { background: #f0fdf4; border-color: #86efac; }
.ts-invoice-card.ts-troc-ko { background: #fff7ed; border-color: #fdba74; }
.dark .ts-invoice-card.ts-troc-ok { background: #052e16; border-color: #166534; }
.dark .ts-invoice-card.ts-troc-ko { background: #431407; border-color: #9a3412; }
/* Solde : payeur -> montant -> receveur avec avatars */
.ts-balance-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; }
.ts-balance-user { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; }
.ts-balance-user b { font-size: .72rem; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-balance-mid { display: inline-flex; align-items: center; gap: .3rem; flex-shrink: 0; }
.ts-balance-eq { justify-content: center; gap: .35rem; color: #6b7280; }
/* Nouvelle mise en page : en-tete compact, une colonne par utilisateur */
.ts-copy-head { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .6rem; border-radius: 8px; background: #15803d; color: #fff; font-size: .68rem; font-weight: 900; cursor: pointer; white-space: nowrap; }
.ts-copy-head.ts-copied { background: #0369a1; }
.ts-head-users { gap: .5rem; }
.ts-user-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .5rem .15rem .15rem; border-radius: 9999px; border: 2px solid transparent; }
.ts-user-col-head { min-width: 118px; }
.ts-col-user { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 9999px; font-size: .68rem; font-weight: 900; }
.ts-col-user span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-col-user img { width: 1.1rem; height: 1.1rem; }
.ts-col-me { color: #15803d; background: #fff; border: 1.5px solid #86efac; }
.ts-col-other { color: #c2410c; background: #fff; border: 1.5px solid #fdba74; }
.ts-user-cell { vertical-align: top; position: relative; }
.ts-user-cell.ts-is-need { vertical-align: middle; }
.ts-user-cell.ts-is-need .ts-cell-top { margin-bottom: 0; }
.ts-cell-top { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem; margin-bottom: .3rem; min-height: 1rem; }
.ts-tag { padding: .1rem .45rem; border-radius: 9999px; font-size: .6rem; font-weight: 900; white-space: nowrap; }
.ts-tag-need { background: #fee2e2; color: #b91c1c; }
.ts-tag-stock { background: #dcfce7; color: #15803d; }
.ts-tag-none { color: #d1d5db; }
.ts-is-provider { background: #f8fafc; }
.ts-user-cell input { width: 66px; }
/* Auteur d'une valeur : avatar + pseudo en bas a droite de la case */
.ts-author { position: absolute; bottom: .2rem; right: .25rem; display: inline-flex; align-items: center; gap: .2rem; font-size: .52rem; font-weight: 900; color: #9ca3af; line-height: 1; }
.ts-author b { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-author img, .ts-author span { width: .875rem; height: .875rem; font-size: .45rem; }
/* Prix + troc fusionnes */
.ts-price-cell { position: relative; }
.ts-price-cell input[type="number"] { width: 70px; }
/* Badge "Troc" automatique quand le prix est a 0 */
.ts-troc-auto { display: inline-block; margin-top: .25rem; padding: .12rem .5rem; border-radius: 9999px; background: #ede9fe; color: #6d28d9; font-size: .58rem; font-weight: 900; text-transform: uppercase; }
/* Totaux en haut */
.ts-invoice-top { border-top: none; border-bottom: 2px solid #d1d5db; padding: .75rem 1rem; }
.ts-excl-sep { font-size: .62rem; font-weight: 900; color: #9ca3af; margin-left: .25rem; }
/* Barre de filtres adaptative : desktop complet, mobile condense avec bouton modal */
.ts-filter-mobile { display: none; }
.ts-filter-modal-btn { display: inline-flex; align-items: center; justify-content: center; padding: .4rem .55rem; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; cursor: pointer; }
@media (max-width: 1100px) {
    .ts-filter-desktop { display: none; }
    .ts-filter-mobile { display: flex; align-items: center; gap: .5rem; }
    .ts-filter-mobile select { flex: 1; min-width: 0; }
}
/* Case monstre compacte */
.ts-monster-box { display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.ts-monster-info { display: flex; align-items: center; gap: .45rem; min-width: 0; text-align: left; }
.ts-monster-img { position: relative; width: 2.4rem; height: 2.4rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.ts-monster-img > img:first-child { width: 100%; height: 100%; object-fit: contain; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
.ts-monster-cat { position: absolute; bottom: -2px; right: -2px; width: .9rem; height: .9rem; background: #fff; border: 1px solid #d1d5db; border-radius: 9999px; padding: 1px; object-fit: contain; }
.dark .ts-monster-cat { background: #262626; border-color: #404040; }
.ts-monster-actions { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; }
.ts-mini-btn { display: inline-flex; padding: .22rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #6b7280; cursor: pointer; }
.ts-mini-btn:hover { border-color: #15803d; color: #15803d; }
.ts-mini-btn.ts-exclude:hover { border-color: #E3000F; color: #E3000F; }
.dark .ts-copy-head { color: #fff; }
.dark .ts-is-provider { background: #1f2937; }
.dark .ts-tag-need { background: #450a0a; color: #fca5a5; }
.dark .ts-tag-stock { background: #052e16; color: #4ade80; }
.dark .ts-mini-btn { background: #1e1e1e; border-color: #525252; color: #d1d5db; }
.dark .ts-legend, .dark .ts-share, .dark .ts-filter-bar { background: #262626; border-color: #404040; color: #e5e7eb; }
.dark .ts-filter-bar select, .dark .ts-share input, .dark .ts-dir-btn, .dark .ts-exclude-btn, .dark .ts-filter-btn { background: #1e1e1e; border-color: #525252; color: #e5e7eb; }
.dark .ts-filter-bar label, .dark .ts-dir-static { color: #e5e7eb; }
.dark .ts-step-row td { background: #14532d; color: #dcfce7; }
.dark .ts-by-me { background: #052e16 !important; }
.dark .ts-by-other { background: #431407 !important; }
.dark .ts-legend-me { background: #052e16; }
.dark .ts-legend-other { background: #431407; }
.dark .ts-invoice { background: #1a1a1a; border-color: #404040; }
.dark .ts-invoice-card { background: #262626; border-color: #404040; }
.dark .ts-invoice-card .amount, .dark .trade-total-cell, .dark .ts-stock { color: #4ade80; }
.dark .trade-sheet-panel { background: #1e1e1e; border-color: #404040; }.dark .trade-sheet-title { border-color: #404040; }.dark .trade-context span, .dark .trade-context strong, .dark .trade-sheet-table tbody th { background: #262626; color: #e5e7eb; border-color: #404040; }.dark .trade-sheet-table thead th { background: #14532d; color: #dcfce7; }.dark .trade-sheet-table th, .dark .trade-sheet-table td { border-color: #404040; }.dark .trade-sheet-table input { background: #262626; color: #fff; border-color: #525252; }
@media (max-width: 639px) { .trade-sheet-page { padding: .75rem; }.trade-sheet-header { align-items: flex-start; flex-direction: column; }.trade-context { justify-content: flex-start; }.trade-sheet-title { flex-direction: column; }.trade-sheet-scroll { max-height: calc(100vh - 240px); } }
.dashboard-tabs { position: relative; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; min-height: 43.2px; margin: 0; border-top: 1px solid var(--io-line); border-radius: 0; background: var(--io-deep); padding: 0.35rem 0.5rem; }
.dashboard-tab { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2rem; border: 1px solid transparent; border-radius: 8px; color: var(--io-muted); font-size: 0.75rem; font-weight: 800; padding: 0 0.8rem; transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.dashboard-tab:hover { border-color: var(--io-line); background: var(--io-accent-soft); color: var(--io-ink); }
.dashboard-tab.is-active { border-color: var(--io-line); background: var(--io-accent-soft); color: var(--io-ink); box-shadow: none; }
html.io-light body.io-unified .dashboard-tabs { background: #ffffff; border-top-color: #d8e0ea; }
html.io-light body.io-unified .dashboard-tab { color: #64748b; }
html.io-light body.io-unified .dashboard-tab:hover,
html.io-light body.io-unified .dashboard-tab.is-active { border-color: #cbd5e1; background: #e0f2fe; color: #0f172a; }
.dashboard-filterbar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.dashboard-filter { border-radius: 8px; border: 1px solid var(--io-line); background: var(--io-surface); color: var(--io-muted); font-size: 0.72rem; font-weight: 850; padding: 0.45rem 0.75rem; transition: 0.18s ease; }
.dashboard-filter img { width: 1.4rem; height: 1.4rem; object-fit: contain; }
.dashboard-filter:hover { border-color: var(--io-accent); color: var(--io-accent); }
.dashboard-filter.is-active { background: var(--io-accent-soft); border-color: var(--io-line); color: var(--io-ink); box-shadow: none; }
.dashboard-category-note { margin: 0 0 0.75rem; padding: 0.65rem 0.75rem; border-left: 3px solid #0e7490; border-radius: 0.5rem; background: #f0fdfa; color: #475569; font-size: 0.72rem; line-height: 1.35; }
.dashboard-category-note strong { color: #0e7490; }
.dark .dashboard-category-note { background: #172b3b; color: #cbd5e1; }
.dark .dashboard-category-note strong { color: #67e8f9; }
.dashboard-subtotal { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.55rem; margin-bottom: 0.8rem; }
.dashboard-subtotal div { border-radius: 0.85rem; background: #ecfeff; padding: 0.75rem; }
.dashboard-subtotal strong { display: block; color: #0f766e; font-size: 1.25rem; line-height: 1; font-weight: 950; }
.dashboard-subtotal span { color: #475569; font-size: 0.66rem; font-weight: 900; }
.dashboard-block { border: 1px solid rgba(17, 24, 39, 0.06); border-radius: 1rem; background: rgba(255, 255, 255, 0.58); margin-top: 0.8rem; overflow: hidden; }
.dark .dashboard-block { background: rgba(255, 255, 255, 0.035); border-color: rgba(255, 255, 255, 0.08); }
.dashboard-block-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem; border-bottom: 1px solid rgba(17, 24, 39, 0.05); }
.dashboard-block-head > button { display: inline-flex; align-items: center; gap: 0.45rem; color: #1f2937; font-size: 0.78rem; font-weight: 950; text-transform: uppercase; }
.dashboard-block-head > button:last-child { border-radius: 0.65rem; padding: 0.45rem; color: #64748b; transition: 0.18s ease; }
.dashboard-block-head > button:last-child:hover { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.dashboard-block-head span { display: inline-flex; align-items: center; gap: 0.4rem; }
.dark .dashboard-block-head > button { color: #f3f4f6; }
.dashboard-block-body { padding: 0.75rem; }
.dashboard-honor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.7rem; }
.dashboard-honor { position: relative; display: flex; gap: 0.7rem; align-items: flex-start; min-height: 7rem; overflow: hidden; border: 1px solid rgba(14, 116, 144, 0.16); border-radius: 0.9rem; background: #f8fafc; padding: 0.95rem; color: #0e7490; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.dashboard-honor::after { content: ''; position: absolute; right: -1.2rem; bottom: -1.2rem; width: 4rem; height: 4rem; border-radius: 999px; background: rgba(56, 189, 248, 0.12); }
.dashboard-honor:hover { transform: translateY(-2px); border-color: rgba(14, 116, 144, 0.35); box-shadow: 0 10px 24px rgba(14, 116, 144, 0.1); }
.dashboard-honor > svg { position: relative; z-index: 1; flex: 0 0 auto; width: 2.25rem; height: 2.25rem; padding: 0.45rem; border-radius: 0.7rem; background: #cffafe; color: #0e7490; }
.dark .dashboard-honor { background: #172b3b; border-color: rgba(56, 189, 248, 0.2); }
.dark .dashboard-honor::after { background: rgba(56, 189, 248, 0.1); }
.dark .dashboard-honor > svg { background: #164e63; color: #67e8f9; }
.dashboard-honor.is-gold { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.dashboard-honor.is-gold::after { background: rgba(245, 158, 11, 0.15); }
.dashboard-honor.is-gold > svg { background: #fef3c7; color: #b45309; }
.dark .dashboard-honor.is-gold { background: #422006; border-color: #92400e; }
.dark .dashboard-honor.is-gold > svg { background: #78350f; color: #fbbf24; }
.dashboard-honor span { position: relative; z-index: 1; display: block; color: #64748b; font-size: 0.66rem; font-weight: 950; text-transform: uppercase; letter-spacing: 0.04em; }
.dashboard-honor strong { position: relative; z-index: 1; display: block; color: #0f172a; font-size: 1.2rem; font-weight: 950; line-height: 1.15; margin-top: 0.2rem; }
.dark .dashboard-honor strong { color: #f8fafc; }
.dashboard-honor small { position: relative; z-index: 1; display: block; color: #64748b; font-size: 0.68rem; font-weight: 800; line-height: 1.2; margin-top: 0.3rem; }
.dashboard-game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.7rem; }
.dashboard-game-card { display: flex; align-items: center; gap: 0.75rem; border-radius: 0.9rem; background: #f0fdfa; padding: 0.9rem; border: 1px solid rgba(14, 116, 144, 0.16); }
.dashboard-game-card img { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; object-fit: contain; border-radius: 0.7rem; background: #ffffff; padding: 0.25rem; }
.dashboard-game-card > div { min-width: 0; }
.dark .dashboard-game-card { background: #172b3b; border-color: rgba(56, 189, 248, 0.2); }
.dark .dashboard-game-card img { background: #0b1220; }
.dashboard-game-card strong { display: block; color: #111827; font-size: 1rem; font-weight: 950; text-transform: capitalize; }
.dark .dashboard-game-card strong { color: #fff; }
.dashboard-game-card span, .dashboard-game-card small { display: block; color: #64748b; font-size: 0.72rem; font-weight: 850; }
.dashboard-game-card b { display: block; color: #15803d; font-size: 1.3rem; line-height: 1.1; font-weight: 950; margin: 0.35rem 0; }
.dashboard-rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.dashboard-mini-title { color: #475569; font-size: 0.72rem; font-weight: 950; margin: 0 0 0.5rem; text-transform: uppercase; }
.dashboard-rank-row { display: grid; grid-template-columns: 2.2rem 2rem minmax(6rem, 0.8fr) minmax(9rem, 1.2fr); align-items: center; gap: 0.5rem; border-radius: 0.75rem; background: rgba(255, 255, 255, 0.72); padding: 0.55rem; margin-top: 0.35rem; }
.dark .dashboard-rank-row { background: rgba(255, 255, 255, 0.05); }
.dashboard-rank-row span { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 0.75rem; font-weight: 950; }
.dashboard-rank-avatar { width: 2rem; height: 2rem; border-radius: 999px; object-fit: cover; background: #e2e8f0; border: 1px solid var(--io-line); }
.dashboard-rank-initial { display: inline-grid; place-items: center; color: #64748b; font-size: 0.75rem; font-weight: 950; }
.dark .dashboard-rank-initial { background: #263449; color: #cbd5e1; }
.dashboard-rank-row strong { overflow: hidden; color: #111827; font-size: 0.82rem; font-weight: 950; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.dark .dashboard-rank-row strong { color: #fff; }
.dashboard-rank-row em { color: #64748b; font-size: 0.68rem; font-style: normal; font-weight: 800; }
.dashboard-ocre-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.65rem; }
.dashboard-ocre-grid div { border-radius: 0.85rem; background: rgba(21, 128, 61, 0.08); padding: 0.85rem; text-align: center; }
.dashboard-ocre-grid strong { display: block; color: #15803d; font-size: 1.55rem; line-height: 1; font-weight: 950; }
.dashboard-ocre-grid span { color: #4b5563; font-size: 0.7rem; font-weight: 900; }
.dashboard-flow-bar b { display: block; min-height: 0.45rem; border-radius: 0.45rem 0.45rem 0.2rem 0.2rem; background: #0f766e; box-shadow: 0 8px 16px rgba(15, 118, 110, 0.15); }
.dashboard-legend { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.75rem; color: #64748b; font-size: 0.7rem; font-weight: 900; }
.dashboard-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.dashboard-legend i, .dashboard-legend b { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 0.25rem; background: #0e7490; }
.dashboard-legend b { background: #0f766e; }
.dashboard-server-name em { border-radius: 999px; background: rgba(21, 128, 61, 0.1); color: #15803d; font-size: 0.58rem; font-style: normal; font-weight: 950; padding: 0.15rem 0.4rem; text-transform: uppercase; }
.dashboard-focus { width: min(94vw, 72rem); max-height: 88vh; overflow: hidden; border-radius: 1.1rem; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.dark .dashboard-focus { background: #1e1e1e; }
.dashboard-focus-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #15803d; color: #fff; padding: 0.9rem 1rem; }
.dashboard-focus-head strong { font-size: 0.95rem; font-weight: 950; }
.dashboard-focus-head button { border-radius: 999px; padding: 0.45rem; transition: 0.18s ease; }
.dashboard-focus-head button:hover { background: rgba(255, 255, 255, 0.18); }
.dashboard-focus-body { max-height: calc(88vh - 3.4rem); overflow: auto; padding: 1rem; background: #ffffff; }
.dark .dashboard-focus-body { background: #1e1e1e; }

/* Observatoire : aligné sur la palette du site (tokens --io-*) pour les modes clair et sombre. */
.dashboard-panel { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-surface); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); }
.dashboard-panel .dashboard-eyebrow { color: var(--io-accent); letter-spacing: 0.14em; }
.dashboard-panel .dashboard-heading h2 { color: var(--io-ink); font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 900; }
.dashboard-panel .dashboard-heading p { color: var(--io-muted); font-weight: 600; }
.dashboard-panel .dashboard-champion { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); box-shadow: none; }
.dashboard-panel .dashboard-champion div div { color: var(--io-accent); }
.dashboard-panel .dashboard-champion strong { color: var(--io-ink); }
.dashboard-panel .dashboard-champion span { color: var(--io-muted); }
.dashboard-panel .dashboard-stat { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); box-shadow: none; }
.dashboard-panel .dashboard-stat-icon { background: var(--io-accent-soft); color: var(--io-accent); }
.dashboard-panel .dashboard-stat-value { color: var(--io-ink); font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.dashboard-panel .dashboard-stat-label { color: var(--io-ink); }
.dashboard-panel .dashboard-stat-caption { color: var(--io-muted); }
.dashboard-panel .dashboard-block { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); }
.dashboard-panel .dashboard-block-head { border-bottom-color: var(--io-line); }
.dashboard-panel .dashboard-block-head > button { color: var(--io-ink); font-weight: 800; }
.dashboard-panel .dashboard-block-head > button:last-child { color: var(--io-muted); }
.dashboard-panel .dashboard-block-head > button:last-child:hover { background: var(--io-accent-soft); color: var(--io-accent); }
.dashboard-panel .dashboard-server-row { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-surface); box-shadow: none; }
.dashboard-panel .dashboard-server-row:hover { border-color: var(--io-accent); }
.dashboard-panel .dashboard-server-name strong { color: var(--io-ink); }
.dashboard-panel .dashboard-server-name small { color: var(--io-muted); }
.dashboard-panel .dashboard-server-name img { background: transparent; border-color: var(--io-line); }
.dashboard-panel .dashboard-server-game { background: transparent; }
.dashboard-panel .dashboard-server-bar { background: var(--io-line); }
.dashboard-panel .dashboard-server-bar i { background: linear-gradient(90deg, var(--io-accent), #f0c75e); }
.dashboard-panel .dashboard-server-metrics span { background: var(--io-surface-soft); color: var(--io-muted); }
.dashboard-panel .dashboard-server-metrics b { color: var(--io-ink); }
.dashboard-panel .dashboard-honor { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); color: var(--io-accent); }
.dashboard-panel .dashboard-honor::after { background: var(--io-accent-soft); }
.dashboard-panel .dashboard-honor > svg { background: var(--io-accent-soft); color: var(--io-accent); }
.dashboard-panel .dashboard-honor span { color: var(--io-muted); }
.dashboard-panel .dashboard-honor strong { color: var(--io-ink); }
.dashboard-panel .dashboard-honor small { color: var(--io-muted); }
.dashboard-panel .dashboard-game-card { border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); }
.dashboard-panel .dashboard-game-card img { background: transparent; }
.dashboard-panel .dashboard-game-card strong { color: var(--io-ink); }
.dashboard-panel .dashboard-game-card span, .dashboard-panel .dashboard-game-card small { color: var(--io-muted); }
.dashboard-panel .dashboard-game-card b { color: var(--io-accent); }
.dashboard-panel .dashboard-rank-row { border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-deep); }
.dashboard-panel .dashboard-rank-row span { background: var(--io-accent-soft); color: var(--io-accent); }
.dashboard-panel .dashboard-rank-row strong { color: var(--io-ink); }
.dashboard-panel .dashboard-rank-row em { color: var(--io-muted); }
.dashboard-panel .dashboard-rank-initial { background: var(--io-surface-soft); color: var(--io-muted); }
.dashboard-panel .dashboard-mini-title, .dashboard-panel .dashboard-section-title { color: var(--io-muted); }
.dashboard-panel .dashboard-flow-bar span { background: rgba(217, 164, 65, 0.4); box-shadow: none; }
.dashboard-panel .dashboard-flow-bar b { background: var(--io-accent); box-shadow: none; }
.dashboard-panel .dashboard-flow-bar small { color: var(--io-muted); }
.dashboard-panel .dashboard-radial { background: conic-gradient(var(--io-accent) calc(var(--value) * 1%), var(--io-line) 0); }
.dashboard-panel .dashboard-radial::before { background: var(--io-surface); }
.dashboard-panel .dashboard-radial strong { color: var(--io-accent); }
.dashboard-panel .dashboard-radial span { color: var(--io-muted); }
.dashboard-panel .dashboard-subtotal div, .dashboard-panel .dashboard-ocre-grid div { background: var(--io-deep); border: 1px solid var(--io-line); }
.dashboard-panel .dashboard-subtotal strong, .dashboard-panel .dashboard-ocre-grid strong { color: var(--io-accent); }
.dashboard-panel .dashboard-subtotal span, .dashboard-panel .dashboard-ocre-grid span { color: var(--io-muted); }
.dashboard-panel .dashboard-category-note { border-left-color: var(--io-accent); background: var(--io-accent-soft); color: var(--io-muted); }
.dashboard-panel .dashboard-category-note strong { color: var(--io-accent); }
.dashboard-panel .dashboard-legend { color: var(--io-muted); }
.dashboard-panel .dashboard-legend i, .dashboard-panel .dashboard-legend b { background: var(--io-accent); }
.dashboard-panel .dashboard-loading, .dashboard-panel .dashboard-empty { border-color: var(--io-line); color: var(--io-muted); }

.manage-modal { max-width: 56rem; }
.header-account-mobile-actions { display: none; }

@media (max-width: 639px) {
	.dashboard-heading, .dashboard-champion, .dashboard-server-row { display: block; }
	.dashboard-champion { margin-top: 0.75rem; }
	.dashboard-insights { grid-template-columns: 1fr; }
	.dashboard-flow { overflow-x: auto; padding-bottom: 0.25rem; }
	.dashboard-flow-bar { min-width: 2.3rem; }
	.dashboard-server-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dashboard-tabs { justify-content: stretch; }
	.dashboard-tab { flex: 1 1 8rem; justify-content: center; }
	.dashboard-rank-grid { grid-template-columns: 1fr; }
	.dashboard-rank-row { grid-template-columns: 2rem 2rem minmax(5rem, 1fr); }
	.dashboard-rank-row em { grid-column: 3; }
	.character-table-top-scroll { display: none; }
	.header-user-name { display: none; }
	.header-server-name { display: none; }
	.header-desktop-utility { display: none; }
	.header-account-mobile-actions { display: grid; }
	.header-main-nav { border-radius: 0; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }


:root {
    --io-ink: #e8eef7;
    --io-muted: #9aa9bd;
    --io-deep: #130e07;
    --io-surface: rgba(34, 26, 15, 0.92);
    --io-surface-soft: rgba(46, 35, 20, 0.84);
    --io-line: rgba(201, 151, 58, 0.2);
    --io-accent: #d9a441;
    --io-accent-soft: rgba(217, 164, 65, 0.16);
    --io-radius: 10px;
    --io-control-height: 36px;
}
/* Surcharge ocre des utilitaires Tailwind bleus / sky (CDN) sur le site unifié. */
body.io-unified [class~="bg-blue-500"], body.io-unified [class~="bg-blue-600"], body.io-unified [class~="bg-blue-700"],
body.io-unified [class~="bg-sky-500"], body.io-unified [class~="bg-sky-600"], body.io-unified [class~="bg-sky-700"] { background-color: #a8741a !important; }
body.io-unified [class~="bg-blue-50"], body.io-unified [class~="bg-blue-100"], body.io-unified [class~="bg-sky-50"], body.io-unified [class~="bg-sky-100"] { background-color: #fbefd2 !important; }
body.io-unified [class~="hover:bg-blue-700"]:hover, body.io-unified [class~="hover:bg-blue-600"]:hover, body.io-unified [class~="hover:bg-sky-700"]:hover { background-color: #8a5f10 !important; }
body.io-unified [class*="text-blue-"], body.io-unified [class*="text-sky-"] { color: #9a6b12 !important; }
body.io-unified [class*="border-blue-"], body.io-unified [class*="border-sky-"] { border-color: #d9a441 !important; }
.io-global-footer .footer-like {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.5rem;
    padding: 0 0.25rem;
    border-radius: 0.4rem;
    color: var(--io-muted);
    white-space: nowrap;
}
.footer-like svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.footer-like.is-liked svg { fill: #f43f5e; stroke: #f43f5e; }
.footer-like.is-error svg { stroke: #f59e0b; }
.footer-like:not(:disabled):hover { background: var(--io-accent-soft); }
.footer-like:disabled { cursor: default; }
.footer-dialog {
    width: min(94vw, 24rem);
    max-height: 90vh;
    overflow: auto;
    padding: 1.2rem;
    border: 1px solid var(--io-line);
    border-radius: 1rem;
    background: var(--io-deep);
    color: var(--io-ink);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.3);
}
.footer-dialog::backdrop { background: rgba(2, 6, 23, 0.7); backdrop-filter: blur(6px); }
.footer-dialog h2 { margin: 0 0 0.6rem; font-size: 1.15rem; font-weight: 800; }
.footer-dialog p { margin: 0.6rem 0; color: var(--io-muted); }
.footer-dialog-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.footer-dialog-actions button { flex: 1; padding: 0.5rem; border: 1px solid var(--io-line); border-radius: 0.5rem; }
.footer-dialog-actions button:hover, .footer-dialog-actions button:focus-visible { background: var(--io-accent-soft); }
.footer-dialog .footer-dialog-error { color: #f59e0b; }
.footer-terms { width: min(94vw, 38rem); position: relative; }
.footer-terms { width: 95vw; max-width: 95vw; height: 95vh; max-height: 95vh; padding: 0; border-radius: 1.1rem; overflow: hidden; display: flex; flex-direction: column; }
.footer-terms-content { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(1rem, 3vw, 2.25rem); }
.footer-terms .io-legal-card { max-width: 60rem; margin: 0 auto; padding: 0; border: 0; box-shadow: none; background: none; }
.footer-terms .io-legal-card h1 { padding-right: 2.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--io-line); }
.footer-terms .io-legal-card section { margin-top: 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--io-line); border-left: 3px solid var(--io-accent); border-radius: 0.9rem; background: var(--io-surface); }
.footer-terms .io-legal-card section h2 { margin-top: 0; color: var(--io-accent); }
.footer-terms .io-legal-card section button { margin-top: 0.6rem; padding: 0.4rem 0.8rem; border: 1px solid var(--io-line); border-radius: 0.5rem; background: var(--io-accent-soft); color: var(--io-ink); font-weight: 700; cursor: pointer; text-decoration: none; }
.footer-terms .io-legal-card section button:hover { border-color: var(--io-accent); }
html.io-light body.io-unified .footer-terms .io-legal-card section { background: #ffffff; border-color: #d8e0ea; }
html.io-light body.io-unified .footer-terms .io-legal-card section h2 { color: #9a6b1c; }
@media (max-width: 640px) { .footer-terms .io-legal-card section { padding: 0.9rem; } }
.footer-dialog-close { position: absolute; top: 0.6rem; right: 0.8rem; padding: 0.35rem; }
.io-scroll-top {
    position: fixed !important;
    right: 1rem !important;
    bottom: 3rem !important;
    z-index: 90 !important;
    display: grid !important;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    padding: 0.75rem !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: var(--io-accent) !important;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.25);
    transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
}
.io-scroll-top:hover { background: var(--io-accent) !important; transform: translateY(-2px); }
.io-scroll-top.is-hidden { display: none !important; }

html,
body,
* {
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body.io-unified {
    color: var(--io-ink);
    background: var(--io-deep) !important;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body[data-shell-page="messages"],
body[data-shell-page="cgu"] { margin: 0; }
body.io-unified #auth-modal.global-messages-host { z-index: 120 !important; background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

body.io-unified :is(input, select, textarea) {
    background-color: var(--io-surface-soft);
    border: 1px solid var(--io-line);
    color: var(--io-ink);
}

body.io-unified :is(button, a, input, select, textarea) {
    border-radius: var(--io-radius);
}

body.io-unified :is(button, a):focus-visible {
    outline: 2px solid var(--io-accent);
    outline-offset: 2px;
}

.io-global-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    min-height: 52px;
    background: var(--io-surface) !important;
    border-color: var(--io-line) !important;
    box-shadow: 0 8px 24px rgba(2, 8, 23, 0.18);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
html:not(.io-light) body.io-unified .io-global-header,
html:not(.io-light) body.io-unified .io-global-header > div:first-child,
html:not(.io-light) body.io-unified .io-global-header .io-app-nav,
html:not(.io-light) body.io-unified .io-global-header .io-kralaide-nav {
    background: var(--io-deep) !important;
    background-image: none !important;
}
html.io-light body.io-unified .io-global-header,
html.io-light body.io-unified .io-global-header > div:first-child,
html.io-light body.io-unified .io-global-header .io-app-nav,
html.io-light body.io-unified .io-global-header .io-kralaide-nav {
    background: #ffffff !important;
    background-image: none !important;
}
body.io-unified #global-header {
    position: sticky;
    top: 0;
    z-index: 60;
}
body.io-unified #global-header + iframe,
body.io-unified #global-header + .io-messages-page-frame {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
}

.io-global-header img { max-width: 100%; }
.io-global-header > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.io-global-header > div:first-child > div { display: flex; align-items: center; min-width: 0; }
.io-global-header > div:first-child > div:first-child > a > img { width: 40px; height: 40px; }
.io-global-header .io-game-trigger img { width: 24px; height: 24px; object-fit: contain; }
.io-global-header .io-context-badge { width: 22px; height: 22px; object-fit: contain; }
.io-global-header .io-context-badge[role="button"] { cursor: pointer; }

.io-global-header .io-global-link,
.io-global-header .io-global-control {
    min-height: var(--io-control-height);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.7rem;
    color: var(--io-muted);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
    .io-global-header .io-global-select {
        min-height: var(--io-control-height);
        max-width: 8rem;
        border: 1px solid var(--io-line);
        border-radius: var(--io-radius);
        background: var(--io-surface-soft);
        color: var(--io-ink);
        padding: 0 0.45rem;
        font-size: 0.72rem;
        font-weight: 800;
    }

.io-game-choice {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.2rem;
    min-height: 2.65rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.io-game-choice:hover,
.io-game-choice.is-active {
    background: var(--io-accent-soft);
    border-color: var(--io-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--io-accent) 20%, transparent);
}

.io-server-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: var(--io-control-height);
    padding: 0 0.45rem;
    border: 0;
    border-radius: 9px;
    background: var(--io-accent-soft);
    color: var(--io-ink);
    font-size: 0.72rem;
    font-weight: 900;
}

.io-server-select {
    display: none;
    min-width: 5.2rem;
    max-width: 7rem;
    appearance: none;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    cursor: pointer;
}

.io-server-control .io-context-badge { width: 1.5rem; height: 1.5rem; object-fit: contain; flex: 0 0 auto; }
.io-server-control .io-context-badge.hidden { display: none !important; }
.io-server-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; border: 0; background: transparent; color: inherit; font-size: 0.72rem; font-weight: 900; cursor: pointer; }
.io-server-control.is-empty #io-server-label { display: inline; }
.io-server-control.is-empty .io-server-trigger::after { content: none; }
.io-server-menu { position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 100; width: 15rem; max-height: 22rem; overflow-y: auto; padding: 0.35rem; border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-surface); box-shadow: 0 18px 45px rgba(2, 8, 23, 0.28); }
.io-server-menu.hidden { display: none !important; }
.io-server-option { display: flex; width: 100%; align-items: center; gap: 0.55rem; padding: 0.55rem; border: 0; border-radius: 9px; background: transparent; color: var(--io-ink); text-align: left; font-size: 0.75rem; font-weight: 800; cursor: pointer; }
.io-server-option:hover, .io-server-option.is-active { background: var(--io-accent-soft); }
.io-server-option img { width: 1.8rem; height: 1.8rem; border-radius: 999px; object-fit: cover; }
.io-server-option img.io-server-game-mini { width: 1rem; height: 1rem; border-radius: 4px; object-fit: contain; margin-right: -0.2rem; }
.io-server-option-info { display: grid; min-width: 0; gap: 0.18rem; }
.io-server-option-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-server-badges { display: flex; flex-wrap: wrap; gap: 0.18rem; }
.io-server-count { margin-left: auto; flex-shrink: 0; font-size: 0.65rem; font-weight: 800; opacity: 0.75; white-space: nowrap; }
.io-server-badge { display: inline-flex; padding: 0.12rem 0.32rem; border-radius: 999px; font-size: 0.52rem; font-weight: 900; line-height: 1; }
.io-server-badge-classic { background: #fbefd2; color: #9a6b12; }
.io-server-badge-pioneer { background: #dcfce7; color: #15803d; }
.io-server-badge-mono { background: #fef3c7; color: #92400e; }
.io-server-badge-hero { background: #fee2e2; color: #b91c1c; }
.io-server-badge-international { background: #ede9fe; color: #6d28d9; }
.io-server-empty { padding: 0.8rem; color: var(--io-muted); font-size: 0.72rem; text-align: center; }

.io-global-header .io-global-link:hover,
.io-global-header .io-global-control:hover {
    color: var(--io-ink);
    background: var(--io-accent-soft);
}

.io-global-header .io-global-nav {
    background: rgba(8, 15, 28, 0.48);
    border-top: 1px solid var(--io-line);
}

.io-global-header .io-global-nav > :is(a, button) {
    min-height: 36px;
    border-radius: 8px;
}

.io-global-header nav a,
.io-global-header nav button { border-radius: 8px; }

.io-app-nav {
    border-top: 1px solid var(--io-line);
    background: rgba(8, 15, 28, 0.64);
}

.io-app-nav-inner {
    display: flex;
    gap: 0.4rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.35rem 0.5rem;
    overflow-x: auto;
}

.io-app-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--io-muted);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.io-app-link img { width: 1.2rem; height: 1.2rem; object-fit: contain; }
.io-app-link.io-hidden { display: none; }
.io-messages-app-tab { margin-left: auto; }
.io-app-link:hover, .io-app-link.is-active { color: var(--io-ink); background: var(--io-accent-soft); border-color: var(--io-line); }
.io-global-nav {
    border-top: 1px solid var(--io-line);
    background: rgba(8, 15, 28, 0.64);
}
.io-global-nav-inner {
    display: flex;
    gap: 0.4rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.35rem 0.5rem;
    overflow-x: auto;
}
.io-global-nav .tab-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent !important;
    color: var(--io-muted) !important;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}
.io-global-nav .tab-btn:hover,
.io-global-nav .tab-btn.bg-amber-500 {
    border-color: var(--io-line);
    background: var(--io-accent-soft) !important;
    color: var(--io-ink) !important;
}
.server-filter-bar {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    overflow-x: auto;
    margin-top: -0.75rem;
    padding: 0.25rem 0;
}
.server-filter-bar .btn-filtre {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--io-muted);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}
.server-filter-bar .btn-filtre img { width: 1.25rem; height: 1.25rem; object-fit: contain; }
.server-filter-bar .btn-filtre:not(.is-active) { opacity: 0.55; filter: grayscale(0.6); }
.server-filter-bar .btn-filtre:hover {
    border-color: var(--io-line);
    background: var(--io-accent-soft);
    color: var(--io-ink);
    opacity: 1;
}
.server-filter-bar .btn-filtre.is-active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.22);
    color: #fff;
    box-shadow: 0 0 0 1px #f59e0b, 0 0 12px rgba(245, 158, 11, 0.35);
}
.srv-card {
    position: relative;
    display: block;
    min-height: 145px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--io-line);
    border-radius: 16px;
    background: var(--io-surface);
    color: var(--io-ink);
    text-decoration: none;
}
.srv-card-image,
.srv-card-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.srv-card > img.srv-card-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center 15%;
    transform: scale(1.06);
    transition: transform 0.25s ease;
}
.srv-card:hover > img.srv-card-image {
    transform: scale(1.12);
}
.srv-card-shade { background: linear-gradient(to bottom, rgba(2, 8, 23, .08) 15%, rgba(2, 8, 23, .84) 100%); }
.srv-card-warning { position: absolute; top: .55rem; left: .6rem; z-index: 2; color: #f59e0b; font-size: 1.05rem; line-height: 1; }
.srv-card-badges { position: absolute; top: .45rem; right: .45rem; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.srv-card-badges > div { position: static !important; align-items: flex-end; }
.srv-card-badges > span { position: static !important; }
.srv-card-name { position: absolute; bottom: .6rem; left: .65rem; z-index: 2; max-width: calc(100% - 3rem); color: #fff; font-size: .9rem; font-weight: 900; line-height: 1.1; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.srv-card-game { position: absolute; right: .55rem; bottom: .45rem; z-index: 2; width: 1.7rem !important; height: 1.7rem !important; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8)); }
.srv-card:hover { border-color: var(--io-accent); transform: translateY(-3px); }
.srv-view-toggle { margin-left: auto; display: inline-flex; gap: .25rem; }
.srv-view-toggle button { min-height: 2rem; padding: 0 .6rem; border: 1px solid var(--io-line); border-radius: 10px; color: var(--io-muted); font-size: .8rem; font-weight: 800; }
.srv-view-toggle button.is-active { border-color: var(--io-accent); color: var(--io-ink); }
#container-discord-serveurs.is-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; gap: 1rem !important; }
#container-discord-serveurs.is-compact .srv-card { display: flex; align-items: center; gap: .7rem; min-height: 0; aspect-ratio: auto; padding: .4rem .7rem; border-radius: 12px; }
#container-discord-serveurs.is-compact .srv-card:hover { transform: none; }
#container-discord-serveurs.is-compact .srv-card > img.srv-card-image { position: static; width: 3rem !important; height: 3rem !important; flex: none; border-radius: 10px; object-fit: contain; object-position: center; background: #1e293b; padding: 2px; transform: none; }
#container-discord-serveurs.is-compact .srv-card-shade { display: none; }
#container-discord-serveurs.is-compact .srv-card-name { position: static; order: 2; flex: 1; max-width: none; font-size: .9rem; }
#container-discord-serveurs.is-compact .srv-card-badges { position: static; order: 3; flex-direction: row; }
#container-discord-serveurs.is-compact .srv-card-game { position: static; order: 4; width: 1.3rem !important; height: 1.3rem !important; }
#container-discord-serveurs.is-compact .srv-card-warning { position: static; order: 3; }
.srv-card.is-unavailable { cursor: pointer; filter: grayscale(1); opacity: .55; }
.srv-card.is-unavailable:hover { opacity: .8; border-color: #f59e0b; }
.io-context-badge, .io-auth-avatar { width: 1.35rem; height: 1.35rem; object-fit: contain; border-radius: 999px; flex: 0 0 auto; }
.io-auth-avatar { border: 1px solid var(--io-line); }
.io-control-symbol { font-size: 1rem; line-height: 1; }
.io-brand-stack { display: flex; flex-direction: column; min-width: 0; }
.io-game-trigger { display: inline-flex; align-items: center; gap: 0.35rem; min-height: var(--io-control-height); margin-right: 0.45rem; padding: 0 0.45rem; border: 0; border-radius: 9px; background: var(--io-accent-soft); color: var(--io-ink); font-size: 0.72rem; font-weight: 900; cursor: pointer; flex: 0 0 auto; }
.io-game-trigger img { width: 1.5rem; height: 1.5rem; object-fit: contain; }
.io-game-control { position: relative; display: inline-flex; flex: 0 0 auto; }
.io-game-menu { width: 13rem; }
.io-game-menu .io-server-option img { width: 1.75rem; height: 1.75rem; object-fit: contain; }
.io-conversation-menu { position: fixed; z-index: 100; width: min(22rem, calc(100vw - 1rem)); overflow: hidden; border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-surface); color: var(--io-ink); box-shadow: 0 18px 45px rgba(2, 8, 23, 0.28); }
.io-conversation-title { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--io-line); font-size: 0.8rem; font-weight: 900; }
.io-conversation-list { max-height: min(22rem, 60vh); overflow-y: auto; padding: 0.35rem; }
.io-conversation-list button { display: flex; width: 100%; align-items: center; gap: 0.55rem; padding: 0.6rem; border-radius: 9px; color: inherit; text-align: left; font-size: 0.75rem; font-weight: 800; }
.io-conversation-list button:hover { background: var(--io-accent-soft); }
.io-conversation-avatar { display: inline-grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 999px; background: var(--io-accent-soft); color: var(--io-accent); font-size: 0.7rem; font-weight: 900; }
.io-conversation-empty { padding: 1rem; color: var(--io-muted); font-size: 0.75rem; text-align: center; }
.io-messages-panel { position: fixed; left: 0; right: 0; bottom: 2.6rem; z-index: 90; max-height: calc(100vh - 10.6rem); overflow: auto; border-bottom: 1px solid var(--io-line); background: var(--io-surface); box-shadow: 0 18px 35px rgba(2, 8, 23, 0.25); }
.io-messages-panel iframe { display: block; width: 100%; height: min(520px, calc(100vh - 10.6rem)); min-height: 280px; border: 0; }
.io-messages-page-frame { display: block; width: 100%; height: calc(100vh - 10rem); min-height: 420px; border: 0; }
.io-legal-page { min-height: calc(100vh - 9rem); padding: 2rem 1rem 6rem; }
.io-legal-card { max-width: 52rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--io-line); border-radius: 16px; background: var(--io-surface); color: var(--io-ink); box-shadow: 0 18px 45px rgba(2, 8, 23, .18); }
.io-legal-eyebrow { margin: 0 0 .4rem; color: var(--io-accent); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.io-legal-card h1 { margin: 0 0 1.5rem; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 950; }
.io-legal-card h2 { margin: 1.4rem 0 .5rem; font-size: 1.05rem; font-weight: 900; }
.io-legal-card p { margin: .65rem 0; color: var(--io-muted); line-height: 1.65; }
body[data-shell-page="messages"] #io-kralaide-nav { display: none !important; }
body[data-shell-page="cgu"] #io-kralaide-nav { display: none !important; }
#io-auth-modal { align-items: center; justify-content: center; }

.io-portal-nav {
    border-top: 1px solid var(--io-line);
    background: rgba(8, 15, 28, 0.48);
}

.io-portal-nav-inner {
    display: flex;
    gap: 0.35rem;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.35rem 0.5rem;
    overflow-x: auto;
}

.io-portal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0 0.75rem;
    border-radius: 8px;
    color: var(--io-muted);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.io-portal-link:hover { color: var(--io-ink); background: var(--io-accent-soft); }

.io-kralaide-nav { border-top: 1px solid var(--io-line); background: rgba(8, 15, 28, 0.36); }
.io-kralaide-nav-inner { display: flex; gap: 0.35rem; max-width: 80rem; margin: 0 auto; padding: 0.3rem 0.5rem; overflow-x: auto; }
.io-kralaide-nav button { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 1.9rem; padding: 0 0.7rem; border-radius: 8px; color: var(--io-muted); font-size: 0.72rem; font-weight: 800; white-space: nowrap; }
.io-kralaide-nav button:hover, .io-kralaide-nav button.is-active { color: var(--io-ink); background: var(--io-accent-soft); }

html.io-light body.io-unified {
    --io-ink: #172033;
    --io-muted: #526174;
    --io-deep: #ffffff;
    --io-surface: rgba(255, 255, 255, 0.94);
    --io-surface-soft: rgba(241, 246, 251, 0.96);
    --io-line: rgba(71, 85, 105, 0.2);
    --io-accent: #9a6b12;
    --io-accent-soft: rgba(154, 107, 18, 0.12);
    background: var(--io-deep) !important;
    color: var(--io-ink) !important;
}

html.io-light body.io-unified .io-app-nav { background: rgba(255, 255, 255, 0.8); }
html.io-light body.io-unified .io-global-nav { background: rgba(255, 255, 255, 0.8); }
html.io-light body.io-unified .io-portal-nav { background: rgba(255, 255, 255, 0.66); }
html.io-light body.io-unified .io-kralaide-nav { background: rgba(255, 255, 255, 0.48); }
html.io-light body.io-unified footer,
html.io-light body.io-unified .io-global-footer {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: #d8e0ea !important;
    color: #526174 !important;
}
html.io-light body.io-unified footer a,
html.io-light body.io-unified footer button,
html.io-light body.io-unified .io-global-footer a,
html.io-light body.io-unified .io-global-footer button { color: #475569 !important; }
html.io-light body.io-unified footer a:hover,
html.io-light body.io-unified footer button:hover,
html.io-light body.io-unified .io-global-footer a:hover,
html.io-light body.io-unified .io-global-footer button:hover { color: #0f766e !important; }
html.io-light body.io-unified .io-global-nav { background: rgba(255, 255, 255, 0.72) !important; border-color: #d8e0ea !important; }
html.io-light body.io-unified .io-global-nav .tab-btn[class*="bg-slate-800"] { background: #ffffff !important; color: #475569 !important; }
html.io-light body.io-unified .io-global-nav .tab-btn[class*="bg-slate-800"]:hover { background: #e2e8f0 !important; color: #0f172a !important; }
html.io-light body.io-unified .io-global-header > div:first-child > div:last-child > div { background: rgba(255, 255, 255, 0.88) !important; border-color: #d8e0ea !important; color: #475569 !important; }

html.io-light body.io-unified .glass-panel,
html.io-light body.io-unified [class*="bg-[#2D2825]"],
html.io-light body.io-unified [class*="bg-[#1a1715]"] {
    background-color: #ffffff !important;
    color: #172033 !important;
}

html.io-light body.io-unified [class*="border-[#4A3525]"] {
    border-color: #d6dee8 !important;
}

html.io-light body.io-unified [class*="text-[#D1C7B3]"],
html.io-light body.io-unified [class*="text-white"] {
    color: #334155 !important;
}

/* Les bannières colorées de Kral'Aide (vert, rouge...) gardent un texte blanc lisible */
html.io-light body.io-unified #app [class*="text-white"] {
    color: #ffffff !important;
}
html.io-light body.io-unified #app #main-view-container button[class*="dark:text-white"] {
    color: #475569 !important;
}
html.io-light body.io-unified #app #main-view-container button[class*="text-[#E3000F]"] {
    color: #e3000f !important;
}
html.io-light body.io-unified #app #main-view-container .kralaide-presentation h1,
html.io-light body.io-unified #app #main-view-container .kralaide-presentation h2 {
    color: #172033 !important;
}
html.io-light body.io-unified #app #main-view-container .kralaide-presentation p {
    color: #475569 !important;
}
html.io-light body.io-unified #app #main-view-container .kralaide-presentation strong {
    color: #0f766e !important;
}
body.io-unified #auth-modal [class*="bg-[#E3000F]"],
body.io-unified #auth-modal [class*="bg-red-600"] {
    background: var(--io-surface) !important;
    background-image: none !important;
    border-color: var(--io-line) !important;
    color: var(--io-ink) !important;
}
body.io-unified #auth-modal [class*="bg-[#E3000F]"] h2,
body.io-unified #auth-modal [class*="bg-[#E3000F]"] button,
body.io-unified #auth-modal [class*="bg-red-600"] h2,
body.io-unified #auth-modal [class*="bg-red-600"] button {
    color: var(--io-ink) !important;
}
html.io-light body.io-unified #auth-modal [class*="bg-[#E3000F]"],
html.io-light body.io-unified #auth-modal [class*="bg-red-600"] {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
    color: #172033 !important;
}
html.io-light body.io-unified #app #kralamour-direct-view [class~="text-white"] {
    color: #172033 !important;
}
html.io-light body.io-unified #app #kralamour-direct-view .placement-turn-button.bg-kralaide-primary,
html.io-light body.io-unified #app #kralamour-direct-view .placement-turn-button.bg-kralaide-primary [class~="text-white"] {
    color: #ffffff !important;
}

html.io-light body.io-unified main [class*="bg-slate-950"],
html.io-light body.io-unified main [class*="bg-slate-900"],
html.io-light body.io-unified main [class*="bg-slate-800"] {
    background-color: #ffffff !important;
}

html.io-light body.io-unified main [class*="border-slate-800"],
html.io-light body.io-unified main [class*="border-slate-700"] {
    border-color: #d8e0ea !important;
}

html.io-light body.io-unified main [class*="text-slate-300"],
html.io-light body.io-unified main [class*="text-slate-400"],
html.io-light body.io-unified main [class*="text-slate-200"] {
    color: #475569 !important;
}

html.io-light body.io-unified main [class*="hover\\:bg-slate-700"]:hover,
html.io-light body.io-unified main [class*="hover\\:bg-blue-600"]:hover {
    color: #0f172a !important;
}

html.io-light body.io-unified #io-auth-modal > div {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
    color: #172033 !important;
}

html.io-light body.io-unified #io-auth-modal input,
html.io-light body.io-unified #io-auth-modal textarea,
html.io-light body.io-unified #io-auth-modal select {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #172033 !important;
}

html.io-light body.io-unified #io-auth-modal [class*="bg-slate-950"] { background: #eef2f7 !important; }
html.io-light body.io-unified #io-auth-modal [class*="bg-slate-800"],
html.io-light body.io-unified #io-auth-modal [class*="bg-slate-700"] { background: #e2e8f0 !important; color: #172033 !important; }
html.io-light body.io-unified #io-auth-modal [class*="bg-sky-700"] { background: #9a6b12 !important; color: #ffffff !important; }

html.io-light body.io-unified #contactModal > div,
html.io-light body.io-unified #suggestModal > div {
    background: #ffffff !important;
    border-color: #d8e0ea !important;
    color: #172033 !important;
}

html.io-light body.io-unified #contactModal input,
html.io-light body.io-unified #contactModal textarea,
html.io-light body.io-unified #suggestModal input {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #172033 !important;
}

html.io-light body.io-unified #contactModal [class*="text-white"],
html.io-light body.io-unified #suggestModal [class*="text-white"] { color: #172033 !important; }
html.io-light body.io-unified #io-auth-modal [class*="text-slate-400"],
html.io-light body.io-unified #io-auth-modal [class*="text-slate-200"] { color: #526174 !important; }

@media (max-width: 640px) {
    .io-global-header > div:first-child { flex-wrap: wrap; min-width: 0; }
    .io-global-header > div:first-child > div { min-width: 0; }
    .io-global-header .io-brand-stack { display: none; }
    .io-global-header .io-global-link,
    .io-global-header .io-global-control { padding: 0 0.55rem; }
    .io-global-header .io-global-label { display: none; }
        .io-global-header .io-global-select { max-width: 5.5rem; font-size: 0.65rem; }
        .io-control-label { display: none; }
        .io-app-link { padding: 0 0.6rem; }
        .io-app-link-label { display: none; }
        .io-portal-link { padding: 0 0.55rem; }
    .io-global-header .io-game-choice { display: none; }
    .io-global-header .io-context-badge { display: none; }
    .io-global-header .io-auth-label { display: none; }
    .io-global-header .io-data-controls { gap: 0; }
    .io-global-header .io-actions-shell { gap: 0.2rem; padding: 0.15rem; border: 0; border-radius: 0; background: transparent; overflow: visible; }
    .io-global-header .io-actions-shell .io-global-control,
    .io-global-header .io-actions-shell .io-global-link { padding: 0 0.35rem; }
    .io-global-header .io-actions-shell > button,
    .io-global-header .io-actions-shell > a,
    .io-global-header .io-data-controls > button,
    .io-global-header .io-data-controls > .io-server-control { flex: 0 0 2rem; width: 2rem; min-width: 2rem; justify-content: center; }
    .io-global-header .io-data-controls { flex: 0 0 auto; gap: 0.25rem; }
    .io-global-header #io-theme-button { position: relative; z-index: 3; }
    .io-global-header .io-server-control { padding: 0 0.3rem; }
    .io-global-header .io-server-select { display: none; }
    .io-global-header .io-server-control { min-width: 2rem; width: 2rem; justify-content: center; background: transparent; }
    .io-global-header .io-server-control .io-context-badge { position: relative; z-index: 1; width: 22px; height: 22px; }
    .io-global-header .io-server-trigger { position: absolute; inset: 0; z-index: 2; min-width: 0; width: 100%; padding: 0; background: transparent; }
    .io-global-header .io-server-trigger #io-server-label { display: none; }
    .io-global-header .io-server-control.is-empty .io-server-trigger::after { content: 'S'; font-size: 0.72rem; font-weight: 900; }
    .io-global-header .io-server-control .io-context-badge { display: block; }
    .io-global-header #io-auth-label { display: none; }
    .io-global-header .io-stat-label { display: none; }
    .io-global-nav .tab-btn { width: 2.5rem; min-width: 2.5rem; padding: 0; gap: 0; }
    .io-global-nav .io-portal-tab-label { display: none; }
    .server-filter-bar .server-filter-label { display: none; }
    .io-global-header #io-theme-button { display: none; }
    .io-global-header .io-current-context { display: block; }
    .io-global-header .io-game-trigger { width: 2rem; min-width: 2rem; padding: 0; justify-content: center; }
    .io-global-header .io-game-trigger span { display: none; }
    .io-global-header .io-game-trigger { flex: 0 0 2rem; margin-right: 0.45rem; }
    .io-global-header .io-server-control { flex: 0 0 2rem !important; }
}

.io-portal-nav.hidden { display: none; }

/* Modals du simulateur : la carte reste visible sous l'overlay dans les deux thèmes */
#entity-modal {
    z-index: 200 !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
#entity-modal > div {
    z-index: 201;
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(2, 8, 23, 0.5) !important;
}
#entity-modal h3 { color: var(--io-accent) !important; }
#entity-modal button[data-action^="place"] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
#entity-modal button[data-action="close-entity"] { color: #94a3b8 !important; }
.io-check-input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.05rem;
    border: 2px solid #475569;
    border-radius: 0.4rem;
    background: #0f172a;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.io-check-input::after {
    content: "";
    width: 0.3rem;
    height: 0.6rem;
    border: solid #0b1220;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .15s;
}
.io-check-input:checked { background: #d9a441; border-color: #d9a441; }
.io-check-input:checked::after { transform: rotate(45deg) scale(1); }
.io-check-input:focus-visible { box-shadow: 0 0 0 3px rgba(56, 189, 248, .35); }
#legend-modal,
#settings-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
#legend-modal > div,
#settings-modal > div {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(2, 8, 23, 0.5) !important;
}
#legend-modal h3,
#settings-modal h3 { color: var(--io-accent) !important; }
#settings-modal select {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.io-light body.io-unified #legend-modal,
html.io-light body.io-unified #settings-modal,
html.io-light body.io-unified #entity-modal {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
html.io-light body.io-unified #legend-modal > div,
html.io-light body.io-unified #settings-modal > div,
html.io-light body.io-unified #entity-modal > div {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
html.io-light body.io-unified main #legend-modal,
html.io-light body.io-unified main #settings-modal,
html.io-light body.io-unified main #entity-modal {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}
html.io-light body.io-unified main #legend-modal > div,
html.io-light body.io-unified main #settings-modal > div,
html.io-light body.io-unified main #entity-modal > div {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(2, 8, 23, 0.5) !important;
}
html.io-light body.io-unified #view-container #legend-modal,
html.io-light body.io-unified #view-container #settings-modal,
html.io-light body.io-unified #view-container #entity-modal {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}
html.io-light body.io-unified #view-container #legend-modal > div,
html.io-light body.io-unified #view-container #settings-modal > div,
html.io-light body.io-unified #view-container #entity-modal > div {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(2, 8, 23, 0.5) !important;
}
html.io-light body.io-unified #view-container #entity-modal {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
html.io-light body.io-unified #view-container #entity-modal > div {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2) !important;
}

/* Modals d'entraînement : fond vide et panneau thémé */
#training-success-modal,
#training-result-modal,
#training-leaderboard-modal,
#training-threshold-modal {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
#training-success-modal,
#training-result-modal,
 #training-leaderboard-modal > div,
#training-threshold-modal > div {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
html.io-light body.io-unified #training-success-modal,
html.io-light body.io-unified #training-result-modal,
html.io-light body.io-unified #training-leaderboard-modal,
html.io-light body.io-unified #training-threshold-modal {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
html.io-light body.io-unified #training-success-modal,
html.io-light body.io-unified #training-result-modal,
html.io-light body.io-unified #training-leaderboard-modal > div,
html.io-light body.io-unified #training-threshold-modal > div {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #172033 !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2) !important;
}
html.io-light body.io-unified #view-container #training-threshold-modal,
html.io-light body.io-unified #view-container #training-leaderboard-modal {
    background-color: transparent !important;
    background-image: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}
html.io-light body.io-unified #view-container #entity-modal > div button[data-action^="place"] {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}



/* Style universel des barres d'onglets */
body.io-tabs-hidden :is(.io-app-nav, .io-global-nav, #sidebar-guide, .io-kralaide-nav),
body.io-tabs-hidden #app-root > header.glass-panel {
    display: none !important;
}
.kralamour-subtabs.io-tabs-hidden { display: none !important; }
.io-global-header {
    box-shadow: none !important;
    border-bottom: 0 !important;
    overflow: visible !important;
    isolation: isolate;
}
#global-header,
#global-header .io-global-header,
.io-server-control,
.io-game-control {
    position: relative;
    z-index: 1000 !important;
}
.io-server-menu {
    z-index: 1100 !important;
}
:is(.io-app-nav, .io-global-nav, .io-kralaide-nav) {
    min-height: 43.2px;
    border-top: 1px solid var(--io-line);
    border-bottom: 0 !important;
    background: var(--io-deep) !important;
    background-image: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    isolation: isolate;
}
body.io-unified #app-root > header.glass-panel {
    border-bottom: 0 !important;
    background: var(--io-deep) !important;
    opacity: 1 !important;
    overflow: clip;
    isolation: isolate;
}
:is(.io-app-nav-inner, .io-global-nav-inner, .io-kralaide-nav-inner) {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 80rem;
    margin: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0.35rem 0.5rem;
    overflow-x: auto;
    justify-content: flex-start;
}
.io-app-nav-inner, body.io-unified .io-global-nav-inner {
    justify-content: center;
    margin-left: auto !important;
    margin-right: auto !important;
}
:is(.io-app-link, .io-global-nav .tab-btn, .io-kralaide-nav button) {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent !important;
    color: var(--io-muted) !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
:is(.io-app-link svg, .io-global-nav .tab-btn svg, .io-kralaide-nav button svg, .io-kralaide-nav button i) {
    display: inline-flex;
    flex: 0 0 1rem;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    vertical-align: middle;
}
:is(.io-app-link, .io-global-nav .tab-btn, .io-kralaide-nav button):hover,
:is(.io-app-link.is-active, .io-global-nav .tab-btn.bg-amber-500, .io-kralaide-nav button.is-active) {
    border-color: var(--io-line);
    background: var(--io-accent-soft) !important;
    color: var(--io-ink) !important;
}

.io-kralaide-nav button[data-kralaide-tab="concept"] {
    width: 8.35rem;
    min-width: 8.35rem;
    max-width: 8.35rem;
    min-height: 2rem;
    padding-inline: 0.8rem;
}

html.io-light body.io-unified :is(.io-app-nav, .io-global-nav, .io-kralaide-nav) {
    background: #ffffff !important;
    background-image: none !important;
    border-color: #d8e0ea !important;
    box-shadow: none !important;
}
html.io-light body.io-unified #app-root > header.glass-panel {
    background: #ffffff !important;
}
html.io-light body.io-unified :is(.io-app-link, .io-global-nav .tab-btn, .io-kralaide-nav button):hover,
html.io-light body.io-unified :is(.io-app-link.is-active, .io-global-nav .tab-btn.bg-amber-500, .io-kralaide-nav button.is-active) {
    background: #e0f2fe !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

@media (max-width: 767px) {
    :is(.io-app-link-label, .io-portal-tab-label, .io-kralaide-nav button span) {
        display: none !important;
    }
    :is(.io-app-link, .io-global-nav .tab-btn, .io-kralaide-nav button) {
        min-width: 2.5rem;
        width: 2.5rem;
        height: 2rem;
        min-height: 2rem;
        padding-inline: 0 !important;
        gap: 0 !important;
    }
    .io-kralaide-nav button[data-kralaide-tab="concept"] {
        width: 2.5rem !important;
        min-width: 2.5rem !important;
        max-width: 2.5rem !important;
        height: 2rem !important;
        min-height: 2rem !important;
        padding-inline: 0 !important;
    }
}

/* Marge de navigation fluide (rail latéral / barre basse mobile) */
body.io-rail-on :is(.io-kralaide-nav, .io-stats-quick-nav),
body.io-rail-on #app-root > header.glass-panel { display: none !important; }
.io-rail { display: none; }
body.io-rail-on .io-global-header { border-bottom: 1px solid var(--io-line) !important; }
body.io-rail-on:not(.io-tabs-hidden) .io-rail {
    position: fixed; z-index: 900; display: flex; flex-direction: column; gap: 0.6rem;
    left: 0; top: 0; bottom: 0; width: 3.5rem;
    padding: 0.6rem 0.4rem; overflow: hidden auto;
    background: var(--io-deep); border-right: 1px solid var(--io-line);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s;
}
body.io-rail-on:not(.io-tabs-hidden) { padding-left: 4.25rem; }
body.io-rail-on:not(.io-tabs-hidden) .io-rail:is(:hover, :focus-within) { width: 13.5rem; box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35); }
.io-rail-group { display: flex; flex-direction: column; gap: 0.25rem; }
.io-rail-group + .io-rail-group { padding-top: 0.6rem; border-top: 1px solid var(--io-line); }
.io-rail-item {
    position: relative; display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 2.5rem;
    padding: 0 0.6rem; border: 1px solid transparent; border-radius: 10px; background: transparent;
    color: var(--io-muted); font-size: 0.78rem; font-weight: 800; white-space: nowrap; cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.io-rail-item:hover, .io-rail-item:focus-visible { background: var(--io-accent-soft); color: var(--io-ink); }
.io-rail-item:active { transform: scale(0.96); }
.io-rail-item.is-active { border-color: var(--io-line); background: var(--io-accent-soft); color: var(--io-ink); }
.io-rail-item.is-active::before { content: ""; position: absolute; left: -0.4rem; top: 25%; bottom: 25%; width: 3px; border-radius: 3px; background: var(--io-accent, #f59e0b); }
.io-rail-icon { display: inline-flex; flex: 0 0 1.25rem; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; }
.io-rail-icon :is(img, svg, i) { width: 1.25rem; height: 1.25rem; object-fit: contain; font-size: 1rem; line-height: 1.25rem; text-align: center; }
.io-rail-label { overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.2s; }
.io-rail:is(:hover, :focus-within) .io-rail-label { opacity: 1; }
html.io-light body.io-unified .io-rail { background: #ffffff; border-color: #d8e0ea; }
html.io-light body.io-unified .io-rail-item:is(:hover, .is-active) { background: #e0f2fe; color: #0f172a; }

@media (max-width: 767px) {
    body.io-rail-on:not(.io-tabs-hidden) { padding-left: 3.25rem; }
    body.io-rail-on:not(.io-tabs-hidden) .io-rail { width: 2.75rem; padding: 0.5rem 0.25rem; gap: 0.5rem; }
    body.io-rail-on:not(.io-tabs-hidden) .io-rail:is(:hover, :focus-within) { width: 11.5rem; }
    .io-rail-item { min-height: 2.5rem; padding: 0 0.5rem; }
    .io-rail-item.is-active::before { left: -0.25rem; }
}
/* Le bouton ☰ agrandit la marge de navigation (au lieu de la masquer) */
body.io-rail-on.io-rail-open .io-rail { width: 13.5rem !important; box-shadow: 8px 0 24px rgba(0, 0, 0, 0.35); }
body.io-rail-open .io-rail .io-rail-label { opacity: 1; }
@media (max-width: 767px) {
    body.io-rail-on.io-rail-open .io-rail { width: 12.5rem !important; }
}
/* Aide « visite » */
.io-stat-metric > div { position: relative; }
.io-visit-info { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; margin-left: 0.35rem; border: 1px solid #f59e0b; border-radius: 50% !important; background: transparent; color: #f59e0b; font-size: 0.7rem; font-weight: 900; line-height: 1; vertical-align: middle; cursor: pointer; }
.io-visit-info:hover { background: rgba(245, 158, 11, 0.2); }
.io-visit-dialog { position: fixed; inset: 0; width: min(26rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); margin: auto; padding: 1.25rem; border: 1px solid var(--io-line); border-radius: 0.9rem; background: var(--io-surface, #121d2e); color: var(--io-ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.io-visit-dialog::backdrop { background: rgba(2, 6, 23, 0.7); }
.io-visit-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.io-visit-dialog-header h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.io-visit-dialog-header button { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--io-line); border-radius: 0.5rem; color: var(--io-muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.io-visit-dialog-header button:hover { background: var(--io-accent-soft); color: var(--io-ink); }
.io-visit-dialog p { margin: 1rem 0 0; color: var(--io-muted); font-size: 0.875rem; line-height: 1.5; }
/* Jeu et serveur : uniquement utiles dans Kral'Aide */
html:not(.io-kralaide-page) :is(.io-game-control, .io-server-control) { display: none !important; }

.io-destination-time { display:block; color:#94a3b8; font-size:.72rem; font-weight:700; margin-top:2px; }

/* Onglets principaux dans le header : segmenté, icônes seules sur mobile */
body.io-unified .io-app-nav { padding: 0.4rem 0.5rem; border-top: 0 !important; }
body.io-unified .io-app-nav-inner {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.25rem;
    width: 100%; max-width: 80rem; margin: 0 auto; padding: 0.25rem; overflow: visible;
    border-radius: 12px; background: var(--io-surface, rgba(18, 29, 46, 0.94));
}
body.io-unified .io-app-link { width: 100%; min-width: 0; min-height: 2.5rem; gap: 0.45rem; border: 0; font-size: 0.8rem; transition: background .2s, color .2s, box-shadow .2s; }
body.io-unified .io-app-link img, body.io-unified .io-app-link svg { width: 1.3rem; height: 1.3rem; flex: 0 0 1.3rem; object-fit: contain; }
body.io-unified .io-app-link:hover { background: rgba(201, 151, 58, 0.12) !important; }
body.io-unified .io-app-link.is-active { background: rgba(68, 50, 24, 0.95) !important; color: var(--io-accent, #d9a441) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); border: 0; }
body.io-unified .io-app-link.io-hidden { display: none; }
html.io-light body.io-unified .io-app-nav-inner { background: #eef2f7; }
html.io-light body.io-unified .io-app-link.is-active { background: #ffffff !important; box-shadow: 0 1px 4px rgba(15, 23, 42, 0.15); }
@media (max-width: 767px) {
    body.io-unified .io-app-link { width: 100% !important; min-width: 0 !important; height: 2.4rem; }
}
/* (!) en haut à droite de la carte Visites totales */
.io-stat-metric:has(.io-visit-info) { position: relative; }
.io-stat-metric .io-visit-info { position: absolute; top: 0.4rem; right: 0.4rem; margin: 0; }
/* Lien utile : un seul onglet, avec une barre Fansites / Serveurs / Classes */
#btn-statistiques { display: none !important; }
body.io-stats-view .io-global-nav { display: none !important; }
body.io-unified .io-global-nav { padding: 0.4rem 0.5rem; border-top: 0 !important; }
body.io-unified .io-global-nav-inner {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.25rem;
    width: 100%; max-width: 80rem; margin: 0 auto; padding: 0.25rem; overflow: visible;
    border-radius: 12px; background: var(--io-surface, rgba(18, 29, 46, 0.94));
}
body.io-unified .io-global-nav .tab-btn { width: 100%; min-width: 0; min-height: 2.5rem; border: 0; font-size: 0.8rem; }
body.io-unified .io-global-nav .tab-btn.bg-amber-500 { background: rgba(68, 50, 24, 0.95) !important; color: var(--io-accent, #d9a441) !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
html.io-light body.io-unified .io-global-nav-inner { background: #eef2f7; }
html.io-light body.io-unified .io-global-nav .tab-btn.bg-amber-500 { background: #ffffff !important; }
@media (max-width: 767px) {
    body.io-unified .io-global-nav .tab-btn { flex-direction: column; gap: 0.15rem; width: 100% !important; min-height: 2.9rem; font-size: 0.62rem; }
    body.io-unified .io-global-nav .tab-btn i { margin: 0 !important; }
    body.io-unified .io-global-nav .io-portal-tab-label { display: block !important; }
}
/* Fenêtres Kral'Aide au premier plan, au-dessus de la marge et des headers */
#auth-modal, #io-auth-modal { z-index: 10000 !important; }
#auth-modal .manage-modal { border-radius: 1rem; max-height: 92vh; }
#auth-modal .manage-modal .io-step-card { transition: border-color .15s, background-color .15s; }
@media (max-width: 767px) { #auth-modal { padding: 0.5rem; align-items: flex-end; } #auth-modal .manage-modal { max-height: 94vh; } }

/* Menu « étapes » avec icône monstre / boss / archimonstre */
.io-step-select .io-step-caret { font-style: normal; opacity: .7; }
.io-step-menu {
    position: fixed; z-index: 10001; overflow-y: auto; padding: 0.3rem; border-radius: 12px;
    background: #1e160b; border: 1px solid rgba(201, 151, 58, 0.25); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.io-step-item {
    display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.5rem 0.6rem; border: 0; border-radius: 8px;
    background: transparent; color: #e8eef7; font-size: 0.85rem; font-weight: 700; text-align: left; cursor: pointer;
}
.io-step-item img, .io-step-item-gap { width: 1.4rem; height: 1.4rem; flex: none; object-fit: contain; }
.io-step-item:hover { background: rgba(201, 151, 58, 0.15); }
.io-step-item.is-selected { background: #15803d; color: #fff; }
html.io-light .io-step-menu { background: #fff; border-color: #d5dde8; }
html.io-light .io-step-item { color: #1f2937; }
html.io-light .io-step-item:hover { background: #eef2f7; }
html.io-light .io-step-item.is-selected { background: #15803d; color: #fff; }
/* Barre segmentée Kral'Aide, sans marge latérale */
body.io-unified .io-kralaide-nav { padding: 0.25rem 0.5rem; border-top: 0 !important; }
body.io-unified .io-kralaide-nav-inner {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.25rem;
    width: 100%; max-width: 80rem; margin: 0 auto !important; padding: 0.15rem; overflow: visible;
    border-radius: 12px; background: var(--io-surface, rgba(18, 29, 46, 0.92));
}
body.io-unified .io-kralaide-nav button { width: 100% !important; min-width: 0 !important; max-width: none !important; min-height: 2.5rem; border: 0; font-size: 0.8rem; }
body.io-unified .io-kralaide-nav button.is-active { background: var(--io-accent-soft) !important; color: var(--io-ink) !important; box-shadow: none; }
body.io-unified .io-kralaide-nav button:has(.io-nav-text) { min-height: 2rem; padding-top: 0.2rem; padding-bottom: 0.2rem; }
body.io-unified .io-kralaide-nav .io-nav-text small { display: none; }
.io-nav-text { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; text-align: left; line-height: 1.2; white-space: normal; }
.io-nav-text small { margin-top: .2rem; color: var(--io-muted); font-size: .64rem; font-weight: 500; }
@media (max-width: 767px) {
    body.io-unified .io-kralaide-nav-inner { grid-auto-columns: minmax(160px, 1fr); overflow-x: auto; }
    body.io-unified .io-kralaide-nav button { gap: .4rem !important; }
    body.io-unified .io-kralaide-nav button .io-nav-text { display: flex !important; }
}

.io-app-link-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; text-align: left; min-width: 0; }
.io-app-link-sub { font-size: 0.6rem; font-weight: 500; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 640px) { .io-app-link-sub { display: none; } }
.radar-page { display: grid; gap: .85rem; padding: 1rem 0 2rem; color: var(--io-ink); }
.radar-panel { border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-surface); }
.radar-dialog-title p { color: var(--io-muted); font-size: .8rem; }
.radar-filters { padding: 1rem; }
.radar-filter-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr); gap: .8rem; align-items: end; }
.radar-category-filter { min-width: 0; }
.radar-category-filter legend { margin-bottom: .35rem; color: var(--io-muted); font-size: .72rem; font-weight: 750; }
.radar-category-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.radar-category-button { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 38px; padding: .2rem; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-deep); color: var(--io-muted); }
.radar-category-button:hover, .radar-category-button.is-active { border-color: var(--io-accent); background: var(--io-accent-soft); color: var(--io-accent); }
.radar-category-button:focus-visible { outline: 2px solid var(--io-accent); outline-offset: 2px; }
.radar-category-icon { width: 1.8rem; height: 1.8rem; object-fit: contain; flex-shrink: 0; }
.radar-row .radar-category-caption { display: flex; align-items: center; gap: .35rem; }
.radar-category-caption .radar-category-icon { width: 1.25rem; height: 1.25rem; border-radius: .2rem; }
.io-context-filters { position: relative; z-index: 1; isolation: isolate; display: flex; flex-wrap: wrap; gap: .7rem; padding: .65rem; border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); }
.radar-filter-grid > .io-context-filters { grid-column: span 2; }
.io-context-filter { display: grid; flex: 1; min-width: 120px; gap: .35rem; }
.io-context-filter > span { color: var(--io-muted); font-size: .72rem; font-weight: 750; }
.io-panel-head { display: grid; gap: .2rem; padding: .65rem .9rem; border-bottom: 1px solid var(--io-line); background: var(--io-deep); color: var(--io-ink); }
.io-panel-head h2, .io-panel-head > strong { margin: 0; font-size: .95rem; font-weight: 850; color: inherit; }
.io-panel-head p { margin: 0; color: var(--io-muted); font-size: .72rem; font-weight: 700; }
.io-panel-head.io-panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.io-context-filters .io-game-trigger, .io-context-filters .io-server-control { width: 100%; min-height: 38px; margin: 0; }
.io-context-filters .io-server-trigger { width: 100%; justify-content: flex-start; }
.io-context-filters .io-server-menu { left: 0; right: auto; max-width: min(80vw, 280px); }
.io-context-filters .io-server-control .io-server-menu { left: auto; right: 0; }
.io-global-header :is(#io-dev-button, #io-messages-button).hidden { display: none !important; }
.radar-filter-grid label, .radar-form-grid label { display: grid; gap: .35rem; color: var(--io-muted); font-size: .72rem; font-weight: 750; }
.radar-control { width: 100%; min-width: 0; min-height: 38px; padding: .5rem .65rem; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-deep); color: var(--io-ink); font-size: .8rem; }
.radar-control:focus-visible { outline: 2px solid var(--io-accent); outline-offset: 1px; }
.radar-filter-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--io-line); color: var(--io-muted); font-size: .75rem; }
.radar-filter-footer label, .radar-filter-footer div { display: flex; align-items: center; gap: .5rem; }
.radar-filter-footer button:not(.radar-primary) { color: var(--io-accent); font-weight: 700; }
.radar-primary { padding: .65rem .9rem; border-radius: 8px; background: var(--io-accent); color: #071321; font-size: .8rem; font-weight: 800; }
html.io-light .radar-primary { color: white; }
.radar-primary:disabled, .radar-small-button:disabled { opacity: .5; cursor: wait; }
.radar-list-panel { overflow: hidden; }
.radar-list-header, .radar-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.5fr) minmax(120px, 1fr) minmax(130px, 1fr) minmax(430px, auto); align-items: center; gap: .75rem; padding: .8rem 1rem; }
.radar-list-header { background: var(--io-surface-soft); color: var(--io-muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.radar-row { border-top: 1px solid var(--io-line); font-size: .8rem; }
.radar-row.is-placed { background: rgba(180, 83, 9, .22); box-shadow: inset 4px 0 0 #b45309; }
.radar-row strong, .radar-row small { display: block; overflow-wrap: anywhere; }
.radar-row small { margin-top: .2rem; color: var(--io-muted); font-size: .7rem; }
.radar-age { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; margin-top: .45rem; padding: .3rem .55rem; border: 1px solid var(--io-accent); border-radius: 999px; background: var(--io-accent-soft); color: var(--io-accent); font-size: .75rem; font-weight: 800; line-height: 1.3; }
.radar-age svg { width: .95rem; height: .95rem; flex-shrink: 0; }
.radar-age-label { overflow-wrap: anywhere; }
.calendar-strategy-dialog { width: 95vw; max-width: 95vw; height: 95vh; height: 95dvh; max-height: 95vh; max-height: 95dvh; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); color: var(--io-ink); }
.calendar-strategy-dialog[open] { display: flex; flex-direction: column; }
.calendar-strategy-dialog::backdrop { background: rgba(2, 8, 23, .8); }
.calendar-strategy-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem .8rem; border-bottom: 1px solid var(--io-line); }
.calendar-strategy-header h2 { font-size: 1rem; font-weight: 800; }
.calendar-strategy-header button { flex-shrink: 0; }
.calendar-strategy-dialog > p, .calendar-strategy-dialog > #calendar-strategy-retry { margin: 1rem; }
.calendar-strategy-frame { flex: 1; width: 100%; min-height: 0; border: 0; }
body:has(#calendar-strategy-dialog[open]) { overflow: hidden; }
.radar-row .radar-status { color: var(--io-accent); }
.radar-author { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.radar-avatar { width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 9999px; object-fit: cover; }
.radar-target { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.radar-sprite { width: 2.5rem; height: 2.5rem; flex-shrink: 0; object-fit: contain; }
.radar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.radar-small-button { padding: .4rem .55rem; border: 1px solid var(--io-line); border-radius: 7px; color: var(--io-ink); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.radar-small-button:hover { background: var(--io-accent-soft); }
.radar-report-button { background: rgba(168, 85, 247, 0.18); border-color: rgba(168, 85, 247, 0.55); color: #d8b4fe; }
.radar-report-button:hover { background: rgba(168, 85, 247, 0.32); }
.radar-captured-button { background: rgba(34, 197, 94, 0.18); border-color: rgba(34, 197, 94, 0.55); color: #86efac; }
.radar-captured-button:hover { background: rgba(34, 197, 94, 0.32); }
.radar-empty { padding: 3rem 1rem; text-align: center; color: var(--io-muted); font-size: .8rem; }
.radar-error { padding: .7rem; border: 1px solid #ef4444; border-radius: 8px; color: #ef4444; font-size: .8rem; }
.radar-article-dialog { width: min(1040px, 94vw); height: 88vh; max-width: none; max-height: 88vh; padding: 1rem; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-surface, #fff); color: var(--io-ink); overflow: hidden; display: flex; flex-direction: column; }
.radar-article-dialog:not([open]) { display: none; }
.radar-article-dialog[open] { display: flex; }
.radar-article-dialog > .radar-article-layout { min-height: 0; flex: 1; overflow: hidden; }
.radar-article-head { display: flex; justify-content: space-between; align-items: center; }
.radar-article-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.radar-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 13rem; gap: 1rem; align-items: stretch; }
.radar-article-main { display: flex; flex-direction: column; gap: .75rem; min-height: 0; overflow-y: auto; }
.radar-chat-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.radar-article-chat { display: flex; flex-direction: column; gap: .6rem; flex: 1; min-height: 12rem; overflow-y: auto; margin: .4rem 0; padding: .75rem; list-style: none; border: 1px solid var(--io-line); border-radius: 12px; background: rgba(201, 151, 58, .06); scroll-behavior: smooth; }
.radar-article-aside { position: sticky; top: 0; align-self: start; padding: .75rem; border: 1px solid var(--io-line); border-radius: 12px; background: rgba(201, 151, 58, .06); }
.radar-article-places { display: flex; flex-direction: column; gap: .4rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.radar-place { display: flex; align-items: center; gap: .4rem; font-size: .85rem; }
.radar-place.is-mine { color: var(--io-accent); }
.radar-place .radar-avatar, .radar-chat-avatar img { width: 1.75rem; height: 1.75rem; border-radius: 9999px; object-fit: cover; }
@media (max-width: 760px) { .radar-article-layout { grid-template-columns: 1fr; } .radar-article-aside { position: static; } }
.radar-article-form input[name="body"] { flex: 1; min-width: 12rem; }
.radar-article-captures { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }

.radar-chat-message { display: flex; gap: .5rem; align-items: flex-end; max-width: 78%; }
.radar-chat-message.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.radar-chat-avatar { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; flex-shrink: 0; border-radius: 9999px; background: var(--io-accent-soft); color: var(--io-ink); font-size: .75rem; font-weight: 800; }
.radar-chat-bubble { padding: .45rem .7rem; border: 1px solid var(--io-line); border-radius: 12px 12px 12px 4px; background: var(--io-surface); }
.radar-chat-message.is-mine .radar-chat-bubble { border-radius: 12px 12px 4px 12px; background: var(--io-accent-soft); }
.radar-chat-meta { display: flex; gap: .5rem; align-items: baseline; font-size: .72rem; }
.radar-chat-meta time { color: var(--io-muted); font-size: .65rem; }
.radar-chat-bubble p { margin: .15rem 0 0; font-size: .85rem; line-height: 1.35; word-break: break-word; }
.radar-chat-empty { margin: auto; color: var(--io-muted); font-size: .8rem; text-align: center; }
.radar-chat-form { display: flex; gap: .5rem; align-items: center; }
.radar-chat-form input[name="body"] { flex: 1; min-width: 0; padding: .5rem .75rem; border: 1px solid var(--io-line); border-radius: 9999px; background: var(--io-surface); color: var(--io-ink); font-size: .85rem; }
.radar-chat-form input[name="body"]:focus { outline: 2px solid var(--io-accent-soft); outline-offset: 1px; }
.radar-chat-panel h4 { margin-bottom: .2rem; font-weight: 800; }
.radar-capture { display: grid; grid-template-columns: 96px 1fr; gap: .5rem; align-items: center; padding: .4rem 0; border-top: 1px solid var(--io-line); list-style: none; }
.radar-capture-proof { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.radar-capture .radar-actions { grid-column: 2; }
.radar-dialog { width: min(94vw, 560px); max-height: 90vh; padding: 1.25rem; border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-surface); color: var(--io-ink); }
.radar-dialog::backdrop { background: rgba(2, 8, 23, .75); }
.radar-dialog-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.radar-dialog-title h2 { font-size: 1.1rem; font-weight: 800; }
.radar-dialog-title button { font-size: 1.5rem; line-height: 1; color: var(--io-muted); }
.radar-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.radar-target-search { grid-column: 1 / -1; position: relative; }
.radar-suggestions { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; max-height: 280px; overflow-y: auto; margin: .25rem 0 0; padding: .25rem; list-style: none; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.radar-suggestions button { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .4rem .5rem; border-radius: 6px; color: var(--io-ink); font-size: .8rem; text-align: left; }
.radar-suggestions button:hover, .radar-suggestions button:focus-visible { background: var(--io-accent-soft); }
.radar-suggestions button span { flex: 1; font-weight: 700; }
.radar-suggestions small, .radar-suggestion-empty { color: var(--io-muted); font-size: .72rem; }
.radar-suggestion-empty { padding: .5rem; }
.radar-target-preview { grid-column: 1 / -1; display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-deep); font-size: .8rem; }
.radar-target-preview span { display: grid; gap: .1rem; }
.radar-target-preview small { color: var(--io-muted); font-size: .72rem; }
.radar-anon { display: flex; gap: .5rem; align-items: center; margin: 1rem 0; font-size: .8rem; }
.radar-dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
@media (max-width: 800px) {
    .radar-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .radar-list-header { display: none; }
    .radar-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .radar-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
    .radar-row { grid-template-columns: minmax(0, 1fr); gap: .6rem; padding: .85rem .75rem; border-radius: 12px; margin-bottom: .5rem; border: 1px solid var(--io-line); background: var(--io-surface-soft); }
    .radar-row .kra-entity, .radar-row .radar-target, .radar-row .radar-author { min-width: 0; }
    .radar-row .radar-age { align-self: flex-start; width: auto; height: auto; white-space: nowrap; }
    .radar-row .radar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
    .radar-row .radar-small-button { width: 100%; min-height: 2.4rem; }
    .radar-row .radar-sprite { width: 2.5rem; height: 2.5rem; flex-shrink: 0; }
}
@media (max-width: 420px) {
    .radar-filter-grid, .radar-form-grid { grid-template-columns: 1fr; }
    .radar-filter-grid > .io-context-filters { grid-column: auto; }
}
.calendar-toolbar { padding: .85rem; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem; }
.calendar-server-select { display: flex; flex-wrap: wrap; gap: .6rem; }
.calendar-server-select label, .calendar-label, .calendar-form-grid label, .calendar-character-fields label { display: grid; gap: .3rem; color: var(--io-muted); font-size: .72rem; font-weight: 700; }
.calendar-server-select select { min-width: 140px; }
.calendar-tabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.calendar-tabs button { padding: .55rem .8rem; color: var(--io-muted); font-size: .75rem; font-weight: 800; border-radius: 8px; }
.calendar-tabs button:hover, .calendar-tabs button.is-active { color: var(--io-ink); background: var(--io-accent-soft); }
.calendar-muted { color: var(--io-muted); font-size: .75rem; }
.calendar-check { display: flex; align-items: flex-start; gap: .5rem; margin-top: .8rem; font-size: .78rem; }
.calendar-live { padding: .85rem; outline: 2px solid #cc7722; outline-offset: 2px; }
.calendar-live-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.calendar-live-heading h2 { font-weight: 800; }
.calendar-live-logo { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.calendar-rooms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-top: .75rem; }
.calendar-room { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .8rem; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-surface-soft); font-size: .75rem; }
.calendar-room:hover { border-color: var(--io-accent); }
.calendar-room.is-mine { border-color: var(--io-accent); background: color-mix(in srgb, var(--io-accent) 12%, var(--io-surface-soft)); }
.calendar-room strong { color: var(--io-accent); }
.calendar-live-heading .calendar-tabs { flex-wrap: wrap; }
.calendar-live-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem; margin-top: .75rem; }
.calendar-live-card { display: flex; flex-direction: column; gap: .4rem; padding: .75rem; text-align: left; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-surface-soft); font-size: .75rem; }
.calendar-live-card:hover, .calendar-live-card.is-active { border-color: var(--io-accent); }
.calendar-live-card-head { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.calendar-live-card-head img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.calendar-live-card-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-live-card-status { font-weight: 700; color: var(--io-accent); }
.calendar-progress { display: block; height: 6px; border-radius: 999px; background: var(--io-line); overflow: hidden; }
.calendar-progress > span { display: block; height: 100%; background: var(--io-accent); }
#calendar-live-detail { margin-top: .75rem; }
.calendar-empty-page { display: grid; justify-items: center; gap: 10px; max-width: 560px; margin: 24px auto; padding: 28px 22px; border: 1px solid var(--io-line); border-radius: 16px; background: var(--io-surface); text-align: center; }
.calendar-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--io-deep); border: 1px solid var(--io-accent); color: var(--io-accent); font-size: 26px; }
.calendar-empty-page h3 { color: var(--io-ink); font-size: 18px; font-weight: 900; }
.calendar-empty-page p { color: var(--io-muted); font-size: 13px; line-height: 1.5; }
.calendar-empty-steps { display: grid; gap: 8px; width: 100%; margin-top: 6px; padding: 0; list-style: none; text-align: left; font-size: 12px; color: var(--io-ink); }
.calendar-empty-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--io-line); border-radius: 10px; background: var(--io-deep); }
.calendar-empty-steps span { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--io-accent); color: #130e07; font-weight: 900; }

.calendar-proof { display: block; max-width: 100%; max-height: 45vh; margin: .75rem auto; object-fit: contain; }
.calendar-days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.calendar-date-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; padding: .85rem; margin-bottom: .8rem; }
.calendar-date-navigation[hidden] { display: none; }
.calendar-date-navigation > span { font-size: .85rem; font-weight: 800; }
.calendar-date-navigation > p { flex-basis: 100%; margin: 0; }
.calendar-date-actions { display: flex; align-items: center; gap: .4rem; }
.calendar-date-actions button:disabled { opacity: .4; cursor: not-allowed; }
.calendar-day { overflow: hidden; }
.calendar-day h2 { padding: .85rem; border-bottom: 1px solid var(--io-line); font-weight: 800; }
.calendar-day h2 small { margin-left: .4rem; color: var(--io-muted); font-size: .72rem; font-weight: 500; text-transform: capitalize; }
.calendar-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calendar-slot { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .6rem .75rem; border-bottom: 1px solid var(--io-line); text-align: left; font-size: .72rem; }
.calendar-slot:hover, .calendar-slot.is-mine { background: var(--io-accent-soft); }
.calendar-slot:disabled { opacity: .4; cursor: default; }
.calendar-slot strong { color: var(--io-accent); }
.calendar-slot span { color: var(--io-muted); }
.calendar-slot small { margin-left: auto; color: var(--io-accent); }
.calendar-groups-heading, .calendar-group-heading, .calendar-character-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.calendar-groups-heading { margin: .25rem 0 .85rem; }
.calendar-groups-heading h2, .calendar-group h3 { font-weight: 800; }
.calendar-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: .8rem; }
.calendar-group { padding: 1rem; }
.calendar-group-heading > strong { color: var(--io-accent); white-space: nowrap; }
.calendar-members { margin: .8rem 0; border-top: 1px solid var(--io-line); }
.calendar-member { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--io-line); font-size: .72rem; overflow-wrap: anywhere; }
.calendar-label { margin-top: .75rem; }
.calendar-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .75rem; }
.calendar-character-heading { margin-top: 1rem; font-size: .8rem; }
.calendar-character { margin-top: .7rem; padding: .7rem; border: 1px solid var(--io-line); border-radius: 8px; }
.calendar-goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .75rem; }
.calendar-goals legend, .calendar-goals label { color: var(--io-muted); font-size: .72rem; font-weight: 700; }
.calendar-goals > label { display: grid; gap: .3rem; }
.calendar-goals > .calendar-label { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; }
.calendar-goals-achievements { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); }
.calendar-class-icon { display: inline-block; width: 1.1rem; height: 1.1rem; object-fit: contain; vertical-align: -0.2rem; }
.calendar-achievement-icon { display: inline-block; width: 1.25rem; height: 1.25rem; object-fit: contain; vertical-align: -0.3rem; margin-right: .25rem; }
.calendar-group-side { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.calendar-achievement-tiles { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0; }
.calendar-achievement-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-width: 3.75rem; min-height: 3.75rem; padding: .3rem; border-radius: 8px; background: #f59e0b; color: #1f2937; font-size: .6rem; font-weight: 800; text-align: center; }
.calendar-goals .calendar-achievement-tile { display: flex; color: #000; }
.calendar-goals .calendar-achievement-tile span, .calendar-goals .calendar-achievement-tile select { color: #000; }
.calendar-achievement-tile .calendar-achievement-icon { width: 1.25rem; height: 1.25rem; margin: 0; }
.calendar-achievement-tile .radar-control { width: 100%; font-size: .6rem; padding: .15rem; }
.kra-entity { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.kra-logo { width: 2rem; height: 2rem; flex: none; object-fit: contain; }
.calendar-day-groups { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--io-muted, #94a3b8); }
.calendar-day-groups b { color: var(--io-ink); }
.calendar-character-fields { display: grid; grid-template-columns: 1fr 1fr 5rem auto; align-items: end; gap: .4rem; }
.calendar-character fieldset { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; color: var(--io-muted); font-size: .7rem; }
.calendar-character legend { font-weight: 700; }
@media (max-width: 800px) { .calendar-days { grid-template-columns: 1fr; } .calendar-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .calendar-character-fields { grid-template-columns: 1fr 1fr; } }
/* Notifications communes et preferences du profil */
.io-notification-bell {
    position: relative; overflow: visible; flex-shrink: 0;
}
.io-notification-bell[hidden] { display: none; }
.io-notification-badge { position: absolute; right: -5px; bottom: -5px; min-width: 17px; height: 17px; padding: 0 3px; border: 2px solid var(--io-deep); border-radius: 999px; background: #dc2626; color: white; font-size: 9px; font-weight: 900; line-height: 13px; text-align: center; pointer-events: none; }
.io-notification-badge[hidden] { display: none; }
.io-notification-dialog {
    width: min(680px, 95vw); max-width: 95vw; max-height: 85dvh; margin: auto; overflow: hidden;
    padding: 0; border: 1px solid var(--io-line); border-radius: 16px;
    background: var(--io-surface); color: var(--io-ink);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}
.io-notification-dialog[open] { display: flex; flex-direction: column; }
.io-notification-dialog.is-expanded { width: 95vw; height: 95dvh; max-height: 95dvh; }
.io-notification-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.io-notification-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-bottom: 1px solid var(--io-line); background: var(--io-deep); }
.io-notification-heading-actions { display: flex; gap: 8px; }
.io-notification-heading-actions svg { width: 16px; height: 16px; }
.io-notification-heading h2, .io-notification-preferences h3 { font-size: 18px; font-weight: 900; }
.io-notification-toolbar { display: grid; gap: 12px; flex-shrink: 0; padding: 14px 16px; border-bottom: 1px solid var(--io-line); font-size: 12px; }
.io-notification-toolbar label { display: flex; align-items: center; gap: 8px; }
.io-notification-toolbar .radar-actions { justify-content: flex-start; }
#io-notification-status { margin: 0; padding: 0 16px; font-size: 12px; }
#io-notification-status:not(:empty) { padding-top: 10px; padding-bottom: 10px; }
#io-notification-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: grid; align-content: start; gap: 10px; }
.io-notification-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-deep); }
.io-notification-item.is-unread { border-left: 3px solid var(--io-accent); background: var(--io-accent-soft); }
.io-notification-content { min-width: 0; flex: 1; display: grid; gap: 8px; font-size: 13px; overflow-wrap: anywhere; }
.io-notification-item.is-unread p { font-weight: 700; }
.io-notification-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; color: var(--io-muted); font-size: 10px; font-weight: 800; }
.io-notification-meta > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.io-notification-meta svg { width: 13px; height: 13px; }
.io-notification-item.is-unread .io-notification-meta { color: var(--io-accent); }
.io-notification-visual { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-surface); color: var(--io-accent); }
.io-notification-visual > svg { width: 24px; height: 24px; }
.io-notification-monster { width: 44px; height: 44px; object-fit: contain; }
.io-notification-category { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; padding: 2px; object-fit: contain; border: 1px solid var(--io-line); border-radius: 6px; background: var(--io-deep); }
.io-notification-actor { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.io-notification-actor img, .io-notification-actor svg { width: 20px; height: 20px; border-radius: 999px; object-fit: cover; }
.io-notification-item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.io-notification-item-actions :is(a, button) { display: inline-flex; align-items: center; gap: 5px; }
.io-notification-item-actions svg { width: 13px; height: 13px; }
.io-notification-empty { display: grid; justify-items: center; gap: 12px; padding: 32px; color: var(--io-muted); font-size: 13px; text-align: center; }
.io-notification-item small { color: var(--io-muted); }
body:has(#io-notification-dialog[open]) { overflow: hidden; }
.io-notification-preferences, .io-notification-preferences form { display: grid; gap: 14px; font-size: 13px; }
.io-notification-preferences fieldset, .io-notification-server { padding: 12px; border: 1px solid var(--io-line); border-radius: 12px; }
.io-notification-preferences legend, .io-notification-server summary { font-weight: 800; }
.io-notification-preferences .calendar-check { display: flex; gap: 8px; margin: 10px 0; }
.io-bot-help { display: grid; gap: 6px; margin: 0; padding-left: 18px; list-style: disc; }
.io-notification-preferences .radar-control { width: 100%; }
.io-notification-preferences .is-error, #io-notification-status.is-error { color: #fb7185; }
#io-auth-modal > div { width: 95%; height: 95%; max-width: none; max-height: 95%; overflow-y: auto; }
.community-score-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.community-heading { pointer-events: auto; margin-bottom: 14px; }
.search-radar-availability { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-accent-soft); }
.search-radar-availability > div { min-width: 0; flex: 1 1 260px; }
.search-radar-count { display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 12px; border-radius: 12px; background: var(--io-deep); color: var(--io-ink); font-size: 32px; font-weight: 900; line-height: 1; }
.search-radar-availability strong { font-size: 14px; color: var(--io-ink); }
.search-radar-availability p { margin-top: 5px; font-size: 12px; color: var(--io-muted); }
.search-radar-targets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.search-radar-targets span { padding: 3px 8px; border-radius: 999px; background: var(--io-surface); font-size: 11px; overflow-wrap: anywhere; }
.profile-search-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-surface); }
.profile-search-heading { display: flex; flex-direction: column; gap: 3px; }
.profile-search-heading strong { color: var(--io-ink); font-size: 18px; }
.profile-search-heading > span { font-size: 11px; color: var(--io-muted); }
.profile-search-filters { display: flex; flex: 1 1 360px; flex-wrap: wrap; align-items: end; gap: .7rem; min-width: 0; padding: .65rem; border: 1px solid var(--io-line); border-radius: 14px; background: var(--io-deep); }
.profile-search-filters label { display: grid; flex: 1 1 150px; gap: .35rem; min-width: 0; }
.profile-search-filters label > span { color: var(--io-muted); font-size: .72rem; font-weight: 750; }
.profile-search-filters label > div { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: .5rem .65rem; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-deep); }
.profile-search-filters select { width: 100%; min-width: 0; background: transparent; color: var(--io-ink); font-size: 12px; font-weight: 700; }
.profile-search-filters option { background: var(--io-surface); color: var(--io-ink); }
.profile-search-filters img, .profile-search-filters svg, .profile-search-context img, .profile-search-context svg { width: 18px; height: 18px; flex-shrink: 0; object-fit: contain; }
.profile-search-input { flex: 1 1 200px; min-width: 0; }
.profile-search-toolbar > p { flex-basis: 100%; }
.profile-search-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 124px 124px auto; align-items: center; gap: 12px; }
.profile-search-card > .profile-search-open { white-space: nowrap; }
.profile-search-identity { min-width: 0; }
.profile-search-detail { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: 1px solid var(--io-line); border-radius: 8px; background: var(--io-surface-soft); color: var(--io-ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
.profile-search-detail:hover { border-color: #93c5fd; }
.profile-search-total { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 0; padding: 6px 12px; border: 1px solid transparent; border-radius: 10px; text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.profile-search-total b { font-size: 18px; line-height: 1; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.profile-search-total small { margin-top: 0; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; line-height: 1.2; }
.profile-search-total.is-need { background: linear-gradient(180deg, #eff6ff, #dbeafe); border-color: #bfdbfe; color: #1d4ed8; }
.profile-search-total.is-offer { background: linear-gradient(180deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; color: #15803d; }
.dark .profile-search-total.is-need { background: linear-gradient(180deg, rgba(30, 58, 138, 0.38), rgba(30, 58, 138, 0.22)); border-color: rgba(147, 197, 253, 0.25); color: #93c5fd; }
.dark .profile-search-total.is-offer { background: linear-gradient(180deg, rgba(20, 83, 45, 0.38), rgba(20, 83, 45, 0.22)); border-color: rgba(134, 239, 172, 0.25); color: #86efac; }
.profile-server-detail-dialog { width: min(100%, 520px); max-height: 80vh; overflow: auto; padding: 16px; border-radius: 14px; background: var(--io-surface); color: var(--io-ink); box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35); }
.profile-search-context { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.profile-search-context > span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--io-line); border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--io-surface-soft); color: var(--io-ink); }
.profile-search-context .profile-server-icon, .profile-search-filters .profile-server-icon { border-radius: 50%; }
.profile-search-card .calendar-muted { margin-top: 6px; }
@media (max-width: 960px) {
    .profile-search-card { grid-template-columns: 40px minmax(0, 1fr) auto 124px 124px; }
    .profile-search-card > .profile-search-open { grid-column: 2 / -1; justify-self: start; }
}
@media (max-width: 640px) {
    .profile-search-card { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; }
    .profile-search-card > .profile-search-detail,
    .profile-search-card > .profile-search-total,
    .profile-search-card > .profile-search-open { grid-column: 2; justify-self: start; }
    .profile-search-heading { width: 100%; }
}
.community-score-card { display: grid; gap: 3px; padding: 16px 12px; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-surface); text-align: center; }
.community-score-card strong { font-size: 26px; font-weight: 900; color: var(--io-accent); overflow-wrap: anywhere; }
.community-score-card span { font-size: 12px; font-weight: 800; }
.community-score-card small { color: var(--io-muted); font-size: 11px; }
.community-score-card.is-penalty strong { color: #fbbf24; }
.community-rules { margin: 16px 0; padding: 12px; border: 1px solid var(--io-line); border-radius: 12px; font-size: 12px; color: var(--io-muted); }
.community-rules-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--io-line); border-radius: 10px; background: var(--io-surface-soft); color: var(--io-ink); font-size: 12px; font-weight: 800; white-space: nowrap; transition: border-color .15s, background .15s; }
.community-rules-button:hover { border-color: #93c5fd; background: rgba(147, 197, 253, 0.12); }
.moderation-dialog, .radar-proof-dialog { width: min(440px, calc(100vw - 32px)); border: 1px solid var(--io-line); border-radius: 16px; background: var(--io-surface); color: var(--io-ink); padding: 18px; }
.moderation-dialog::backdrop, .radar-proof-dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.moderation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.moderation-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.moderation-card { border: 1px solid var(--io-line); border-radius: 16px; background: var(--io-surface-soft); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; transition: transform .2s ease; }
.moderation-card[data-swipe="yes"] { box-shadow: inset 0 0 0 3px #22c55e; }
.moderation-card[data-swipe="no"] { box-shadow: inset 0 0 0 3px #ef4444; }
.moderation-image { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #0f172a; }
.moderation-info { display: grid; gap: 4px; padding: 12px; }
.moderation-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.moderation-actions button { flex: 1; padding: 10px; font-weight: 800; }
.moderation-refuse { background: #fee2e2; color: #991b1b; }
.moderation-valid { background: #dcfce7; color: #166534; }
.moderation-hint { margin: 8px 0 0; text-align: center; font-size: 12px; }
.radar-proof-form { display: grid; gap: 10px; }
.radar-proof-form h3 { margin: 0; font-size: 16px; font-weight: 800; }
.community-rules-dialog { width: min(100%, 560px); max-height: 80vh; overflow: auto; padding: 18px; border-radius: 14px; background: var(--io-surface); color: var(--io-ink); box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35); }
.community-rules-body { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--io-muted); }
.community-rules-body ul { display: grid; gap: 8px; padding-left: 1rem; list-style: disc; }
.community-rules-body b { color: var(--io-ink); }

.community-rules summary { cursor: pointer; color: var(--io-ink); font-weight: 800; }
.community-rules ul { display: grid; gap: 8px; padding: 12px 0 0 18px; list-style: disc; line-height: 1.6; }
.community-ranking-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.community-ranking-filters label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; flex: 1; min-width: 180px; }
.community-ranking-list { display: grid; gap: 8px; }
.community-ranking-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--io-line); border-radius: 12px; background: var(--io-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.community-ranking-row:hover { border-color: var(--io-accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.community-ranking-avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--io-line); background: var(--io-deep); color: var(--io-accent); font-weight: 900; }
.community-ranking-main { display: grid; gap: 5px; min-width: 0; }
.community-ranking-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.community-ranking-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 800; color: var(--io-ink); }
.community-rank { font-size: 13px; font-weight: 900; color: var(--io-accent); text-align: center; }
.community-ranking-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.community-ranking-score { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 8px; border: 1px solid var(--io-line); border-radius: 999px; background: var(--io-deep); font-size: 10px; font-weight: 700; color: var(--io-muted); }
.community-ranking-score b { font-size: 12px; color: var(--io-ink); }
.community-ranking-score.is-current { border-color: var(--io-accent); color: var(--io-accent); }
.community-ranking-score.is-current b { color: var(--io-accent); font-weight: 900; }
.community-ranking-score.is-penalty b { color: #f87171; }
.community-ranking-space { font-size: 11px; color: var(--io-muted); }
.community-ranking-open { padding: 6px 12px; border: 1px solid var(--io-accent); border-radius: 8px; background: var(--io-deep); color: var(--io-accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.community-rank { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; background: var(--io-deep); border: 1px solid var(--io-line); color: var(--io-accent); font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums; }
.community-ranking-search input { width: 100%; }

.community-ranking-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: 12px; }
.community-ranking-pagination button:disabled { opacity: .45; cursor: default; }
.io-empty-state { display: grid; justify-items: center; gap: 8px; padding: 28px 20px; margin: 8px 0; text-align: center; border: 1px dashed var(--io-accent); border-radius: 16px; background: var(--io-surface); }
.io-empty-state h3 { font-size: 18px; font-weight: 900; color: var(--io-ink); }
.io-empty-state p { max-width: 420px; font-size: 13px; line-height: 1.6; color: var(--io-muted); }
.io-empty-state strong { color: var(--io-accent); }
.io-empty-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--io-deep); color: var(--io-accent); font-size: 22px; font-weight: 900; animation: io-empty-bob 1.6s ease-in-out infinite; }
@keyframes io-empty-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .io-empty-arrow { animation: none; } }

.community-public-profile h1 { font-size: 24px; font-weight: 900; overflow-wrap: anywhere; }
@media (max-width: 650px) {
    .community-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .community-score-card:last-child { grid-column: 1 / -1; }
    .community-ranking-row { grid-template-columns: 40px minmax(0, 1fr); }
    .community-rank { display: none; }
    .community-ranking-open { grid-column: 2; justify-self: start; }
}
