/* ═══════════════════════════════════════════════════════════
   SLIME IDLE — Full Medieval Pixel Art UI (Browser Version)
   Couvre : login, menus, boutons, chat, stats, skills, modals
   ═══════════════════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
	--px-bg:        #080608;
	--px-panel:     #110e0c;
	--px-btn:       #1e1612;
	--px-btn-h:     #2c2018;
	--px-border:    #4a3020;
	--px-border-m:  #6b4828;
	--px-border-l:  #9b6e30;
	--px-gold:      #d4a832;
	--px-goldbr:    #f0c84a;
	--px-golddark:  #7a5018;
	--px-text:      #e0d0a8;
	--px-textdim:   #8a7a58;
	--px-textbr:    #f8ead0;
	--px-hp:        #c03030;
	--px-mp:        #2858b8;
	--px-xp:        #38a028;
	--px-red:       #c03030;
	--px-green:     #38a028;
}

/* ── LIGHT THEME (respecte les préférences système) ── */
@media (prefers-color-scheme: light) {
	:root {
		--px-bg:        #efe7d6;
		--px-panel:     #f6f0e3;
		--px-btn:       #e6dbc2;
		--px-btn-h:     #d6c7a0;
		--px-border:    #b9a877;
		--px-border-m:  #a98f5e;
		--px-border-l:  #8a6f3e;
		--px-gold:      #9a6a12;
		--px-goldbr:    #6e4e0a;
		--px-golddark:  #b08a2a;
		--px-text:      #3a2e1c;
		--px-textdim:   #7a6a4a;
		--px-textbr:    #2a1f12;
		--px-hp:        #b03030;
		--px-mp:        #2858b8;
		--px-xp:        #2f8a28;
		--px-red:       #b03030;
		--px-green:     #2f8a28;
	}
}

/* ── FONT ── */
@font-face {
	font-family: 'Pixel';
	src: url('/css/fonts/m5x7.ttf') format('truetype');
}

/* ── BASE RESET POUR LE JEU ── */
html, body {
	background: var(--px-bg) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--px-bg); }
::-webkit-scrollbar-thumb { background: var(--px-border-m); }
::-webkit-scrollbar-thumb:hover { background: var(--px-border-l); }

/* ═══════════════════════════════════════════════
   BOUTONS PIXEL ART — gamebutton, slimbutton, etc.
   ═══════════════════════════════════════════════ */

.gamebutton, .slimbutton, .tinybutton, .pixel-btn,
.medieval-action-btn, .smallbutton {
	display: inline-block;
	background: var(--px-btn) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	border-right: 2px solid var(--px-bg) !important;
	border-bottom: 2px solid var(--px-bg) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	font-size: 13px !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	padding: 6px 10px !important;
	text-align: center;
	position: relative;
	transition: background 0.07s, color 0.07s;
	user-select: none;
	outline: none;
	text-shadow: 1px 1px 0 #000;
	box-shadow: none !important;
	border-radius: 0 !important;
}

.gamebutton::before, .slimbutton::before, .tinybutton::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(255,255,255,0.05) 0%, transparent 60%);
	pointer-events: none;
}

.gamebutton:hover, .slimbutton:hover, .tinybutton:hover, .pixel-btn:hover {
	background: var(--px-btn-h) !important;
	color: var(--px-goldbr) !important;
	border-top-color: var(--px-golddark) !important;
	border-left-color: var(--px-golddark) !important;
}

.gamebutton:active, .slimbutton:active, .tinybutton:active, .pixel-btn:active {
	border-top: 2px solid var(--px-bg) !important;
	border-left: 2px solid var(--px-bg) !important;
	border-right: 2px solid var(--px-border-l) !important;
	border-bottom: 2px solid var(--px-border-l) !important;
	background: var(--px-golddark) !important;
	transform: translate(1px,1px);
}

.gamebutton.active, .slimbutton.active, .pixel-btn.active {
	background: var(--px-golddark) !important;
	color: var(--px-goldbr) !important;
	border-top-color: var(--px-bg) !important;
	border-left-color: var(--px-bg) !important;
	border-right-color: var(--px-border-l) !important;
	border-bottom-color: var(--px-border-l) !important;
}

.gamebutton-large {
	font-size: 15px !important;
	padding: 8px 14px !important;
}

.gamebutton-small, .tinybutton {
	font-size: 11px !important;
	padding: 4px 7px !important;
}

/* ═══════════════════════════════════════════════
   LOGIN / SÉLECTION PERSONNAGE
   ═══════════════════════════════════════════════ */

#loginbox, .loginbox, #characterselect, .characterselect,
.loginarea, #login_form {
	background: var(--px-panel) !important;
	border: 2px solid var(--px-border-m) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	box-shadow: 4px 4px 0 rgba(0,0,0,0.8) !important;
	border-radius: 0 !important;
}

input[type="text"], input[type="password"], input[type="email"],
textarea, select, .chatinput, .medieval-chat-input {
	background: var(--px-bg) !important;
	border: 1px solid var(--px-border-m) !important;
	border-top-color: var(--px-bg) !important;
	border-left-color: var(--px-bg) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	font-size: 13px !important;
	padding: 4px 8px !important;
	outline: none !important;
	border-radius: 0 !important;
}

input[type="text"]:focus, input[type="password"]:focus,
input[type="email"]:focus, textarea:focus {
	border-color: var(--px-golddark) !important;
}

input::placeholder, textarea::placeholder {
	color: var(--px-textdim) !important;
}

/* ═══════════════════════════════════════════════
   MODALS / POPUPS
   ═══════════════════════════════════════════════ */

#modal, .modal-bg {
	background: rgba(4,3,2,0.88) !important;
}

.modal_box, .modalbox, #modalbody, .modal-content,
.block, .gameblock {
	background: var(--px-panel) !important;
	border: 2px solid var(--px-border-m) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	box-shadow: 4px 4px 0 rgba(0,0,0,0.8) !important;
	border-radius: 0 !important;
}

.block_title, .modal_title, .windowtitle {
	background: var(--px-border) !important;
	color: var(--px-goldbr) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	letter-spacing: 2px;
	padding: 5px 10px !important;
	border-bottom: 2px solid var(--px-border-m) !important;
}

/* ═══════════════════════════════════════════════
   CHAT
   ═══════════════════════════════════════════════ */

.medieval-chat {
	position: fixed;
	bottom: 8px;
	left: 8px;
	width: 440px;
	max-width: min(440px, calc(100vw - 16px));
	background: linear-gradient(180deg, #352217 0%, #26180f 100%);
	border: 4px solid #1a0f08;
	box-shadow: 0 8px 24px rgba(0,0,0,0.7);
	z-index: 99;
	font-family: pixel, "Courier New", monospace;
	image-rendering: pixelated;
	overflow: hidden;
}

/* Header */
.medieval-chat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	background: linear-gradient(180deg, #4b3120 0%, #352216 100%);
	border-bottom: 2px solid #1a0f08;
}

/* SERVEUR #01 PLUS GRAND */
.medieval-chat-server {
	color: #e8c46a;
	font-weight: 700;
	font-size: 20px;
	text-shadow: 2px 2px 0 #1a0f08;
	letter-spacing: 2px;
}

.medieval-chat-time {
	color: #c4b090;
	font-size: 13px;
}

/* Zone messages - PLEINE LARGEUR SANS MARGES */
.medieval-chat-messages {
	display: block;
	width: 100% !important;
	height: 164px;
	margin: 0;
	padding: 8px 10px;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	overflow-y: auto;
	overflow-x: hidden;
	font-size: 13px;
	line-height: 18px;
	color: #d8c29b;
}

/* Scrollbar */
.medieval-chat-messages::-webkit-scrollbar {
	width: 6px;
}

.medieval-chat-messages::-webkit-scrollbar-track {
	background: #1a0f08;
}

.medieval-chat-messages::-webkit-scrollbar-thumb {
	background: #3d2818;
	border: 1px solid #1a0f08;
}

/* Messages */
.medieval-chat-entry {
	display: block;
	width: 100%;
	padding: 3px 0;
	margin: 0;
	border: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: #d8c29b;
	white-space: normal;
	word-break: break-word;
}

.medieval-chat-entry:last-child {
	border-bottom: none;
}

.medieval-chat-entry.server {
	color: #d4a34a;
	font-style: italic;
}

.medieval-chat-entry.server::before {
	content: "[S] ";
	font-weight: 700;
	color: #e8c46a;
}

#medieval-chat #chatlog,
#medieval-chat #chatinput {
	background-image: none !important;
}

#medieval-chat #chatlog {
	height: 164px !important;
	width: 100% !important;
	padding: 8px 10px !important;
	background: transparent !important;
	border: 0 !important;
	margin: 0 !important;
	left: auto !important;
	bottom: auto !important;
	position: static !important;
	line-height: 18px !important;
	font-size: 13px !important;
}

#medieval-chat .chatentry {
	margin: 0 !important;
}

#medieval-chat .medieval-chat-entry + .medieval-chat-entry {
	margin-top: 2px;
}

#medieval-chat .medieval-chat-tools {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}

#medieval-chat .medieval-quest-btn {
	width: 28px;
	height: 28px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	font-size: 14px;
	font-weight: 700;
}

/* Scrollbar stylisée discrète */
.medieval-chat-messages::-webkit-scrollbar {
	width: 6px;
}

.medieval-chat-messages::-webkit-scrollbar-track {
	background: #2d1f16;
}

.medieval-chat-messages::-webkit-scrollbar-thumb {
	background: #6b4e3a;
	border: 1px solid #1a110d;
}

/* === INPUT ROW - COLLÉ AU BOUTON, PAS DE GRIS === */
.medieval-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px 10px 10px;
	background: transparent;
	border-top: 1px solid rgba(232, 196, 106, 0.15);
}

.medieval-chat-input {
	flex: 1 1 auto;
	width: 100% !important;
	height: 34px;
	margin: 0 !important;
	position: static !important;
	left: auto !important;
	bottom: auto !important;
	z-index: auto !important;
	border: 2px solid #5a3a23;
	font-family: pixel, "Courier New", monospace;
	font-size: 13px;
	padding: 0 10px;
	background: rgba(255, 240, 210, 0.06) !important;
	color: #f4deb0;
	outline: none;
	box-shadow: none !important;
}

.medieval-chat-input::placeholder {
	color: #5c3d28;
}

.medieval-chat-input:focus {
	border-color: #8b6239;
	background: rgba(255, 240, 210, 0.1) !important;
}

.medieval-send-btn {
	flex: 0 0 42px;
	width: 42px;
	height: 34px;
	padding: 0;
	border: 2px solid #5a3a23;
	font-family: pixel, "Courier New", monospace;
	font-size: 16px;
	background: linear-gradient(180deg, #5b3822 0%, #402718 100%);
	color: #f4c46a;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
}

.medieval-send-btn:hover {
	background: #4d3422;
	color: #f4d47a;
}

/* Bouton toggle CHAT */
.chat-toggle-btn {
	display: none;
	position: fixed;
	top: 8px;
	right: 50px;
	border: 3px solid #1a0f08;
	background: #3d2818;
	box-shadow: 0 4px 8px rgba(0,0,0,0.4);
	font-size: 12px;
	padding: 6px 12px;
	color: #e8c46a;
	cursor: pointer;
	font-family: pixel, "Courier New", monospace;
	font-weight: 700;
	z-index: 100;
	text-shadow: 1px 1px 0 #1a0f08;
}

.chat-toggle-btn.visible {
	display: block;
}

/* === BOUTONS PIXEL ART - HOVER VISUEL, CLIQ SANS EFFET === */
.pixel-btn {
	position: relative;
	border: 3px solid #1a0f08;
	padding: 8px 12px;
	cursor: pointer;
	color: #c4a080;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
	font-size: 10px;
	font-family: pixel, "Courier New", monospace;
	background: #2d1f14;
	text-shadow: 2px 2px 0 #1a0f08;
	box-shadow: 0 3px 0 #0d0805;
	transition: all 0.05s;
	margin: 2px;
}

/* HOVER - effet visuel CLAIR */
.pixel-btn:hover {
	background: #4d3422;
	color: #e8c46a;
	border-color: #3d2818;
	box-shadow: 
		0 3px 0 #0d0805,
		0 0 8px rgba(212, 163, 74, 0.3);
}

/* ACTIVE (clic) - juste enfoncé, PAS d'effet visuel */
.pixel-btn:active {
	transform: translateY(3px);
	box-shadow: 0 0 0 #0d0805;
	background: #2d1f14;
	color: #c4a080;
	border-color: #1a0f08;
}

/* Bouton paramètre en haut à droite */
.pixel-btn.settings {
	position: fixed;
	top: 8px;
	right: 8px;
	z-index: 101;
	padding: 8px 12px;
	font-size: 14px;
}

/* === MENU BAR DANS LE CHAT === */
.medieval-menu-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	padding: 6px;
	background: #3d2818;
	border-bottom: 2px solid #1a0f08;
}

.medieval-menu-bar .pixel-btn {
	flex: 1 1 calc(50% - 3px);
	min-width: 0;
	text-align: center;
	justify-content: center;
	padding-left: 8px;
	padding-right: 8px;
}

.medieval-menu-bar.hidden {
	display: none;
}

/* === QUEST PANEL DANS LE CHAT === */
.medieval-quest-panel {
	padding: 8px;
	background: #2d1f14;
	border-bottom: 2px solid #1a0f08;
	display: none;
}

.medieval-quest-panel.visible {
	display: block;
}

.medieval-quest-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px;
	background: #3d2818;
	border: 2px solid #1a0f08;
	margin-bottom: 6px;
}

.medieval-quest-title-header {
	font-size: 12px;
	font-weight: 700;
	color: #e8c46a;
	text-shadow: 1px 1px 0 #1a0f08;
}

.medieval-quest-back {
	cursor: pointer;
	font-size: 14px;
	color: #c4a080;
	padding: 2px 8px;
	background: #2d1f14;
	border: 2px solid #1a0f08;
}

.medieval-quest-back:hover {
	background: #4d3422;
}

.medieval-quest-item {
	background: #3d2818;
	border: 2px solid #1a0f08;
	padding: 6px;
}

.medieval-quest-name {
	font-size: 12px;
	font-weight: 700;
	color: #c4a080;
	margin-bottom: 3px;
}

.medieval-quest-progress {
	font-size: 10px;
	color: #8a7050;
	text-align: right;
	margin-bottom: 3px;
}

.medieval-quest-bar {
	height: 6px;
	background: #1a0f08;
	border: 1px solid #1a0f08;
	overflow: hidden;
}

.medieval-quest-bar > div {
	height: 100%;
	background: #d4a34a;
}

/* === BOTTOM CENTER CONTAINER === */
.medieval-skillbar-container {
	position: fixed;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 97;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.medieval-action-btns-row {
	display: flex;
	gap: 6px;
	background: #3d2818;
	padding: 6px;
	border: 3px solid #1a0f08;
	box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* === SKILL BUTTONS - HOVER VISUEL === */
.pixel-skill-btn {
	position: relative;
	width: 52px;
	height: 52px;
	border: 3px solid #1a0f08;
	cursor: pointer;
	background: linear-gradient(180deg, #3b2619 0%, #281a11 100%);
	box-shadow: 0 2px 0 #0d0805;
	transition: all 0.05s;
	margin: 0 2px;
	overflow: visible;
}

.pixel-skill-btn:hover {
	background: #4d3422;
	border-color: #3d2818;
	box-shadow: 
		0 2px 0 #0d0805,
		0 0 6px rgba(232, 196, 106, 0.3);
}

.pixel-skill-btn:active {
	transform: translateY(2px);
	box-shadow: 0 0 0 #0d0805;
	background: #2d1f14;
	border-color: #1a0f08;
}

.pixel-skill-btn .skill-key {
	position: absolute;
	right: 3px;
	bottom: 2px;
	font-family: pixel, "Courier New", monospace;
	font-size: 10px;
	font-weight: 700;
	color: #e8c46a;
	text-shadow: 2px 2px 0 #1a0f08;
	z-index: 3;
}

.pixel-skill-btn .skill-label {
	position: absolute;
	left: 50%;
	top: -12px;
	transform: translateX(-50%);
	font-family: pixel, "Courier New", monospace;
	font-size: 8px;
	line-height: 9px;
	font-weight: 700;
	color: #f7e7c1;
	text-shadow: 1px 1px 0 #1a0f08;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 64px;
	z-index: 3;
	pointer-events: none;
}

.pixel-skill-btn .skill-icon-wrap {
	position: absolute;
	left: 50%;
	top: 56%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	pointer-events: none;
}

.pixel-skill-btn .skill-icon-wrap .hotbar-icon-frame {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: none;
	border: 0;
	box-shadow: none;
}

.pixel-skill-btn .skill-icon-wrap .hotbar-icon-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	image-rendering: pixelated;
	background: none;
	border: 0;
	filter: brightness(1.12) contrast(1.05);
}

.pixel-skill-btn .hotbar-fallback {
	font-size: 11px;
	font-weight: 700;
	color: #f4dba7;
	text-shadow: 1px 1px 0 #1a0f08;
}

.pixel-skill-btn.pressed {
	transform: translateY(1px);
}

.pixel-skill-btn.empty .skill-label {
	color: #9f8767;
}

/* Cooldown effect */
.pixel-skill-btn.cooldown {
	filter: grayscale(0.8) brightness(0.6);
}

.pixel-skill-btn.cooldown::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		0deg,
		rgba(0,0,0,0.7) var(--cooldown, 0%),
		transparent var(--cooldown, 0%)
	);
}

.pixel-skill-btn.utility {
	background: linear-gradient(180deg, #4c3320 0%, #332114 100%);
}

/* === BARS STATS EN BAS À DROITE === */
.medieval-stats-bottom {
	position: fixed;
	bottom: 8px;
	right: 8px;
	z-index: 96;
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 200px;
}

.medieval-stat-box {
	background: #3d2818;
	border: 3px solid #1a0f08;
	box-shadow: 0 4px 8px rgba(0,0,0,0.3);
	padding: 4px;
}

.medieval-stat-label {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	font-weight: 700;
	color: #e8c46a;
	text-shadow: 1px 1px 0 #1a0f08;
	margin-bottom: 3px;
}

.medieval-stat-bar-fill {
	height: 10px;
	background: #1a0f08;
	border: 1px solid #1a0f08;
	overflow: hidden;
}

.medieval-stat-bar-fill > div {
	height: 100%;
	transition: width 0.3s ease;
}

/* Colors */
.hp-fill { background: linear-gradient(180deg, #c94a4a 0%, #8b2e2e 100%); }
.mp-fill { background: linear-gradient(180deg, #4a7ac9 0%, #2e4f8b 100%); }
.xp-fill { background: linear-gradient(180deg, #7ac94a 0%, #4f8b2e 100%); }

/* ═══════════════════════════════════════════════
   TOP BUTTONS BAR (SKILLS, TRAVEL, CONF, etc.)
   ═══════════════════════════════════════════════ */

#topbuttons, .topbuttons, #topleftcorner .gamebutton,
#toprightcorner .gamebutton, .top-btn-row {
	font-family: 'Pixel', 'Courier New', monospace !important;
}

#bottomrightcorner {
	display: none !important;
}

/* Settings button top-right */
.pixel-btn.settings, #settings-btn, .settingsbtn {
	position: fixed;
	top: 8px;
	right: 8px;
	z-index: 200;
	background: var(--px-btn) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	border-right: 2px solid var(--px-bg) !important;
	border-bottom: 2px solid var(--px-bg) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', monospace !important;
	font-size: 13px !important;
	padding: 6px 12px !important;
	cursor: pointer;
	letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════
   SELECTION / LOGIN SCREEN PANELS
   ═══════════════════════════════════════════════ */

/* Fond global login */
#innerGame, body.login-page {
	background: var(--px-bg) !important;
}

/* Panel principal centré login */
.selection, .selectionbox, .login-center, #login-center {
	background: var(--px-panel) !important;
	border: 2px solid var(--px-border-m) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	box-shadow: 6px 6px 0 rgba(0,0,0,0.8) !important;
	padding: 20px !important;
}

/* Titres dans login */
.selection h1, .selection h2, .selection h3,
.selectionbox h1, .selectionbox h2 {
	color: var(--px-goldbr) !important;
	letter-spacing: 3px;
	text-shadow: 0 0 12px var(--px-golddark);
	font-family: 'Pixel', monospace !important;
}

/* Character slots */
.character-slot, .charslot, .cslot {
	background: var(--px-btn) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	border-right: 2px solid var(--px-bg) !important;
	border-bottom: 2px solid var(--px-bg) !important;
	color: var(--px-text) !important;
	padding: 8px !important;
	margin: 4px !important;
	cursor: pointer;
	transition: background 0.07s;
}

.character-slot:hover, .charslot:hover {
	background: var(--px-btn-h) !important;
	color: var(--px-goldbr) !important;
}

/* Separateurs */
hr, .hr, .separator {
	border: none !important;
	border-top: 1px solid var(--px-border-m) !important;
	margin: 8px 0 !important;
}

/* ═══════════════════════════════════════════════
   SETTINGS PANEL (basicsettings, paramètres)
   ═══════════════════════════════════════════════ */

.basicsettings, .settingspanel, #settings-panel {
	background: var(--px-panel) !important;
	border: 2px solid var(--px-border-m) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	padding: 12px !important;
}

.basicsettings label, .settingspanel label {
	color: var(--px-text) !important;
	font-family: 'Pixel', monospace !important;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	cursor: pointer;
}

.basicsettings input[type="checkbox"],
.settingspanel input[type="checkbox"] {
	appearance: none;
	width: 14px !important;
	height: 14px !important;
	background: var(--px-bg) !important;
	border: 1px solid var(--px-border-m) !important;
	border-top-color: var(--px-bg) !important;
	border-left-color: var(--px-bg) !important;
	position: relative;
	cursor: pointer;
	padding: 0 !important;
}

.basicsettings input[type="checkbox"]:checked::after,
.settingspanel input[type="checkbox"]:checked::after {
	content: 'x';
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%,-50%);
	color: var(--px-goldbr);
	font-size: 10px;
	font-family: 'Pixel', monospace;
}

/* ═══════════════════════════════════════════════
   INVENTORY / ITEMS
   ═══════════════════════════════════════════════ */

.item-slot, .slot, .inv-slot, .itemslot {
	background: var(--px-btn) !important;
	border: 1px solid var(--px-border-m) !important;
	border-top-color: var(--px-bg) !important;
	border-left-color: var(--px-bg) !important;
	cursor: pointer;
	position: relative;
}

.item-slot:hover, .slot:hover {
	border-color: var(--px-gold) !important;
	background: var(--px-btn-h) !important;
}

/* ═══════════════════════════════════════════════
   LOG / GAMELOG
   ═══════════════════════════════════════════════ */

#gamelog, .gamelog, .chatlog, #chat {
	background: var(--px-bg) !important;
	border: 1px solid var(--px-border-m) !important;
	color: var(--px-textdim) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	font-size: 12px !important;
	padding: 4px !important;
}

.chatlog div, #gamelog div {
	padding: 1px 3px;
	border-bottom: 1px solid rgba(74,48,32,0.3);
}

/* ═══════════════════════════════════════════════
   TARGET / ENTITY INFO
   ═══════════════════════════════════════════════ */

#targetinfo, .targetbox, .targetinfo {
	background: var(--px-panel) !important;
	border: 2px solid var(--px-border-m) !important;
	border-top: 2px solid var(--px-border-l) !important;
	border-left: 2px solid var(--px-border-l) !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', 'Courier New', monospace !important;
	padding: 6px !important;
}

/* ═══════════════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════════════ */

.progress-bar, .progressbar, .bar-wrap {
	background: var(--px-bg) !important;
	border: 1px solid var(--px-border-m) !important;
	height: 12px !important;
	overflow: hidden;
}

.progress-bar > div, .progressbar > div, .bar-fill {
	height: 100%;
	transition: width 0.3s ease;
}

.progress-bar.hp > div, .hpbar > div { background: var(--px-hp) !important; }
.progress-bar.mp > div, .mpbar > div { background: var(--px-mp) !important; }
.progress-bar.xp > div, .xpbar > div { background: var(--px-xp) !important; }

/* ═══════════════════════════════════════════════
   COLORS TEXT UTILITIES
   ═══════════════════════════════════════════════ */

.gold, .goldtext { color: var(--px-gold) !important; }
.goldglow { color: var(--px-goldbr) !important; text-shadow: 0 0 8px var(--px-golddark); }
.ggreen { color: #5ad050 !important; }
.gyellow { color: var(--px-gold) !important; }
.gray, .grey { color: var(--px-textdim) !important; }
.red, .gred { color: var(--px-red) !important; }
.white { color: var(--px-textbr) !important; }

/* ═══════════════════════════════════════════════
   DISCORD BUTTON SPÉCIAL
   ═══════════════════════════════════════════════ */

.discord-btn, a[href*="discord"], .discord-link {
	background: #2d2060 !important;
	border-top: 2px solid #5865F2 !important;
	border-left: 2px solid #5865F2 !important;
	border-right: 2px solid #0a0820 !important;
	border-bottom: 2px solid #0a0820 !important;
	color: #fff !important;
}

.discord-btn:hover, a[href*="discord"]:hover {
	background: #3d30a0 !important;
	color: #f0c84a !important;
}

/* ═══════════════════════════════════════════════
   LINKS
   ═══════════════════════════════════════════════ */

a, a:visited {
	color: var(--px-gold) !important;
	text-decoration: none !important;
}

a:hover {
	color: var(--px-goldbr) !important;
	text-decoration: underline !important;
}

a.cancela, a.cancela:visited {
	color: var(--px-textdim) !important;
}

a.cancela:hover {
	color: var(--px-text) !important;
}

/* ═══════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════ */

table { border-collapse: collapse !important; }
td, th {
	border: 1px solid var(--px-border) !important;
	padding: 4px 8px !important;
	color: var(--px-text) !important;
	font-family: 'Pixel', monospace !important;
}
th {
	background: var(--px-border) !important;
	color: var(--px-goldbr) !important;
	letter-spacing: 1px;
}
tr:nth-child(even) td {
	background: rgba(255,255,255,0.02) !important;
}

/* ═══════════════════════════════════════════════
   ANIMATIONS PIXEL
   ═══════════════════════════════════════════════ */

@keyframes px-glow {
	0%,100% { text-shadow: 0 0 4px var(--px-golddark); }
	50% { text-shadow: 0 0 16px var(--px-gold), 0 0 4px var(--px-goldbr); }
}

@keyframes px-flash {
	0%,100% { opacity: 1; }
	50% { opacity: 0.4; }
}

.textglow { animation: px-glow 2s ease-in-out infinite; }
.textflash { animation: px-flash 1s ease-in-out infinite; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

@media (max-width: 800px) {
	.gamebutton, .slimbutton {
		font-size: 11px !important;
		padding: 5px 8px !important;
	}
	.medieval-stats-bottom { width: 160px !important; }
	.medieval-chat { width: 320px !important; }
}

/* ═══════════════════════════════════════════════
   SELECTION HUB — MEDIEVAL FANTASY REWORK
   ═══════════════════════════════════════════════ */

#pagewrapped.loginorselection {
	min-width: 760px;
	max-width: 860px;
	padding: 18px !important;
	background:
		radial-gradient(circle at top, rgba(212,168,50,0.12), transparent 32%),
		linear-gradient(180deg, rgba(42,27,18,0.96), rgba(15,10,8,0.98)) !important;
	border: 2px solid #7b5530 !important;
	border-top-color: #b98a49 !important;
	border-left-color: #b98a49 !important;
	box-shadow: 0 0 0 2px rgba(20,13,10,0.75), 10px 10px 0 rgba(0,0,0,0.55) !important;
}

.medieval-entry-hero {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px 14px 12px;
	margin-bottom: 10px;
	background: linear-gradient(180deg, rgba(47, 30, 18, 0.82), rgba(22, 14, 10, 0.68));
	border: 1px solid rgba(185, 138, 73, 0.3);
	text-align: left;
}

.medieval-entry-kicker {
	color: var(--px-goldbr) !important;
	font-size: 12px !important;
	letter-spacing: 3px;
	text-transform: uppercase;
}

.medieval-entry-title {
	color: var(--px-textbr) !important;
	font-size: 28px !important;
	line-height: 1.1;
	text-transform: uppercase;
	text-shadow: 0 0 12px rgba(212, 168, 50, 0.28);
}

.medieval-entry-copy {
	color: var(--px-textdim) !important;
	font-size: 13px !important;
	line-height: 1.7;
	max-width: 700px;
}

.medieval-login-buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.medieval-entry-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 14px;
}

/* ═══ LOGIN HUB — MEDIEVAL FANTASY REWORK ═══ */

.medieval-entry-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(185, 138, 73, 0.3);
}

.medieval-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	text-decoration: none !important;
	color: var(--px-textbr) !important;
}

.medieval-wordmark .medieval-mark {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid #b98a49;
	border-top-color: #9b6e30;
	border-left-color: #9b6e30;
	border-radius: 8px;
	background: linear-gradient(180deg, rgba(53, 36, 24, 0.95), rgba(27, 17, 12, 0.95));
	box-shadow: 0 0 14px rgba(212, 168, 50, 0.25);
	font-size: 18px;
	font-weight: 950;
	color: #f7e6b5;
	text-shadow: 0 0 8px rgba(212, 168, 50, 0.5);
}

.medieval-wordmark strong {
	display: block;
	font-size: 15px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: 0.14em;
}

.medieval-wordmark small {
	display: block;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.22em;
	color: var(--px-textdim);
}

.medieval-entry-statuses {
	display: flex;
	align-items: center;
	gap: 8px;
}

.medieval-status-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 11px;
	border: 1px solid #6b4828;
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(29, 19, 14, 0.9), rgba(16, 10, 8, 0.92));
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--px-textdim) !important;
}

.medieval-status-pill i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #d4a832;
	box-shadow: 0 0 8px rgba(212, 168, 50, 0.8);
	animation: medieval_status_pulse 1.8s ease-in-out infinite;
}

@keyframes medieval_status_pulse {
	0%, 100% { opacity: 0.5; transform: scale(0.85); }
	50% { opacity: 1; transform: scale(1); }
}

.medieval-login-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
}

.medieval-discord-button {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 13px;
	width: 100%;
	min-height: 64px;
	box-sizing: border-box;
	padding: 10px 16px 10px 11px;
	border: 1px solid #5865f2;
	border-top-color: #7984f5;
	border-left-color: #7984f5;
	border-radius: 14px;
	background: linear-gradient(180deg, #5865f2, #4453d6);
	box-shadow: 0 10px 26px rgba(88, 101, 242, 0.32);
	text-decoration: none !important;
	color: #ffffff !important;
	transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease, filter 180ms ease;
}

.medieval-discord-button:hover,
.medieval-discord-button:focus-visible {
	transform: translateY(-2px);
	filter: brightness(1.08);
	box-shadow: 0 16px 34px rgba(88, 101, 242, 0.42);
	outline: none;
}

.medieval-discord-button:active {
	transform: translateY(1px) scale(0.99);
}

.medieval-discord-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.14);
}

.medieval-discord-icon svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.medieval-discord-copy {
	display: grid;
	gap: 3px;
	min-width: 0;
	text-align: left;
}

.medieval-discord-copy strong {
	font-size: 12px;
	line-height: 1.2;
	font-weight: 900;
	letter-spacing: 0.05em;
}

.medieval-discord-copy small {
	font-size: 10px;
	font-weight: 650;
	opacity: 0.78;
}

.medieval-entry-trust {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 10px;
	line-height: 1.45;
	color: var(--px-textdim);
}

.medieval-entry-trust::before {
	content: "◆";
	color: var(--px-goldbr);
}

.medieval-selection-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
	text-align: left;
}

.medieval-selection-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.medieval-selection-actions .gamebutton {
	min-width: 148px;
}

.selection-title {
	color: var(--px-goldbr) !important;
	font-size: 26px !important;
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-bottom: 8px;
	text-shadow: 0 0 10px rgba(212,168,50,0.4);
}

.selection-subtitle {
	color: var(--px-textdim) !important;
	font-size: 13px !important;
	line-height: 1.6;
	max-width: 620px;
	margin: 0 auto 16px auto;
}

.selection-shell-note {
	color: #8aa56b !important;
	font-size: 12px !important;
	margin-top: 8px;
}

.selection-loading-wrap {
	display: flex;
	justify-content: center;
}

.selection-loading-shell {
	width: min(620px, 100%);
	margin: 0 auto;
	padding: 22px 20px !important;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.selection-loading-kicker {
	font-size: 11px !important;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--px-textdim) !important;
}

.selection-loading-stage {
	min-height: 138px;
	display: flex;
	align-items: center;
	justify-content: center;
	background:
		radial-gradient(circle at 50% 28%, rgba(212,168,50,0.15), transparent 34%),
		linear-gradient(180deg, rgba(20,14,10,0.98), rgba(10,8,6,0.98));
	border: 1px solid #4f3420;
	overflow: hidden;
}

.selection-loading-stage .cskin {
	transform: scale(2.4);
	transform-origin: center center;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 80px;
}

.selection-loading-bar {
	height: 14px;
	border: 1px solid #6b4828;
	background: rgba(12, 8, 6, 0.75);
	overflow: hidden;
	position: relative;
}

.selection-loading-bar-fill {
	width: 42%;
	height: 100%;
	background: linear-gradient(90deg, rgba(212,168,50,0.35), rgba(212,168,50,0.9), rgba(255,232,177,0.95));
	box-shadow: 0 0 18px rgba(212,168,50,0.35);
	animation: selection_loading_bar 1.6s ease-in-out infinite alternate;
}

.selection-loading-status {
	font-size: 12px !important;
	line-height: 1.5;
	color: var(--px-textdim) !important;
	letter-spacing: 1px;
	text-transform: uppercase;
}

@keyframes selection_loading_bar {
	0% {
		width: 28%;
	}
	100% {
		width: 78%;
	}
}

.character-creation-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
	gap: 16px;
	align-items: stretch;
	text-align: left;
}

.creation-panel,
.class-preview-panel,
.server-panel,
.topui-panel {
	background: linear-gradient(180deg, rgba(29,19,14,0.98), rgba(16,10,8,0.98)) !important;
	border: 1px solid #6b4828 !important;
	border-top-color: #9b6e30 !important;
	border-left-color: #9b6e30 !important;
	box-shadow: inset 0 0 0 1px rgba(255,216,145,0.04);
	padding: 12px;
}

.panel-section-title {
	font-size: 12px !important;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--px-goldbr) !important;
	margin-bottom: 8px;
}

.creation-panel .selectioninput.charactername {
	display: block;
	width: 100%;
	font-size: 18px !important;
	padding: 8px 10px !important;
	text-align: left;
	margin: 0 0 12px 0 !important;
}

.class-grid,
.looks-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.looks-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 8px;
}

.chartype,
.lookstype {
	display: flex !important;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	text-align: center;
	border: 1px solid #6b4828 !important;
	background: linear-gradient(180deg, rgba(53,36,24,0.95), rgba(27,17,12,0.95)) !important;
	box-shadow: inset 0 0 0 1px rgba(255,214,122,0.05);
	font-size: 13px !important;
	line-height: 1.3;
	margin: 0 !important;
	padding: 8px 10px !important;
}

.chartype.selected,
.lookstype.selected {
	background: linear-gradient(180deg, rgba(115,76,28,1), rgba(76,49,16,1)) !important;
	border-color: #d4a832 !important;
	color: #fff0c2 !important;
	box-shadow: 0 0 0 1px rgba(212,168,50,0.25), inset 0 0 14px rgba(255,210,120,0.08);
}

.creation-help-text {
	color: var(--px-textdim) !important;
	font-size: 12px !important;
	line-height: 1.6;
	margin: 10px 0 12px 0;
}

.create-action-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
}

.create-action-row .gamebutton {
	min-width: 170px;
	text-align: center;
	font-size: 14px !important;
}

.class-preview-panel {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.class-preview-stage {
	min-height: 170px;
	background:
		radial-gradient(circle at 50% 30%, rgba(212,168,50,0.12), transparent 35%),
		linear-gradient(180deg, rgba(20,14,10,0.98), rgba(10,8,6,0.98));
	border: 1px solid #4f3420;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.class-preview-stage .preview-sprite {
	min-height: 128px;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(2.2);
	transform-origin: center center;
}

.class-preview-meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.preview-card {
	background: rgba(10,8,6,0.55);
	border: 1px solid rgba(123,85,48,0.85);
	padding: 8px;
}

.preview-card strong,
.class-preview-name {
	display: block;
	color: var(--px-goldbr) !important;
	font-size: 14px !important;
	letter-spacing: 1px;
	margin-bottom: 4px;
}

.preview-muted,
.class-preview-desc,
.class-preview-tip {
	color: var(--px-textdim) !important;
	font-size: 12px !important;
	line-height: 1.55;
}

.class-stat-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
}

.class-stat-pill {
	background: rgba(212,168,50,0.08);
	border: 1px solid rgba(123,85,48,0.65);
	padding: 6px 7px;
	font-size: 11px !important;
	color: var(--px-text) !important;
}

.class-stat-pill span {
	display: block;
	color: var(--px-textdim) !important;
	font-size: 10px !important;
	margin-bottom: 2px;
}

.cole-shrine-layout {
	display: grid;
	grid-template-columns: minmax(260px, 320px) minmax(280px, 420px) minmax(320px, 1fr);
	gap: 14px;
	align-items: start;
	text-align: left;
}

.cole-shrine-hero,
.cole-shrine-browser,
.cole-recipe-detail {
	min-height: 100%;
	padding: 14px !important;
}

.cole-shrine-hero {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cole-hero-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cole-hero-portrait {
	width: 88px;
	height: 88px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(123, 85, 48, 0.85);
	background: radial-gradient(circle at 50% 35%, rgba(212, 168, 50, 0.16), rgba(12, 8, 6, 0.96) 72%);
	overflow: hidden;
}

.cole-hero-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cole-hero-kicker {
	font-size: 11px !important;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--px-textdim) !important;
}

.cole-hero-title {
	font-size: 24px !important;
	letter-spacing: 2px;
	color: var(--px-goldbr) !important;
	text-transform: uppercase;
}

.cole-hero-subtitle,
.cole-hero-note {
	font-size: 12px !important;
	line-height: 1.6;
	color: var(--px-textdim) !important;
}

.cole-hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cole-hero-chip {
	padding: 6px 10px;
	font-size: 11px !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #f0dab0 !important;
	background: rgba(12, 8, 6, 0.72);
	border: 1px solid rgba(123, 85, 48, 0.85);
}

.cole-shrine-browser {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cole-recipe-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
	gap: 10px;
	max-height: 520px;
	overflow-y: auto;
	padding-right: 4px;
}

.cole-recipe-card {
	border: 1px solid rgba(123, 85, 48, 0.85);
	background: linear-gradient(180deg, rgba(38, 25, 17, 0.96), rgba(15, 10, 7, 0.98));
	padding: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	min-height: 148px;
	text-align: center;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.cole-recipe-card:hover,
.cole-recipe-card.active {
	transform: translateY(-1px);
	border-color: #d4a832;
	box-shadow: 0 0 0 1px rgba(212, 168, 50, 0.25), inset 0 0 16px rgba(212, 168, 50, 0.08);
}

.cole-recipe-card-icon {
	min-height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cole-recipe-card-name {
	font-size: 12px !important;
	line-height: 1.35;
	color: var(--px-text) !important;
	min-height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cole-recipe-card-meta {
	font-size: 10px !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--px-textdim) !important;
}

.cole-recipe-detail {
	min-width: 320px;
	overflow: hidden;
}

@media only screen and (max-width: 1180px) {
	.cole-shrine-layout {
		grid-template-columns: 1fr;
	}

	.cole-recipe-detail {
		min-width: 0;
	}

	.cole-recipe-grid {
		max-height: none;
	}
}

.character-slot-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 12px;
	align-items: stretch;
}

.character-slot-card {
	width: 100% !important;
	min-height: 96px;
	text-align: left !important;
	padding: 12px 12px 12px 74px !important;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.character-slot-card .slot-name {
	display: block;
	font-size: 14px !important;
	color: var(--px-textbr) !important;
	margin-bottom: 4px;
}

.character-slot-card .slot-meta {
	font-size: 11px !important;
	color: var(--px-textdim) !important;
	line-height: 1.4;
}

/* Stat Box for Hotbar */
.pixel-stat-box {
  background: #1a1614;
  border: 3px solid #3c2a1a;
  padding: 4px 6px;
  min-width: 150px;
	box-shadow: inset 0 0 0 2px #000, 0 4px 0 #000;
  text-align: left;
  width: 140px;
  cursor: pointer;
  display: inline-block;
  pointer-events: auto;
}
.pixel-stat-box:hover {
  background: #241e1a;
}
.pixel-stat-box .stat-label {
  color: #e9d9b5;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-weight: bold;
}
.pixel-stat-box .stat-label span {
  font-weight: normal;
  color: #c9b995;
}
.pixel-stat-box .stat-bar {
  height: 10px;
  background: #090604;
  border: 1px solid #000;
  position: relative;
}
.pixel-stat-box .hp-fill { background: linear-gradient(90deg, #9b2226, #e5383b); height: 100%; transition: width 0.2s; }
.pixel-stat-box .xp-fill { background: linear-gradient(90deg, #b07d62, #ffb703); height: 100%; transition: width 0.2s; }
.pixel-stat-box .mp-fill { background: linear-gradient(90deg, #023e8a, #00b4d8); height: 100%; transition: width 0.2s; }

.medieval-stats-row {
	display: flex;
	gap: 8px;
	justify-content: center;
	align-items: stretch;
	margin: 15px 0 10px;
	flex-wrap: nowrap;
}

.medieval-stats-row .pixel-stat-box {
	flex: 1 1 132px;
	min-width: 0;
	max-width: 142px;
	padding: 4px 5px;
}

.medieval-stats-row .pixel-stat-box .stat-label {
	font-size: 12px;
	gap: 5px;
}

.medieval-stats-row .pixel-stat-box .stat-label span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.character-slot-card .cskin {
	position: absolute;
	left: 12px;
	top: 50%;
	margin: 0 !important;
	transform: translateY(-50%) scale(1.2);
	transform-origin: center center;
}

.character-slot-card .character-slot-preview {
	position: relative;
	overflow: hidden;
}

.character-slot-card .character-slot-preview .cskin {
	position: static;
	left: auto;
	top: auto;
	transform: scale(1.2);
}

.selection-pager,
.selection-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
	justify-content: center;
	align-items: center;
}

.selection-actions .nchb {
	min-width: 140px;
	text-align: center !important;
}

.create-action-row {
	align-items: flex-start;
}

.passwordui .selectioninput,
.emailcui .selectioninput,
.sortui .selectioninput,
.renameui .selectioninput,
.transferui .selectioninput,
.privacyui .selectioninput,
.deleteui .selectioninput,
.freeui .selectioninput,
.cmapui .selectioninput,
.dmapui .selectioninput {
	display: block;
	width: min(100%, 360px) !important;
	margin: 0 auto 8px auto !important;
	text-align: left !important;
}

.sortui .selectioninput.scharacters {
	width: min(100%, 420px) !important;
}

#topui .largeborder {
	min-width: 230px;
	background: linear-gradient(180deg, rgba(30,20,15,0.97), rgba(15,9,8,0.98)) !important;
}

#features {
	max-width: 360px !important;
	height: 280px !important;
	padding: 14px !important;
}

@media (max-width: 1100px) {
	#pagewrapped.loginorselection {
		min-width: 0;
		max-width: calc(100vw - 32px);
	}
	.medieval-selection-header {
		flex-direction: column;
	}
	.medieval-selection-actions {
		justify-content: flex-start;
	}
	.medieval-entry-links {
		justify-content: flex-start;
	}
	.character-creation-grid {
		grid-template-columns: 1fr;
	}
	.class-preview-stage .preview-sprite {
		transform: scale(1.8);
	}
}

@media (max-width: 760px) {
	.class-grid,
	.character-slot-grid {
		grid-template-columns: 1fr;
	}
	.looks-grid,
	.class-stat-list,
	.class-preview-meta {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.create-action-row {
		flex-direction: column;
		align-items: stretch;
	}
}

/* === FINAL FULL PIXEL GAMEPLAY REWORK === */

#bottomrightcodecorner,
#medieval-menu-bar,
#medieval-quest-panel,
.medieval-chat-tools,
.medieval-send-btn,
.chat-toggle-btn,
.chat-toggle-btn.visible {
	display: none !important;
}

#bottomleftcorner {
	display: block !important;
	position: fixed !important;
	left: 50% !important;
	top: 50% !important;
	transform: translate(-50%, -50%) !important;
	z-index: 220 !important;
}

#bottomleftcorner2 {
	display: block !important;
	position: fixed !important;
	left: 16px !important;
	bottom: 16px !important;
	z-index: 210 !important;
}

.pixel-btn.settings,
#settings-btn,
.settingsbtn {
	top: 16px !important;
	right: 16px !important;
	width: 132px;
	height: 48px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 0 12px !important;
	background: linear-gradient(180deg, #7a522d 0%, #4b2d18 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 3px #9e6a35, 0 10px 18px rgba(0,0,0,0.35) !important;
	color: #f7e7c1 !important;
	font-size: 13px !important;
	letter-spacing: 1px;
}

.top-menu-buttons {
	position: fixed !important;
	top: 72px !important;
	right: 16px !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 10px !important;
	padding: 12px !important;
	background: linear-gradient(180deg, rgba(28, 18, 10, 0.98) 0%, rgba(12, 8, 5, 0.98) 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 3px #8d5826, 0 14px 24px rgba(0,0,0,0.42) !important;
	clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
	z-index: 209 !important;
}

.top-menu-buttons .pixel-btn {
	min-width: 132px;
	min-height: 46px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 10px 14px !important;
	background: linear-gradient(180deg, #7a522d 0%, #4b2d18 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 2px #9e6a35 !important;
	color: #f7e7c1 !important;
	font-size: 12px !important;
	letter-spacing: 1px;
}

.top-menu-buttons .pixel-btn:hover,
.pixel-btn.settings:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.medieval-chat {
	width: 388px !important;
	background: linear-gradient(180deg, rgba(30, 20, 12, 0.98) 0%, rgba(9, 6, 4, 0.98) 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 3px #8d5826, 0 16px 28px rgba(0,0,0,0.45) !important;
	color: #f3e2be !important;
}

.medieval-chat::before,
.medieval-chat::after {
	display: none !important;
}

.medieval-chat-header {
	justify-content: space-between !important;
	align-items: center !important;
	padding: 10px 14px !important;
	background: linear-gradient(180deg, rgba(72, 45, 24, 0.98) 0%, rgba(37, 22, 12, 0.98) 100%) !important;
	border-bottom: 2px solid #8d5826 !important;
}

.medieval-chat-server {
	font-size: 14px !important;
	letter-spacing: 1px;
	color: #f4cd79 !important;
}

.medieval-chat-time {
	font-size: 12px !important;
	color: #d9c39a !important;
	opacity: 0.9;
}

.medieval-chat-messages {
	height: 188px !important;
	margin: 0 !important;
	padding: 12px !important;
	border: 0 !important;
	background: linear-gradient(180deg, rgba(20, 13, 8, 0.96) 0%, rgba(10, 7, 5, 0.98) 100%) !important;
	box-shadow: inset 0 0 0 1px rgba(141, 88, 38, 0.24), inset 0 10px 20px rgba(0,0,0,0.35) !important;
	font-size: 14px !important;
	line-height: 18px !important;
}

.medieval-chat-entry {
	padding: 6px 0 !important;
	margin-bottom: 0 !important;
	border-bottom: 1px dashed rgba(141, 88, 38, 0.22) !important;
}

.medieval-input-row {
	display: block !important;
	margin: 0 !important;
	padding: 12px !important;
	min-height: auto !important;
	background: linear-gradient(180deg, rgba(18, 12, 8, 0.98) 0%, rgba(8, 6, 4, 0.98) 100%) !important;
	border-top: 2px solid rgba(141, 88, 38, 0.42) !important;
	box-shadow: none !important;
}

.medieval-chat-input {
	width: 100% !important;
	height: 46px !important;
	padding: 0 14px !important;
	background: linear-gradient(180deg, rgba(10, 7, 5, 0.98) 0%, rgba(21, 14, 10, 0.98) 100%) !important;
	border: 2px solid #8d5826 !important;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.38), inset 0 10px 14px rgba(0,0,0,0.24) !important;
	color: #f7e7c1 !important;
	font-size: 15px !important;
}

.medieval-chat-input::placeholder {
	color: #9f8767 !important;
}

.medieval-chat-input:focus {
	border-color: #d8a75e !important;
	box-shadow: 0 0 0 1px #2a1509, inset 0 0 0 1px rgba(255,255,255,0.04), inset 0 10px 14px rgba(0,0,0,0.24) !important;
}

.medieval-action-btns-row {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-bottom: 10px;
}

.medieval-action-btns-row .pixel-btn {
	min-width: 118px;
	min-height: 46px;
	padding: 10px 12px !important;
	background: linear-gradient(180deg, #724926 0%, #452715 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 2px #8d5826 !important;
	color: #f7e7c1 !important;
	font-size: 12px !important;
	letter-spacing: 1px;
}

.medieval-buttons-separator {
	display: none !important;
}

.medieval-skillbar-row {
	gap: 8px !important;
	padding: 16px 18px 12px !important;
	background: linear-gradient(180deg, rgba(29, 18, 11, 0.98) 0%, rgba(10, 7, 5, 0.98) 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 3px #8d5826, 0 14px 24px rgba(0,0,0,0.4) !important;
	align-items: flex-end !important;
}

.medieval-skillbar-row::before,
.medieval-skillbar-row::after {
	display: none !important;
}

.medieval-skillbar-row > div[data-skid] {
	position: relative !important;
	margin: 0 !important;
	width: 58px !important;
	height: 58px !important;
	border: 0 !important;
	background: linear-gradient(180deg, #7a4a22 0%, #6b3f1c 16%, #5c3417 58%, #3b1f0d 100%) !important;
	box-shadow: 0 -3px 0 #9f6931 inset, 0 3px 0 #2b1508 inset, 3px 0 0 #2b1508 inset, -3px 0 0 #9f6931 inset, 0 0 0 2px #d39a44, 0 0 0 4px #3c1f0d, 0 4px 0 #130904, 0 6px 10px rgba(0,0,0,0.35) !important;
	clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px) !important;
	overflow: visible !important;
	transition: transform 0.08s steps(2, end), filter 0.08s steps(2, end) !important;
	image-rendering: pixelated;
}

.medieval-skillbar-row > div[data-skid]::before {
	content: "";
	position: absolute;
	inset: 4px;
	background: linear-gradient(180deg, rgba(255, 225, 145, 0.15), rgba(255,255,255,0) 40%);
	pointer-events: none;
	clip-path: inherit;
	z-index: 0;
}

.medieval-skillbar-row > div[data-skid]:hover {
	filter: brightness(1.08);
	transform: translateY(-2px);
}

.medieval-skillbar-row > div[data-skid]:active {
	transform: translateY(2px);
	box-shadow: 0 -3px 0 #9f6931 inset, 0 3px 0 #2b1508 inset, 3px 0 0 #2b1508 inset, -3px 0 0 #9f6931 inset, 0 0 0 2px #d39a44, 0 0 0 4px #3c1f0d, 0 2px 0 #130904, 0 3px 6px rgba(0,0,0,0.28) !important;
}

.medieval-skillbar-row > div[data-skid] > div[id^='rid'] {
	position: absolute !important;
	left: 6px !important;
	top: 8px !important;
	bottom: auto !important;
	border: 2px solid #d39a44 !important;
	background: #120905 !important;
	box-shadow: 0 0 0 2px #3c1f0d, inset 0 1px 0 rgba(255,255,255,0.06) !important;
	padding: 3px !important;
	overflow: hidden !important;
	z-index: 1;
}

.medieval-skillbar-row > div[data-skid] > div[id^='rid'] img {
	image-rendering: pixelated !important;
}

.medieval-skillbar-row > div[data-skid] > .truui {
	left: 50% !important;
	top: -10px !important;
	transform: translateX(-50%) !important;
	min-width: 26px;
	height: 20px;
	padding: 3px 6px 0 !important;
	border: 2px solid #2a1509 !important;
	box-shadow: 0 0 0 2px #8d5826 !important;
	background: linear-gradient(180deg, #f3d07a 0%, #b7782b 100%) !important;
	color: #2a1509 !important;
	font-size: 10px !important;
	line-height: 12px !important;
	text-shadow: none !important;
	z-index: 4 !important;
}

.medieval-skillbar-row > div[data-skid] > .iqui,
.medieval-skillbar-row > div[data-skid] > .iuui,
.medieval-skillbar-row > div[data-skid] > .trruui {
	z-index: 3 !important;
}

.pixel-skill-btn {
	width: 74px !important;
	height: 88px !important;
	margin: 0 !important;
	overflow: visible !important;
}

.pixel-skill-btn .skill-key {
	top: -10px !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto !important;
	transform: translateX(-50%) !important;
	min-width: 28px;
	height: 22px;
	padding: 3px 6px 0 !important;
	background: linear-gradient(180deg, #f3d07a 0%, #b7782b 100%);
	border: 2px solid #2a1509;
	box-shadow: 0 0 0 2px #8d5826;
	color: #2a1509 !important;
	font-size: 11px !important;
	text-shadow: none !important;
	text-align: center;
	z-index: 8 !important;
}

.pixel-skill-btn .skill-icon-wrap {
	inset: 16px 8px 24px 8px !important;
	top: auto !important;
	left: auto !important;
	width: auto !important;
	height: auto !important;
	transform: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Hide merchant creation and Center Loading */
div.chartype[data-class="merchant"] {
    display: none !important;
}

#progressui.loading {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99999 !important;
}

.pixel-skill-btn .hotbar-icon-frame {
	width: 44px !important;
	height: 44px !important;
	transform: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	filter: drop-shadow(0 2px 0 rgba(0,0,0,0.42));
}

.pixel-skill-btn .hotbar-icon-image {
	max-width: none !important;
	max-height: none !important;
	object-fit: none !important;
}

.pixel-skill-btn .skill-icon-wrap .hotbar-item-icon {
	width: 100% !important;
	height: 100% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.pixel-skill-btn .skill-icon-wrap .hotbar-item-icon > div {
	margin: 0 !important;
	box-shadow: 0 0 0 2px #3d2412 !important;
}

.pixel-skill-btn .skill-icon-wrap .hotbar-item-icon img {
	image-rendering: pixelated !important;
}

.pixel-skill-btn .skill-label {
	top: auto !important;
	left: 6px !important;
	right: 6px !important;
	bottom: 6px !important;
	transform: none !important;
	max-width: none !important;
	font-size: 9px !important;
	line-height: 10px !important;
	color: #f8ebcb !important;
}

.pixel-skill-btn.empty .skill-label,
.pixel-skill-btn.empty .hotbar-fallback {
	display: none !important;
}

.medieval-character-panel.self-character-shell {
	min-width: min(620px, calc(100vw - 44px)) !important;
	max-width: min(620px, calc(100vw - 44px)) !important;
	padding: 18px !important;
}

.self-character-header {
	flex-direction: column;
	align-items: flex-start !important;
	gap: 10px !important;
}

.self-character-name-btn {
	font-size: 28px !important;
	line-height: 30px !important;
}

.self-character-sub {
	font-size: 13px !important;
	line-height: 18px !important;
}

.self-character-pillbox {
	justify-content: flex-start !important;
}

.self-character-body {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) 170px;
	gap: 16px;
	align-items: stretch;
}

.self-character-left-column {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.self-character-stat-grid {
	margin-bottom: 0 !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 10px !important;
}

.self-character-stat-card {
	min-height: 70px;
	padding: 12px !important;
	border: 2px solid rgba(141, 88, 38, 0.55) !important;
	background: linear-gradient(180deg, rgba(24, 16, 10, 0.94) 0%, rgba(10, 7, 5, 0.94) 100%) !important;
}

.self-character-stat-label {
	font-size: 12px !important;
	line-height: 12px !important;
	margin-bottom: 8px !important;
}

.self-character-stat-value {
	font-size: 20px !important;
	line-height: 22px !important;
}

.self-character-actions {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px !important;
}

.self-character-action {
	min-height: 46px;
	padding: 10px 12px !important;
	background: linear-gradient(180deg, #724926 0%, #452715 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: 0 0 0 2px #8d5826 !important;
	color: #f7e7c1 !important;
}

.self-character-action.secondary {
	background: linear-gradient(180deg, #614127 0%, #342013 100%) !important;
}

.self-character-action.support {
	background: linear-gradient(180deg, #607032 0%, #354116 100%) !important;
}

.self-character-portrait-column {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.self-character-portrait-frame {
	min-height: 248px;
	padding: 12px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: linear-gradient(180deg, rgba(31, 20, 12, 0.96) 0%, rgba(12, 8, 5, 0.98) 100%);
	border: 3px solid #2a1509;
	box-shadow: inset 0 0 0 2px rgba(141, 88, 38, 0.32);
	overflow: hidden;
}

.self-character-portrait-caption {
	padding: 10px 12px;
	text-align: center;
	background: linear-gradient(180deg, rgba(32, 20, 12, 0.96) 0%, rgba(13, 9, 5, 0.98) 100%);
	border: 2px solid #2a1509;
	color: #e9d9b5;
	font-size: 12px;
	line-height: 16px;
}

.inventory-shell {
	min-width: min(640px, calc(100vw - 40px));
	max-width: none;
}

.inventory-target-shell {
	min-width: min(640px, calc(100vw - 40px));
	max-width: none;
}

.inventory-toolbar {
	padding: 12px 14px 10px !important;
	margin-bottom: 10px !important;
}

.inventory-title {
	font-size: 24px !important;
	line-height: 24px !important;
}

.inventory-subtitle {
	font-size: 12px !important;
	line-height: 16px !important;
}

.inventory-toolbar-actions .pixel-btn,
.inventory-cosmetics-btn {
	min-width: 132px !important;
	min-height: 44px !important;
	padding: 10px 12px !important;
}

.inventory-gear-shell {
	margin: 0 10px 12px !important;
	padding: 12px !important;
	background: linear-gradient(180deg, rgba(20, 13, 8, 0.96) 0%, rgba(9, 6, 4, 0.98) 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: inset 0 0 0 2px rgba(141, 88, 38, 0.26) !important;
}

.inventory-gear-title {
	font-size: 13px !important;
	letter-spacing: 1px;
	margin-bottom: 10px !important;
}

.inventory-gear-grid .slots {
	display: inline-block;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.inventory-content-row {
	display: flex;
	gap: 8px;
	align-items: stretch !important;
}

.inventory-floating-layout {
	position: relative;
	display: inline-block;
	width: fit-content;
	max-width: 100%;
}

.inventory-external-stats {
	position: absolute;
	top: 0;
	right: calc(100% + 50px);
	left: auto;
	z-index: 221;
	width: 280px;
	min-width: 280px;
}

.inventory-companion-external-stats {
	left: calc(100% + 50px);
	right: auto;
}

.inventory-external-stats .inventory-character-summary {
	width: 100%;
}

.inventory-layout-shell {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 10px;
}

.inventory-target-shell .inventory-layout-shell {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 10px;
}

.inventory-left-column,
.inventory-right-column {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 280px;
	min-width: 280px;
}

.inventory-main-column {
	flex: 1 1 auto;
	min-width: 0;
}

.inventory-target-shell .inventory-main-column {
	flex: 1 1 auto;
	min-width: 0;
}

.inventory-target-shell .inventory-gear-shell {
	margin: 0 !important;
}

.inventory-target-shell .inventory-right-column .inventory-item {
	min-height: 318px;
}

.inventory-target-shell .inventory-right-column {
	flex: 0 0 280px;
	width: 280px;
	min-width: 280px;
}

.inventory-grid-column {
	flex: 1 1 auto;
	min-width: 0;
}

.inventory-content-row > .inventory-right-column {
	flex: 0 0 280px;
	width: 280px;
	min-width: 280px;
	align-self: stretch;
}

.inventory-character-summary {
	width: 280px;
	padding: 12px !important;
	background: linear-gradient(180deg, rgba(20, 13, 8, 0.96) 0%, rgba(9, 6, 4, 0.98) 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: inset 0 0 0 2px rgba(141, 88, 38, 0.26) !important;
}

.inventory-character-summary-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(157, 94, 39, 0.36);
}

.inventory-character-summary-title {
	font-size: 13px;
	line-height: 13px;
	letter-spacing: 1px;
	color: #f0cb7a;
}

.inventory-character-summary-level {
	padding: 4px 8px;
	border: 1px solid rgba(157, 94, 39, 0.45);
	background: rgba(0,0,0,0.24);
	color: #f5ddb2;
	font-size: 11px;
	line-height: 11px;
	letter-spacing: 1px;
}

.inventory-character-summary-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.inventory-companion-name {
	margin-bottom: 10px;
	color: #f4dfa8;
	font-size: 12px;
	line-height: 14px;
	text-align: center;
}

.inventory-companion-xp-shell {
	margin-bottom: 10px;
	padding: 8px;
	border: 1px solid rgba(157, 94, 39, 0.45);
	background: rgba(0,0,0,0.22);
}

.inventory-companion-xp-label,
.inventory-companion-xp-value {
	font-size: 10px;
	line-height: 10px;
	color: #b7a88c;
}

.inventory-companion-xp-label {
	margin-bottom: 6px;
	letter-spacing: 1px;
}

.inventory-companion-xp-value {
	margin-top: 6px;
	text-align: right;
	color: #f2ddb2;
}

.inventory-companion-xp-bar {
	height: 10px;
	border: 1px solid rgba(157, 94, 39, 0.45);
	background: #20150d;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.45);
	overflow: hidden;
}

.inventory-companion-xp-fill {
	height: 100%;
	background: linear-gradient(90deg, #d89f2f 0%, #f2cf63 100%);
}

.inventory-character-stat {
	padding: 7px 8px;
	border: 1px solid rgba(157, 94, 39, 0.45);
	background: rgba(0,0,0,0.22);
	min-width: 0;
}

.inventory-character-stat-label {
	font-size: 10px;
	line-height: 10px;
	color: #a89378;
	margin-bottom: 4px;
}

.inventory-character-stat-value {
	font-size: 13px;
	line-height: 14px;
	color: #f2ddb2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.inventory-character-bonus {
	color: #8fd25c;
	font-size: 11px;
}

.inventory-character-bonus.negative {
	color: #f08a7d;
}

.inventory-right-column .inventory-item {
	width: 100% !important;
	flex: 1 1 auto;
	min-height: 0;
	padding: 12px !important;
	background: linear-gradient(180deg, rgba(20, 13, 8, 0.96) 0%, rgba(9, 6, 4, 0.98) 100%) !important;
	border: 3px solid #2a1509 !important;
	box-shadow: inset 0 0 0 2px rgba(141, 88, 38, 0.26) !important;
	box-sizing: border-box;
}

.inventory-detail-empty {
	min-height: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #786955;
	font-style: italic;
	text-align: center;
}

@media (max-width: 980px) {
	.top-menu-buttons {
		flex-direction: row !important;
		flex-wrap: wrap !important;
		top: 72px !important;
		left: 16px !important;
		right: 16px !important;
	}
	.top-menu-buttons .pixel-btn {
		min-width: calc(50% - 5px);
	}
	.medieval-character-panel.self-character-shell {
		min-width: min(calc(100vw - 32px), 620px) !important;
		max-width: min(calc(100vw - 32px), 620px) !important;
	}
	.self-character-body {
		grid-template-columns: 1fr !important;
	}
	.inventory-floating-layout {
		display: block;
		width: 100%;
	}
	.inventory-external-stats {
		position: static;
		width: 100%;
		min-width: 0;
		margin-bottom: 10px;
	}
	.inventory-floating-layout,
	.inventory-layout-shell {
		flex-direction: column;
	}
	.inventory-target-shell .inventory-layout-shell {
		display: flex;
	}
	.inventory-content-row {
		flex-direction: column;
	}
	.inventory-external-stats,
	.inventory-left-column,
	.inventory-right-column,
	.inventory-main-column,
	.inventory-character-summary,
	.inventory-right-column .inventory-item,
	.inventory-shell {
		width: 100% !important;
		min-width: 0 !important;
	}
}

@media (max-width: 760px) {
	#bottomleftcorner2 {
		left: 10px !important;
		right: 10px !important;
		bottom: 10px !important;
	}
	.medieval-chat {
		width: auto !important;
	}
	.medieval-action-btns-row {
		flex-wrap: wrap;
	}
	.medieval-action-btns-row .pixel-btn {
		min-width: calc(50% - 5px);
	}
	.medieval-skillbar-row {
		gap: 8px !important;
		padding: 18px 10px 12px !important;
		flex-wrap: wrap;
	}
	.pixel-skill-btn {
		width: 68px !important;
		height: 84px !important;
	}
}

html.slimefox-sidebar-mode,
body.slimefox-sidebar-mode {
	overflow: hidden;
}

body.slimefox-sidebar-mode #bottomleftcorner,
body.slimefox-sidebar-mode #bottomleftcorner2,
body.slimefox-sidebar-mode #bottomrightcorner,
body.slimefox-sidebar-mode #bottomrightcodecorner {
	display: none !important;
}

body.slimefox-sidebar-mode .pixel-btn.settings,
body.slimefox-sidebar-mode .top-menu-buttons,
body.slimefox-sidebar-mode .medieval-stats-bottom,
body.slimefox-sidebar-mode #bottommid,
body.slimefox-sidebar-mode #targetframe,
body.slimefox-sidebar-mode #cooldown-tracker,
body.slimefox-sidebar-mode #action-notice-anchor {
	z-index: 140 !important;
}

body.slimefox-sidebar-mode .pixel-btn.settings {
	left: 12px !important;
	right: auto !important;
	top: 12px !important;
	width: 120px !important;
	padding: 8px 10px !important;
	font-size: 12px !important;
}

body.slimefox-sidebar-mode .top-menu-buttons {
	top: 56px !important;
	left: 12px !important;
	right: auto !important;
	width: 120px !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
}

body.slimefox-sidebar-mode .top-menu-buttons .pixel-btn {
	width: 100% !important;
	min-width: 0 !important;
	padding: 8px 10px !important;
	font-size: 12px !important;
}

body.slimefox-sidebar-mode #targetframe {
	left: 144px !important;
	right: 12px !important;
	top: 12px !important;
	width: auto !important;
	transform: none !important;
}

body.slimefox-sidebar-mode .target-frame-card {
	padding: 8px 10px !important;
}

body.slimefox-sidebar-mode .target-frame-name {
	font-size: 14px !important;
}

body.slimefox-sidebar-mode .target-frame-subtitle,
body.slimefox-sidebar-mode .target-frame-meta,
body.slimefox-sidebar-mode .target-frame-tags {
	font-size: 10px !important;
}

body.slimefox-sidebar-mode #cooldown-tracker {
	left: 144px !important;
	right: 12px !important;
	bottom: 64px !important;
	top: auto !important;
	width: auto !important;
	transform: none !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	justify-content: flex-end !important;
}

body.slimefox-sidebar-mode .cooldown-chip {
	width: min(148px, calc(50vw - 88px));
}

body.slimefox-sidebar-mode #action-notice-anchor {
	left: 144px !important;
	right: 12px !important;
	bottom: 12px !important;
	width: auto !important;
	transform: none !important;
}

body.slimefox-sidebar-mode #action-notice {
	padding: 10px 14px !important;
	font-size: 13px !important;
}

body.slimefox-sidebar-mode #bottommid {
	left: 12px !important;
	right: auto !important;
	top: 278px !important;
	bottom: 12px !important;
	width: 120px !important;
}

body.slimefox-sidebar-mode .medieval-skillbar-container {
	position: static !important;
	transform: none !important;
	width: 100% !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 10px !important;
}

body.slimefox-sidebar-mode .medieval-action-btns-row {
	width: 100% !important;
	flex-direction: column !important;
	gap: 6px !important;
	padding: 6px !important;
}

body.slimefox-sidebar-mode .medieval-action-btns-row .pixel-btn {
	width: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 8px 10px !important;
	font-size: 11px !important;
}

body.slimefox-sidebar-mode .medieval-buttons-separator {
	margin: 0 !important;
}

body.slimefox-sidebar-mode #medieval-skillbar,
body.slimefox-sidebar-mode .medieval-skillbar-row {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 8px !important;
	padding: 12px 8px 8px !important;
	background: rgba(20, 11, 7, 0.84) !important;
	border: 3px solid #1a0f08 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

body.slimefox-sidebar-mode .pixel-skill-btn {
	width: 48px !important;
	height: 64px !important;
	margin: 0 !important;
}

body.slimefox-sidebar-mode .pixel-skill-btn .skill-label {
	top: -9px !important;
	max-width: 44px !important;
	font-size: 7px !important;
	line-height: 8px !important;
}

body.slimefox-sidebar-mode .pixel-skill-btn .skill-icon-wrap {
	width: 30px !important;
	height: 30px !important;
}

body.slimefox-sidebar-mode .pixel-skill-btn .skill-icon-wrap .hotbar-icon-frame {
	width: 30px !important;
	height: 30px !important;
}

body.slimefox-sidebar-mode .pixel-skill-btn .skill-key {
	font-size: 9px !important;
}

body.slimefox-sidebar-mode .medieval-stats-bottom {
	left: 12px !important;
	right: auto !important;
	top: 200px !important;
	bottom: auto !important;
	width: 120px !important;
	gap: 6px !important;
}

body.slimefox-sidebar-mode .medieval-stat-box {
	padding: 4px !important;
}

body.slimefox-sidebar-mode .medieval-stat-label {
	flex-direction: column !important;
	align-items: flex-start !important;
	gap: 2px !important;
	font-size: 9px !important;
}

body.slimefox-sidebar-mode .medieval-stat-bar-fill {
	height: 8px !important;
}

body.slimefox-sidebar-mode #topleftcorner,
body.slimefox-sidebar-mode #toprightcorner,
body.slimefox-sidebar-mode #codeui {
	left: 144px !important;
	right: 12px !important;
}

body.slimefox-sidebar-mode #toprightcorner {
	top: 68px !important;
}

body.slimefox-sidebar-mode .medieval-character-panel.self-character-shell {
	min-width: min(calc(100vw - 168px), 620px) !important;
	max-width: min(calc(100vw - 168px), 620px) !important;
}

body.slimefox-sidebar-mode .self-character-body {
	grid-template-columns: 1fr !important;
}

body.slimefox-firefox-shell {
	--px-bg: #0f1117;
	--px-panel: #171c24;
	--px-btn: #222a36;
	--px-btn-h: #303b4b;
	--px-border: #334154;
	--px-border-m: #556479;
	--px-border-l: #7f90aa;
	--px-gold: #78a9ff;
	--px-goldbr: #d6e4ff;
	--px-golddark: #3f5f92;
	--px-text: #edf2ff;
	--px-textdim: #a1abbd;
	--px-textbr: #ffffff;
}

body.slimefox-firefox-shell .pixel-btn.settings,
body.slimefox-firefox-shell .top-menu-buttons {
	display: none !important;
}

body.slimefox-firefox-shell[data-shell-inside="game"] #medieval-skillbar,
body.slimefox-firefox-shell[data-shell-inside="game"] .medieval-stats-bottom,
body.slimefox-firefox-shell[data-shell-inside="game"] #targetframe,
body.slimefox-firefox-shell[data-shell-inside="game"] #cooldown-tracker,
body.slimefox-firefox-shell[data-shell-inside="game"] #action-notice-anchor {
	display: none !important;
}

body.slimefox-firefox-shell #topleftcorner .gamebutton.eexternal,
body.slimefox-firefox-shell #topleftcorner .gamebutton[onclick*="show_settings"],
body.slimefox-firefox-shell #topleftcorner #observeui {
	display: none !important;
}

body.slimefox-firefox-shell[data-shell-inside="login"] #topleftcorner,
body.slimefox-firefox-shell[data-shell-inside="selection"] #topleftcorner,
body.slimefox-firefox-shell[data-shell-inside="login"] .gamebutton.menu,
body.slimefox-firefox-shell[data-shell-inside="selection"] .gamebutton.menu,
body.slimefox-firefox-shell[data-shell-inside="login"] #progressui,
body.slimefox-firefox-shell[data-shell-inside="selection"] #progressui {
	display: none !important;
}

body.slimefox-firefox-shell[data-shell-inside="login"] #pagewrapper,
body.slimefox-firefox-shell[data-shell-inside="selection"] #pagewrapper {
	margin-top: 24px !important;
}

body.slimefox-firefox-shell[data-shell-inside="login"] #features,
body.slimefox-firefox-shell[data-shell-inside="selection"] #features {
	max-width: calc(100vw - 24px) !important;
	margin: 24px 0 0 !important;
}

body.slimefox-firefox-shell .pixel-btn,
body.slimefox-firefox-shell .pixel-skill-btn,
body.slimefox-firefox-shell .medieval-stat-box,
body.slimefox-firefox-shell .target-frame-card,
body.slimefox-firefox-shell .cooldown-chip,
body.slimefox-firefox-shell #action-notice {
	font-family: "Segoe UI Variable Text", "Segoe UI", Tahoma, sans-serif !important;
	letter-spacing: 0.01em !important;
	text-shadow: none !important;
	border-radius: 12px !important;
}

body.slimefox-firefox-shell .pixel-btn,
body.slimefox-firefox-shell .pixel-skill-btn {
	text-transform: none !important;
	font-weight: 600 !important;
}

body.slimefox-firefox-shell #medieval-skillbar,
body.slimefox-firefox-shell .medieval-skillbar-row,
body.slimefox-firefox-shell .medieval-stat-box,
body.slimefox-firefox-shell .target-frame-card,
body.slimefox-firefox-shell .cooldown-chip,
body.slimefox-firefox-shell #action-notice {
	background: rgba(24, 30, 40, 0.9) !important;
	border-color: #1a2230 !important;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3) !important;
}

body.slimefox-firefox-shell .medieval-stats-bottom {
	top: 12px !important;
}

body.slimefox-firefox-shell #bottommid {
	top: 138px !important;
}

@media (max-width: 430px) {
	body.slimefox-sidebar-mode .pixel-btn.settings,
	body.slimefox-sidebar-mode .top-menu-buttons,
	body.slimefox-sidebar-mode .medieval-stats-bottom,
	body.slimefox-sidebar-mode #bottommid {
		width: 108px !important;
	}

	body.slimefox-sidebar-mode #targetframe,
	body.slimefox-sidebar-mode #cooldown-tracker,
	body.slimefox-sidebar-mode #action-notice-anchor,
	body.slimefox-sidebar-mode #topleftcorner,
	body.slimefox-sidebar-mode #toprightcorner,
	body.slimefox-sidebar-mode #codeui {
		left: 132px !important;
	}

	body.slimefox-sidebar-mode .top-menu-buttons .pixel-btn,
	body.slimefox-sidebar-mode .medieval-action-btns-row .pixel-btn {
		font-size: 11px !important;
		padding-inline: 8px !important;
	}
}

/* ===== EXOTIC BARS (HP/LEVEL/MANA) ===== */
.exotic-only {
  margin:0;
}
.bars-wrap {
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
}
.status-bar.exotic-bar {
  display:grid;
  grid-template-columns:56px 1fr;
  gap:12px;
  align-items:center;
}
.bar-icon.exotic-icon {
  position:relative;
  width:56px;
  height:56px;
  border:3px solid #000;
  clip-path:polygon(
    8px 0, calc(100% - 8px) 0,
    100% 8px, 100% calc(100% - 8px),
    calc(100% - 8px) 100%, 8px 100%,
    0 calc(100% - 8px), 0 8px
  );
  box-shadow:inset 0 3px 0 rgba(255,255,255,0.14), inset 0 -4px 0 rgba(0,0,0,0.28);
}
.exotic-icon::before, .exotic-icon::after {
  content:""; position:absolute; width:8px; height:8px;
  background:#f2cf63; border:2px solid #000; z-index:3; transform:rotate(45deg);
}
.exotic-icon::before { top:4px; left:4px; }
.exotic-icon::after { bottom:4px; right:4px; }
.heart-icon { background:linear-gradient(180deg,#e79a85 0 8%,#d85f55 8% 30%,#982727 30% 76%,#611414 76% 100%); }
.crest-icon { background:linear-gradient(180deg,#fff0bf 0 8%,#ddb14c 8% 30%,#9f6e1d 30% 76%,#67420c 76% 100%); }
.mana-icon { background:linear-gradient(180deg,#d9f4ff 0 8%,#74b7ff 8% 30%,#2d5898 30% 76%,#162d52 76% 100%); }
.bar-icon span {
  position:absolute; inset:0; margin:auto; width:22px; height:22px;
}
.heart-icon span::before, .heart-icon span::after {
  content:""; position:absolute; width:11px; height:16px; background:#ffd6c8; border:2px solid #000; top:2px;
}
.heart-icon span::before {
  left:2px; border-radius:6px 6px 0 0; transform:rotate(-45deg); transform-origin:bottom right;
}
.heart-icon span::after {
  right:2px; border-radius:6px 6px 0 0; transform:rotate(45deg); transform-origin:bottom left;
}
.crest-icon span {
  background:#fff0b8; border:2px solid #000; clip-path:polygon(50% 0, 100% 18%, 100% 68%, 50% 100%, 0 68%, 0 18%); box-shadow:inset 0 2px 0 rgba(255,255,255,0.25);
}
.crest-icon span::before, .crest-icon span::after {
  content:""; position:absolute; background:#d79e2f; border:1px solid #000;
}
.crest-icon span::before { width:3px; height:14px; left:8px; top:2px; }
.crest-icon span::after { width:12px; height:3px; left:3px; top:7px; }
.mana-icon span {
  background:#d9f3ff; border:2px solid #000; transform:rotate(45deg); box-shadow:inset 0 2px 0 rgba(255,255,255,0.25);
}
.mana-icon span::before {
  content:""; position:absolute; inset:4px; background:#7ed4ff; border:1px solid #000;
}
.exotic-shell {
  position:relative; height:32px; border:3px solid #000; overflow:hidden;
  clip-path:polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  box-shadow:inset 0 3px 0 rgba(255,255,255,0.08), inset 0 -6px 0 rgba(0,0,0,0.30), 0 0 0 3px #4d2e18, 0 0 0 6px #000, 0 8px 16px rgba(0,0,0,0.22);
}
.hp-shell { background:linear-gradient(180deg,rgba(255,255,255,0.07),transparent 18%), repeating-linear-gradient(90deg,#25100f 0px,#25100f 12px,#331514 12px,#331514 24px); }
.level-shell { background:linear-gradient(180deg,rgba(255,255,255,0.07),transparent 18%), repeating-linear-gradient(90deg,#2a1c0a 0px,#2a1c0a 12px,#37240d 12px,#37240d 24px); }
.mana-shell { background:linear-gradient(180deg,rgba(255,255,255,0.07),transparent 18%), repeating-linear-gradient(90deg,#0f1829 0px,#0f1829 12px,#13203a 12px,#13203a 24px); }
.side-cap {
  position:absolute; top:50%; width:16px; height:16px; margin-top:-8px; background:#f2cf63; border:3px solid #000; transform:rotate(45deg); z-index:5; box-shadow:inset 0 2px 0 rgba(255,255,255,0.22);
}
.side-cap.left { left:10px; }
.side-cap.right { right:10px; }
.exotic-fill {
  position:absolute; left:5px; top:5px; bottom:5px; border-right:3px solid #000;
  clip-path:polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  box-shadow:inset 0 2px 0 rgba(255,255,255,0.18), inset 0 -3px 0 rgba(0,0,0,0.24); z-index:1;
}
.hp-fill { background:linear-gradient(180deg,#ffc2b4 0 18%,#f56d61 18% 42%,#a52725 42% 100%); }
.level-fill { background:linear-gradient(180deg,#fff2b8 0 18%,#f2cb62 18% 42%,#a96d17 42% 100%); }
.mana-fill { background:linear-gradient(180deg,#def8ff 0 18%,#7bd7ff 18% 42%,#265eb1 42% 100%); }
.bar-core-pattern {
  position:absolute; inset:6px 32px; z-index:2; opacity:0.45; pointer-events:none;
}
.hp-pattern { background:repeating-linear-gradient(135deg,rgba(255,255,255,0.22) 0 6px,rgba(0,0,0,0) 6px 12px); }
.level-pattern { background:repeating-linear-gradient(90deg,rgba(255,255,255,0.22) 0 5px,rgba(0,0,0,0) 5px 10px); }
.mana-pattern { background:repeating-linear-gradient(45deg,rgba(255,255,255,0.22) 0 5px,rgba(0,0,0,0) 5px 10px); }
.center-emblem {
  position:absolute; top:50%; left:50%; width:14px; height:14px; margin-left:-7px; margin-top:-7px; border:2px solid #000; z-index:4; box-shadow:inset 0 1px 0 rgba(255,255,255,0.22);
}
.hp-emblem { background:#ffb6a5; transform:rotate(45deg); }
.level-emblem { background:#ffe08b; clip-path:polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.mana-emblem { background:#a4ebff; border-radius:50% 50% 50% 0; transform:rotate(-45deg); }

/* ===== CHAT REWORK ===== */
#bottomleftcorner2 { background: transparent !important; border: none !important; }
.chat-frame {
  width:min(440px, 90vw);
  border:none !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0;
  pointer-events:none;
}
.chat-top {
  display:none;
}
.chat-frame .server-name {
  display:none;
}
.chat-gem {
  display:none;
}
.chat-box {
  border:none !important; padding:8px; display:flex; flex-direction:column; gap:8px;
  background:transparent !important;
  box-shadow:none !important;
  height: 200px;
  overflow-y: auto;
  pointer-events:auto;
  -ms-overflow-style: none;  /* IE/Edge */
  scrollbar-width: none;  /* Firefox */
}
.chat-box::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}
.chat-box .chatentry {
  display: none !important;
}
.chat-row {
  display:grid; grid-template-columns:32px 1fr; gap:10px; align-items:center;
}
.chat-row.server {
  grid-template-columns:1fr;
}
.chat-row.server .avatar {
  display: none;
}
.avatar {
  width:32px; height:32px; border:3px solid #000;
}
.avatar.knight { background:linear-gradient(#d8dbe2,#7f8795,#3f4350); }
.avatar.mage { background:linear-gradient(#d8b8ff,#7b4bc2,#3d215e); }
.avatar.scout { background:linear-gradient(#bce49a,#4d8c43,#223f1d); }
.bubble {
  padding:6px 10px; border:4px solid #000; color:#f7ead1;
  background:linear-gradient(180deg,#3c2618,#2b1c13);
  text-shadow:1px 1px 0 #000; font-size: 14px;
  clip-path:polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}
.chat-row.alt .bubble {
  background:linear-gradient(180deg,#1d355d,#152746);
}
.chat-sender {
  display: inline-block;
  font-size: 12px;
  color: #f2cf63;
  background: rgba(0,0,0,0.5);
  padding: 1px 5px;
  margin-bottom: 2px;
  border-left: 2px solid #5c3a22;
  letter-spacing: 0.5px;
}

/* ===== NEW DIALOG PANELS (Inventory, Sheets, etc.) ===== */
.pixel-art-panel {
  background: #120d0a;
  border: 4px solid #3c2618;
  box-shadow: inset 0 0 0 4px #000, 0 0 0 4px #000, 0 8px 15px rgba(0,0,0,0.6);
  padding: 10px;
  color: #e9d9b5;
  font-family: inherit;
}
.pixel-art-panel .panel-header {
  background: #23160f;
  border: 3px solid #000;
  padding: 8px 12px;
  margin-bottom: 15px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.05);
  text-align: center;
  font-size: 20px;
  letter-spacing: 2px;
  color: #f2cf63;
  text-shadow: 2px 2px 0 #000;
}

.slimefox-overlay-panel {
  width: 980px;
  max-width: calc(100vw - 48px);
  padding: 14px;
  overflow: hidden;
}
.modal.slimefox-centered-modal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  padding: 24px;
  box-sizing: border-box;
}
.modal.slimefox-centered-modal .imodal {
  margin: 0 !important;
  max-height: calc(100vh - 48px);
}
.modal.slimefox-achievement-modal {
  align-items: center;
}
.modal.slimefox-achievement-modal .imodal {
  overflow: hidden;
}
.slimefox-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.slimefox-overlay-copy {
  min-width: 0;
}
.slimefox-overlay-title {
  color: #f2cf63;
  font-size: 28px;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 #000;
}
.slimefox-overlay-subtitle {
  color: #b7a98c;
  font-size: 13px;
  margin-top: 4px;
}
.slimefox-overlay-close {
  width: 52px;
  height: 52px;
  padding: 0;
  flex: 0 0 auto;
}
.slimefox-overlay-close .btn-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #f7ead1;
}
.slimefox-achievement-shell {
  width: 920px;
  height: min(680px, calc(100vh - 72px));
  max-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #11130f;
  border-color: #253126;
  box-shadow: inset 0 0 0 4px #000, 0 0 0 4px #000, 0 10px 24px rgba(0,0,0,0.62);
}
.slimefox-achievement-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  margin-bottom: 12px;
  background: #18211b;
  border: 3px solid #2d5443;
  box-shadow: inset 0 0 0 2px #000;
}
.slimefox-achievement-hero .slimefox-overlay-title {
  letter-spacing: 0;
}
.slimefox-achievement-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.slimefox-achievement-summary-card {
  min-height: 62px;
  padding: 9px 10px;
  background: #171914;
  border: 3px solid #2d5443;
  box-shadow: inset 0 0 0 2px #000;
}
.slimefox-achievement-summary-label {
  color: #9fb89a;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.slimefox-achievement-summary-value {
  color: #f2cf63;
  font-size: 26px;
  line-height: 30px;
  text-shadow: 2px 2px 0 #000;
}
.slimefox-achievement-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.slimefox-achievement-filter-btn {
  min-width: 118px;
}
.slimefox-achievement-list {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  gap: 9px;
  max-height: none;
  overflow-y: auto;
  padding-right: 6px;
}
.slimefox-achievement-contract {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 10px;
  background: #151812;
  border: 3px solid #273427;
  box-shadow: inset 0 0 0 2px #000;
}
.slimefox-achievement-contract.claimable {
  border-color: #4f8e5d;
  background: #172117;
}
.slimefox-achievement-contract.claimed {
  border-color: #6f7b45;
  background: #1c2017;
}
.slimefox-achievement-contract-main {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.slimefox-achievement-mark {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #223b35;
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px #4f8e5d;
  color: #d7f2a1;
  font-size: 24px;
  text-shadow: 2px 2px 0 #000;
}
.slimefox-achievement-contract-copy {
  min-width: 0;
}
.slimefox-achievement-contract-title {
  color: #f7ead1;
  font-size: 18px;
  line-height: 22px;
  overflow-wrap: anywhere;
  text-shadow: 2px 2px 0 #000;
}
.slimefox-achievement-contract-meta {
  color: #9fb89a;
  font-size: 13px;
  margin-top: 4px;
}
.slimefox-achievement-progress {
  height: 12px;
  margin-top: 8px;
  background: #090b08;
  border: 2px solid #000;
  overflow: hidden;
}
.slimefox-achievement-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4f8e5d, #d3d86a);
}
.slimefox-achievement-contract-action {
  display: grid;
  grid-template-rows: 38px 38px;
  gap: 8px;
  justify-items: stretch;
}
.slimefox-achievement-status {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #0c0f0b;
  border: 2px solid #2d5443;
  color: #f2cf63;
  font-size: 12px;
  text-align: center;
}
.slimefox-achievement-token-reward {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d7f2a1;
  background: #142118;
  border: 2px solid #273427;
  font-size: 13px;
}
.slimefox-achievement-claim-btn {
  height: 38px;
  min-height: 38px;
}
.slimefox-achievement-empty {
  padding: 18px;
  color: #d7c49a;
  background: #151812;
  border: 3px solid #273427;
  box-shadow: inset 0 0 0 2px #000;
  text-align: center;
}
.slimefox-panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.slimefox-panel-tab {
  min-width: 112px;
  background: #1b120d;
  border: 3px solid #3c2618;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  color: #d7c49a;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  text-shadow: 1px 1px 0 #000;
  cursor: pointer;
}
.slimefox-panel-tab small {
  display: block;
  color: #9f947d;
  font-size: 11px;
  margin-top: 4px;
}
.slimefox-panel-tab.active {
  background: #2a1d14;
  border-color: #c08a39;
  color: #f7e3a3;
}
.slimefox-panel-card {
  background: #17100c;
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  padding: 10px;
  margin-bottom: 12px;
}
.slimefox-panel-card-title {
  color: #f2cf63;
  font-size: 16px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
  margin-bottom: 8px;
}
.slimefox-travel-shell {
  width: 1080px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 90px);
  overflow: hidden;
}
.slimefox-travel-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(55,35,20,0.98) 0%, rgba(29,18,11,0.98) 100%);
  border: 3px solid #4e3420;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.4);
}
.slimefox-travel-hero-copy {
  min-width: 0;
}
.slimefox-travel-hero-title {
  color: #cdb690;
  font-size: 12px;
  letter-spacing: 1px;
}
.slimefox-travel-hero-subtitle {
  color: #f7ead1;
  font-size: 24px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.slimefox-travel-hero-badge {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #f2cf63 0%, #b97722 100%);
  border: 3px solid #000;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2), 0 4px 0 rgba(0,0,0,0.35);
  color: #23160f;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 9px 12px;
  text-transform: uppercase;
}
.slimefox-travel-body {
  max-height: calc(100vh - 255px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.slimefox-travel-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.slimefox-travel-section {
  background: #17100c;
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  padding: 12px;
  margin-bottom: 12px;
}
.slimefox-travel-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.slimefox-travel-section-title {
  color: #f2cf63;
  font-size: 16px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}
.slimefox-travel-section-subtitle {
  color: #a99b7d;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.45;
}
.slimefox-travel-section-meta {
  flex: 0 0 auto;
  color: #f7e3a3;
  font-size: 12px;
  background: #23160f;
  border: 2px solid #4e3420;
  box-shadow: inset 0 0 0 1px #000;
  padding: 6px 9px;
  white-space: nowrap;
}
.slimefox-travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.slimefox-travel-card {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(45,29,18,0.98) 0%, rgba(24,15,10,0.98) 100%);
  border: 3px solid #4b311d;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.4);
  color: #eadfc5;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease;
}
.slimefox-travel-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  border-color: #c08a39;
}
.slimefox-travel-card:active {
  transform: translateY(1px);
}
.slimefox-travel-card-art {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #2d1d13 0%, #1a120d 100%);
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000;
  overflow: hidden;
}
.slimefox-travel-card-copy {
  min-width: 0;
}
.slimefox-travel-card-name {
  color: #f7ead1;
  font-size: 18px;
  text-shadow: 1px 1px 0 #000;
  overflow-wrap: anywhere;
}
.slimefox-travel-card-subtitle {
  color: #b9ab8a;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.slimefox-travel-card-action {
  align-self: center;
  background: linear-gradient(180deg, #f2cf63 0%, #b97722 100%);
  border: 3px solid #000;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.18), 0 4px 0 rgba(0,0,0,0.35);
  color: #23160f;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 10px;
  white-space: nowrap;
}
.slimefox-travel-card.monster .slimefox-travel-card-action {
  background: linear-gradient(180deg, #ffbf87 0%, #c55a1f 100%);
}
.slimefox-travel-card.npc .slimefox-travel-card-action {
  background: linear-gradient(180deg, #e6d9a2 0%, #b08a3a 100%);
}
.slimefox-travel-empty {
  color: #b7a98c;
  background: rgba(255,255,255,0.03);
  border: 2px dashed #4a3525;
  padding: 16px;
  text-align: center;
  line-height: 1.5;
}
.slimefox-travel-place-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.slimefox-travel-place-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(39,25,17,0.98) 0%, rgba(23,15,10,0.98) 100%);
  border: 3px solid #4b311d;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.4);
  color: #eadfc5;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.slimefox-travel-place-btn.current {
  border-color: #c08a39;
  background: linear-gradient(180deg, rgba(62,41,22,0.98) 0%, rgba(28,18,11,0.98) 100%);
}
.slimefox-travel-place-name {
  color: #f7ead1;
  font-size: 15px;
  text-shadow: 1px 1px 0 #000;
  overflow-wrap: anywhere;
}
.slimefox-travel-place-action {
  flex: 0 0 auto;
  color: #f2cf63;
  font-size: 12px;
  letter-spacing: 1px;
}
.slimefox-skills-shell {
  width: 1100px;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 90px);
  overflow: hidden;
}
.slimefox-skills-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-height: calc(100vh - 210px);
}
.slimefox-skills-preview {
  min-width: 0;
  min-height: 420px;
  max-height: calc(100vh - 210px);
  background: #17100c;
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
}
.slimefox-skills-preview-empty {
  color: #a99b7d;
  font-size: 13px;
  line-height: 1.5;
}
.slimefox-skills-content {
  min-width: 0;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  padding-right: 4px;
}
.slimefox-skills-mapping-row,
.slimefox-skills-grid-row {
  display: flex;
  flex-wrap: nowrap;
}
.slimefox-skills-mapping-row .itemui,
.slimefox-skills-grid-row .itemui {
  margin-right: 4px;
  margin-bottom: 4px;
}
.slimefox-leaderboard-shell {
  width: 920px;
  max-width: calc(100vw - 48px);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 110px);
  margin: 0 auto;
}
.slimefox-leaderboard-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  padding-right: 4px;
}
.slimefox-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}
.slimefox-leaderboard-entry {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: #17100c;
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  padding: 10px 12px;
}
.slimefox-leaderboard-rank {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a1d14;
  border: 3px solid #c08a39;
  color: #f7e3a3;
  font-size: 18px;
  text-shadow: 1px 1px 0 #000;
}
.slimefox-leaderboard-meta {
  min-width: 0;
}
.slimefox-leaderboard-name {
  color: #f7ead1;
  font-size: 18px;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slimefox-leaderboard-extra {
  color: #a99b7d;
  font-size: 12px;
  margin-top: 4px;
}
.slimefox-leaderboard-value {
  color: #f0d77a;
  font-size: 18px;
  text-align: right;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}
.slimefox-leaderboard-empty {
  background: #17100c;
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  color: #b7a98c;
  padding: 18px;
  text-align: center;
}
.slimefox-leaderboard-foot {
  margin-top: 10px;
  color: #998a6c;
  font-size: 12px;
  text-align: right;
}
.slimefox-skill-detail-card {
  background: linear-gradient(180deg, rgba(31,21,14,0.98) 0%, rgba(13,9,6,0.98) 100%);
  border: 3px solid #4b311d;
  box-shadow: inset 0 0 0 2px #000, 0 6px 0 rgba(0,0,0,0.45);
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  color: #eadfc5;
}
.slimefox-skill-detail-header {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  margin-bottom: 12px;
}
.slimefox-skill-detail-icon {
  flex: 0 0 auto;
}
.slimefox-skill-detail-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.slimefox-skill-detail-title {
  color: #f2cf63;
  font-size: 20px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
  overflow-wrap: anywhere;
}
.slimefox-skill-detail-subtitle {
  color: #a99b7d;
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 1px;
}
.slimefox-skill-detail-text {
  color: #e1d3b2;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.slimefox-skill-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slimefox-skill-stat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  min-width: 0;
  gap: 12px;
  padding: 7px 9px;
  background: rgba(255,255,255,0.03);
  border: 2px solid #332115;
}
.slimefox-skill-stat-label {
  color: #a99b7d;
  font-size: 12px;
  flex: 1 1 110px;
  min-width: 0;
}
.slimefox-skill-stat-value {
  color: #f7ead1;
  font-size: 13px;
  text-align: right;
  flex: 1 1 120px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.slimefox-skill-stat-value.muted {
  color: #d1c4a7;
}
.slimefox-skill-stat-value.mana {
  color: #72b7ff;
}
.slimefox-skill-stat-value.arcane {
  color: #c9a7ff;
}
.slimefox-skill-stat-value.emerald {
  color: #8ad27a;
}
.slimefox-skill-stat-value.gold {
  color: #f2cf63;
}
.slimefox-skill-consume {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #5a432f;
}
.slimefox-skill-consume-label {
  color: #a99b7d;
  font-size: 12px;
  margin-bottom: 6px;
}
.slimefox-skill-consume-item {
  display: inline-flex;
}
.slimefox-skill-json-btn {
  width: 100%;
  margin-top: 12px;
  height: 44px;
}
.slimefox-skill-json-btn .btn-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7ead1;
  font-size: 13px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
  text-align: center;
  white-space: normal;
  line-height: 1.1;
  padding: 0 10px;
}
.slimefox-admin-shell {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9010;
  width: min(1080px, calc(100vw - 48px));
  max-height: calc(100vh - 120px);
  padding: 16px;
  overflow: visible;
}
.slimefox-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}
.slimefox-admin-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slimefox-admin-section {
  position: relative;
  background: #17100c;
  border: 3px solid #2f1d12;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 rgba(0,0,0,0.45);
  padding: 12px;
}
.slimefox-admin-field-label {
  color: #a99b7d;
  font-size: 12px;
  margin-bottom: 8px;
}
.slimefox-admin-note {
  color: #998a6c;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}
.slimefox-admin-target-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slimefox-admin-target-input {
  flex: 1 1 auto;
}
.slimefox-admin-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  background: #2a1d14;
  border: 3px solid #c08a39;
  color: #f7e3a3;
  font-size: 11px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}
.slimefox-admin-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.slimefox-admin-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 86px auto;
  gap: 10px;
  align-items: center;
}
.slimefox-admin-qty-input {
  width: 86px;
}
.slimefox-admin-action-btn {
  min-width: 188px;
  height: 48px;
}
.slimefox-admin-compact-btn {
  min-width: 86px;
  height: 44px;
}
.slimefox-admin-action-btn .btn-icon,
.slimefox-admin-compact-btn .btn-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7ead1;
  font-size: 14px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}
.slimefox-admin-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #4a3525;
  color: #b7a98c;
  font-size: 13px;
}
.slimefox-admin-status-line:last-of-type {
  border-bottom: none;
}
.slimefox-admin-status-line strong {
  color: #f7ead1;
  font-size: 14px;
  text-align: right;
}
.slimefox-admin-item-picker {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 2px);
  max-height: 240px;
  overflow-y: auto;
  background: #110c09;
  border: 3px solid #3c2618;
  box-shadow: inset 0 0 0 2px #000, 0 6px 0 rgba(0,0,0,0.4);
  padding: 10px;
  z-index: 20;
}
@media (max-width: 1024px) {
  .slimefox-overlay-panel,
  .slimefox-achievement-shell,
  .slimefox-travel-shell,
  .slimefox-skills-shell,
  .slimefox-leaderboard-shell {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }
  .slimefox-achievement-summary,
  .slimefox-achievement-contract {
    grid-template-columns: 1fr;
  }
  .slimefox-achievement-list {
    max-height: none;
  }
  .slimefox-achievement-filter-btn {
    min-width: 0;
    flex: 1 1 132px;
  }
  .slimefox-travel-hero,
  .slimefox-travel-section-header,
  .slimefox-travel-card,
  .slimefox-travel-place-btn {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
  .slimefox-travel-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .slimefox-travel-card-action {
    grid-column: 1 / -1;
  }
  .slimefox-travel-body {
    max-height: calc(100vh - 300px);
  }
  .slimefox-travel-grid,
  .slimefox-travel-place-list {
    grid-template-columns: 1fr;
  }
  .slimefox-skills-layout {
    grid-template-columns: 1fr;
  }
  .slimefox-skills-shell,
  .slimefox-skills-layout,
  .slimefox-skills-preview,
  .slimefox-skills-content {
    max-height: none;
  }
  .slimefox-leaderboard-entry {
    grid-template-columns: 54px minmax(0, 1fr);
  }
  .slimefox-leaderboard-value {
    grid-column: 2;
    text-align: left;
  }
  .slimefox-leaderboard-body {
    max-height: calc(100vh - 320px);
  }
  .slimefox-admin-shell {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 90px);
    top: 68px;
  }
  .slimefox-admin-grid {
    grid-template-columns: 1fr;
  }
  .slimefox-admin-item-row {
    grid-template-columns: 1fr 1fr;
  }
  #admin-item {
    grid-column: 1 / -1;
  }
  .slimefox-admin-qty-input {
    width: 100%;
  }
}

.inventory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #23160f;
  border: 3px solid #000;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.05);
}
.inventory-toolbar-copy { text-align: left; }
.inventory-title { color: #f2cf63; font-size: 18px; font-weight: bold; letter-spacing: 1px; text-shadow: 2px 2px 0 #000; }
.inventory-subtitle { color: #c9b995; font-size: 13px; margin-top: -2px; }
.inventory-gear-shell {
  background: #1a1614;
  border: 3px solid #3c2a1a;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 2px #000, 0 4px 0 #000;
}
.inventory-gear-title {
  color: #f2cf63;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.inventory-gear-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

/* Character Sheet / Profile List Styles */
.pixel-art-panel > div[style*="padding:0 12px"] > div {
  padding: 4px 0;
  border-bottom: 1px solid #23160f;
  display: flex;
  justify-content: space-between;
}
.pixel-art-panel div[style*="padding:0 12px"] > div:last-child {
  border-bottom: none;
}
.pixel-art-panel span[style*="color:gray"], .pixel-art-panel span[style*="color: gray"] {
  color: #a69fb0 !important;
  font-weight: bold;
}
.pixel-art-panel div[style*="border-bottom"] {
  border-color: #3c2a1a !important;
}

/* Guide Article Content Overrides */
.guide-article-panel p, .guide-article-panel {
  color: #e8d7b5 !important;
}
.guide-article-panel .title {
  color: #ffcc00 !important;
  text-shadow: 2px 2px 0px #3c2a1a;
  border-bottom: 2px solid #8b5a2b;
  padding-bottom: 5px;
  margin-bottom: 15px;
}
.guide-article-panel .title.mt15 {
  margin-top: 25px !important;
}
.guide-article-panel .divider,
.guide-article-panel div[style*="background-color: gray"],
.guide-article-panel div[style*="background-color:gray"] {
  background-color: #3c2a1a !important;
  height: 4px !important;
  border: none !important;
}
.guide-article-panel div[style*="background-color: #58595b"] {
  background-color: #2b1f17 !important;
  border: 2px solid #1a1614 !important;
  color: #ffcc00 !important;
  box-shadow: none !important;
  text-shadow: 1px 1px 0px #000;
  border-radius: 2px;
}
.guide-article-panel div[style*="border: 4px solid #2b5b89"] {
  border: 4px solid #3c2a1a !important;
  background-color: #1a1614 !important;
  padding: 8px !important;
  border-radius: 4px;
}
/* Force article buttons to look like wood hotbar buttons */
.guide-article-panel .gamebutton {
  background-color: #8b5a2b !important;
  border: 2px solid #1a1614 !important;
  color: #e4d5b7 !important;
  box-shadow: inset 0 2px 0 #c08a39, inset 0 -2px 0 #4f2c17 !important;
  text-shadow: 1px 1px 0px #000;
  border-radius: 2px;
}
.guide-article-panel .gamebutton:hover {
  background-color: #c08a39 !important;
  box-shadow: inset 0 2px 0 #f3dfaa, inset 0 -2px 0 #8b5a2b !important;
}
/* Re-color the inner <span style="color: #909292"> arrows to parchment */
.guide-article-panel span[style*="color: #909292"] {
  color: #e8d7b5 !important;
}

/* === MEDIEVAL PARTY DISPLAY ABOVE CHAT === */
.medieval-party-display {
	width: 220px;
	max-width: min(220px, calc(100vw - 24px));
	background: linear-gradient(180deg, #352217 0%, #26180f 100%);
	border: 4px solid #1a0f08;
	box-shadow: 0 8px 24px rgba(0,0,0,0.7);
	z-index: 100;
	font-family: pixel, "Courier New", monospace;
	image-rendering: pixelated;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	padding: 4px;
	margin-bottom: 8px;
	position: static;
}

.medieval-party-member {
	flex: 1 1 auto;
	background: #3d2818;
	border: 2px solid #1a0f08;
	padding: 6px 7px;
	cursor: pointer;
	box-sizing: border-box;
}
.medieval-party-member:hover {
	background: #4d3422;
}

.medieval-party-member-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}
	
.medieval-party-member-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 12px;
	font-weight: 700;
	color: #f6e5b2;
	margin-bottom: 3px;
	text-shadow: 1px 1px 0 #1a0f08, 0 0 8px rgba(240, 200, 74, 0.15);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.medieval-party-member-hptext {
	flex: 0 0 auto;
	font-size: 10px;
	line-height: 10px;
	color: #f0c84a;
	white-space: nowrap;
	text-shadow: 1px 1px 0 #1a0f08;
}

.medieval-party-member-bars {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.medieval-party-bar {
	height: 6px;
	background: #1a0f08;
	border: 1px solid #1a0f08;
	overflow: hidden;
}

.medieval-party-bar-fill {
	height: 100%;
}
.medieval-party-bar-fill.hp {
	background: linear-gradient(180deg, #c94a4a 0%, #8b2e2e 100%);
}
.medieval-party-bar-fill.mp {
	background: linear-gradient(180deg, #4a7ac9 0%, #2e4f8b 100%);
}

.npc-dialog-shell {
	background: linear-gradient(180deg, rgba(27, 18, 10, 0.98) 0%, rgba(11, 7, 4, 0.98) 100%) !important;
	border: 3px solid #402616 !important;
	box-shadow: 0 0 0 3px #8d5826, 0 16px 32px rgba(0,0,0,0.38) !important;
}

.npc-dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.npc-dialog-title {
	flex: 1 1 auto;
	min-width: 0 !important;
	padding: 8px 12px !important;
	font-size: 14px !important;
	line-height: 14px !important;
	text-transform: uppercase;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: default !important;
	pointer-events: none;
}

.npc-dialog-close {
	flex: 0 0 42px;
	width: 42px;
	min-width: 42px !important;
	min-height: 42px !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: 16px !important;
	line-height: 16px !important;
}

.target-character-shell {
	min-width: min(360px, calc(100vw - 32px)) !important;
	max-width: min(360px, calc(100vw - 32px)) !important;
	padding: 12px !important;
}

.target-character-shell .self-character-header {
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	padding-bottom: 8px;
}

.target-character-shell .self-character-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 92px;
	gap: 10px;
	align-items: start;
}

.target-character-shell .self-character-left-column {
	min-width: 0;
}

.target-character-shell .self-character-pillbox {
	justify-content: flex-start;
	gap: 4px;
}

.target-character-shell .self-character-pill {
	padding: 3px 6px;
	font-size: 10px;
	line-height: 10px;
}

.target-character-name-btn {
	min-width: 0 !important;
	padding: 8px 12px !important;
	font-size: 14px !important;
	line-height: 14px !important;
}

.target-character-shell .self-character-sub {
	margin-top: 6px;
	font-size: 11px;
	line-height: 14px;
}

.target-character-shell .self-character-stat-grid {
	gap: 6px;
	margin-bottom: 10px;
}

.target-character-shell .self-character-stat-card {
	padding: 6px 8px;
}

.target-character-shell .self-character-stat-label {
	font-size: 10px;
	line-height: 10px;
	margin-bottom: 4px;
}

.target-character-shell .self-character-stat-value {
	font-size: 13px;
	line-height: 14px;
}

.target-character-shell .self-character-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.target-character-action-btn {
	width: 100%;
	min-width: 0 !important;
	min-height: 38px !important;
	padding: 8px 8px !important;
	font-size: 11px !important;
	line-height: 11px !important;
	text-align: center;
}

.target-character-action-btn.support {
	background: linear-gradient(180deg, #4c5f2a 0%, #253014 100%) !important;
	color: #edf7d0 !important;
}

.target-character-action-btn.secondary {
	background: linear-gradient(180deg, #5b3a22 0%, #2d1c10 100%) !important;
	color: #f5ddb2 !important;
}

.target-character-shell .self-character-portrait-column {
	width: 92px;
}

.target-character-portrait-frame {
	min-height: 112px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.target-character-shell .self-character-portrait-caption {
	font-size: 10px;
	line-height: 14px;
	margin-top: 6px;
}

.target-character-slots {
	width: fit-content;
	max-width: min(360px, calc(100vw - 32px));
}

.target-character-slots-title {
	font-size: 11px !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--px-goldbr) !important;
	margin-bottom: 8px;
}

@media (max-width: 600px) {
	.target-character-shell {
		min-width: min(320px, calc(100vw - 24px)) !important;
		max-width: min(320px, calc(100vw - 24px)) !important;
	}

	.target-character-shell .self-character-body {
		grid-template-columns: 1fr;
	}

	.target-character-shell .self-character-portrait-column {
		width: auto;
	}

	.target-character-shell .self-character-actions {
		grid-template-columns: 1fr;
	}
}

/* Hotbar MP Bar */
.hotbar-mp-container {
	position: relative;
	width: 100%;
	height: 12px;
	background: #1a0f08;
	border: 2px solid #5c4033;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 8px;
}

.hotbar-mp-fill {
	height: 100%;
	background: linear-gradient(180deg, #4a7ac9 0%, #2e4f8b 100%);
	transition: width 0.2s ease;
}

.hotbar-mp-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 10px;
	font-weight: bold;
	color: #fff;
	text-shadow: 1px 1px 2px #000;
	pointer-events: none;
}
